revert changing menu
This commit is contained in:
parent
c10af7f927
commit
dbd348cec8
1 changed files with 12 additions and 13 deletions
|
@ -72,25 +72,24 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
|
|||
final View scrollView = mainView.findViewById(scrollViewId);
|
||||
int scrollViewHeight = scrollView.getHeight();
|
||||
int dividerHeight = AndroidUtils.dpToPx(getContext(), 1);
|
||||
int shadowHeight = AndroidUtils.dpToPx(getContext(), 15);
|
||||
int cancelButtonHeight = getContext().getResources().getDimensionPixelSize(R.dimen.bottom_sheet_cancel_button_height);
|
||||
int spaceForScrollView = screenHeight - statusBarHeight - dividerHeight - cancelButtonHeight;
|
||||
int spaceForScrollView = screenHeight - statusBarHeight - navBarHeight - dividerHeight - cancelButtonHeight;
|
||||
if (scrollViewHeight > spaceForScrollView) {
|
||||
scrollView.getLayoutParams().height = spaceForScrollView;
|
||||
scrollView.requestLayout();
|
||||
}
|
||||
|
||||
// if (AndroidUiHelper.isOrientationPortrait(activity)) {
|
||||
// AndroidUtils.setBackground(activity, mainView, nightMode, R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark);
|
||||
// } else {
|
||||
// if (screenHeight - statusBarHeight - mainView.getHeight() >= getResources().getDimension(R.dimen.bottom_sheet_content_padding_small)) {
|
||||
// AndroidUtils.setBackground(activity, mainView, nightMode,
|
||||
// R.drawable.bg_bottom_sheet_topsides_landscape_light, R.drawable.bg_bottom_sheet_topsides_landscape_dark);
|
||||
// } else {
|
||||
// AndroidUtils.setBackground(activity, mainView, nightMode,
|
||||
// R.drawable.bg_bottom_sheet_sides_landscape_light, R.drawable.bg_bottom_sheet_sides_landscape_dark);
|
||||
// }
|
||||
// }
|
||||
if (AndroidUiHelper.isOrientationPortrait(activity)) {
|
||||
AndroidUtils.setBackground(activity, mainView, nightMode, R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark);
|
||||
} else {
|
||||
if (screenHeight - statusBarHeight - mainView.getHeight() >= getResources().getDimension(R.dimen.bottom_sheet_content_padding_small)) {
|
||||
AndroidUtils.setBackground(activity, mainView, nightMode,
|
||||
R.drawable.bg_bottom_sheet_topsides_landscape_light, R.drawable.bg_bottom_sheet_topsides_landscape_dark);
|
||||
} else {
|
||||
AndroidUtils.setBackground(activity, mainView, nightMode,
|
||||
R.drawable.bg_bottom_sheet_sides_landscape_light, R.drawable.bg_bottom_sheet_sides_landscape_dark);
|
||||
}
|
||||
}
|
||||
|
||||
ViewTreeObserver obs = mainView.getViewTreeObserver();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
|
|
Loading…
Reference in a new issue