mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-24 18:08:23 +01:00
Fix the bottom app bar shows under the nav bar. Fix the bottom app bar vanishes after orientation change.
This commit is contained in:
parent
d4d3db8343
commit
8c454d52c7
@ -202,15 +202,21 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
|
|
||||||
int navBarResourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android");
|
int navBarResourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android");
|
||||||
if (navBarResourceId > 0) {
|
if (navBarResourceId > 0) {
|
||||||
|
int navBarHeight = resources.getDimensionPixelSize(navBarResourceId);
|
||||||
CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) fab.getLayoutParams();
|
CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) fab.getLayoutParams();
|
||||||
params.bottomMargin = resources.getDimensionPixelSize(navBarResourceId);
|
params.bottomMargin = navBarHeight;
|
||||||
fab.setLayoutParams(params);
|
fab.setLayoutParams(params);
|
||||||
|
linearLayoutBottomAppBar.setPadding(0,
|
||||||
|
(int) (6 * resources.getDisplayMetrics().density), 0, navBarHeight);
|
||||||
|
|
||||||
showToast = true;
|
showToast = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showBottomAppBar = mSharedPreferences.getBoolean(SharedPreferencesUtils.BOTTOM_APP_BAR_KEY, false);
|
||||||
|
lockBottomAppBar = mSharedPreferences.getBoolean(SharedPreferencesUtils.LOCK_BOTTOM_APP_BAR, false);
|
||||||
|
|
||||||
subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME_KEY);
|
subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME_KEY);
|
||||||
|
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
@ -272,9 +278,6 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
toolbar.setLayoutParams(toolbarParams);
|
toolbar.setLayoutParams(toolbarParams);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
|
|
||||||
showBottomAppBar = mSharedPreferences.getBoolean(SharedPreferencesUtils.BOTTOM_APP_BAR_KEY, false);
|
|
||||||
lockBottomAppBar = mSharedPreferences.getBoolean(SharedPreferencesUtils.LOCK_BOTTOM_APP_BAR, false);
|
|
||||||
|
|
||||||
glide = Glide.with(this);
|
glide = Glide.with(this);
|
||||||
|
|
||||||
mSubredditViewModel = new ViewModelProvider(this,
|
mSubredditViewModel = new ViewModelProvider(this,
|
||||||
|
Loading…
Reference in New Issue
Block a user