Make controls.xml more re-usable.
Note that we also must update the themes to have PopupWindow provide overlay_background_color.
This commit is contained in:
parent
b8d5953cf0
commit
1a4484b0c1
@ -20,8 +20,15 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:vib="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:vib="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:background="?overlay_background_color"
|
||||
android:orientation="horizontal"
|
||||
android:elevation="2dp">
|
||||
<ch.blinkenlights.android.vanilla.VanillaImageButton
|
||||
android:id="@+id/shuffle"
|
||||
android:paddingTop="@dimen/controls_padding"
|
||||
@ -78,4 +85,4 @@ THE SOFTWARE.
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/repeat_inactive"
|
||||
android:contentDescription="@string/cycle_repeat_mode" />
|
||||
</merge>
|
||||
</LinearLayout>
|
||||
|
@ -36,15 +36,9 @@ THE SOFTWARE.
|
||||
android:layout_marginTop="40dip"
|
||||
android:orientation="horizontal"
|
||||
vanilla:slider_handle_id="@+id/queue_slider">
|
||||
<LinearLayout
|
||||
android:id="@+id/queue_slider"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:background="?overlay_background_color"
|
||||
android:orientation="horizontal"
|
||||
android:elevation="2dp">
|
||||
<include layout="@layout/controls" />
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/controls" android:id="@+id/queue_slider"/>
|
||||
|
||||
<fragment class="ch.blinkenlights.android.vanilla.ShowQueueFragment"
|
||||
android:id="@+id/queue"
|
||||
android:layout_width="fill_parent"
|
||||
|
@ -60,15 +60,9 @@ THE SOFTWARE.
|
||||
android:layout_marginTop="88dip"
|
||||
android:orientation="horizontal"
|
||||
vanilla:slider_handle_id="@+id/queue_slider">
|
||||
<LinearLayout
|
||||
android:id="@+id/queue_slider"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:background="?overlay_background_color"
|
||||
android:orientation="horizontal"
|
||||
android:elevation="2dp">
|
||||
<include layout="@layout/controls" />
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/controls" android:id="@+id/queue_slider"/>
|
||||
|
||||
<fragment class="ch.blinkenlights.android.vanilla.ShowQueueFragment"
|
||||
android:id="@+id/queue"
|
||||
android:layout_width="fill_parent"
|
||||
|
@ -69,14 +69,7 @@ THE SOFTWARE.
|
||||
|
||||
<include layout="@layout/seek_bar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:background="?overlay_background_color"
|
||||
android:orientation="horizontal"
|
||||
android:elevation="2dp">
|
||||
<include layout="@layout/controls" />
|
||||
</LinearLayout>
|
||||
<include layout="@layout/controls" />
|
||||
|
||||
<fragment class="ch.blinkenlights.android.vanilla.ShowQueueFragment"
|
||||
android:id="@+id/queue"
|
||||
|
@ -31,11 +31,7 @@ THE SOFTWARE.
|
||||
android:layout_weight="1"
|
||||
android:layout_height="0px"
|
||||
android:layout_width="match_parent" />
|
||||
<LinearLayout
|
||||
android:layout_gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal">
|
||||
<include layout="@layout/controls" />
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/controls" android:id="@+id/queue_slider"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -50,6 +50,7 @@
|
||||
</style>
|
||||
|
||||
<style name="Amoled_dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<item name="overlay_background_color">@color/overlay_background_dark</item>
|
||||
<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>
|
||||
|
@ -47,6 +47,7 @@
|
||||
</style>
|
||||
|
||||
<style name="Blue_dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<item name="overlay_background_color">@color/overlay_background_dark</item>
|
||||
<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>
|
||||
|
@ -46,6 +46,7 @@
|
||||
</style>
|
||||
|
||||
<style name="Blue_light.PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="overlay_background_color">@color/overlay_background_light</item>
|
||||
<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>
|
||||
|
@ -47,6 +47,7 @@
|
||||
</style>
|
||||
|
||||
<style name="Grey_dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<item name="overlay_background_color">@color/overlay_background_dark</item>
|
||||
<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>
|
||||
|
@ -46,6 +46,7 @@
|
||||
</style>
|
||||
|
||||
<style name="Grey_light.PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="overlay_background_color">@color/overlay_background_light</item>
|
||||
<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>
|
||||
|
@ -47,6 +47,7 @@
|
||||
</style>
|
||||
|
||||
<style name="Orange_dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<item name="overlay_background_color">@color/overlay_background_dark</item>
|
||||
<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>
|
||||
|
@ -46,6 +46,7 @@
|
||||
</style>
|
||||
|
||||
<style name="Orange_light.PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="overlay_background_color">@color/overlay_background_light</item>
|
||||
<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>
|
||||
|
@ -47,6 +47,7 @@
|
||||
</style>
|
||||
|
||||
<style name="Red_dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<item name="overlay_background_color">@color/overlay_background_dark</item>
|
||||
<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>
|
||||
|
@ -46,6 +46,7 @@
|
||||
</style>
|
||||
|
||||
<style name="Red_light.PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="overlay_background_color">@color/overlay_background_light</item>
|
||||
<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>
|
||||
|
@ -47,6 +47,7 @@
|
||||
</style>
|
||||
|
||||
<style name="Standard_dark.PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<item name="overlay_background_color">@color/overlay_background_dark</item>
|
||||
<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>
|
||||
|
@ -46,6 +46,7 @@
|
||||
</style>
|
||||
|
||||
<style name="PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="overlay_background_color">@color/overlay_background_light</item>
|
||||
<item name="background_circle_color">@color/material_grey_300</item>
|
||||
<item name="controls_normal">@color/material_grey_900</item>
|
||||
<item name="controls_active">#ff3e677a</item>
|
||||
|
@ -1,34 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- THIS FILE IS AUTOGENERATED BY generate-themes.pl - DO NOT TOUCH! -->
|
||||
<resources>
|
||||
<string-array name="theme_values">
|
||||
<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>
|
||||
<item>#ff000000,#ff000000,#ff000000</item>
|
||||
</string-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>
|
||||
<item>dark</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="theme_entries">
|
||||
<item>@string/theme_name_standard_light</item>
|
||||
<item>@string/theme_name_standard_dark</item>
|
||||
@ -57,19 +29,33 @@
|
||||
<item>10</item>
|
||||
</string-array>
|
||||
|
||||
<integer-array name="theme_category_library">
|
||||
<item>@style/Library</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>
|
||||
<item>@style/Amoled_dark.Library</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>
|
||||
<item>dark</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="theme_values">
|
||||
<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>
|
||||
<item>#ff000000,#ff000000,#ff000000</item>
|
||||
</string-array>
|
||||
|
||||
<integer-array name="theme_category_popupdialog">
|
||||
<item>@style/PopupDialog</item>
|
||||
@ -85,6 +71,20 @@
|
||||
<item>@style/Amoled_dark.PopupDialog</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>
|
||||
<item>@style/Amoled_dark.VanillaBase</item>
|
||||
</integer-array>
|
||||
|
||||
<integer-array name="theme_category_backactionbar">
|
||||
<item>@style/BackActionBar</item>
|
||||
<item>@style/Standard_dark.BackActionBar</item>
|
||||
@ -99,18 +99,18 @@
|
||||
<item>@style/Amoled_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>
|
||||
<item>@style/Amoled_dark.VanillaBase</item>
|
||||
<integer-array name="theme_category_library">
|
||||
<item>@style/Library</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>
|
||||
<item>@style/Amoled_dark.Library</item>
|
||||
</integer-array>
|
||||
|
||||
<integer-array name="theme_category_playback">
|
||||
|
@ -47,6 +47,7 @@ THE SOFTWARE.
|
||||
</style>
|
||||
|
||||
<style name="PopupDialog" parent="android:Theme.Holo.Dialog.MinWidth">
|
||||
<item name="overlay_background_color">#a000</item>
|
||||
<item name="background_circle_color">#4A4A4A</item>
|
||||
<item name="controls_normal">#fff5f5f5</item>
|
||||
<item name="controls_active">@android:color/holo_blue_dark</item>
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
use strict;
|
||||
|
||||
use constant THEMES_OUTDIR => './res/values-v21/';
|
||||
use constant THEMES_LIST => './res/values-v21/themes-list.xml';
|
||||
use constant THEMES_OUTDIR => './app/src/main/res/values-v21/';
|
||||
use constant THEMES_LIST => './app/src/main/res/values-v21/themes-list.xml';
|
||||
|
||||
my $THEMES = [
|
||||
{ name=>"standard_light", id=>0, dark=>0, colorAccent => '#ff3e677a', colorPrimary => '#ff37474f', colorPrimaryDark => '#ff263238', controlsNormal=>'@color/material_grey_900', _bg => '#fff0f0f0' },
|
||||
@ -130,6 +130,7 @@ EOF
|
||||
</style>
|
||||
|
||||
<style name="${tid}PopupDialog" parent="android:Theme.Material.Light.Dialog.MinWidth">
|
||||
<item name="overlay_background_color">\@color/overlay_background_light</item>
|
||||
<item name="background_circle_color">\@color/material_grey_300</item>
|
||||
<item name="controls_normal">$this->{controlsNormal}</item>
|
||||
<item name="controls_active">$this->{colorAccent}</item>
|
||||
@ -166,6 +167,7 @@ EOF
|
||||
</style>
|
||||
|
||||
<style name="${tid}PopupDialog" parent="android:Theme.Material.Dialog.MinWidth">
|
||||
<item name="overlay_background_color">\@color/overlay_background_dark</item>
|
||||
<item name="background_circle_color">\@color/material_grey_700</item>
|
||||
<item name="controls_normal">$this->{controlsNormal}</item>
|
||||
<item name="controls_active">$this->{colorAccent}</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user