Simplifiy themes (2)

This commit is contained in:
Andrew Rabert 2019-12-22 14:26:29 -05:00
parent c5c4185e2f
commit 1c269aac53
2 changed files with 100 additions and 117 deletions

View File

@ -175,7 +175,7 @@ public class SubsonicActivity extends AppCompatActivity implements OnItemSelecte
private void createCustomActionBarView() {
actionBarSpinner = (Spinner) getLayoutInflater().inflate(R.layout.actionbar_spinner, null);
if ((this instanceof SubsonicFragmentActivity || this instanceof SettingsActivity) && ThemeUtil.getThemeRes(this) != R.style.Theme_Audinaut_Light_No_Color) {
if ((this instanceof SubsonicFragmentActivity || this instanceof SettingsActivity) && ThemeUtil.getThemeRes(this) != R.style.Theme_Audinaut_Light) {
actionBarSpinner.setBackground(DrawableTint.getTintedDrawableFromColor(this));
}
spinnerAdapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item);

View File

@ -6,149 +6,135 @@
</style>
<style name="Theme.Audinaut.Light" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="element_color">@color/lightElement</item>
<item name="offline_icon">@drawable/main_offline</item>
<item name="media_button_backward">@drawable/media_backward</item>
<item name="media_button_forward">@drawable/media_forward</item>
<item name="media_button_rewind">@drawable/media_rewind</item>
<item name="media_button_fastforward">@drawable/media_fastforward</item>
<item name="media_button_pause">@drawable/media_pause</item>
<item name="media_button_repeat_off">@drawable/media_repeat_off</item>
<item name="media_button_repeat_single">@drawable/media_repeat_single</item>
<item name="media_button_repeat_all">@drawable/media_repeat_all</item>
<item name="media_button_start">@drawable/media_start</item>
<item name="media_button_stop">@drawable/media_stop</item>
<item name="download_none">@drawable/download_none</item>
<item name="shuffle_button">@drawable/ic_menu_shuffle</item>
<item name="volume">@drawable/ic_action_volume</item>
<item name="toggle_list">@drawable/action_toggle_list</item>
<item name="select_server">@drawable/main_select_server</item>
<item name="select_tabs">@drawable/main_select_tabs</item>
<item name="playing">@drawable/playing</item>
<item name="downloading">@drawable/downloading</item>
<item name="drawerLibrary">@drawable/ic_menu_library</item>
<item name="drawerPlaylists">@drawable/ic_menu_playlist</item>
<item name="drawerDownloading">@drawable/ic_menu_download</item>
<item name="drawerSettings">@drawable/ic_menu_settings</item>
<item name="drawerArrowStyle">@style/Audinaut.DrawerArrow</item>
<item name="colorPrimary">@color/lightPrimary</item>
<item name="colorPrimaryDark">@color/background_material_light</item>
<item name="colorAccent">@color/lightAccent</item>
<item name="actionModeBackground">@color/background_material_light</item>
<item name="actionModeCloseButtonStyle">@style/DarkCloseButton</item>
<item name="actionModeStyle">@style/LightActionMode</item>
<item name="actionbarBackgroundColor">@android:color/transparent</item>
<item name="actionbarPopupStyle">@style/ThemeOverlay.AppCompat.Light</item>
<item name="windowActionModeOverlay">true</item>
<item name="actionModeBackground">@color/background_material_light</item>
<item name="card_background">@android:color/white</item>
<item name="cardBackgroundDrawable">@drawable/card_rounded_corners</item>
<item name="drawerHeaderBackground">@color/lightPrimary</item>
<item name="android:windowLightStatusBar">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="actionbar_element_color">@color/lightElement</item>
<item name="actionbarSubtitleStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle</item>
<item name="actionbarThemeStyle">@style/ThemeOverlay.AppCompat.ActionBar</item>
<item name="actionbarTitleStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Title
</item>
<item name="actionbarSubtitleStyle">
@style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle
</item>
<item name="android:spinnerItemStyle">@style/LightSpinnerItem</item>
<item name="drawerTitleStyle">
@style/TextAppearance.AppCompat.Widget.ActionBar.Title.Inverse
</item>
<item name="drawerSubtitleStyle">
@style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle.Inverse
</item>
<item name="actionbarTitleStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Title</item>
<item name="actionbar_backward">@drawable/media_backward</item>
<item name="actionbar_element_color">@color/lightElement</item>
<item name="actionbar_fastforward">@drawable/media_fastforward</item>
<item name="actionbar_forward">@drawable/media_forward</item>
<item name="actionbar_pause">@drawable/media_pause</item>
<item name="actionbar_rewind">@drawable/media_rewind</item>
<item name="actionbar_start">@drawable/media_start</item>
<item name="actionbar_stop">@drawable/media_stop</item>
<item name="actionbar_rewind">@drawable/media_rewind</item>
<item name="actionbar_fastforward">@drawable/media_fastforward</item>
<item name="add">@drawable/ic_action_add</item>
<item name="shuffle">@drawable/ic_menu_shuffle</item>
<item name="add_person">@drawable/ic_menu_add_person</item>
<item name="android:spinnerItemStyle">@style/LightSpinnerItem</item>
<item name="android:windowLightStatusBar">true</item>
<item name="cardBackgroundDrawable">@drawable/card_rounded_corners</item>
<item name="card_background">@android:color/white</item>
<item name="colorAccent">@color/lightAccent</item>
<item name="colorPrimary">@color/lightPrimary</item>
<item name="colorPrimaryDark">@color/background_material_light</item>
<item name="download">@drawable/ic_menu_download</item>
<item name="download_none">@drawable/download_none</item>
<item name="downloading">@drawable/downloading</item>
<item name="drawerArrowStyle">@style/Audinaut.DrawerArrow</item>
<item name="drawerDownloading">@drawable/ic_menu_download</item>
<item name="drawerHeaderBackground">@color/lightPrimary</item>
<item name="drawerLibrary">@drawable/ic_menu_library</item>
<item name="drawerPlaylists">@drawable/ic_menu_playlist</item>
<item name="drawerSettings">@drawable/ic_menu_settings</item>
<item name="drawerSubtitleStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle.Inverse</item>
<item name="drawerTitleStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Title.Inverse</item>
<item name="element_color">@color/lightElement</item>
<item name="media_button_backward">@drawable/media_backward</item>
<item name="media_button_fastforward">@drawable/media_fastforward</item>
<item name="media_button_forward">@drawable/media_forward</item>
<item name="media_button_pause">@drawable/media_pause</item>
<item name="media_button_repeat_all">@drawable/media_repeat_all</item>
<item name="media_button_repeat_off">@drawable/media_repeat_off</item>
<item name="media_button_repeat_single">@drawable/media_repeat_single</item>
<item name="media_button_rewind">@drawable/media_rewind</item>
<item name="media_button_start">@drawable/media_start</item>
<item name="media_button_stop">@drawable/media_stop</item>
<item name="offline_icon">@drawable/main_offline</item>
<item name="playing">@drawable/playing</item>
<item name="refresh">@drawable/actionbar_refresh</item>
<item name="search">@drawable/actionbar_search</item>
<item name="remove">@drawable/ic_menu_remove</item>
<item name="save">@drawable/actionbar_save</item>
<item name="add_person">@drawable/ic_menu_add_person</item>
<item name="download">@drawable/ic_menu_download</item>
<item name="actionModeStyle">@style/LightActionMode</item>
<item name="actionModeCloseButtonStyle">@style/DarkCloseButton</item>
<item name="search">@drawable/actionbar_search</item>
<item name="select_server">@drawable/main_select_server</item>
<item name="select_tabs">@drawable/main_select_tabs</item>
<item name="shuffle">@drawable/ic_menu_shuffle</item>
<item name="shuffle_button">@drawable/ic_menu_shuffle</item>
<item name="toggle_list">@drawable/action_toggle_list</item>
<item name="volume">@drawable/ic_action_volume</item>
<item name="windowActionBar">false</item>
<item name="windowActionModeOverlay">true</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.Audinaut.Dark" parent="@style/Theme.AppCompat">
<item name="element_color">@color/darkElement</item>
<item name="actionbar_element_color">@color/darkElement</item>
<item name="offline_icon">@drawable/main_offline</item>
<item name="media_button_backward">@drawable/media_backward</item>
<item name="media_button_forward">@drawable/media_forward</item>
<item name="media_button_rewind">@drawable/media_rewind</item>
<item name="media_button_fastforward">@drawable/media_fastforward</item>
<item name="media_button_pause">@drawable/media_pause</item>
<item name="media_button_repeat_off">@drawable/media_repeat_off</item>
<item name="media_button_repeat_single">@drawable/media_repeat_single</item>
<item name="media_button_repeat_all">@drawable/media_repeat_all</item>
<item name="media_button_start">@drawable/media_start</item>
<item name="media_button_stop">@drawable/media_stop</item>
<item name="actionModeBackground">@color/background_material_dark</item>
<item name="actionbarBackgroundColor">@android:color/transparent</item>
<item name="actionbarPopupStyle">@style/ThemeOverlay.AppCompat.Dark</item>
<item name="actionbarSubtitleStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle</item>
<item name="actionbarThemeStyle">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
<item name="actionbarTitleStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Title</item>
<item name="actionbar_backward">@drawable/media_backward</item>
<item name="actionbar_element_color">@color/darkElement</item>
<item name="actionbar_fastforward">@drawable/media_fastforward</item>
<item name="actionbar_forward">@drawable/media_forward</item>
<item name="actionbar_pause">@drawable/media_pause</item>
<item name="actionbar_rewind">@drawable/media_rewind</item>
<item name="actionbar_start">@drawable/media_start</item>
<item name="actionbar_stop">@drawable/media_stop</item>
<item name="actionbar_rewind">@drawable/media_rewind</item>
<item name="actionbar_fastforward">@drawable/media_fastforward</item>
<item name="add">@drawable/ic_action_add</item>
<item name="download_none">@drawable/download_none</item>
<item name="shuffle">@drawable/ic_menu_shuffle</item>
<item name="shuffle_button">@drawable/ic_menu_shuffle</item>
<item name="refresh">@drawable/actionbar_refresh</item>
<item name="search">@drawable/actionbar_search</item>
<item name="remove">@drawable/ic_menu_remove</item>
<item name="save">@drawable/actionbar_save</item>
<item name="volume">@drawable/ic_action_volume</item>
<item name="toggle_list">@drawable/action_toggle_list</item>
<item name="select_server">@drawable/main_select_server</item>
<item name="select_tabs">@drawable/main_select_tabs</item>
<item name="playing">@drawable/playing</item>
<item name="downloading">@drawable/downloading</item>
<item name="add_person">@drawable/ic_menu_add_person</item>
<item name="download">@drawable/ic_menu_download</item>
<item name="drawerLibrary">@drawable/ic_menu_library</item>
<item name="drawerPlaylists">@drawable/ic_menu_playlist</item>
<item name="drawerDownloading">@drawable/ic_menu_download</item>
<item name="drawerSettings">@drawable/ic_menu_settings</item>
<item name="drawerArrowStyle">@style/Audinaut.DrawerArrow</item>
<item name="cardBackgroundDrawable">@drawable/card_rounded_corners</item>
<item name="card_background">@android:color/black</item>
<item name="colorAccent">@color/lightAccent</item>
<item name="colorPrimary">@color/lightPrimary</item>
<item name="colorPrimaryDark">@color/background_material_dark</item>
<item name="colorAccent">@color/lightAccent</item>
<item name="actionbarBackgroundColor">@android:color/transparent</item>
<item name="actionbarTitleStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Title
</item>
<item name="actionbarSubtitleStyle">
@style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle
</item>
<item name="actionbarPopupStyle">@style/ThemeOverlay.AppCompat.Dark</item>
<item name="actionbarThemeStyle">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
<item name="drawerTitleStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Title</item>
<item name="drawerSubtitleStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle
</item>
<item name="windowActionModeOverlay">true</item>
<item name="actionModeBackground">@color/background_material_dark</item>
<item name="card_background">@android:color/black</item>
<item name="cardBackgroundDrawable">@drawable/card_rounded_corners</item>
<item name="download">@drawable/ic_menu_download</item>
<item name="download_none">@drawable/download_none</item>
<item name="downloading">@drawable/downloading</item>
<item name="drawerArrowStyle">@style/Audinaut.DrawerArrow</item>
<item name="drawerDownloading">@drawable/ic_menu_download</item>
<item name="drawerHeaderBackground">@color/lightPrimaryDark</item>
<item name="drawerLibrary">@drawable/ic_menu_library</item>
<item name="drawerPlaylists">@drawable/ic_menu_playlist</item>
<item name="drawerSettings">@drawable/ic_menu_settings</item>
<item name="drawerSubtitleStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle</item>
<item name="drawerTitleStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Title</item>
<item name="element_color">@color/darkElement</item>
<item name="media_button_backward">@drawable/media_backward</item>
<item name="media_button_fastforward">@drawable/media_fastforward</item>
<item name="media_button_forward">@drawable/media_forward</item>
<item name="media_button_pause">@drawable/media_pause</item>
<item name="media_button_repeat_all">@drawable/media_repeat_all</item>
<item name="media_button_repeat_off">@drawable/media_repeat_off</item>
<item name="media_button_repeat_single">@drawable/media_repeat_single</item>
<item name="media_button_rewind">@drawable/media_rewind</item>
<item name="media_button_start">@drawable/media_start</item>
<item name="media_button_stop">@drawable/media_stop</item>
<item name="offline_icon">@drawable/main_offline</item>
<item name="playing">@drawable/playing</item>
<item name="refresh">@drawable/actionbar_refresh</item>
<item name="remove">@drawable/ic_menu_remove</item>
<item name="save">@drawable/actionbar_save</item>
<item name="search">@drawable/actionbar_search</item>
<item name="select_server">@drawable/main_select_server</item>
<item name="select_tabs">@drawable/main_select_tabs</item>
<item name="shuffle">@drawable/ic_menu_shuffle</item>
<item name="shuffle_button">@drawable/ic_menu_shuffle</item>
<item name="toggle_list">@drawable/action_toggle_list</item>
<item name="volume">@drawable/ic_action_volume</item>
<item name="windowActionBar">false</item>
<item name="windowActionModeOverlay">true</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.Audinaut.Black" parent="Theme.Audinaut.Dark">
<item name="actionModeBackground">@android:color/black</item>
<item name="android:windowBackground">@android:color/black</item>
<item name="colorPrimaryDark">@android:color/black</item>
<item name="actionModeBackground">@android:color/black</item>
</style>
<style name="Theme.Audinaut.Light.No_Color" parent="Theme.Audinaut.Light">
</style>
<style name="Audinaut.DrawerArrow" parent="Widget.AppCompat.DrawerArrowToggle">
@ -164,11 +150,8 @@
</style>
<style name="LightActionMode" parent="@style/Widget.AppCompat.ActionMode">
<item name="titleTextStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Title.Inverse
</item>
<item name="subtitleTextStyle">
@style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle.Inverse
</item>
<item name="titleTextStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Title.Inverse</item>
<item name="subtitleTextStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle.Inverse</item>
</style>
<style name="DarkCloseButton" parent="@style/Widget.AppCompat.ActionButton.CloseMode">