diff options
author | Tom Hennen <TomHennen@users.noreply.github.com> | 2015-04-05 13:47:13 -0400 |
---|---|---|
committer | Tom Hennen <TomHennen@users.noreply.github.com> | 2015-04-05 13:47:13 -0400 |
commit | 1fb8b64b34116652a53bff49abc68ddd0564090d (patch) | |
tree | b7a72191eb031444300d1f9e2b7857408653d332 /app/src/main/java/de/danoeh/antennapod/adapter | |
parent | 3e977aca195bc1fa188835e4b2f0cf2d6cd633d0 (diff) | |
parent | e7bde8ff8202c3d5734d1d24409d94ebd4ea2d72 (diff) | |
download | AntennaPod-1fb8b64b34116652a53bff49abc68ddd0564090d.zip |
Merge pull request #709 from TomHennen/swipe_to_mark_as_read
Swipe to mark as read
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java | 4 | ||||
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/NewEpisodesListAdapter.java | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java index a0ba0f794..5494869a6 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java @@ -25,7 +25,7 @@ public class NavListAdapter extends BaseAdapter { public static final int VIEW_TYPE_SECTION_DIVIDER = 1; public static final int VIEW_TYPE_SUBSCRIPTION = 2; - public static final int[] NAV_TITLES = {R.string.all_episodes_label, R.string.queue_label, R.string.downloads_label, R.string.playback_history_label, R.string.add_feed_label}; + public static final int[] NAV_TITLES = {R.string.queue_label, R.string.new_episodes_label, R.string.downloads_label, R.string.playback_history_label, R.string.add_feed_label}; private final Drawable[] drawables; @@ -132,7 +132,7 @@ public class NavListAdapter extends BaseAdapter { } else { holder.count.setVisibility(View.GONE); } - } else if (NAV_TITLES[position] == R.string.all_episodes_label) { + } else if (NAV_TITLES[position] == R.string.new_episodes_label) { int unreadItems = itemAccess.getNumberOfUnreadItems(); if (unreadItems > 0) { holder.count.setVisibility(View.VISIBLE); diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/NewEpisodesListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/NewEpisodesListAdapter.java index 7a05b9370..2d481a7ef 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/NewEpisodesListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/NewEpisodesListAdapter.java @@ -1,6 +1,7 @@ package de.danoeh.antennapod.adapter; import android.content.Context; +import android.graphics.Color; import android.text.format.DateUtils; import android.view.LayoutInflater; import android.view.View; @@ -11,6 +12,7 @@ import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; +import com.nineoldandroids.view.ViewHelper; import com.squareup.picasso.Picasso; import de.danoeh.antennapod.R; @@ -140,6 +142,13 @@ public class NewEpisodesListAdapter extends BaseAdapter { .fit() .into(holder.imageView); + if (item.isRead()) { + // grey it out + ViewHelper.setAlpha(convertView, .2f); + } else { + ViewHelper.setAlpha(convertView, 1.0f); + } + return convertView; } |