diff options
author | daneren2005 <daneren2005@gmail.com> | 2013-01-08 17:31:01 -0800 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2013-01-08 17:31:01 -0800 |
commit | c154f934673efed17a1e33ca179025df81fc9663 (patch) | |
tree | 3a4ade50b7dc4085cb0d8b285454b641c1a0e49a /subsonic-android | |
parent | 2554e7d93e9f182c8c7e89bfc66efb16f462885a (diff) | |
parent | 82b57da94195d7b1dac7e6f7aaf9c615ed4e1335 (diff) | |
download | dsub-c154f934673efed17a1e33ca179025df81fc9663.tar.gz dsub-c154f934673efed17a1e33ca179025df81fc9663.tar.bz2 dsub-c154f934673efed17a1e33ca179025df81fc9663.zip |
Merge pull request #86 from hedwig34/fork
Changed media buttons from white to dark when using a light theme.
Diffstat (limited to 'subsonic-android')
-rw-r--r-- | subsonic-android/res/drawable-hdpi-v4/media_backward_light.png | bin | 0 -> 1106 bytes | |||
-rw-r--r-- | subsonic-android/res/drawable-hdpi-v4/media_forward_light.png | bin | 0 -> 1128 bytes | |||
-rw-r--r-- | subsonic-android/res/drawable-hdpi-v4/media_pause_light.png | bin | 0 -> 443 bytes | |||
-rw-r--r-- | subsonic-android/res/drawable-hdpi-v4/media_repeat_off_light.png | bin | 0 -> 1512 bytes | |||
-rw-r--r-- | subsonic-android/res/drawable-hdpi-v4/media_start_light.png | bin | 0 -> 1121 bytes | |||
-rw-r--r-- | subsonic-android/res/drawable-hdpi-v4/media_stop_light.png | bin | 0 -> 301 bytes | |||
-rw-r--r-- | subsonic-android/res/layout/download_media_buttons.xml | 12 | ||||
-rw-r--r-- | subsonic-android/res/values/attrs.xml | 6 | ||||
-rw-r--r-- | subsonic-android/res/values/themes.xml | 18 | ||||
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java | 6 | ||||
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java | 2 |
11 files changed, 36 insertions, 8 deletions
diff --git a/subsonic-android/res/drawable-hdpi-v4/media_backward_light.png b/subsonic-android/res/drawable-hdpi-v4/media_backward_light.png Binary files differnew file mode 100644 index 00000000..14188c86 --- /dev/null +++ b/subsonic-android/res/drawable-hdpi-v4/media_backward_light.png diff --git a/subsonic-android/res/drawable-hdpi-v4/media_forward_light.png b/subsonic-android/res/drawable-hdpi-v4/media_forward_light.png Binary files differnew file mode 100644 index 00000000..9e172d8f --- /dev/null +++ b/subsonic-android/res/drawable-hdpi-v4/media_forward_light.png diff --git a/subsonic-android/res/drawable-hdpi-v4/media_pause_light.png b/subsonic-android/res/drawable-hdpi-v4/media_pause_light.png Binary files differnew file mode 100644 index 00000000..8ebf9b45 --- /dev/null +++ b/subsonic-android/res/drawable-hdpi-v4/media_pause_light.png diff --git a/subsonic-android/res/drawable-hdpi-v4/media_repeat_off_light.png b/subsonic-android/res/drawable-hdpi-v4/media_repeat_off_light.png Binary files differnew file mode 100644 index 00000000..39408bec --- /dev/null +++ b/subsonic-android/res/drawable-hdpi-v4/media_repeat_off_light.png diff --git a/subsonic-android/res/drawable-hdpi-v4/media_start_light.png b/subsonic-android/res/drawable-hdpi-v4/media_start_light.png Binary files differnew file mode 100644 index 00000000..45cad73c --- /dev/null +++ b/subsonic-android/res/drawable-hdpi-v4/media_start_light.png diff --git a/subsonic-android/res/drawable-hdpi-v4/media_stop_light.png b/subsonic-android/res/drawable-hdpi-v4/media_stop_light.png Binary files differnew file mode 100644 index 00000000..110d538e --- /dev/null +++ b/subsonic-android/res/drawable-hdpi-v4/media_stop_light.png diff --git a/subsonic-android/res/layout/download_media_buttons.xml b/subsonic-android/res/layout/download_media_buttons.xml index 1a34a8bb..1835a373 100644 --- a/subsonic-android/res/layout/download_media_buttons.xml +++ b/subsonic-android/res/layout/download_media_buttons.xml @@ -9,7 +9,7 @@ <ImageButton style="@style/PlaybackControl.Small" android:id="@+id/download_repeat" - android:src="@drawable/media_repeat_off" + android:src="?attr/media_button_repeat_off" android:layout_alignParentLeft="true" android:layout_centerVertical="true" /> @@ -17,7 +17,7 @@ <github.daneren2005.dsub.view.AutoRepeatButton style="@style/PlaybackControl" android:id="@+id/download_previous" - android:src="@drawable/media_backward" + android:src="?attr/media_button_backward" android:layout_toLeftOf="@+id/download_pause" android:layout_centerVertical="true" /> @@ -25,28 +25,28 @@ <ImageButton style="@style/PlaybackControl" android:id="@+id/download_pause" - android:src="@drawable/media_pause" + android:src="?attr/media_button_pause" android:layout_centerInParent="true" /> <ImageButton style="@style/PlaybackControl" android:id="@+id/download_stop" - android:src="@drawable/media_stop" + android:src="?attr/media_button_stop" android:layout_centerInParent="true" /> <ImageButton style="@style/PlaybackControl" android:id="@+id/download_start" - android:src="@drawable/media_start" + android:src="?attr/media_button_start" android:layout_centerInParent="true" /> <github.daneren2005.dsub.view.AutoRepeatButton style="@style/PlaybackControl" android:id="@+id/download_next" - android:src="@drawable/media_forward" + android:src="?attr/media_button_forward" android:layout_toRightOf="@+id/download_start" android:layout_centerVertical="true" /> diff --git a/subsonic-android/res/values/attrs.xml b/subsonic-android/res/values/attrs.xml index 30f5097e..e5d8984f 100644 --- a/subsonic-android/res/values/attrs.xml +++ b/subsonic-android/res/values/attrs.xml @@ -1,4 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <attr name="offline_icon" format="reference"/> + <attr name="media_button_backward" format="reference"/> + <attr name="media_button_forward" format="reference"/> + <attr name="media_button_pause" format="reference"/> + <attr name="media_button_repeat_off" format="reference"/> + <attr name="media_button_start" format="reference"/> + <attr name="media_button_stop" format="reference"/> </resources> diff --git a/subsonic-android/res/values/themes.xml b/subsonic-android/res/values/themes.xml index 71a88596..59869254 100644 --- a/subsonic-android/res/values/themes.xml +++ b/subsonic-android/res/values/themes.xml @@ -6,12 +6,24 @@ <item name="android:textColorSecondary">@color/cyan</item> <item name="android:windowBackground">@color/lightBackground</item> <item name="offline_icon">@drawable/main_offline_light</item> + <item name="media_button_backward">@drawable/media_backward_light</item> + <item name="media_button_forward">@drawable/media_forward_light</item> + <item name="media_button_pause">@drawable/media_pause_light</item> + <item name="media_button_repeat_off">@drawable/media_repeat_off_light</item> + <item name="media_button_start">@drawable/media_start_light</item> + <item name="media_button_stop">@drawable/media_stop_light</item> </style> <style name="Theme.DSub.Dark" parent="Theme.Sherlock"> <item name="actionBarStyle">@style/Widget.DSub.ActionBarStyle.Dark</item> <item name="android:actionBarStyle">@style/Widget.DSub.ActionBarStyle.Dark</item> <item name="android:textColorSecondary">@color/cyan</item> <item name="offline_icon">@drawable/main_offline</item> + <item name="media_button_backward">@drawable/media_backward</item> + <item name="media_button_forward">@drawable/media_forward</item> + <item name="media_button_pause">@drawable/media_pause</item> + <item name="media_button_repeat_off">@drawable/media_repeat_off</item> + <item name="media_button_start">@drawable/media_start</item> + <item name="media_button_stop">@drawable/media_stop</item> </style> <style name="Theme.DSub.Holo" parent="Theme.Sherlock"> <item name="actionBarStyle">@style/Widget.DSub.ActionBarStyle.Holo</item> @@ -19,6 +31,12 @@ <item name="android:textColorSecondary">@color/cyan</item> <item name="android:windowBackground">@drawable/background</item> <item name="offline_icon">@drawable/main_offline</item> + <item name="media_button_backward">@drawable/media_backward</item> + <item name="media_button_forward">@drawable/media_forward</item> + <item name="media_button_pause">@drawable/media_pause</item> + <item name="media_button_repeat_off">@drawable/media_repeat_off</item> + <item name="media_button_start">@drawable/media_start</item> + <item name="media_button_stop">@drawable/media_stop</item> </style> <style name="Theme.DSub.Light.Fullscreen" parent="Theme.DSub.Light"> diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java index ec50b09f..3ad70134 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java @@ -791,7 +791,11 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi switch (downloadService.getRepeatMode()) { case OFF: - repeatButton.setImageResource(R.drawable.media_repeat_off); + if("light".equals(theme) | "light_fullscreen".equals(theme)) { + repeatButton.setImageResource(R.drawable.media_repeat_off_light); + } else { + repeatButton.setImageResource(R.drawable.media_repeat_off); + } break; case ALL: repeatButton.setImageResource(R.drawable.media_repeat_all); diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java index cc986d2d..75c03be0 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java @@ -58,7 +58,7 @@ public class SubsonicTabActivity extends SherlockActivity { private static final String TAG = SubsonicTabActivity.class.getSimpleName();
private static ImageLoader IMAGE_LOADER;
- private String theme;
+ protected static String theme;
private boolean destroyed;
private View homeButton;
|