Forráskód Böngészése

Make androidx.preference dialog match M3 dialog (#8909)

zbue 2 éve
szülő
commit
e7937fe562

+ 15 - 0
app/src/main/res/drawable/material_popup_background.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape>
+            <solid android:color="?attr/colorSurface" />
+            <corners android:radius="@dimen/m3_alert_dialog_corner_size" />
+        </shape>
+    </item>
+    <item>
+        <shape>
+            <solid android:color="@color/m3_popupmenu_overlay_color" />
+            <corners android:radius="@dimen/m3_alert_dialog_corner_size" />
+        </shape>
+    </item>
+</layer-list>

+ 1 - 3
app/src/main/res/values/styles.xml

@@ -14,10 +14,8 @@
     <!--AlertDialog-->
     <!--===========-->
     <style name="ThemeOverlay.Tachiyomi.MaterialAlertDialog" parent="ThemeOverlay.Material3.MaterialAlertDialog">
-        <item name="android:textColorPrimary">?attr/colorOnSurface</item>
-        <item name="android:textColor">?attr/colorOnSurface</item>
-        <item name="android:colorBackground">?attr/colorSurface</item>
         <item name="android:layout">@layout/m3_alert_dialog</item>
+        <item name="android:background">@drawable/material_popup_background</item>
         <item name="dialogCornerRadius">@dimen/m3_alert_dialog_corner_size</item>
     </style>