diff options
author | Tom Hennen <TomHennen@users.noreply.github.com> | 2016-04-25 08:47:52 -0400 |
---|---|---|
committer | Tom Hennen <TomHennen@users.noreply.github.com> | 2016-04-25 08:47:52 -0400 |
commit | c3808e2c24ec0c747b7edd598bc05aa3a11270bd (patch) | |
tree | 9012218124750a97dd91af025e03a962d31775b5 /app/src/main/java/de/danoeh/antennapod/adapter | |
parent | 25e4e407287312490cc88fc99587bcd48277e6ee (diff) | |
parent | 7827b6646ffc5253c23f55103d193b55b635f0ff (diff) | |
download | AntennaPod-c3808e2c24ec0c747b7edd598bc05aa3a11270bd.zip |
Merge pull request #1889 from mfietz/issue/1886-indicate-played
All Episodes/Favorites: Indicate played episodes
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java index 2fd4fc186..43a00f7c5 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java @@ -15,6 +15,7 @@ import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.ImageView; +import android.widget.LinearLayout; import android.widget.ProgressBar; import android.widget.TextView; @@ -81,6 +82,7 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR .inflate(R.layout.new_episodes_listitem, parent, false); Holder holder = new Holder(view); holder.container = (FrameLayout) view.findViewById(R.id.container); + holder.content = (LinearLayout) view.findViewById(R.id.content); holder.placeholder = (TextView) view.findViewById(R.id.txtvPlaceholder); holder.title = (TextView) view.findViewById(R.id.txtvTitle); if(Build.VERSION.SDK_INT >= 23) { @@ -126,6 +128,11 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR } else { holder.statusUnread.setVisibility(View.VISIBLE); } + if(item.isPlayed()) { + ViewHelper.setAlpha(holder.content, 0.5f); + } else { + ViewHelper.setAlpha(holder.content, 1.0f); + } FeedMedia media = item.getMedia(); if (media != null) { @@ -233,6 +240,7 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR implements View.OnClickListener, View.OnCreateContextMenuListener, ItemTouchHelperViewHolder { + LinearLayout content; FrameLayout container; TextView placeholder; TextView title; |