Pārlūkot izejas kodu

Fix transparent navbar when bottom sheets are opened (fixes #3848)

arkon 4 gadi atpakaļ
vecāks
revīzija
d548c690d6

+ 11 - 0
app/src/main/res/values/styles.xml

@@ -48,6 +48,17 @@
     </style>
 
 
+    <!--===========-->
+    <!--BottomSheet-->
+    <!--===========-->
+
+    <style name="Theme.BottomSheet" parent="ThemeOverlay.MaterialComponents.BottomSheetDialog">
+        <item name="android:windowIsFloating">false</item>
+        <item name="android:statusBarColor">@android:color/transparent</item>
+        <item name="android:navigationBarColor">?attr/colorPrimary</item>
+    </style>
+
+
     <!--===============-->
     <!--Text Appearance-->
     <!--===============-->

+ 2 - 0
app/src/main/res/values/themes.xml

@@ -57,6 +57,7 @@
         <item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
         <item name="dialogTheme">@style/Theme.AlertDialog.Light</item>
         <item name="alertDialogTheme">@style/Theme.AlertDialog.Dark</item>
+        <item name="bottomSheetDialogTheme">@style/Theme.BottomSheet</item>
         <item name="chipStyle">@style/Theme.Widget.Chip</item>
         <item name="buttonStyle">@style/Theme.Widget.Button</item>
         <item name="snackbarStyle">@style/Theme.Widget.Snackbar</item>
@@ -148,6 +149,7 @@
         <item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
         <item name="dialogTheme">@style/Theme.AlertDialog.Dark</item>
         <item name="alertDialogTheme">@style/Theme.AlertDialog.Dark</item>
+        <item name="bottomSheetDialogTheme">@style/Theme.BottomSheet</item>
         <item name="chipStyle">@style/Theme.Widget.Chip</item>
         <item name="buttonStyle">@style/Theme.Widget.Button</item>
         <item name="snackbarStyle">@style/Theme.Widget.Snackbar</item>