Преглед изворни кода

Remove unused attrs and colors. Theme preference dialogs on API >= 21

len пре 9 година
родитељ
комит
81d39ea272

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

@@ -8,6 +8,7 @@
         <item name="android:windowDrawsSystemBarBackgrounds">true</item>
         <item name="android:statusBarColor">@color/colorPrimaryDark</item>
         <item name="android:navigationBarColor">@color/colorPrimaryDark</item>
+        <item name="android:alertDialogTheme">@style/Theme.AlertDialog.Light</item>
     </style>
 
     <!--============-->
@@ -18,5 +19,6 @@
         <item name="android:windowDrawsSystemBarBackgrounds">true</item>
         <item name="android:statusBarColor">@color/colorPrimaryDark</item>
         <item name="android:navigationBarColor">@color/colorPrimaryDark</item>
+        <item name="android:alertDialogTheme">@style/Theme.AlertDialog.Dark</item>
     </style>
 </resources>

+ 0 - 1
app/src/main/res/values/attrs.xml

@@ -20,5 +20,4 @@
     <attr name="navigation_view_theme" format="reference"/>
     <attr name="selectable_list_drawable" format="reference|integer" />
     <attr name="divider_drawable" format="reference|integer" />
-    <attr name="status_bar_trans" format="reference|color"/>
 </resources>

+ 0 - 1
app/src/main/res/values/colors.xml

@@ -3,7 +3,6 @@
     <!-- Application Colors -->
     <color name="colorPrimary">#54759e</color>
     <color name="colorPrimaryDark">#435e7e</color>
-    <color name="colorPrimaryDarkTrans">#40435e7e</color>
 
     <!-- Light Theme -->
     <color name="colorAccentLight">@color/md_blue_A400</color>

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

@@ -19,6 +19,23 @@
         <item name="tabGravity">fill</item>
     </style>
 
+    <!--===========-->
+    <!--AlertDialog-->
+    <!--===========-->
+    <style name="Theme.AlertDialog"/>
+
+    <style name="Theme.AlertDialog.Light" parent="Theme.AppCompat.Light.Dialog.Alert">
+        <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
+        <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
+        <item name="colorAccent">@color/colorAccentLight</item>
+    </style>
+
+    <style name="Theme.AlertDialog.Dark" parent="Theme.AppCompat.Dialog.Alert">
+        <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
+        <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
+        <item name="colorAccent">@color/colorAccentDark</item>
+    </style>
+
     <!--==============-->
     <!--NavigationView-->
     <!--==============-->

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

@@ -33,7 +33,6 @@
         <!-- Custom Attributes-->
         <item name="selectable_list_drawable">@drawable/list_item_selector_light</item>
         <item name="divider_drawable">@drawable/line_divider_light</item>
-        <item name="status_bar_trans">@color/colorPrimaryDarkTrans</item>
     </style>
 
     <style name="Theme.Tachiyomi" parent="Theme.Base">
@@ -68,7 +67,6 @@
         <item name="navigation_view_theme">@style/Theme.Widget.NavigationView.Dark</item>
         <item name="selectable_list_drawable">@drawable/list_item_selector_dark</item>
         <item name="divider_drawable">@drawable/line_divider_dark</item>
-        <item name="status_bar_trans">@color/colorPrimaryDarkTrans</item>
     </style>
 
     <style name="Theme.Tachiyomi.Dark" parent="Theme.Base.Dark">