From 9edef2643bdcf166f3d55491874bbdc5f963d0d1 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 27 Jan 2021 16:53:33 +0200 Subject: [PATCH] Fix #10682 --- .../net/osmand/plus/base/MenuBottomSheetDialogFragment.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/base/MenuBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/base/MenuBottomSheetDialogFragment.java index 9f97a07563..e4f0c6fa58 100644 --- a/OsmAnd/src/net/osmand/plus/base/MenuBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/base/MenuBottomSheetDialogFragment.java @@ -372,7 +372,7 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra private void setupDismissButton() { dismissButton = buttonsContainer.findViewById(R.id.dismiss_button); - dismissButton.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, getDismissButtonHeight())); + dismissButton.getLayoutParams().height = getDismissButtonHeight(); int buttonTextId = getDismissButtonTextId(); if (buttonTextId != DEFAULT_VALUE) { UiUtilities.setupDialogButton(nightMode, dismissButton, getDismissButtonType(), buttonTextId); @@ -389,7 +389,7 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra private void setupRightButton() { rightButton = buttonsContainer.findViewById(R.id.right_bottom_button); - rightButton.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, getRightButtonHeight())); + rightButton.getLayoutParams().height = getRightButtonHeight(); int buttonTextId = getRightBottomButtonTextId(); if (buttonTextId != DEFAULT_VALUE) { UiUtilities.setupDialogButton(nightMode, rightButton, getRightBottomButtonType(), buttonTextId); @@ -412,7 +412,7 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra protected void setupThirdButton() { thirdButton = buttonsContainer.findViewById(R.id.third_button); - thirdButton.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, getThirdButtonHeight())); + thirdButton.getLayoutParams().height = getThirdButtonHeight(); int buttonTextId = getThirdBottomButtonTextId(); if (buttonTextId != DEFAULT_VALUE) { UiUtilities.setupDialogButton(nightMode, thirdButton, getThirdBottomButtonType(), buttonTextId);