Fix and improve service switching (introduced colors)
- Every service now have its own colors - Fix bug navigation button and backstack count - Fix and themed properly the icons and colors of the main fragment tabs - Re-organized the styles and colors (too much in one file)
This commit is contained in:
parent
1ce7d66fb1
commit
3a8b04e2d1
24 changed files with 421 additions and 283 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!--TODO: preffix these with "ic_"-->
|
||||
<attr name="thumbs_up" format="reference"/>
|
||||
<attr name="thumbs_down" format="reference"/>
|
||||
<attr name="audio" format="reference"/>
|
||||
|
|
@ -23,6 +24,8 @@
|
|||
<attr name="search_add" format="reference"/>
|
||||
<attr name="options" format="reference"/>
|
||||
<attr name="play" format="reference"/>
|
||||
<attr name="ic_hot" format="reference"/>
|
||||
<attr name="ic_channel" format="reference"/>
|
||||
|
||||
<!-- Can't refer to colors directly into drawable's xml-->
|
||||
<attr name="toolbar_shadow_drawable" format="reference"/>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#CD201F</color>
|
||||
|
||||
<!-- Light Theme -->
|
||||
<color name="light_background_color">#EEEEEE</color>
|
||||
<color name="light_youtube_primary_color">#e53935</color>
|
||||
<color name="light_youtube_dark_color">#d32f2f</color>
|
||||
<color name="light_youtube_accent_color">#000000</color>
|
||||
<color name="light_settings_accent_color">#e53935</color>
|
||||
<color name="light_separator_color">#32000000</color>
|
||||
<color name="light_ripple_color">#48868686</color>
|
||||
|
|
@ -18,9 +16,6 @@
|
|||
|
||||
<!-- Dark Theme -->
|
||||
<color name="dark_background_color">#222222</color>
|
||||
<color name="dark_youtube_primary_color">#CD322E</color>
|
||||
<color name="dark_youtube_dark_color">#BC211D</color>
|
||||
<color name="dark_youtube_accent_color">#FFFFFF</color>
|
||||
<color name="dark_settings_accent_color">#ff5252</color>
|
||||
<color name="dark_separator_color">#0affffff</color>
|
||||
<color name="dark_ripple_color">#48ffffff</color>
|
||||
|
|
|
|||
21
app/src/main/res/values/colors_services.xml
Normal file
21
app/src/main/res/values/colors_services.xml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- YouTube -->
|
||||
<color name="light_youtube_primary_color">#e53935</color>
|
||||
<color name="light_youtube_dark_color">#d32f2f</color>
|
||||
<color name="light_youtube_accent_color">#000000</color>
|
||||
|
||||
<color name="dark_youtube_primary_color">#CD322E</color>
|
||||
<color name="dark_youtube_dark_color">#BC211D</color>
|
||||
<color name="dark_youtube_accent_color">#FFFFFF</color>
|
||||
|
||||
<!-- SoundCloud -->
|
||||
<color name="light_soundcloud_primary_color">#f57c00</color>
|
||||
<color name="light_soundcloud_dark_color">#ef6c00</color>
|
||||
<color name="light_soundcloud_accent_color">#000000</color>
|
||||
|
||||
<color name="dark_soundcloud_primary_color">#f57c00</color>
|
||||
<color name="dark_soundcloud_dark_color">#ef6c00</color>
|
||||
<color name="dark_soundcloud_accent_color">#FFFFFF</color>
|
||||
|
||||
</resources>
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#CD201F</color>
|
||||
</resources>
|
||||
|
|
@ -1,7 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources translatable="false">
|
||||
<!-- Service -->
|
||||
<string name="current_service_key" translatable="false">current_service</string>
|
||||
<string-array name="service_list" translatable="false">
|
||||
<item>@string/youtube</item>
|
||||
<item>@string/soundcloud</item>
|
||||
</string-array>
|
||||
<string name="current_service_key" translatable="false">service</string>
|
||||
<string name="default_service_value" translatable="false">@string/youtube</string>
|
||||
|
||||
<!-- Key values -->
|
||||
<string name="download_path_key" translatable="false">download_path</string>
|
||||
|
|
@ -46,12 +51,6 @@
|
|||
<item>144p</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="service_list" translatable="false">
|
||||
<item>@string/youtube</item>
|
||||
<item>@string/soundcloud</item>
|
||||
</string-array>
|
||||
<string name="service_key" translatable="false">service</string>
|
||||
<string name="default_service_value" translatable="false">@string/youtube</string>
|
||||
|
||||
<string name="video_mp4_key" translatable="false">video_mp4</string>
|
||||
<string name="video_webm_key" translatable="false">video_webm</string>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,15 @@
|
|||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="OpeningTheme" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="colorPrimary">@android:color/transparent</item>
|
||||
<item name="colorPrimaryDark">@android:color/transparent</item>
|
||||
<item name="colorAccent">@android:color/transparent</item>
|
||||
|
||||
<item name="android:windowBackground">@color/dark_background_color</item>
|
||||
</style>
|
||||
|
||||
<!-- Base themes -->
|
||||
|
||||
<style name="LightTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorPrimary">@color/light_youtube_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/light_youtube_dark_color</item>
|
||||
|
|
@ -30,6 +39,8 @@
|
|||
<item name="search_add">@drawable/ic_arrow_top_left_black_24dp</item>
|
||||
<item name="options">@drawable/ic_more_vert_black_24dp</item>
|
||||
<item name="play">@drawable/ic_play_arrow_black_24dp</item>
|
||||
<item name="ic_hot">@drawable/ic_whatshot_black_24dp</item>
|
||||
<item name="ic_channel">@drawable/ic_channel_black_24dp</item>
|
||||
|
||||
<item name="separator_color">@color/light_separator_color</item>
|
||||
<item name="contrast_background_color">@color/light_contrast_background_color</item>
|
||||
|
|
@ -42,7 +53,10 @@
|
|||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
|
||||
</style>
|
||||
|
||||
<!-- Dark Theme-->
|
||||
<style name="LightTheme.Switchable">
|
||||
<item name="android:windowAnimationStyle">@style/SwitchAnimation</item>
|
||||
</style>
|
||||
|
||||
<style name="DarkTheme" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="colorPrimary">@color/dark_youtube_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/dark_youtube_dark_color</item>
|
||||
|
|
@ -72,6 +86,8 @@
|
|||
<item name="search_add">@drawable/ic_arrow_top_left_white_24dp</item>
|
||||
<item name="options">@drawable/ic_more_vert_white_24dp</item>
|
||||
<item name="play">@drawable/ic_play_arrow_white_24dp</item>
|
||||
<item name="ic_hot">@drawable/ic_whatshot_white_24dp</item>
|
||||
<item name="ic_channel">@drawable/ic_channel_white_24dp</item>
|
||||
|
||||
<item name="separator_color">@color/dark_separator_color</item>
|
||||
<item name="contrast_background_color">@color/dark_contrast_background_color</item>
|
||||
|
|
@ -84,12 +100,21 @@
|
|||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
|
||||
</style>
|
||||
|
||||
<style name="DarkTheme.Switchable">
|
||||
<item name="android:windowAnimationStyle">@style/SwitchAnimation</item>
|
||||
</style>
|
||||
|
||||
<style name="BlackTheme" parent="DarkTheme">
|
||||
<item name="android:windowBackground">@color/black_background_color</item>
|
||||
|
||||
<item name="separator_color">@color/black_separator_color</item>
|
||||
<item name="contrast_background_color">@color/black_contrast_background_color</item>
|
||||
</style>
|
||||
|
||||
<style name="BlackTheme.Switchable">
|
||||
<item name="android:windowAnimationStyle">@style/SwitchAnimation</item>
|
||||
</style>
|
||||
|
||||
<!-- Settings -->
|
||||
<style name="LightSettingsTheme" parent="LightTheme">
|
||||
<item name="colorAccent">@color/light_settings_accent_color</item>
|
||||
|
|
@ -103,85 +128,34 @@
|
|||
<item name="colorAccent">@color/black_settings_accent_color</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="PlayerTheme" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowBackground">@android:color/black</item>
|
||||
<style name="SwitchAnimation" parent="@android:style/Animation.Activity">
|
||||
<item name="android:windowEnterAnimation">@anim/switch_service_in</item>
|
||||
<item name="android:windowExitAnimation">@anim/switch_service_out</item>
|
||||
</style>
|
||||
|
||||
<style name="Toolbar.Title" parent="TextAppearance.Widget.AppCompat.Toolbar.Title">
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="RedButton" parent="Widget.AppCompat.Button.Colored">
|
||||
<item name="colorButtonNormal">@color/subscribe_background_color</item>
|
||||
<item name="android:textColor">@color/subscribe_text_color</item>
|
||||
<item name="colorControlHighlight">@color/dark_ripple_color</item>
|
||||
</style>
|
||||
|
||||
<style name="VideoPlayerTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<style name="OldVideoPlayerTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="colorPrimary">@color/light_youtube_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/light_youtube_dark_color</item>
|
||||
<item name="colorAccent">@color/light_youtube_accent_color</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="windowActionBarOverlay">true</item>
|
||||
<item name="android:actionBarStyle">@style/VideoPlayerActionBarTheme</item>
|
||||
<item name="actionBarStyle">@style/VideoPlayerActionBarTheme</item>
|
||||
<item name="android:actionBarStyle">@style/OldVideoPlayerActionBarTheme</item>
|
||||
<item name="actionBarStyle">@style/OldVideoPlayerActionBarTheme</item>
|
||||
<item name="android:windowBackground">@android:color/black</item>
|
||||
</style>
|
||||
|
||||
<style name="VideoPlayerActionBarTheme" parent="Widget.AppCompat.Light.ActionBar.Solid.Inverse">
|
||||
<style name="OldVideoPlayerActionBarTheme" parent="Widget.AppCompat.Light.ActionBar.Solid.Inverse">
|
||||
<item name="android:displayOptions">showHome</item>
|
||||
<item name="displayOptions">showHome</item>
|
||||
<item name="android:background">@color/video_overlay_color</item>
|
||||
<item name="background">@color/video_overlay_color</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerThemeLight" parent="NNF_BaseTheme.Light">
|
||||
<item name="colorPrimary">@color/light_youtube_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/light_youtube_dark_color</item>
|
||||
<item name="colorAccent">@color/light_youtube_accent_color</item>
|
||||
<item name="android:background">@color/light_background_color</item>
|
||||
<item name="nnf_separator_color">@color/light_separator_color</item>
|
||||
|
||||
<item name="alertDialogTheme">@style/FilePickerAlertDialogThemeLight</item>
|
||||
<item name="nnf_toolbarTheme">@style/FilePickerToolbarLight</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerAlertDialogThemeLight" parent="Theme.AppCompat.Dialog.Alert">
|
||||
<item name="colorPrimary">@color/light_youtube_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/light_youtube_dark_color</item>
|
||||
<item name="colorAccent">@color/light_youtube_accent_color</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerToolbarLight" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
<item name="android:background">@color/light_youtube_primary_color</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerThemeDark" parent="FilePickerThemeLight">
|
||||
<item name="colorPrimary">@color/dark_youtube_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/dark_youtube_dark_color</item>
|
||||
<item name="colorAccent">@color/dark_youtube_accent_color</item>
|
||||
<item name="android:background">@color/dark_background_color</item>
|
||||
<item name="android:textColorPrimary">@color/dark_youtube_accent_color</item>
|
||||
<item name="nnf_separator_color">@color/black_separator_color</item>
|
||||
|
||||
<item name="alertDialogTheme">@style/FilePickerAlertDialogThemeDark</item>
|
||||
<item name="nnf_toolbarTheme">@style/FilePickerToolbarDark</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerAlertDialogThemeDark" parent="Theme.AppCompat.Dialog.Alert">
|
||||
<item name="colorPrimary">@color/dark_youtube_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/dark_youtube_dark_color</item>
|
||||
<item name="colorAccent">@color/dark_youtube_accent_color</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerToolbarDark" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
<item name="android:background">@color/dark_youtube_primary_color</item>
|
||||
</style>
|
||||
|
||||
<style name="RouterActivityThemeLight" parent="LightTheme">
|
||||
<item name="colorPrimary">@android:color/transparent</item>
|
||||
<item name="colorPrimaryDark">@android:color/transparent</item>
|
||||
|
|
|
|||
55
app/src/main/res/values/styles_misc.xml
Normal file
55
app/src/main/res/values/styles_misc.xml
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="RedButton" parent="Widget.AppCompat.Button.Colored">
|
||||
<item name="colorButtonNormal">@color/subscribe_background_color</item>
|
||||
<item name="android:textColor">@color/subscribe_text_color</item>
|
||||
<item name="colorControlHighlight">@color/dark_ripple_color</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!--File picker styles-->
|
||||
|
||||
<style name="FilePickerThemeLight" parent="NNF_BaseTheme.Light">
|
||||
<item name="colorPrimary">@color/light_youtube_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/light_youtube_dark_color</item>
|
||||
<item name="colorAccent">@color/light_youtube_accent_color</item>
|
||||
<item name="android:background">@color/light_background_color</item>
|
||||
<item name="nnf_separator_color">@color/light_separator_color</item>
|
||||
|
||||
<item name="alertDialogTheme">@style/FilePickerAlertDialogThemeLight</item>
|
||||
<item name="nnf_toolbarTheme">@style/FilePickerToolbarLight</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerAlertDialogThemeLight" parent="Theme.AppCompat.Dialog.Alert">
|
||||
<item name="colorPrimary">@color/light_youtube_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/light_youtube_dark_color</item>
|
||||
<item name="colorAccent">@color/light_youtube_accent_color</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerToolbarLight" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
<item name="android:background">@color/light_youtube_primary_color</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerThemeDark" parent="FilePickerThemeLight">
|
||||
<item name="colorPrimary">@color/dark_youtube_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/dark_youtube_dark_color</item>
|
||||
<item name="colorAccent">@color/dark_youtube_accent_color</item>
|
||||
<item name="android:background">@color/dark_background_color</item>
|
||||
<item name="android:textColorPrimary">@color/dark_youtube_accent_color</item>
|
||||
<item name="nnf_separator_color">@color/black_separator_color</item>
|
||||
|
||||
<item name="alertDialogTheme">@style/FilePickerAlertDialogThemeDark</item>
|
||||
<item name="nnf_toolbarTheme">@style/FilePickerToolbarDark</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerAlertDialogThemeDark" parent="Theme.AppCompat.Dialog.Alert">
|
||||
<item name="colorPrimary">@color/dark_youtube_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/dark_youtube_dark_color</item>
|
||||
<item name="colorAccent">@color/dark_youtube_accent_color</item>
|
||||
</style>
|
||||
|
||||
<style name="FilePickerToolbarDark" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
<item name="android:background">@color/dark_youtube_primary_color</item>
|
||||
</style>
|
||||
</resources>
|
||||
29
app/src/main/res/values/styles_services.xml
Normal file
29
app/src/main/res/values/styles_services.xml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- YouTube -->
|
||||
<style name="LightTheme.YouTube" parent="LightTheme.Switchable"/>
|
||||
|
||||
<style name="DarkTheme.YouTube" parent="DarkTheme.Switchable"/>
|
||||
|
||||
<style name="BlackTheme.YouTube" parent="BlackTheme.Switchable"/>
|
||||
|
||||
<!-- SoundCloud -->
|
||||
<style name="LightTheme.SoundCloud" parent="LightTheme.Switchable">
|
||||
<item name="colorPrimary">@color/light_soundcloud_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/light_soundcloud_dark_color</item>
|
||||
<item name="colorAccent">@color/light_soundcloud_accent_color</item>
|
||||
</style>
|
||||
|
||||
<style name="DarkTheme.SoundCloud" parent="DarkTheme.Switchable">
|
||||
<item name="colorPrimary">@color/dark_soundcloud_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/dark_soundcloud_dark_color</item>
|
||||
<item name="colorAccent">@color/dark_soundcloud_accent_color</item>
|
||||
</style>
|
||||
|
||||
<style name="BlackTheme.SoundCloud" parent="BlackTheme.Switchable">
|
||||
<item name="colorPrimary">@color/dark_soundcloud_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/dark_soundcloud_dark_color</item>
|
||||
<item name="colorAccent">@color/dark_soundcloud_accent_color</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue