From 385b11eae209c37cff64375b7fd6669e71918e5a Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Fri, 16 Nov 2012 19:36:21 +0100 Subject: [PATCH] Added 'Playing' state --- res/values/colors.xml | 1 + .../antennapod/adapter/FeedItemlistAdapter.java | 14 +++++++++++--- .../util/menuhandler/FeedItemMenuHandler.java | 9 +++++++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/res/values/colors.xml b/res/values/colors.xml index e87f90420..f1e4fbd9d 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -25,5 +25,6 @@ #CC0000 #99CC00 #FFBB33 + #EE5F52 \ No newline at end of file diff --git a/src/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java b/src/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java index 5a1da7ef5..e7d2c322c 100644 --- a/src/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java +++ b/src/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java @@ -93,13 +93,21 @@ public class FeedItemlistAdapter extends ArrayAdapter { holder.feedtitle.setText(item.getFeed().getTitle()); } - if (item.isInProgress()) { + if (item.isPlaying()) { holder.title.setTypeface(Typeface.DEFAULT_BOLD); - holder.statusLabel.setBackgroundColor(convertView.getResources().getColor(R.color.status_progress)); + holder.statusLabel.setBackgroundColor(convertView + .getResources().getColor(R.color.status_playing)); + holder.statusLabel.setVisibility(View.VISIBLE); + + } else if (item.isInProgress()) { + holder.title.setTypeface(Typeface.DEFAULT_BOLD); + holder.statusLabel.setBackgroundColor(convertView + .getResources().getColor(R.color.status_progress)); holder.statusLabel.setVisibility(View.VISIBLE); } else if (!item.isRead()) { holder.title.setTypeface(Typeface.DEFAULT_BOLD); - holder.statusLabel.setBackgroundColor(convertView.getResources().getColor(R.color.status_unread)); + holder.statusLabel.setBackgroundColor(convertView + .getResources().getColor(R.color.status_unread)); holder.statusLabel.setVisibility(View.VISIBLE); } else { holder.title.setTypeface(Typeface.DEFAULT); diff --git a/src/de/danoeh/antennapod/util/menuhandler/FeedItemMenuHandler.java b/src/de/danoeh/antennapod/util/menuhandler/FeedItemMenuHandler.java index d6bc79ade..2c345fe0a 100644 --- a/src/de/danoeh/antennapod/util/menuhandler/FeedItemMenuHandler.java +++ b/src/de/danoeh/antennapod/util/menuhandler/FeedItemMenuHandler.java @@ -50,8 +50,13 @@ public class FeedItemMenuHandler { selectedItem.getLink() != null); menu.findItem(R.id.mark_unread_item).setVisible( - selectedItem.isRead() || selectedItem.isInProgress()); - menu.findItem(R.id.mark_read_item).setVisible(!selectedItem.isRead() || selectedItem.isInProgress()); + !selectedItem.isPlaying() + && (selectedItem.isRead() || selectedItem + .isInProgress())); + menu.findItem(R.id.mark_read_item).setVisible( + !selectedItem.isPlaying() + && (!selectedItem.isRead() || selectedItem + .isInProgress())); if (selectedItem.getLink() != null) { menu.findItem(R.id.visit_website_item).setVisible(true);