make theming flexibler
This commit is contained in:
1 parent
10bfb3469e
commit
43f1d345cf
14 files changed
+469
-338
No files matched your search
+54
-66
@@ -5,39 +5,23 @@ use constant THEMES_OUTDIR => './res/values-v21/';
|
||||
use constant THEMES_LIST => './res/values-v21/themes-list.xml';
|
||||
|
||||
my $THEMES = [
|
||||
{
|
||||
_name => 'standard',
|
||||
light => { colorAccent => '#ff3e677a', colorPrimary => '#ff37474f', colorPrimaryDark => '#ff263238', controlsNormal=>'@color/material_grey_900', _bg => '#fff0f0f0' },
|
||||
dark => { colorAccent => '#ff3e677a', colorPrimary => '#ff37474f', colorPrimaryDark => '#ff263238', controlsNormal=>'@color/material_grey_300', _bg => '#ff2a2a2a' },
|
||||
},
|
||||
{
|
||||
_name => 'greyish',
|
||||
light => { colorAccent => '#ff000000', colorPrimary => '#ff212121', colorPrimaryDark => '#ff090909', controlsNormal=>'@color/material_grey_600', _bg => '#fff0f0f0' },
|
||||
dark => { colorAccent => '#ffd8d8d8', colorPrimary => '#ff212121', colorPrimaryDark => '#ff090909', controlsNormal=>'@color/material_grey_600', _bg => '#ff2a2a2a' },
|
||||
},
|
||||
{
|
||||
_name => 'orange',
|
||||
light => { colorAccent => '#FFF57F17', colorPrimary => '#FFE65100', colorPrimaryDark => '#FFBF360C', controlsNormal=>'@color/material_grey_900', _bg => '#fff0f0f0' },
|
||||
dark => { colorAccent => '#FFF57F17', colorPrimary => '#FFE65100', colorPrimaryDark => '#FFBF360C', controlsNormal=>'@color/material_grey_300', _bg => '#ff2a2a2a' },
|
||||
},
|
||||
{
|
||||
_name => 'blue',
|
||||
light => { colorAccent => '#FF03A9F4', colorPrimary => '#FF0277BD', colorPrimaryDark => '#FF01579B', controlsNormal=>'@color/material_grey_900', _bg => '#fff0f0f0' },
|
||||
dark => { colorAccent => '#FF03A9F4', colorPrimary => '#FF0277BD', colorPrimaryDark => '#FF01579B', controlsNormal=>'@color/material_grey_300', _bg => '#ff2a2a2a' },
|
||||
},
|
||||
{
|
||||
_name => 'red',
|
||||
light => { colorAccent => '#ffd50000', colorPrimary => '#ffc62828', colorPrimaryDark => '#ffb71c1c', controlsNormal=>'@color/material_grey_900', _bg => '#fff0f0f0' },
|
||||
dark => { colorAccent => '#ffd50000', colorPrimary => '#ffc62828', colorPrimaryDark => '#ffb71c1c', controlsNormal=>'@color/material_grey_300', _bg => '#ff2a2a2a' },
|
||||
},
|
||||
{ name=>"standard_light", id=>0, dark=>0, colorAccent => '#ff3e677a', colorPrimary => '#ff37474f', colorPrimaryDark => '#ff263238', controlsNormal=>'@color/material_grey_900', _bg => '#fff0f0f0' },
|
||||
{ name=>"standard_dark", id=>1, dark=>1, colorAccent => '#ff3e677a', colorPrimary => '#ff37474f', colorPrimaryDark => '#ff263238', controlsNormal=>'@color/material_grey_300', _bg => '#ff2a2a2a' },
|
||||
{ name=>"grey_light", id=>2, dark=>0, colorAccent => '#ff000000', colorPrimary => '#ff212121', colorPrimaryDark => '#ff090909', controlsNormal=>'@color/material_grey_600', _bg => '#fff0f0f0' },
|
||||
{ name=>"grey_dark", id=>3, dark=>1, colorAccent => '#ffd8d8d8', colorPrimary => '#ff212121', colorPrimaryDark => '#ff090909', controlsNormal=>'@color/material_grey_600', _bg => '#ff2a2a2a' },
|
||||
{ name=>"orange_light", id=>4, dark=>0, colorAccent => '#FFF57F17', colorPrimary => '#FFE65100', colorPrimaryDark => '#FFBF360C', controlsNormal=>'@color/material_grey_900', _bg => '#fff0f0f0' },
|
||||
{ name=>"orange_dark", id=>5, dark=>1, colorAccent => '#FFF57F17', colorPrimary => '#FFE65100', colorPrimaryDark => '#FFBF360C', controlsNormal=>'@color/material_grey_300', _bg => '#ff2a2a2a' },
|
||||
{ name=>"blue_light", id=>6, dark=>0, colorAccent => '#FF03A9F4', colorPrimary => '#FF0277BD', colorPrimaryDark => '#FF01579B', controlsNormal=>'@color/material_grey_900', _bg => '#fff0f0f0' },
|
||||
{ name=>"blue_dark", id=>7, dark=>1, colorAccent => '#FF03A9F4', colorPrimary => '#FF0277BD', colorPrimaryDark => '#FF01579B', controlsNormal=>'@color/material_grey_300', _bg => '#ff2a2a2a' },
|
||||
{ name=>"red_light", id=>8, dark=>0, colorAccent => '#ffd50000', colorPrimary => '#ffc62828', colorPrimaryDark => '#ffb71c1c', controlsNormal=>'@color/material_grey_900', _bg => '#fff0f0f0' },
|
||||
{ name=>"red_dark", id=>9, dark=>1, colorAccent => '#ffd50000', colorPrimary => '#ffc62828', colorPrimaryDark => '#ffb71c1c', controlsNormal=>'@color/material_grey_300', _bg => '#ff2a2a2a' },
|
||||
];
|
||||
|
||||
|
||||
my $XML_ARRAYS = {};
|
||||
my $THEME_ID = 0;
|
||||
foreach my $theme_ref (@$THEMES) {
|
||||
my $theme_name = $theme_ref->{_name};
|
||||
my $theme_id = ($theme_name eq 'standard' ? '' : ucfirst($theme_name)."."); # standard has no prefix
|
||||
my $theme_name = $theme_ref->{name};
|
||||
my $theme_id = $theme_ref->{id} == 0 ? '' : ucfirst($theme_name)."."; # standard_light has no prefix
|
||||
my $outfile = THEMES_OUTDIR."/theme-$theme_name.xml";
|
||||
my $outbuff = get_theme_xml($theme_ref, $theme_id);
|
||||
|
||||
@@ -45,6 +29,7 @@ foreach my $theme_ref (@$THEMES) {
|
||||
print OUT $outbuff;
|
||||
close(OUT);
|
||||
|
||||
# Get all styles found in get_theme_xml output.
|
||||
foreach my $line (split(/\n/, $outbuff)) {
|
||||
if (my ($style) = $line =~ /style name=\"([^"]+)\"/) {
|
||||
my $category = "theme_category_".lc((split(/\./, $style))[-1]);
|
||||
@@ -52,18 +37,15 @@ foreach my $theme_ref (@$THEMES) {
|
||||
}
|
||||
}
|
||||
|
||||
# use this loop to also populate the theme list output
|
||||
# assumes that get_theme_xml created two themes per definition (light and dark)
|
||||
foreach my $variant ('', 'Dark.') {
|
||||
my $tvvar = ($variant eq '' ? 'light' : 'dark');
|
||||
my $tvarr = join(",", map { $theme_ref->{$tvvar}->{$_} } qw(colorPrimaryDark _bg colorPrimary));
|
||||
|
||||
# user visible names of themes
|
||||
push(@{$XML_ARRAYS->{'string-array'}->{theme_entries}}, $variant.ucfirst($theme_name));
|
||||
# csv list of theme info, such as its id and the primary colors to show in preview
|
||||
push(@{$XML_ARRAYS->{'string-array'}->{theme_values}}, ($THEME_ID).",".$tvarr);
|
||||
$THEME_ID++;
|
||||
}
|
||||
my $tvarr = join(",", map { $theme_ref->{$_} } qw(colorPrimaryDark _bg colorPrimary));
|
||||
# csv list of theme info, such as its id and the primary colors to show in preview
|
||||
push(@{$XML_ARRAYS->{'string-array'}->{theme_values}}, $tvarr);
|
||||
# user visible names of themes
|
||||
push(@{$XML_ARRAYS->{'string-array'}->{theme_entries}}, $theme_ref->{name});
|
||||
# id <-> sort mapping
|
||||
push(@{$XML_ARRAYS->{'string-array'}->{theme_ids}}, $theme_ref->{id});
|
||||
# set flag whether theme is dark or not
|
||||
push(@{$XML_ARRAYS->{'string-array'}->{theme_variant}}, $theme_ref->{dark} ? 'dark' : 'light');
|
||||
}
|
||||
|
||||
|
||||
@@ -115,18 +97,22 @@ my $DATA = << "EOF";
|
||||
-->
|
||||
|
||||
<resources>
|
||||
EOF
|
||||
|
||||
if($this->{dark} == 0) {
|
||||
$DATA .= << "EOF"
|
||||
<style name="${tid}VanillaBase" parent="android:Theme.Material.Light.DarkActionBar">
|
||||
<item name="overlay_background_color">\@color/overlay_background_light</item>
|
||||
<item name="overlay_foreground_color">\@color/overlay_foreground_light</item>
|
||||
<item name="float_color">\@color/material_grey_400</item>
|
||||
<item name="background_circle_color">\@color/material_grey_300</item>
|
||||
<item name="tabs_background">$this->{light}->{colorPrimary}</item>
|
||||
<item name="now_playing_marker">$this->{light}->{colorAccent}</item>
|
||||
<item name="controls_normal">$this->{light}->{controlsNormal}</item>
|
||||
<item name="controls_active">$this->{light}->{colorAccent}</item>
|
||||
<item name="android:colorAccent">$this->{light}->{colorAccent}</item>
|
||||
<item name="android:colorPrimary">$this->{light}->{colorPrimary}</item>
|
||||
<item name="android:colorPrimaryDark">$this->{light}->{colorPrimaryDark}</item>
|
||||
<item name="tabs_background">$this->{colorPrimary}</item>
|
||||
<item name="now_playing_marker">$this->{colorAccent}</item>
|
||||
<item name="controls_normal">$this->{controlsNormal}</item>
|
||||
<item name="controls_active">$this->{colorAccent}</item>
|
||||
<item name="android:colorAccent">$this->{colorAccent}</item>
|
||||
<item name="android:colorPrimary">$this->{colorPrimary}</item>
|
||||
<item name="android:colorPrimaryDark">$this->{colorPrimaryDark}</item>
|
||||
</style>
|
||||
|
||||
<style name="${tid}Playback" parent="${tid}VanillaBase">
|
||||
@@ -144,45 +130,47 @@ my $DATA = << "EOF";
|
||||
|
||||
<style name="${tid}PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="background_circle_color">\@color/material_grey_300</item>
|
||||
<item name="controls_normal">$this->{light}->{controlsNormal}</item>
|
||||
<item name="controls_active">$this->{light}->{colorAccent}</item>
|
||||
<item name="controls_normal">$this->{controlsNormal}</item>
|
||||
<item name="controls_active">$this->{colorAccent}</item>
|
||||
</style>
|
||||
|
||||
EOF
|
||||
} else {
|
||||
$DATA .= << "EOF"
|
||||
<!-- dark theme -->
|
||||
<style name="${tid}Dark.VanillaBase" parent="android:Theme.Material">
|
||||
<style name="${tid}VanillaBase" parent="android:Theme.Material">
|
||||
<item name="overlay_background_color">\@color/overlay_background_dark</item>
|
||||
<item name="overlay_foreground_color">\@color/overlay_foreground_dark</item>
|
||||
<item name="float_color">\@color/material_grey_900</item>
|
||||
<item name="background_circle_color">\@color/material_grey_700</item>
|
||||
<item name="tabs_background">$this->{dark}->{colorPrimary}</item>
|
||||
<item name="now_playing_marker">$this->{dark}->{colorAccent}</item>
|
||||
<item name="controls_normal">$this->{dark}->{controlsNormal}</item>
|
||||
<item name="controls_active">$this->{dark}->{colorAccent}</item>
|
||||
<item name="android:colorAccent">$this->{dark}->{colorAccent}</item>
|
||||
<item name="android:colorPrimary">$this->{dark}->{colorPrimary}</item>
|
||||
<item name="android:colorPrimaryDark">$this->{dark}->{colorPrimaryDark}</item>
|
||||
<item name="tabs_background">$this->{colorPrimary}</item>
|
||||
<item name="now_playing_marker">$this->{colorAccent}</item>
|
||||
<item name="controls_normal">$this->{controlsNormal}</item>
|
||||
<item name="controls_active">$this->{colorAccent}</item>
|
||||
<item name="android:colorAccent">$this->{colorAccent}</item>
|
||||
<item name="android:colorPrimary">$this->{colorPrimary}</item>
|
||||
<item name="android:colorPrimaryDark">$this->{colorPrimaryDark}</item>
|
||||
</style>
|
||||
|
||||
<style name="${tid}Dark.Playback" parent="${tid}Dark.VanillaBase">
|
||||
<style name="${tid}Playback" parent="${tid}VanillaBase">
|
||||
<item name="android:actionBarStyle">\@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="${tid}Dark.BackActionBar" parent="${tid}Dark.VanillaBase">
|
||||
<style name="${tid}BackActionBar" parent="${tid}VanillaBase">
|
||||
<item name="android:actionBarStyle">\@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="${tid}Dark.Library" parent="${tid}Dark.VanillaBase">
|
||||
<style name="${tid}Library" parent="${tid}VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="${tid}Dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<style name="${tid}PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<item name="background_circle_color">\@color/material_grey_700</item>
|
||||
<item name="controls_normal">$this->{dark}->{controlsNormal}</item>
|
||||
<item name="controls_active">$this->{dark}->{colorAccent}</item>
|
||||
<item name="controls_normal">$this->{controlsNormal}</item>
|
||||
<item name="controls_active">$this->{colorAccent}</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
EOF
|
||||
}
|
||||
$DATA .= "\n</resources>\n";
|
||||
return $DATA
|
||||
}
|
||||
@@ -18,41 +18,8 @@
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<style name="Blue.VanillaBase" parent="android:Theme.Material.Light.DarkActionBar">
|
||||
<item name="overlay_background_color">@color/overlay_background_light</item>
|
||||
<item name="overlay_foreground_color">@color/overlay_foreground_light</item>
|
||||
<item name="float_color">@color/material_grey_400</item>
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="tabs_background">#FF0277BD</item>
|
||||
<item name="now_playing_marker">#FF03A9F4</item>
|
||||
<item name="controls_normal">@color/material_grey_900</item>
|
||||
<item name="controls_active">#FF03A9F4</item>
|
||||
<item name="android:colorAccent">#FF03A9F4</item>
|
||||
<item name="android:colorPrimary">#FF0277BD</item>
|
||||
<item name="android:colorPrimaryDark">#FF01579B</item>
|
||||
</style>
|
||||
|
||||
<style name="Blue.Playback" parent="Blue.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Blue.BackActionBar" parent="Blue.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Blue.Library" parent="Blue.VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Blue.PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="controls_normal">@color/material_grey_900</item>
|
||||
<item name="controls_active">#FF03A9F4</item>
|
||||
</style>
|
||||
|
||||
<!-- dark theme -->
|
||||
<style name="Blue.Dark.VanillaBase" parent="android:Theme.Material">
|
||||
<style name="Blue_dark.VanillaBase" parent="android:Theme.Material">
|
||||
<item name="overlay_background_color">@color/overlay_background_dark</item>
|
||||
<item name="overlay_foreground_color">@color/overlay_foreground_dark</item>
|
||||
<item name="float_color">@color/material_grey_900</item>
|
||||
@@ -66,20 +33,20 @@
|
||||
<item name="android:colorPrimaryDark">#FF01579B</item>
|
||||
</style>
|
||||
|
||||
<style name="Blue.Dark.Playback" parent="Blue.Dark.VanillaBase">
|
||||
<style name="Blue_dark.Playback" parent="Blue_dark.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Blue.Dark.BackActionBar" parent="Blue.Dark.VanillaBase">
|
||||
<style name="Blue_dark.BackActionBar" parent="Blue_dark.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Blue.Dark.Library" parent="Blue.Dark.VanillaBase">
|
||||
<style name="Blue_dark.Library" parent="Blue_dark.VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Blue.Dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<style name="Blue_dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<item name="background_circle_color">@color/material_grey_700</item>
|
||||
<item name="controls_normal">@color/material_grey_300</item>
|
||||
<item name="controls_active">#FF03A9F4</item>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
*** THIS FILE WAS GENERATED BY 'generate-themes.pl' - DO NOT TOUCH ***
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<style name="Blue_light.VanillaBase" parent="android:Theme.Material.Light.DarkActionBar">
|
||||
<item name="overlay_background_color">@color/overlay_background_light</item>
|
||||
<item name="overlay_foreground_color">@color/overlay_foreground_light</item>
|
||||
<item name="float_color">@color/material_grey_400</item>
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="tabs_background">#FF0277BD</item>
|
||||
<item name="now_playing_marker">#FF03A9F4</item>
|
||||
<item name="controls_normal">@color/material_grey_900</item>
|
||||
<item name="controls_active">#FF03A9F4</item>
|
||||
<item name="android:colorAccent">#FF03A9F4</item>
|
||||
<item name="android:colorPrimary">#FF0277BD</item>
|
||||
<item name="android:colorPrimaryDark">#FF01579B</item>
|
||||
</style>
|
||||
|
||||
<style name="Blue_light.Playback" parent="Blue_light.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Blue_light.BackActionBar" parent="Blue_light.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Blue_light.Library" parent="Blue_light.VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Blue_light.PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="controls_normal">@color/material_grey_900</item>
|
||||
<item name="controls_active">#FF03A9F4</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -18,41 +18,8 @@
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<style name="Greyish.VanillaBase" parent="android:Theme.Material.Light.DarkActionBar">
|
||||
<item name="overlay_background_color">@color/overlay_background_light</item>
|
||||
<item name="overlay_foreground_color">@color/overlay_foreground_light</item>
|
||||
<item name="float_color">@color/material_grey_400</item>
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="tabs_background">#ff212121</item>
|
||||
<item name="now_playing_marker">#ff000000</item>
|
||||
<item name="controls_normal">@color/material_grey_600</item>
|
||||
<item name="controls_active">#ff000000</item>
|
||||
<item name="android:colorAccent">#ff000000</item>
|
||||
<item name="android:colorPrimary">#ff212121</item>
|
||||
<item name="android:colorPrimaryDark">#ff090909</item>
|
||||
</style>
|
||||
|
||||
<style name="Greyish.Playback" parent="Greyish.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Greyish.BackActionBar" parent="Greyish.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Greyish.Library" parent="Greyish.VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Greyish.PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="controls_normal">@color/material_grey_600</item>
|
||||
<item name="controls_active">#ff000000</item>
|
||||
</style>
|
||||
|
||||
<!-- dark theme -->
|
||||
<style name="Greyish.Dark.VanillaBase" parent="android:Theme.Material">
|
||||
<style name="Grey_dark.VanillaBase" parent="android:Theme.Material">
|
||||
<item name="overlay_background_color">@color/overlay_background_dark</item>
|
||||
<item name="overlay_foreground_color">@color/overlay_foreground_dark</item>
|
||||
<item name="float_color">@color/material_grey_900</item>
|
||||
@@ -66,20 +33,20 @@
|
||||
<item name="android:colorPrimaryDark">#ff090909</item>
|
||||
</style>
|
||||
|
||||
<style name="Greyish.Dark.Playback" parent="Greyish.Dark.VanillaBase">
|
||||
<style name="Grey_dark.Playback" parent="Grey_dark.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Greyish.Dark.BackActionBar" parent="Greyish.Dark.VanillaBase">
|
||||
<style name="Grey_dark.BackActionBar" parent="Grey_dark.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Greyish.Dark.Library" parent="Greyish.Dark.VanillaBase">
|
||||
<style name="Grey_dark.Library" parent="Grey_dark.VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Greyish.Dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<style name="Grey_dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<item name="background_circle_color">@color/material_grey_700</item>
|
||||
<item name="controls_normal">@color/material_grey_600</item>
|
||||
<item name="controls_active">#ffd8d8d8</item>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
*** THIS FILE WAS GENERATED BY 'generate-themes.pl' - DO NOT TOUCH ***
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<style name="Grey_light.VanillaBase" parent="android:Theme.Material.Light.DarkActionBar">
|
||||
<item name="overlay_background_color">@color/overlay_background_light</item>
|
||||
<item name="overlay_foreground_color">@color/overlay_foreground_light</item>
|
||||
<item name="float_color">@color/material_grey_400</item>
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="tabs_background">#ff212121</item>
|
||||
<item name="now_playing_marker">#ff000000</item>
|
||||
<item name="controls_normal">@color/material_grey_600</item>
|
||||
<item name="controls_active">#ff000000</item>
|
||||
<item name="android:colorAccent">#ff000000</item>
|
||||
<item name="android:colorPrimary">#ff212121</item>
|
||||
<item name="android:colorPrimaryDark">#ff090909</item>
|
||||
</style>
|
||||
|
||||
<style name="Grey_light.Playback" parent="Grey_light.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Grey_light.BackActionBar" parent="Grey_light.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Grey_light.Library" parent="Grey_light.VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Grey_light.PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="controls_normal">@color/material_grey_600</item>
|
||||
<item name="controls_active">#ff000000</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -18,41 +18,8 @@
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<style name="Orange.VanillaBase" parent="android:Theme.Material.Light.DarkActionBar">
|
||||
<item name="overlay_background_color">@color/overlay_background_light</item>
|
||||
<item name="overlay_foreground_color">@color/overlay_foreground_light</item>
|
||||
<item name="float_color">@color/material_grey_400</item>
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="tabs_background">#FFE65100</item>
|
||||
<item name="now_playing_marker">#FFF57F17</item>
|
||||
<item name="controls_normal">@color/material_grey_900</item>
|
||||
<item name="controls_active">#FFF57F17</item>
|
||||
<item name="android:colorAccent">#FFF57F17</item>
|
||||
<item name="android:colorPrimary">#FFE65100</item>
|
||||
<item name="android:colorPrimaryDark">#FFBF360C</item>
|
||||
</style>
|
||||
|
||||
<style name="Orange.Playback" parent="Orange.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Orange.BackActionBar" parent="Orange.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Orange.Library" parent="Orange.VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Orange.PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="controls_normal">@color/material_grey_900</item>
|
||||
<item name="controls_active">#FFF57F17</item>
|
||||
</style>
|
||||
|
||||
<!-- dark theme -->
|
||||
<style name="Orange.Dark.VanillaBase" parent="android:Theme.Material">
|
||||
<style name="Orange_dark.VanillaBase" parent="android:Theme.Material">
|
||||
<item name="overlay_background_color">@color/overlay_background_dark</item>
|
||||
<item name="overlay_foreground_color">@color/overlay_foreground_dark</item>
|
||||
<item name="float_color">@color/material_grey_900</item>
|
||||
@@ -66,20 +33,20 @@
|
||||
<item name="android:colorPrimaryDark">#FFBF360C</item>
|
||||
</style>
|
||||
|
||||
<style name="Orange.Dark.Playback" parent="Orange.Dark.VanillaBase">
|
||||
<style name="Orange_dark.Playback" parent="Orange_dark.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Orange.Dark.BackActionBar" parent="Orange.Dark.VanillaBase">
|
||||
<style name="Orange_dark.BackActionBar" parent="Orange_dark.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Orange.Dark.Library" parent="Orange.Dark.VanillaBase">
|
||||
<style name="Orange_dark.Library" parent="Orange_dark.VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Orange.Dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<style name="Orange_dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<item name="background_circle_color">@color/material_grey_700</item>
|
||||
<item name="controls_normal">@color/material_grey_300</item>
|
||||
<item name="controls_active">#FFF57F17</item>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
*** THIS FILE WAS GENERATED BY 'generate-themes.pl' - DO NOT TOUCH ***
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<style name="Orange_light.VanillaBase" parent="android:Theme.Material.Light.DarkActionBar">
|
||||
<item name="overlay_background_color">@color/overlay_background_light</item>
|
||||
<item name="overlay_foreground_color">@color/overlay_foreground_light</item>
|
||||
<item name="float_color">@color/material_grey_400</item>
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="tabs_background">#FFE65100</item>
|
||||
<item name="now_playing_marker">#FFF57F17</item>
|
||||
<item name="controls_normal">@color/material_grey_900</item>
|
||||
<item name="controls_active">#FFF57F17</item>
|
||||
<item name="android:colorAccent">#FFF57F17</item>
|
||||
<item name="android:colorPrimary">#FFE65100</item>
|
||||
<item name="android:colorPrimaryDark">#FFBF360C</item>
|
||||
</style>
|
||||
|
||||
<style name="Orange_light.Playback" parent="Orange_light.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Orange_light.BackActionBar" parent="Orange_light.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Orange_light.Library" parent="Orange_light.VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Orange_light.PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="controls_normal">@color/material_grey_900</item>
|
||||
<item name="controls_active">#FFF57F17</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -18,41 +18,8 @@
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<style name="Red.VanillaBase" parent="android:Theme.Material.Light.DarkActionBar">
|
||||
<item name="overlay_background_color">@color/overlay_background_light</item>
|
||||
<item name="overlay_foreground_color">@color/overlay_foreground_light</item>
|
||||
<item name="float_color">@color/material_grey_400</item>
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="tabs_background">#ffc62828</item>
|
||||
<item name="now_playing_marker">#ffd50000</item>
|
||||
<item name="controls_normal">@color/material_grey_900</item>
|
||||
<item name="controls_active">#ffd50000</item>
|
||||
<item name="android:colorAccent">#ffd50000</item>
|
||||
<item name="android:colorPrimary">#ffc62828</item>
|
||||
<item name="android:colorPrimaryDark">#ffb71c1c</item>
|
||||
</style>
|
||||
|
||||
<style name="Red.Playback" parent="Red.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Red.BackActionBar" parent="Red.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Red.Library" parent="Red.VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Red.PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="controls_normal">@color/material_grey_900</item>
|
||||
<item name="controls_active">#ffd50000</item>
|
||||
</style>
|
||||
|
||||
<!-- dark theme -->
|
||||
<style name="Red.Dark.VanillaBase" parent="android:Theme.Material">
|
||||
<style name="Red_dark.VanillaBase" parent="android:Theme.Material">
|
||||
<item name="overlay_background_color">@color/overlay_background_dark</item>
|
||||
<item name="overlay_foreground_color">@color/overlay_foreground_dark</item>
|
||||
<item name="float_color">@color/material_grey_900</item>
|
||||
@@ -66,20 +33,20 @@
|
||||
<item name="android:colorPrimaryDark">#ffb71c1c</item>
|
||||
</style>
|
||||
|
||||
<style name="Red.Dark.Playback" parent="Red.Dark.VanillaBase">
|
||||
<style name="Red_dark.Playback" parent="Red_dark.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Red.Dark.BackActionBar" parent="Red.Dark.VanillaBase">
|
||||
<style name="Red_dark.BackActionBar" parent="Red_dark.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Red.Dark.Library" parent="Red.Dark.VanillaBase">
|
||||
<style name="Red_dark.Library" parent="Red_dark.VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Red.Dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<style name="Red_dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<item name="background_circle_color">@color/material_grey_700</item>
|
||||
<item name="controls_normal">@color/material_grey_300</item>
|
||||
<item name="controls_active">#ffd50000</item>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
*** THIS FILE WAS GENERATED BY 'generate-themes.pl' - DO NOT TOUCH ***
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<style name="Red_light.VanillaBase" parent="android:Theme.Material.Light.DarkActionBar">
|
||||
<item name="overlay_background_color">@color/overlay_background_light</item>
|
||||
<item name="overlay_foreground_color">@color/overlay_foreground_light</item>
|
||||
<item name="float_color">@color/material_grey_400</item>
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="tabs_background">#ffc62828</item>
|
||||
<item name="now_playing_marker">#ffd50000</item>
|
||||
<item name="controls_normal">@color/material_grey_900</item>
|
||||
<item name="controls_active">#ffd50000</item>
|
||||
<item name="android:colorAccent">#ffd50000</item>
|
||||
<item name="android:colorPrimary">#ffc62828</item>
|
||||
<item name="android:colorPrimaryDark">#ffb71c1c</item>
|
||||
</style>
|
||||
|
||||
<style name="Red_light.Playback" parent="Red_light.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Red_light.BackActionBar" parent="Red_light.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Red_light.Library" parent="Red_light.VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Red_light.PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="controls_normal">@color/material_grey_900</item>
|
||||
<item name="controls_active">#ffd50000</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
*** THIS FILE WAS GENERATED BY 'generate-themes.pl' - DO NOT TOUCH ***
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<!-- dark theme -->
|
||||
<style name="Standard_dark.VanillaBase" parent="android:Theme.Material">
|
||||
<item name="overlay_background_color">@color/overlay_background_dark</item>
|
||||
<item name="overlay_foreground_color">@color/overlay_foreground_dark</item>
|
||||
<item name="float_color">@color/material_grey_900</item>
|
||||
<item name="background_circle_color">@color/material_grey_700</item>
|
||||
<item name="tabs_background">#ff37474f</item>
|
||||
<item name="now_playing_marker">#ff3e677a</item>
|
||||
<item name="controls_normal">@color/material_grey_300</item>
|
||||
<item name="controls_active">#ff3e677a</item>
|
||||
<item name="android:colorAccent">#ff3e677a</item>
|
||||
<item name="android:colorPrimary">#ff37474f</item>
|
||||
<item name="android:colorPrimaryDark">#ff263238</item>
|
||||
</style>
|
||||
|
||||
<style name="Standard_dark.Playback" parent="Standard_dark.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Standard_dark.BackActionBar" parent="Standard_dark.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Standard_dark.Library" parent="Standard_dark.VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Standard_dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<item name="background_circle_color">@color/material_grey_700</item>
|
||||
<item name="controls_normal">@color/material_grey_300</item>
|
||||
<item name="controls_active">#ff3e677a</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -51,38 +51,4 @@
|
||||
<item name="controls_active">#ff3e677a</item>
|
||||
</style>
|
||||
|
||||
<!-- dark theme -->
|
||||
<style name="Dark.VanillaBase" parent="android:Theme.Material">
|
||||
<item name="overlay_background_color">@color/overlay_background_dark</item>
|
||||
<item name="overlay_foreground_color">@color/overlay_foreground_dark</item>
|
||||
<item name="float_color">@color/material_grey_900</item>
|
||||
<item name="background_circle_color">@color/material_grey_700</item>
|
||||
<item name="tabs_background">#ff37474f</item>
|
||||
<item name="now_playing_marker">#ff3e677a</item>
|
||||
<item name="controls_normal">@color/material_grey_300</item>
|
||||
<item name="controls_active">#ff3e677a</item>
|
||||
<item name="android:colorAccent">#ff3e677a</item>
|
||||
<item name="android:colorPrimary">#ff37474f</item>
|
||||
<item name="android:colorPrimaryDark">#ff263238</item>
|
||||
</style>
|
||||
|
||||
<style name="Dark.Playback" parent="Dark.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Dark.BackActionBar" parent="Dark.VanillaBase">
|
||||
<item name="android:actionBarStyle">@style/Universal.PlaybackActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="Dark.Library" parent="Dark.VanillaBase">
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<item name="background_circle_color">@color/material_grey_700</item>
|
||||
<item name="controls_normal">@color/material_grey_300</item>
|
||||
<item name="controls_active">#ff3e677a</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
+103
-77
@@ -3,93 +3,119 @@
|
||||
<resources>
|
||||
<integer-array name="theme_category_library">
|
||||
<item>@style/Library</item>
|
||||
<item>@style/Dark.Library</item>
|
||||
<item>@style/Greyish.Library</item>
|
||||
<item>@style/Greyish.Dark.Library</item>
|
||||
<item>@style/Orange.Library</item>
|
||||
<item>@style/Orange.Dark.Library</item>
|
||||
<item>@style/Blue.Library</item>
|
||||
<item>@style/Blue.Dark.Library</item>
|
||||
<item>@style/Red.Library</item>
|
||||
<item>@style/Red.Dark.Library</item>
|
||||
</integer-array>
|
||||
|
||||
<integer-array name="theme_category_backactionbar">
|
||||
<item>@style/BackActionBar</item>
|
||||
<item>@style/Dark.BackActionBar</item>
|
||||
<item>@style/Greyish.BackActionBar</item>
|
||||
<item>@style/Greyish.Dark.BackActionBar</item>
|
||||
<item>@style/Orange.BackActionBar</item>
|
||||
<item>@style/Orange.Dark.BackActionBar</item>
|
||||
<item>@style/Blue.BackActionBar</item>
|
||||
<item>@style/Blue.Dark.BackActionBar</item>
|
||||
<item>@style/Red.BackActionBar</item>
|
||||
<item>@style/Red.Dark.BackActionBar</item>
|
||||
</integer-array>
|
||||
|
||||
<integer-array name="theme_category_playback">
|
||||
<item>@style/Playback</item>
|
||||
<item>@style/Dark.Playback</item>
|
||||
<item>@style/Greyish.Playback</item>
|
||||
<item>@style/Greyish.Dark.Playback</item>
|
||||
<item>@style/Orange.Playback</item>
|
||||
<item>@style/Orange.Dark.Playback</item>
|
||||
<item>@style/Blue.Playback</item>
|
||||
<item>@style/Blue.Dark.Playback</item>
|
||||
<item>@style/Red.Playback</item>
|
||||
<item>@style/Red.Dark.Playback</item>
|
||||
</integer-array>
|
||||
|
||||
<integer-array name="theme_category_vanillabase">
|
||||
<item>@style/VanillaBase</item>
|
||||
<item>@style/Dark.VanillaBase</item>
|
||||
<item>@style/Greyish.VanillaBase</item>
|
||||
<item>@style/Greyish.Dark.VanillaBase</item>
|
||||
<item>@style/Orange.VanillaBase</item>
|
||||
<item>@style/Orange.Dark.VanillaBase</item>
|
||||
<item>@style/Blue.VanillaBase</item>
|
||||
<item>@style/Blue.Dark.VanillaBase</item>
|
||||
<item>@style/Red.VanillaBase</item>
|
||||
<item>@style/Red.Dark.VanillaBase</item>
|
||||
<item>@style/Standard_dark.Library</item>
|
||||
<item>@style/Grey_light.Library</item>
|
||||
<item>@style/Grey_dark.Library</item>
|
||||
<item>@style/Orange_light.Library</item>
|
||||
<item>@style/Orange_dark.Library</item>
|
||||
<item>@style/Blue_light.Library</item>
|
||||
<item>@style/Blue_dark.Library</item>
|
||||
<item>@style/Red_light.Library</item>
|
||||
<item>@style/Red_dark.Library</item>
|
||||
</integer-array>
|
||||
|
||||
<integer-array name="theme_category_popupdialog">
|
||||
<item>@style/PopupDialog</item>
|
||||
<item>@style/Dark.PopupDialog</item>
|
||||
<item>@style/Greyish.PopupDialog</item>
|
||||
<item>@style/Greyish.Dark.PopupDialog</item>
|
||||
<item>@style/Orange.PopupDialog</item>
|
||||
<item>@style/Orange.Dark.PopupDialog</item>
|
||||
<item>@style/Blue.PopupDialog</item>
|
||||
<item>@style/Blue.Dark.PopupDialog</item>
|
||||
<item>@style/Red.PopupDialog</item>
|
||||
<item>@style/Red.Dark.PopupDialog</item>
|
||||
<item>@style/Standard_dark.PopupDialog</item>
|
||||
<item>@style/Grey_light.PopupDialog</item>
|
||||
<item>@style/Grey_dark.PopupDialog</item>
|
||||
<item>@style/Orange_light.PopupDialog</item>
|
||||
<item>@style/Orange_dark.PopupDialog</item>
|
||||
<item>@style/Blue_light.PopupDialog</item>
|
||||
<item>@style/Blue_dark.PopupDialog</item>
|
||||
<item>@style/Red_light.PopupDialog</item>
|
||||
<item>@style/Red_dark.PopupDialog</item>
|
||||
</integer-array>
|
||||
|
||||
<integer-array name="theme_category_backactionbar">
|
||||
<item>@style/BackActionBar</item>
|
||||
<item>@style/Standard_dark.BackActionBar</item>
|
||||
<item>@style/Grey_light.BackActionBar</item>
|
||||
<item>@style/Grey_dark.BackActionBar</item>
|
||||
<item>@style/Orange_light.BackActionBar</item>
|
||||
<item>@style/Orange_dark.BackActionBar</item>
|
||||
<item>@style/Blue_light.BackActionBar</item>
|
||||
<item>@style/Blue_dark.BackActionBar</item>
|
||||
<item>@style/Red_light.BackActionBar</item>
|
||||
<item>@style/Red_dark.BackActionBar</item>
|
||||
</integer-array>
|
||||
|
||||
<integer-array name="theme_category_vanillabase">
|
||||
<item>@style/VanillaBase</item>
|
||||
<item>@style/Standard_dark.VanillaBase</item>
|
||||
<item>@style/Grey_light.VanillaBase</item>
|
||||
<item>@style/Grey_dark.VanillaBase</item>
|
||||
<item>@style/Orange_light.VanillaBase</item>
|
||||
<item>@style/Orange_dark.VanillaBase</item>
|
||||
<item>@style/Blue_light.VanillaBase</item>
|
||||
<item>@style/Blue_dark.VanillaBase</item>
|
||||
<item>@style/Red_light.VanillaBase</item>
|
||||
<item>@style/Red_dark.VanillaBase</item>
|
||||
</integer-array>
|
||||
|
||||
<integer-array name="theme_category_playback">
|
||||
<item>@style/Playback</item>
|
||||
<item>@style/Standard_dark.Playback</item>
|
||||
<item>@style/Grey_light.Playback</item>
|
||||
<item>@style/Grey_dark.Playback</item>
|
||||
<item>@style/Orange_light.Playback</item>
|
||||
<item>@style/Orange_dark.Playback</item>
|
||||
<item>@style/Blue_light.Playback</item>
|
||||
<item>@style/Blue_dark.Playback</item>
|
||||
<item>@style/Red_light.Playback</item>
|
||||
<item>@style/Red_dark.Playback</item>
|
||||
</integer-array>
|
||||
|
||||
<string-array name="theme_variant">
|
||||
<item>light</item>
|
||||
<item>dark</item>
|
||||
<item>light</item>
|
||||
<item>dark</item>
|
||||
<item>light</item>
|
||||
<item>dark</item>
|
||||
<item>light</item>
|
||||
<item>dark</item>
|
||||
<item>light</item>
|
||||
<item>dark</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="theme_values">
|
||||
<item>0,#ff263238,#fff0f0f0,#ff37474f</item>
|
||||
<item>1,#ff263238,#ff2a2a2a,#ff37474f</item>
|
||||
<item>2,#ff090909,#fff0f0f0,#ff212121</item>
|
||||
<item>3,#ff090909,#ff2a2a2a,#ff212121</item>
|
||||
<item>4,#FFBF360C,#fff0f0f0,#FFE65100</item>
|
||||
<item>5,#FFBF360C,#ff2a2a2a,#FFE65100</item>
|
||||
<item>6,#FF01579B,#fff0f0f0,#FF0277BD</item>
|
||||
<item>7,#FF01579B,#ff2a2a2a,#FF0277BD</item>
|
||||
<item>8,#ffb71c1c,#fff0f0f0,#ffc62828</item>
|
||||
<item>9,#ffb71c1c,#ff2a2a2a,#ffc62828</item>
|
||||
<item>#ff263238,#fff0f0f0,#ff37474f</item>
|
||||
<item>#ff263238,#ff2a2a2a,#ff37474f</item>
|
||||
<item>#ff090909,#fff0f0f0,#ff212121</item>
|
||||
<item>#ff090909,#ff2a2a2a,#ff212121</item>
|
||||
<item>#FFBF360C,#fff0f0f0,#FFE65100</item>
|
||||
<item>#FFBF360C,#ff2a2a2a,#FFE65100</item>
|
||||
<item>#FF01579B,#fff0f0f0,#FF0277BD</item>
|
||||
<item>#FF01579B,#ff2a2a2a,#FF0277BD</item>
|
||||
<item>#ffb71c1c,#fff0f0f0,#ffc62828</item>
|
||||
<item>#ffb71c1c,#ff2a2a2a,#ffc62828</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="theme_entries">
|
||||
<item>Standard</item>
|
||||
<item>Dark.Standard</item>
|
||||
<item>Greyish</item>
|
||||
<item>Dark.Greyish</item>
|
||||
<item>Orange</item>
|
||||
<item>Dark.Orange</item>
|
||||
<item>Blue</item>
|
||||
<item>Dark.Blue</item>
|
||||
<item>Red</item>
|
||||
<item>Dark.Red</item>
|
||||
<item>standard_light</item>
|
||||
<item>standard_dark</item>
|
||||
<item>grey_light</item>
|
||||
<item>grey_dark</item>
|
||||
<item>orange_light</item>
|
||||
<item>orange_dark</item>
|
||||
<item>blue_light</item>
|
||||
<item>blue_dark</item>
|
||||
<item>red_light</item>
|
||||
<item>red_dark</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="theme_ids">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
<item>8</item>
|
||||
<item>9</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
@@ -47,6 +47,8 @@ public class PreferencesTheme extends PreferenceFragment
|
||||
PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(mContext);
|
||||
final String[] entries = getResources().getStringArray(R.array.theme_entries);
|
||||
final String[] values = getResources().getStringArray(R.array.theme_values);
|
||||
final String[] ids = getResources().getStringArray(R.array.theme_ids);
|
||||
|
||||
for (int i = 0; i < entries.length; i++) {
|
||||
|
||||
int[] attrs = decodeValue(values[i]);
|
||||
@@ -55,7 +57,7 @@ public class PreferencesTheme extends PreferenceFragment
|
||||
pref.setPersistent(false);
|
||||
pref.setOnPreferenceClickListener(this);
|
||||
pref.setTitle(entries[i]);
|
||||
pref.setKey(Long.toString(attrs[0])); // that's actually our value
|
||||
pref.setKey(ids[i]); // preference value of this theme
|
||||
pref.setIcon(generateThemePreview(attrs));
|
||||
screen.addPreference(pref);
|
||||
}
|
||||
@@ -83,16 +85,16 @@ public class PreferencesTheme extends PreferenceFragment
|
||||
|
||||
private Drawable generateThemePreview(int[] colors) {
|
||||
final int size = (int) getResources().getDimension(R.dimen.cover_size);
|
||||
final int step = size / (colors.length - 1);
|
||||
final int step = size / colors.length;
|
||||
|
||||
Bitmap bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.RGB_565);
|
||||
Canvas canvas = new Canvas(bitmap);
|
||||
Paint paint = new Paint();
|
||||
|
||||
paint.setStyle(Paint.Style.FILL);
|
||||
for (int i=1; i < colors.length; i++) {
|
||||
for (int i=0; i < colors.length; i++) {
|
||||
paint.setColor(colors[i]);
|
||||
canvas.drawRect(0, step*(i-1), size, size, paint);
|
||||
canvas.drawRect(0, step*i, size, size, paint);
|
||||
}
|
||||
|
||||
Drawable d = new BitmapDrawable(mContext.getResources(), bitmap);
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ThemeHelper {
|
||||
default:
|
||||
throw new IllegalArgumentException("setTheme() called with unknown theme!");
|
||||
}
|
||||
theme = ar.getResourceId(getSelectedTheme(context), -1);
|
||||
theme = ar.getResourceId(getSelectedThemeIndex(context), -1);
|
||||
ar.recycle();
|
||||
}
|
||||
|
||||
@@ -82,20 +82,30 @@ public class ThemeHelper {
|
||||
{
|
||||
boolean useDark = false;
|
||||
if(usesHoloTheme() == false) {
|
||||
useDark = (getSelectedTheme(context) % 2 != 0); // odd values are always dark
|
||||
final int idx = getSelectedThemeIndex(context);
|
||||
final String[] variants = context.getResources().getStringArray(R.array.theme_variant);
|
||||
useDark = variants[idx].equals("dark");
|
||||
}
|
||||
return useDark;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the user-selected theme id from the shared peferences provider
|
||||
* Returns the user-selected theme index from the shared peferences provider
|
||||
*
|
||||
* @param context the context to use
|
||||
* @return integer of the selected theme
|
||||
*/
|
||||
final private static int getSelectedTheme(Context context) {
|
||||
final private static int getSelectedThemeIndex(Context context) {
|
||||
SharedPreferences settings = PlaybackService.getSettings(context);
|
||||
return Integer.parseInt(settings.getString(PrefKeys.SELECTED_THEME, PrefDefaults.SELECTED_THEME));
|
||||
String prefValue = settings.getString(PrefKeys.SELECTED_THEME, PrefDefaults.SELECTED_THEME);
|
||||
|
||||
final String[] ids = context.getResources().getStringArray(R.array.theme_ids);
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
if (ids[i].equals(prefValue))
|
||||
return i;
|
||||
}
|
||||
// no theme found? return default theme.
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user