Make progress bar theme-specific

This commit is contained in:
recalculated 2016-01-08 17:42:05 -06:00
parent 0d54bd18a7
commit 30e963fc3e
5 changed files with 24 additions and 4 deletions

View File

@ -29,7 +29,7 @@
android:layout_toRightOf="@id/imgvCover"
android:layout_toEndOf="@id/imgvCover"
android:layout_alignParentTop="true"
style="@style/ProgressBarStyle"
style="?attr/progressBarTheme"
android:indeterminate="false"
tools:progress="100"/>

View File

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<solid android:color="#33FFFFFF"/>
</shape>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>

View File

@ -1,9 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<solid android:color="#33212121"/>
</shape>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<solid android:color="?attr/colorAccent"/>
<solid android:color="@color/holo_blue_light"/>
</shape>
</clip>
</item>

View File

@ -41,6 +41,7 @@
<attr name="ic_lock_open" format="reference"/>
<attr name="ic_lock_closed" format="reference"/>
<attr name="ic_filter" format="reference"/>
<attr name="progressBarTheme" format="reference"/>
<!-- Used in itemdescription -->
<attr name="non_transparent_background" format="reference"/>

View File

@ -4,6 +4,7 @@
<style name="Theme.AntennaPod.Light" parent="Theme.AppCompat.Light">
<item name="colorPrimary">@color/primary_light</item>
<item name="colorAccent">@color/holo_blue_light</item>
<item name="progressBarTheme">@style/ProgressBarLight</item>
<item name="buttonStyle">@style/Widget.AntennaPod.Button</item>
<item name="alertDialogTheme">@style/AntennaPod.Dialog.Light</item>
<item name="attr/action_bar_icon_color">@color/grey600</item>
@ -53,6 +54,7 @@
<style name="Theme.AntennaPod.Dark" parent="Theme.AppCompat">
<item name="colorAccent">@color/holo_blue_dark</item>
<item name="buttonStyle">@style/Widget.AntennaPod.Button</item>
<item name="progressBarTheme">@style/ProgressBarDark</item>
<item name="alertDialogTheme">@style/AntennaPod.Dialog.Dark</item>
<item name="attr/action_bar_icon_color">@color/white</item>
<item name="attr/action_about">@drawable/ic_info_white_24dp</item>g
@ -101,6 +103,7 @@
<style name="Theme.AntennaPod.Light.NoTitle" parent="Theme.AppCompat.Light.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowActionModeOverlay">true</item>
<item name="progressBarTheme">@style/ProgressBarLight</item>
<item name="colorPrimary">@color/primary_light</item>
<item name="colorAccent">@color/holo_blue_light</item>
<item name="buttonStyle">@style/Widget.AntennaPod.Button</item>
@ -151,6 +154,7 @@
<style name="Theme.AntennaPod.Dark.NoTitle" parent="Theme.AppCompat.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowActionModeOverlay">true</item>
<item name="progressBarTheme">@style/ProgressBarDark</item>
<item name="colorAccent">@color/holo_blue_dark</item>
<item name="buttonStyle">@style/Widget.AntennaPod.Button</item>
<item name="alertDialogTheme">@style/AntennaPod.Dialog.Dark</item>
@ -253,9 +257,14 @@
</style>
<style name="ProgressBarStyle">
<style name="ProgressBarLight">
<item name="android:indeterminateOnly">false</item>
<item name="android:progressDrawable">@drawable/progress_bar_horizontal</item>
<item name="android:progressDrawable">@drawable/progress_bar_horizontal_light</item>
</style>
<style name="ProgressBarDark">
<item name="android:indeterminateOnly">false</item>
<item name="android:progressDrawable">@drawable/progress_bar_horizontal_dark</item>
</style>
</resources>