From c4325392098058b88bf5f6c39eabccc34eea53ab Mon Sep 17 00:00:00 2001 From: Alexander Sytnyk Date: Fri, 12 Jan 2018 15:14:16 +0200 Subject: [PATCH] Fix additional options menu width in landscape --- .../AdditionalActionsBottomSheetDialogFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/AdditionalActionsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/AdditionalActionsBottomSheetDialogFragment.java index 4af9abc7c7..cd5da18e10 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/AdditionalActionsBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/AdditionalActionsBottomSheetDialogFragment.java @@ -140,7 +140,8 @@ public class AdditionalActionsBottomSheetDialogFragment extends net.osmand.plus. if (!portrait) { final Window window = getDialog().getWindow(); WindowManager.LayoutParams params = window.getAttributes(); - params.width = getActivity().getResources().getDimensionPixelSize(R.dimen.landscape_bottom_sheet_dialog_fragment_width); + params.width = getResources().getDimensionPixelSize(R.dimen.landscape_bottom_sheet_dialog_fragment_width) + + AndroidUtils.dpToPx(getContext(), 16); // 8 dp is shadow width on each side window.setAttributes(params); } }