Transparency for played items

This commit is contained in:
Martin Fietz 2015-05-19 16:57:30 +02:00
parent 61754cae52
commit b0f0d106da
1 changed files with 7 additions and 0 deletions

View File

@ -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));