aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-07-11 10:11:45 -0700
committerScott Jackson <daneren2005@gmail.com>2015-07-11 10:11:45 -0700
commitae22717cc4e0deedac71e91d3566a9302727e62b (patch)
tree3157f85bd1c6c1c3923aea75fd77698d6624cce8 /app/src/main/java
parent46b2eafe0a11c93a4907eb0057fdb06c79751986 (diff)
downloaddsub-ae22717cc4e0deedac71e91d3566a9302727e62b.tar.gz
dsub-ae22717cc4e0deedac71e91d3566a9302727e62b.tar.bz2
dsub-ae22717cc4e0deedac71e91d3566a9302727e62b.zip
Tint stars according to theme
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java2
-rw-r--r--app/src/main/java/github/daneren2005/dsub/view/SongView.java4
-rw-r--r--app/src/main/java/github/daneren2005/dsub/view/UpdateView.java5
3 files changed, 10 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
index f7e7251c..33d978bf 100644
--- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
+++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
@@ -67,6 +67,7 @@ import github.daneren2005.dsub.fragments.SubsonicFragment;
import github.daneren2005.dsub.service.DownloadService;
import github.daneren2005.dsub.service.HeadphoneListenerService;
import github.daneren2005.dsub.util.Constants;
+import github.daneren2005.dsub.util.DrawableTint;
import github.daneren2005.dsub.util.ImageLoader;
import github.daneren2005.dsub.util.SilentBackgroundTask;
import github.daneren2005.dsub.util.Util;
@@ -197,6 +198,7 @@ public class SubsonicActivity extends AppCompatActivity implements OnItemSelecte
if (theme != null && !theme.equals(Util.getTheme(this)) || fullScreen != Util.getPreferences(this).getBoolean(Constants.PREFERENCES_KEY_FULL_SCREEN, false)) {
restart();
overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
+ DrawableTint.wipeTintCache();
}
populateTabs();
diff --git a/app/src/main/java/github/daneren2005/dsub/view/SongView.java b/app/src/main/java/github/daneren2005/dsub/view/SongView.java
index e789c5de..41cba046 100644
--- a/app/src/main/java/github/daneren2005/dsub/view/SongView.java
+++ b/app/src/main/java/github/daneren2005/dsub/view/SongView.java
@@ -29,6 +29,7 @@ import github.daneren2005.dsub.domain.MusicDirectory;
import github.daneren2005.dsub.domain.PodcastEpisode;
import github.daneren2005.dsub.service.DownloadService;
import github.daneren2005.dsub.service.DownloadFile;
+import github.daneren2005.dsub.util.DrawableTint;
import github.daneren2005.dsub.util.Util;
import java.io.File;
@@ -198,6 +199,9 @@ public class SongView extends UpdateView2<MusicDirectory.Entry, Boolean> {
if(item.isStarred()) {
if(!starred) {
+ if(starButton.getDrawable() == null) {
+ starButton.setImageDrawable(DrawableTint.getTintedDrawable(context, R.drawable.ic_toggle_star, R.attr.colorPrimary));
+ }
starButton.setVisibility(View.VISIBLE);
starred = true;
}
diff --git a/app/src/main/java/github/daneren2005/dsub/view/UpdateView.java b/app/src/main/java/github/daneren2005/dsub/view/UpdateView.java
index 5043e7bc..37290240 100644
--- a/app/src/main/java/github/daneren2005/dsub/view/UpdateView.java
+++ b/app/src/main/java/github/daneren2005/dsub/view/UpdateView.java
@@ -27,7 +27,6 @@ import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
-import android.widget.Checkable;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
@@ -39,6 +38,7 @@ import java.util.WeakHashMap;
import github.daneren2005.dsub.domain.MusicDirectory;
import github.daneren2005.dsub.R;
+import github.daneren2005.dsub.util.DrawableTint;
import github.daneren2005.dsub.util.SilentBackgroundTask;
public abstract class UpdateView<T> extends LinearLayout {
@@ -240,6 +240,9 @@ public abstract class UpdateView<T> extends LinearLayout {
if(starButton != null) {
if(isStarred) {
if(!starred) {
+ if(starButton.getDrawable() == null) {
+ starButton.setImageDrawable(DrawableTint.getTintedDrawable(context, R.drawable.ic_toggle_star, R.attr.colorPrimary));
+ }
starButton.setVisibility(View.VISIBLE);
starred = true;
}