forked from organicmaps/organicmaps
[android] unify styling for all bottom sheets
Signed-off-by: Arnaud Vergnet <arnaud.vergnet@mailo.com>
This commit is contained in:
parent
12dcd1b628
commit
3865e07f62
4 changed files with 18 additions and 19 deletions
|
@ -5,6 +5,9 @@
|
|||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
layout="@layout/bottom_sheet_handle" />
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/bottom_sheet_menu_header"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -386,21 +386,21 @@
|
|||
<item name="android:textSize">@dimen/text_size_toolbar</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.BottomSheet" parent="Widget.Material3.BottomSheet.Modal">
|
||||
<item name="android:background">?cardBackground</item>
|
||||
<style
|
||||
name="MwmTheme.BottomSheetDialog"
|
||||
parent="@style/ThemeOverlay.Material3.BottomSheetDialog">
|
||||
<item name="bottomSheetStyle">@style/MwmWidget.BottomSheetDialog</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.BottomSheetDialog" parent="Widget.Material3.BottomSheet.Modal">
|
||||
<item name="backgroundTint">?cardBackground</item>
|
||||
<item name="behavior_hideable">false</item>
|
||||
<item name="elevationOverlayEnabled">false</item>
|
||||
<item name="shapeAppearance">@style/ShapeAppearance.Material3.LargeComponent</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.BottomSheetDialog" parent="Theme.Material3.Light.BottomSheetDialog">
|
||||
<item name="colorSurface">?cardBackground</item>
|
||||
<item name="elevationOverlayEnabled">false</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.Night.BottomSheetDialog" parent="Theme.Material3.Dark.BottomSheetDialog" >
|
||||
<item name="colorSurface">?cardBackground</item>
|
||||
<item name="elevationOverlayEnabled">false</item>
|
||||
<style name="MwmWidget.BottomSheet" parent="MwmWidget.BottomSheetDialog">
|
||||
<item name="android:background">?cardBackground</item>
|
||||
<item name="behavior_hideable">false</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -172,7 +172,10 @@
|
|||
<item name="chipTextColor">@color/bg_primary</item>
|
||||
<item name="android:popupMenuStyle">@style/PopupMenu</item>
|
||||
|
||||
<!-- Style used for bottom sheet behavior components -->
|
||||
<item name="bottomSheetStyle">@style/MwmWidget.BottomSheet</item>
|
||||
<!-- Theme used for bottom sheet dialog components -->
|
||||
<item name="bottomSheetDialogTheme">@style/MwmTheme.BottomSheetDialog</item>
|
||||
</style>
|
||||
|
||||
<!-- Night theme -->
|
||||
|
@ -341,5 +344,6 @@
|
|||
<item name="android:popupMenuStyle">@style/PopupMenu.Dark</item>
|
||||
|
||||
<item name="bottomSheetStyle">@style/MwmWidget.BottomSheet</item>
|
||||
<item name="bottomSheetDialogTheme">@style/MwmTheme.BottomSheetDialog</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -55,14 +55,6 @@ public class MenuBottomSheetFragment extends BottomSheetDialogFragment
|
|||
this.menuBottomSheetItems = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTheme()
|
||||
{
|
||||
return ThemeUtils.isNightTheme(requireContext())
|
||||
? R.style.MwmWidget_Night_BottomSheetDialog
|
||||
: R.style.MwmWidget_BottomSheetDialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue