diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2016-04-22 12:41:56 +0200 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2016-04-22 12:41:56 +0200 |
commit | 7827b6646ffc5253c23f55103d193b55b635f0ff (patch) | |
tree | 0a5a71658428c8ca1ab50c6eead96de54e1404f7 | |
parent | 69fad87166e6ed194d61a2f42f42993c0ea8103a (diff) | |
download | AntennaPod-7827b6646ffc5253c23f55103d193b55b635f0ff.zip |
All Episodes/Favorites: Indicate played episodes
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java | 8 | ||||
-rw-r--r-- | app/src/main/res/layout/new_episodes_listitem.xml | 1 |
2 files changed, 9 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; diff --git a/app/src/main/res/layout/new_episodes_listitem.xml b/app/src/main/res/layout/new_episodes_listitem.xml index 0f1e873f3..944711aec 100644 --- a/app/src/main/res/layout/new_episodes_listitem.xml +++ b/app/src/main/res/layout/new_episodes_listitem.xml @@ -8,6 +8,7 @@ android:layout_height="wrap_content"> <LinearLayout + android:id="@+id/content" android:layout_width="match_parent" android:layout_height="@dimen/listitem_threeline_height" android:background="?attr/selectableItemBackground" |