浏览代码

Theme fixes

inorichi 9 年之前
父节点
当前提交
060da4185e

+ 1 - 2
app/src/main/res/layout/activity_main.xml

@@ -8,8 +8,7 @@
     <android.support.design.widget.AppBarLayout
         android:id="@+id/appbar"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:theme="@style/ThemeOverlay.AppTheme.Dark">
+        android:layout_height="wrap_content">
 
         <include layout="@layout/toolbar" />
 

+ 1 - 2
app/src/main/res/layout/activity_manga.xml

@@ -8,8 +8,7 @@
     <android.support.design.widget.AppBarLayout
         android:id="@+id/appbar"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:theme="@style/ThemeOverlay.AppTheme.Dark">
+        android:layout_height="wrap_content">
 
         <include layout="@layout/toolbar" />
 

+ 1 - 1
app/src/main/res/layout/fragment_manga_chapters.xml

@@ -37,7 +37,7 @@
         android:paddingLeft="12dp"
         android:paddingRight="12dp"
         android:gravity="top|start"
-        android:theme="@style/ThemeOverlay.AppTheme.Dark">
+        android:theme="@style/AppTheme.Popup">
 
         <ImageView
             android:id="@+id/action_sort"

+ 1 - 1
app/src/main/res/layout/library_tab_layout.xml

@@ -5,7 +5,7 @@
     android:id="@+id/tabs"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:theme="@style/ThemeOverlay.AppTheme.Dark"
+    android:theme="@style/AppTheme.Overlay.Dark"
     android:background="@color/colorPrimary"
     android:elevation="4dp"
     app:tabGravity="center"

+ 2 - 2
app/src/main/res/layout/reader_menu.xml

@@ -13,7 +13,7 @@
         android:layout_width="match_parent"
         android:layout_height="?attr/actionBarSize"
         android:background="@color/reader_menu_background"
-        android:theme="@style/ThemeOverlay.AppTheme.Dark"
+        android:theme="@style/AppTheme.Overlay.Dark"
         app:popupTheme="@style/AppTheme.Popup"
         android:elevation="4dp" />
 
@@ -47,7 +47,7 @@
                 android:layout_height="wrap_content"
                 android:layout_weight="1"
                 android:layout_gravity="center_vertical"
-                android:theme="@style/ThemeOverlay.AppTheme.Dark"
+                android:theme="@style/AppTheme.Overlay.Dark"
                 />
 
             <TextView

+ 1 - 1
app/src/main/res/layout/tab_layout.xml

@@ -5,7 +5,7 @@
     android:id="@+id/tabs"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:theme="@style/ThemeOverlay.AppTheme.Dark"
+    android:theme="@style/AppTheme.Overlay.Dark"
     app:tabGravity="fill"
     android:background="@color/colorPrimary"
     android:elevation="4dp"

+ 2 - 3
app/src/main/res/layout/toolbar.xml

@@ -6,6 +6,5 @@
     android:layout_height="?attr/actionBarSize"
     android:background="@color/colorPrimary"
     android:elevation="4dp"
-    android:theme="@style/ThemeOverlay.AppTheme.Dark"
-    app:layout_scrollFlags="scroll|enterAlways|snap"
-    app:popupTheme="@style/AppTheme.Popup" />
+    android:theme="@style/AppTheme.ActionBar"
+    app:layout_scrollFlags="scroll|enterAlways|snap"/>

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

@@ -1,15 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <style name="AppTheme" parent="AppTheme.Base">
-        <item name="android:windowContentTransitions">true</item>
-        <item name="android:windowAllowEnterTransitionOverlap">true</item>
-        <item name="android:windowAllowReturnTransitionOverlap">true</item>
-        <item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
-        <item name="android:windowSharedElementExitTransition">@android:transition/move</item>
-        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
 
-        <item name="android:colorBackground">@color/colorBackgroundLight</item>
-        <item name="android:colorForeground">@color/colorPrimary</item>
-        <item name="colorAccent">@color/accent</item>
-    </style>
 </resources>

+ 31 - 12
app/src/main/res/values/styles.xml

@@ -1,23 +1,24 @@
 <resources>
 
-    <style name="AppTheme" parent="AppTheme.Base">
+    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
         <item name="colorPrimary">@color/colorPrimary</item>
         <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
         <item name="colorAccent">@color/colorAccent</item>
         <item name="colorButtonNormal">@color/colorPrimary</item>
-
-        <item name="android:background">@color/white</item>
+        <item name="alertDialogTheme">@style/AlertDialogStyle</item>
+        <item name="android:itemTextAppearance">@style/OptionsMenuTextColor</item>
         <item name="android:textColor">@color/primary_text</item>
-
+        <item name="android:textColorPrimary">@color/primary_text</item>
+        <item name="colorControlNormal">@color/white</item>
     </style>
 
-    <style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
-        <item name="android:windowActionModeOverlay">true</item>
-        <item name="windowActionModeOverlay">true</item>
-
+    <style name="AppTheme.ActionBar" parent="AppTheme">
+        <item name="android:textColorPrimary">@color/white</item>
+        <item name="android:itemTextAppearance">@style/OptionsMenuTextColor</item>
+        <item name="android:spinnerItemStyle">@style/ActionBarSpinner</item>
     </style>
 
-    <style name="ThemeOverlay.AppTheme.Dark" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
+    <style name="AppTheme.Overlay.Dark" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
         <item name="colorAccent">@color/white</item>
         <item name="android:windowActionModeOverlay">true</item>
         <item name="windowActionModeOverlay">true</item>
@@ -26,14 +27,32 @@
         <item name="actionModeBackground">@color/colorPrimarySuperDark</item>
     </style>
 
-    <style name="AppTheme.Popup" parent="@style/ThemeOverlay.AppTheme.Dark">
+    <style name="AlertDialogStyle" parent="Theme.AppCompat.Light.Dialog.Alert">
+        <item name="android:windowTitleStyle">@style/DialogTitleText</item>
+        <item name="colorAccent">@color/primary</item>
+    </style>
+
+    <style name="DialogTitleText">
+        <item name="android:textColor">@color/primary_text</item>
+        <item name="android:textAppearance">@style/TextAppearance.AppCompat.Title</item>
+    </style>
+
+    <style name="OptionsMenuTextColor" parent="@android:style/TextAppearance.Widget.IconMenu.Item">
+        <item name="android:textColor">@android:color/black</item>
+    </style>
+
+    <style name="ActionBarSpinner" parent="@style/Widget.AppCompat.TextView.SpinnerItem">
+        <item name="android:textColor">@color/white</item>
+        <item name="android:textColorHint">@color/hint_foreground_material_dark</item>
+    </style>
+
+    <style name="AppTheme.Popup" parent="@style/AppTheme.Overlay.Dark">
         <item name="colorAccent">@color/white</item>
         <item name="android:background">@color/colorPrimary</item>
         <item name="android:textColor">@color/white</item>
     </style>
 
     <style name="AppTheme.GridView" parent="AppTheme">
-
         <item name="android:layout_width">match_parent</item>
         <item name="android:padding">10dp</item>
         <item name="android:layout_height">match_parent</item>
@@ -58,7 +77,7 @@
 
         <item name="alertDialogTheme">@style/FilePickerAlertDialogTheme</item>
 
-        <item name="nnf_toolbarTheme">@style/ThemeOverlay.AppTheme.Dark</item>
+        <item name="nnf_toolbarTheme">@style/AppTheme.Overlay.Dark</item>
     </style>
 
     <style name="FilePickerAlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">