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);
|
final View scrollView = mainView.findViewById(scrollViewId);
|
||||||
int scrollViewHeight = scrollView.getHeight();
|
int scrollViewHeight = scrollView.getHeight();
|
||||||
int dividerHeight = AndroidUtils.dpToPx(getContext(), 1);
|
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 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) {
|
if (scrollViewHeight > spaceForScrollView) {
|
||||||
scrollView.getLayoutParams().height = spaceForScrollView;
|
scrollView.getLayoutParams().height = spaceForScrollView;
|
||||||
scrollView.requestLayout();
|
scrollView.requestLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (AndroidUiHelper.isOrientationPortrait(activity)) {
|
if (AndroidUiHelper.isOrientationPortrait(activity)) {
|
||||||
// AndroidUtils.setBackground(activity, mainView, nightMode, R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark);
|
AndroidUtils.setBackground(activity, mainView, nightMode, R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark);
|
||||||
// } else {
|
} else {
|
||||||
// if (screenHeight - statusBarHeight - mainView.getHeight() >= getResources().getDimension(R.dimen.bottom_sheet_content_padding_small)) {
|
if (screenHeight - statusBarHeight - mainView.getHeight() >= getResources().getDimension(R.dimen.bottom_sheet_content_padding_small)) {
|
||||||
// AndroidUtils.setBackground(activity, mainView, nightMode,
|
AndroidUtils.setBackground(activity, mainView, nightMode,
|
||||||
// R.drawable.bg_bottom_sheet_topsides_landscape_light, R.drawable.bg_bottom_sheet_topsides_landscape_dark);
|
R.drawable.bg_bottom_sheet_topsides_landscape_light, R.drawable.bg_bottom_sheet_topsides_landscape_dark);
|
||||||
// } else {
|
} else {
|
||||||
// AndroidUtils.setBackground(activity, mainView, nightMode,
|
AndroidUtils.setBackground(activity, mainView, nightMode,
|
||||||
// R.drawable.bg_bottom_sheet_sides_landscape_light, R.drawable.bg_bottom_sheet_sides_landscape_dark);
|
R.drawable.bg_bottom_sheet_sides_landscape_light, R.drawable.bg_bottom_sheet_sides_landscape_dark);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
ViewTreeObserver obs = mainView.getViewTreeObserver();
|
ViewTreeObserver obs = mainView.getViewTreeObserver();
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||||
|
|
Loading…
Reference in a new issue