Cancel menus on touch outside; fix drawing of menus under the navbar
This commit is contained in:
parent
eafee0d527
commit
bf0df9b29d
2 changed files with 3 additions and 2 deletions
|
@ -256,7 +256,7 @@
|
|||
</style>
|
||||
|
||||
<style name="OsmandLightTheme.BottomSheet">
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:statusBarColor">@color/color_transparent</item>
|
||||
<item name="android:dialogTheme">@style/BottomSheet.Dialog</item>
|
||||
<item name="android:windowBackground">@color/color_transparent</item>
|
||||
<item name="android:backgroundDimAmount">0.3</item>
|
||||
|
@ -264,7 +264,7 @@
|
|||
</style>
|
||||
|
||||
<style name="OsmandDarkTheme.BottomSheet">
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:statusBarColor">@color/color_transparent</item>
|
||||
<item name="android:dialogTheme">@style/BottomSheet.Dialog</item>
|
||||
<item name="android:windowBackground">@color/color_transparent</item>
|
||||
<item name="android:backgroundDimAmount">0.3</item>
|
||||
|
|
|
@ -26,6 +26,7 @@ public abstract class BottomSheetDialogFragment extends DialogFragment {
|
|||
int themeId = settings.isLightContent() ? R.style.OsmandLightTheme_BottomSheet : R.style.OsmandDarkTheme_BottomSheet;
|
||||
|
||||
BottomSheetDialog dialog = new BottomSheetDialog(getContext(), themeId);
|
||||
dialog.setCanceledOnTouchOutside(true);
|
||||
Window window = dialog.getWindow();
|
||||
if (!getMyApplication().getSettings().DO_NOT_USE_ANIMATIONS.get() && window != null) {
|
||||
window.getAttributes().windowAnimations = R.style.Animations_PopUpMenu_Bottom;
|
||||
|
|
Loading…
Reference in a new issue