diff options
author | recalculated <recalculated@users.noreply.github.com> | 2016-01-08 17:42:05 -0600 |
---|---|---|
committer | recalculated <recalculated@users.noreply.github.com> | 2016-01-08 17:42:05 -0600 |
commit | 30e963fc3e4f1f49369e79ae131143c835d1a3fd (patch) | |
tree | 2b29e47a435262b70eacb618b1c58e2d9f9bc98a | |
parent | 0d54bd18a74839a6b6c6ba47524903629bb4ffb4 (diff) | |
download | AntennaPod-30e963fc3e4f1f49369e79ae131143c835d1a3fd.zip |
Make progress bar theme-specific
-rw-r--r-- | app/src/main/res/layout/external_player_fragment.xml | 2 | ||||
-rw-r--r-- | core/src/main/res/drawable/progress_bar_horizontal_dark.xml (renamed from core/src/main/res/drawable/progress_bar_horizontal.xml) | 5 | ||||
-rw-r--r-- | core/src/main/res/drawable/progress_bar_horizontal_light.xml (renamed from core/src/main/res/drawable-v21/progress_bar_horizontal.xml) | 7 | ||||
-rw-r--r-- | core/src/main/res/values/attrs.xml | 1 | ||||
-rw-r--r-- | core/src/main/res/values/styles.xml | 13 |
5 files changed, 24 insertions, 4 deletions
diff --git a/app/src/main/res/layout/external_player_fragment.xml b/app/src/main/res/layout/external_player_fragment.xml index c1dccc658..78c197e1d 100644 --- a/app/src/main/res/layout/external_player_fragment.xml +++ b/app/src/main/res/layout/external_player_fragment.xml @@ -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"/> diff --git a/core/src/main/res/drawable/progress_bar_horizontal.xml b/core/src/main/res/drawable/progress_bar_horizontal_dark.xml index f96a1c3e0..73ad5b37c 100644 --- a/core/src/main/res/drawable/progress_bar_horizontal.xml +++ b/core/src/main/res/drawable/progress_bar_horizontal_dark.xml @@ -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> diff --git a/core/src/main/res/drawable-v21/progress_bar_horizontal.xml b/core/src/main/res/drawable/progress_bar_horizontal_light.xml index 2c0c18182..a1a7129e9 100644 --- a/core/src/main/res/drawable-v21/progress_bar_horizontal.xml +++ b/core/src/main/res/drawable/progress_bar_horizontal_light.xml @@ -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> diff --git a/core/src/main/res/values/attrs.xml b/core/src/main/res/values/attrs.xml index de641f518..4e444c990 100644 --- a/core/src/main/res/values/attrs.xml +++ b/core/src/main/res/values/attrs.xml @@ -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"/> diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml index b006f31b9..1f73fbba2 100644 --- a/core/src/main/res/values/styles.xml +++ b/core/src/main/res/values/styles.xml @@ -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> |