diff options
author | Tom Hennen <tom.hennen@gmail.com> | 2015-05-22 16:21:21 -0400 |
---|---|---|
committer | Tom Hennen <tom.hennen@gmail.com> | 2015-05-22 16:21:21 -0400 |
commit | ec156b4016b6323e817db0312a2f55d510262c71 (patch) | |
tree | 41cb05be4b78a9efe4fb52a9d93cc589cf7be91c /app/src/main/java/de/danoeh/antennapod/adapter | |
parent | 7aafe23b6b7eaddffedeb3f5539a5cfeb0f3e2f8 (diff) | |
download | AntennaPod-ec156b4016b6323e817db0312a2f55d510262c71.zip |
now display the download bar under the other windows
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesListAdapter.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesListAdapter.java index ea0c96be9..5c4946b78 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesListAdapter.java @@ -109,22 +109,22 @@ public class AllEpisodesListAdapter extends BaseAdapter { holder.txtvDuration.setText(""); } + FeedItem.State state = item.getState(); if (isDownloadingMedia) { holder.downloadProgress.setVisibility(View.VISIBLE); - holder.txtvDuration.setVisibility(View.GONE); - holder.pubDate.setVisibility(View.GONE); + // item is being downloaded + holder.downloadProgress.setProgress(itemAccess.getItemDownloadProgressPercent(item)); + } else if (state == FeedItem.State.PLAYING + || state == FeedItem.State.IN_PROGRESS) { + if (media.getDuration() > 0) { + int progress = (int) (100.0 * media.getPosition() / media.getDuration()); + holder.downloadProgress.setProgress(progress); + holder.downloadProgress.setVisibility(View.VISIBLE); + } } else { - holder.txtvDuration.setVisibility(View.VISIBLE); - holder.pubDate.setVisibility(View.VISIBLE); holder.downloadProgress.setVisibility(View.GONE); } - if (!media.isDownloaded()) { - if (isDownloadingMedia) { - // item is being downloaded - holder.downloadProgress.setProgress(itemAccess.getItemDownloadProgressPercent(item)); - } - } } else { holder.downloadProgress.setVisibility(View.GONE); holder.txtvDuration.setVisibility(View.GONE); |