diff options
author | pachecosf <austinwim@gmail.com> | 2019-01-18 12:28:49 -0800 |
---|---|---|
committer | pachecosf <austinwim@gmail.com> | 2019-01-18 12:28:49 -0800 |
commit | a421c490e40fb56f611e268e1442e9d34a59059f (patch) | |
tree | 7d7aa32d3a22d70dda5ed2dd766575624bbcd287 /app/src/main/java/de/danoeh/antennapod/adapter | |
parent | a80435a03becc7ae874541dec77594caca4e11d0 (diff) | |
download | AntennaPod-a421c490e40fb56f611e268e1442e9d34a59059f.zip |
cleaned up a couple of lines
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java index 7dc2d90a5..be8e52cfc 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java @@ -220,20 +220,12 @@ public class NavListAdapter extends BaseAdapter if (position == itemAccess.getSelectedItemIndex()) { txtvTitle.setTypeface(null, Typeface.BOLD); v.getContext().getTheme().resolveAttribute(de.danoeh.antennapod.core.R.attr.drawer_activated_color, typedValue, true); - int[] attribute = new int[] { de.danoeh.antennapod.core.R.attr.drawer_activated_color }; - TypedArray array = v.getContext().obtainStyledAttributes(typedValue.resourceId, attribute); - int backgroundResource = array.getColor(0, 0); - array.recycle(); - v.setBackgroundColor(backgroundResource); + v.setBackgroundResource(typedValue.resourceId); } else { txtvTitle.setTypeface(null, Typeface.NORMAL); v.getContext().getTheme().resolveAttribute(de.danoeh.antennapod.core.R.attr.nav_drawer_background, typedValue, true); - int[] attribute = new int[] { de.danoeh.antennapod.core.R.attr.nav_drawer_background}; - TypedArray array = v.getContext().obtainStyledAttributes(typedValue.resourceId, attribute); - int backgroundResource = array.getColor(0, 0); - array.recycle(); - v.setBackgroundColor(backgroundResource); + v.setBackgroundResource(typedValue.resourceId); } } return v; |