Completed Downloads: Add transparency to played episodes

This commit is contained in:
Martin Fietz 2016-06-21 12:41:56 +02:00
parent b7dfea13b0
commit ec7795953f
1 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,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.FeedItem;
@ -85,6 +86,12 @@ public class DownloadedEpisodesListAdapter extends BaseAdapter {
.dontAnimate()
.into(holder.imageView);
if(item.isPlayed()) {
ViewHelper.setAlpha(convertView, 0.5f);
} else {
ViewHelper.setAlpha(convertView, 1.0f);
}
holder.title.setText(item.getTitle());
holder.txtvSize.setText(Converter.byteToString(item.getMedia().getSize()));
holder.queueStatus.setVisibility(item.isTagged(FeedItem.TAG_QUEUE) ? View.VISIBLE : View.GONE);