Fix additional options menu width in landscape

This commit is contained in:
Alexander Sytnyk 2018-01-12 15:14:16 +02:00
parent a69e44a7c1
commit c432539209

View file

@ -140,7 +140,8 @@ public class AdditionalActionsBottomSheetDialogFragment extends net.osmand.plus.
if (!portrait) { if (!portrait) {
final Window window = getDialog().getWindow(); final Window window = getDialog().getWindow();
WindowManager.LayoutParams params = window.getAttributes(); 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); window.setAttributes(params);
} }
} }