Theme dialogs correctly with accent color

This commit is contained in:
Anthony Restaino 2016-08-01 22:33:54 -04:00
parent 6e108dbbff
commit 097e127407
2 changed files with 27 additions and 0 deletions

View File

@ -14,6 +14,7 @@
<item name="windowActionBar">false</item>
<item name="android:windowContentOverlay">@null</item>
<item name="dividerColor">@color/divider_light</item>
<item name="alertDialogTheme">@style/AppCompatDialogStyle.Light</item>
</style>
<style name="Theme.SettingsTheme.Dark" parent="Theme.AppCompat">
@ -29,6 +30,7 @@
<item name="windowActionBar">false</item>
<item name="android:windowContentOverlay">@null</item>
<item name="dividerColor">@color/divider_dark</item>
<item name="alertDialogTheme">@style/AppCompatDialogStyle.Dark</item>
</style>
<style name="Theme.SettingsTheme.Black" parent="Theme.AppCompat">
@ -44,6 +46,7 @@
<item name="windowActionBar">false</item>
<item name="android:windowContentOverlay">@null</item>
<item name="dividerColor">@color/divider_dark</item>
<item name="alertDialogTheme">@style/AppCompatDialogStyle.Black</item>
</style>
<style name="Theme.LightTheme" parent="Theme.AppCompat.Light">
@ -69,6 +72,7 @@
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@color/secondary_color</item>
<item name="android:windowTranslucentStatus">false</item>
<item name="alertDialogTheme">@style/AppCompatDialogStyle.Light</item>
<!-- READ THIS:
windowTranslucentStatus will set a semitransparent color to the status bar
primaryColorDark will set a color below the actual status bar color that
@ -100,6 +104,7 @@
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@color/secondary_color</item>
<item name="android:windowTranslucentStatus">false</item>
<item name="alertDialogTheme">@style/AppCompatDialogStyle.Dark</item>
</style>
<style name="Theme.BlackTheme" parent="Theme.AppCompat">
@ -125,6 +130,7 @@
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@color/black</item>
<item name="android:windowTranslucentStatus">false</item>
<item name="alertDialogTheme">@style/AppCompatDialogStyle.Black</item>
</style>
</resources>

View File

@ -14,6 +14,7 @@
<item name="windowActionBar">false</item>
<item name="android:windowContentOverlay">@null</item>
<item name="dividerColor">@color/divider_light</item>
<item name="alertDialogTheme">@style/AppCompatDialogStyle.Light</item>
</style>
<style name="Theme.SettingsTheme.Dark" parent="Theme.AppCompat">
@ -29,6 +30,7 @@
<item name="windowActionBar">false</item>
<item name="android:windowContentOverlay">@null</item>
<item name="dividerColor">@color/divider_dark</item>
<item name="alertDialogTheme">@style/AppCompatDialogStyle.Dark</item>
</style>
<style name="Theme.SettingsTheme.Black" parent="Theme.AppCompat">
@ -44,6 +46,7 @@
<item name="windowActionBar">false</item>
<item name="android:windowContentOverlay">@null</item>
<item name="dividerColor">@color/divider_dark</item>
<item name="alertDialogTheme">@style/AppCompatDialogStyle.Black</item>
</style>
<style name="Theme.LightTheme" parent="Theme.AppCompat.Light">
@ -66,6 +69,7 @@
<item name="drawerBackground">@color/drawer_background</item>
<item name="dividerColor">@color/divider_light</item>
<item name="selectedBackground">@drawable/list_bg_light</item>
<item name="alertDialogTheme">@style/AppCompatDialogStyle.Light</item>
</style>
<style name="Theme.DarkTheme" parent="Theme.AppCompat">
@ -88,6 +92,7 @@
<item name="drawerBackground">@color/drawer_background_dark</item>
<item name="dividerColor">@color/divider_dark</item>
<item name="selectedBackground">@drawable/list_bg_dark</item>
<item name="alertDialogTheme">@style/AppCompatDialogStyle.Dark</item>
</style>
<style name="Theme.BlackTheme" parent="Theme.AppCompat">
@ -110,13 +115,29 @@
<item name="drawerBackground">@color/black</item>
<item name="dividerColor">@color/black</item>
<item name="selectedBackground">@drawable/list_bg_dark</item>
<item name="alertDialogTheme">@style/AppCompatDialogStyle.Black</item>
</style>
<!-- AlertDialog Theming -->
<style name="AppCompatDialogStyle.Light" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="colorAccent">@color/accent_color</item>
</style>
<style name="AppCompatDialogStyle.Dark" parent="Theme.AppCompat.Dialog.Alert">
<item name="colorAccent">@color/accent_color</item>
</style>
<style name="AppCompatDialogStyle.Black" parent="Theme.AppCompat.Dialog.Alert">
<item name="colorAccent">@color/accent_color</item>
</style>
<!-- Overflow Menu Customization -->
<style name="overFlowButtonStyle" parent="@style/Widget.AppCompat.ActionButton.Overflow">
<item name="android:minWidth">48dp</item>
<item name="android:padding">0dp</item>
</style>
<!-- Text Customization -->
<style name="boldText">
<item name="android:textStyle">bold</item>
</style>