diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2013-02-12 00:56:51 +0100 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2013-02-12 00:56:51 +0100 |
commit | 235c07393857cd8f87f1f09b43248caf96bb328e (patch) | |
tree | 6e1d0b537e9bf7adeeefedf8a751a31a54a6da25 /src/de/danoeh/antennapod/adapter | |
parent | 5e001760d62f6bcaa85c9174114c494ce9dcd776 (diff) | |
download | AntennaPod-235c07393857cd8f87f1f09b43248caf96bb328e.zip |
Improved status indicators of feeditemlist items
Diffstat (limited to 'src/de/danoeh/antennapod/adapter')
-rw-r--r-- | src/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/src/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java b/src/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java index 3ca63e97f..5941d52ea 100644 --- a/src/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java +++ b/src/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java @@ -68,8 +68,12 @@ public class FeedItemlistAdapter extends AbstractFeedItemlistAdapter { holder.feedtitle = (TextView) convertView .findViewById(R.id.txtvFeedname); } - holder.statusLabel = (View) convertView - .findViewById(R.id.vStatusLabel); + holder.statusPlaying = (View) convertView + .findViewById(R.id.statusPlaying); + holder.statusUnread = (View) convertView + .findViewById(R.id.statusUnread); + holder.statusInProgress = (TextView) convertView + .findViewById(R.id.statusInProgress); convertView.setTag(holder); } else { @@ -93,26 +97,26 @@ public class FeedItemlistAdapter extends AbstractFeedItemlistAdapter { FeedItem.State state = item.getState(); switch (state) { case PLAYING: - holder.title.setTypeface(Typeface.DEFAULT_BOLD); - holder.statusLabel.setBackgroundColor(convertView - .getResources().getColor(R.color.status_playing)); - holder.statusLabel.setVisibility(View.VISIBLE); + holder.statusPlaying.setVisibility(View.VISIBLE); + holder.statusUnread.setVisibility(View.GONE); + holder.statusInProgress.setVisibility(View.GONE); break; case IN_PROGRESS: - holder.title.setTypeface(Typeface.DEFAULT_BOLD); - holder.statusLabel.setBackgroundColor(convertView - .getResources().getColor(R.color.status_progress)); - holder.statusLabel.setVisibility(View.VISIBLE); + holder.statusPlaying.setVisibility(View.GONE); + holder.statusUnread.setVisibility(View.GONE); + holder.statusInProgress.setVisibility(View.VISIBLE); + holder.statusInProgress.setText(Converter + .getDurationStringLong(item.getMedia().getPosition())); break; case NEW: - holder.title.setTypeface(Typeface.DEFAULT_BOLD); - holder.statusLabel.setBackgroundColor(convertView - .getResources().getColor(R.color.status_unread)); - holder.statusLabel.setVisibility(View.VISIBLE); + holder.statusPlaying.setVisibility(View.GONE); + holder.statusUnread.setVisibility(View.VISIBLE); + holder.statusInProgress.setVisibility(View.GONE); break; default: - holder.title.setTypeface(Typeface.DEFAULT); - holder.statusLabel.setVisibility(View.INVISIBLE); + holder.statusPlaying.setVisibility(View.GONE); + holder.statusUnread.setVisibility(View.GONE); + holder.statusInProgress.setVisibility(View.GONE); break; } @@ -198,7 +202,9 @@ public class FeedItemlistAdapter extends AbstractFeedItemlistAdapter { ImageView type; ImageView downloading; ImageButton butAction; - View statusLabel; + View statusUnread; + View statusPlaying; + TextView statusInProgress; } public int getSelectedItemIndex() { |