Added 'Playing' state
This commit is contained in:
parent
a7831abf77
commit
385b11eae2
|
@ -25,5 +25,6 @@
|
|||
<color name="download_failed_red">#CC0000</color>
|
||||
<color name="status_unread">#99CC00</color>
|
||||
<color name="status_progress">#FFBB33</color>
|
||||
<color name="status_playing">#EE5F52</color>
|
||||
|
||||
</resources>
|
|
@ -93,13 +93,21 @@ public class FeedItemlistAdapter extends ArrayAdapter<FeedItem> {
|
|||
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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue