Loading src/com/android/customization/picker/CustomizationPickerActivity.java +12 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.util.Log; import android.view.Gravity; import android.view.Menu; import android.view.MenuItem; import android.view.View; import androidx.annotation.IdRes; import androidx.annotation.NonNull; Loading Loading @@ -101,6 +102,7 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal private static final Map<Integer, CustomizationSection> mSections = new HashMap<>(); private CategoryFragment mWallpaperCategoryFragment; private BottomActionBar mBottomActionBar; private boolean mWallpaperCategoryInitialized; Loading Loading @@ -137,6 +139,15 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal ? R.id.nav_wallpaper : R.id.nav_theme); } } mBottomActionBar = findViewById(R.id.bottom_actionbar); mBottomActionBar.getViewTreeObserver().addOnGlobalLayoutListener(() -> { // Only update the visibility of mBottomNav when mBottomActionBar visibility changes. // Since the listener will be triggered by mBottomActionBar and its child views. if (mBottomActionBar.getVisibility() == mBottomNav.getVisibility()) { mBottomNav.setVisibility(mBottomActionBar.isVisible() ? View.GONE : View.VISIBLE); } }); } @Override Loading Loading @@ -413,7 +424,7 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal @Override public BottomActionBar getBottomActionBar() { return findViewById(R.id.bottom_actionbar); return mBottomActionBar; } /** Loading Loading
src/com/android/customization/picker/CustomizationPickerActivity.java +12 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.util.Log; import android.view.Gravity; import android.view.Menu; import android.view.MenuItem; import android.view.View; import androidx.annotation.IdRes; import androidx.annotation.NonNull; Loading Loading @@ -101,6 +102,7 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal private static final Map<Integer, CustomizationSection> mSections = new HashMap<>(); private CategoryFragment mWallpaperCategoryFragment; private BottomActionBar mBottomActionBar; private boolean mWallpaperCategoryInitialized; Loading Loading @@ -137,6 +139,15 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal ? R.id.nav_wallpaper : R.id.nav_theme); } } mBottomActionBar = findViewById(R.id.bottom_actionbar); mBottomActionBar.getViewTreeObserver().addOnGlobalLayoutListener(() -> { // Only update the visibility of mBottomNav when mBottomActionBar visibility changes. // Since the listener will be triggered by mBottomActionBar and its child views. if (mBottomActionBar.getVisibility() == mBottomNav.getVisibility()) { mBottomNav.setVisibility(mBottomActionBar.isVisible() ? View.GONE : View.VISIBLE); } }); } @Override Loading Loading @@ -413,7 +424,7 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal @Override public BottomActionBar getBottomActionBar() { return findViewById(R.id.bottom_actionbar); return mBottomActionBar; } /** Loading