From b8bdb7de3c027990a06fcad6440045dcac565aab Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 16 May 2013 19:23:16 -0700 Subject: Fix light theme --- .../src/github/daneren2005/dsub/activity/MainActivity.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'subsonic-android/src/github/daneren2005') diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java index e5835f80..d0eb86ef 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java @@ -6,6 +6,8 @@ import android.content.ComponentName; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; +import android.content.res.TypedArray; +import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; @@ -228,7 +230,11 @@ public class MainActivity extends SubsonicActivity { trackView.setText(song.getTitle()); artistView.setText(song.getArtist()); getImageLoader().loadImage(coverArtView, song, false, false); - startButton.setImageResource((getDownloadService().getPlayerState() == PlayerState.STARTED) ? R.drawable.media_pause : R.drawable.media_start); + int[] attrs = new int[] {(getDownloadService().getPlayerState() == PlayerState.STARTED) ? R.attr.media_button_pause : R.attr.media_button_start}; + TypedArray typedArray = this.obtainStyledAttributes(attrs); + Drawable drawable = typedArray.getDrawable(0); + startButton.setImageDrawable(drawable); + typedArray.recycle(); } public void checkUpdates() { -- cgit v1.2.3