From 658594e90f7c94f9ee14b98b97c01be472148b51 Mon Sep 17 00:00:00 2001 From: orelogo Date: Wed, 13 Jul 2016 13:44:48 -0400 Subject: [PATCH] Search Results: Add transparency to played episodes --- .../de/danoeh/antennapod/adapter/SearchlistAdapter.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/SearchlistAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/SearchlistAdapter.java index ac10d53f6..98683219b 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/SearchlistAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/SearchlistAdapter.java @@ -11,6 +11,7 @@ import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; +import com.nineoldandroids.view.ViewHelper; import de.danoeh.antennapod.R; import de.danoeh.antennapod.core.feed.Feed; @@ -96,6 +97,12 @@ public class SearchlistAdapter extends BaseAdapter { holder.subtitle.setText(result.getSubtitle()); } + if(item.isPlayed()) { + ViewHelper.setAlpha(convertView, 0.5f); + } else { + ViewHelper.setAlpha(convertView, 1.0f); + } + Glide.with(context) .load(item.getFeed().getImageLocation()) .placeholder(R.color.light_gray)