From a83d2932128d5ead3c9a4fd36d42f4c8c152fd10 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 26 Aug 2015 09:03:15 -0700 Subject: All getResources() needs to use context --- .../java/github/daneren2005/dsub/fragments/NowPlayingFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java index c58a2ecb..8af8a26b 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java @@ -238,7 +238,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis if(currentSong.isStarred()) { starButton.setImageDrawable(DrawableTint.getTintedDrawable(context, R.drawable.ic_toggle_star)); } else { - if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { + if(context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { starButton.setImageResource(DrawableTint.getDrawableRes(context, R.attr.star_outline)); } else { starButton.setImageResource(R.drawable.ic_toggle_star_outline_dark); @@ -1266,7 +1266,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis if(song.isStarred()) { starButton.setImageDrawable(DrawableTint.getTintedDrawable(context, R.drawable.ic_toggle_star)); } else { - if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { + if(context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { starButton.setImageResource(DrawableTint.getDrawableRes(context, R.attr.star_outline)); } else { starButton.setImageResource(R.drawable.ic_toggle_star_outline_dark); -- cgit v1.2.3