diff options
author | Tom Hennen <tom.hennen@gmail.com> | 2015-07-12 15:17:56 -0400 |
---|---|---|
committer | Tom Hennen <tom.hennen@gmail.com> | 2015-07-12 15:17:56 -0400 |
commit | 58ebf7ed039cf79e11f7330a385db3dc631cd7af (patch) | |
tree | 5dba55c238b9f0b87ace639e57cfba0b11c00851 /app/src/main/java/de/danoeh/antennapod/adapter | |
parent | 7426eedcfec5e6bc9b0746f1f4b157dceb296377 (diff) | |
download | AntennaPod-58ebf7ed039cf79e11f7330a385db3dc631cd7af.zip |
PlaybackHistory doesn't dim played items anymore.
Also adds a space before the feed title when displaying the title.
fixes AntennaPod/AntennaPod#1007
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java index 1ecc45210..56e2bb1bd 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java @@ -33,13 +33,17 @@ public class FeedItemlistAdapter extends BaseAdapter { private final Context context; private boolean showFeedtitle; private int selectedItemIndex; + /** true if played items should be made partially transparent */ + private boolean makePlayedItemsTransparent; private final ActionButtonUtils actionButtonUtils; public static final int SELECTION_NONE = -1; public FeedItemlistAdapter(Context context, ItemAccess itemAccess, - ActionButtonCallback callback, boolean showFeedtitle) { + ActionButtonCallback callback, + boolean showFeedtitle, + boolean makePlayedItemsTransparent) { super(); this.callback = callback; this.context = context; @@ -47,6 +51,7 @@ public class FeedItemlistAdapter extends BaseAdapter { this.showFeedtitle = showFeedtitle; this.selectedItemIndex = SELECTION_NONE; this.actionButtonUtils = new ActionButtonUtils(context); + this.makePlayedItemsTransparent = makePlayedItemsTransparent; } @Override @@ -106,7 +111,7 @@ public class FeedItemlistAdapter extends BaseAdapter { StringBuilder buffer = new StringBuilder(item.getTitle()); if (showFeedtitle) { - buffer.append("("); + buffer.append(" ("); buffer.append(item.getFeed().getTitle()); buffer.append(")"); } @@ -117,7 +122,7 @@ public class FeedItemlistAdapter extends BaseAdapter { } else { holder.statusUnread.setVisibility(View.INVISIBLE); } - if(item.isPlayed()) { + if(item.isPlayed() && makePlayedItemsTransparent) { ViewHelper.setAlpha(convertView, 0.5f); } else { ViewHelper.setAlpha(convertView, 1.0f); @@ -180,7 +185,6 @@ public class FeedItemlistAdapter extends BaseAdapter { convertView.setVisibility(View.GONE); } return convertView; - } private final OnClickListener butActionListener = new OnClickListener() { |