From b0f0d106dae70e52a002e481f4bfcb3fb6ac9038 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Tue, 19 May 2015 16:57:30 +0200 Subject: [PATCH] Transparency for played items --- .../de/danoeh/antennapod/adapter/FeedItemlistAdapter.java | 7 +++++++ 1 file changed, 7 insertions(+) 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 72bcda4d0..b39e23d42 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java @@ -14,6 +14,8 @@ import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; +import com.nineoldandroids.view.ViewHelper; + import de.danoeh.antennapod.R; import de.danoeh.antennapod.core.feed.FeedItem; import de.danoeh.antennapod.core.feed.FeedMedia; @@ -115,6 +117,11 @@ public class FeedItemlistAdapter extends BaseAdapter { } else { holder.statusUnread.setVisibility(View.INVISIBLE); } + if(item.isRead()) { + ViewHelper.setAlpha(convertView, 0.5f); + } else { + ViewHelper.setAlpha(convertView, 1.0f); + } holder.published.setText(DateUtils.formatDateTime(context, item.getPubDate().getTime(), DateUtils.FORMAT_ABBREV_ALL));