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="download_failed_red">#CC0000</color>
|
||||||
<color name="status_unread">#99CC00</color>
|
<color name="status_unread">#99CC00</color>
|
||||||
<color name="status_progress">#FFBB33</color>
|
<color name="status_progress">#FFBB33</color>
|
||||||
|
<color name="status_playing">#EE5F52</color>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
|
@ -93,13 +93,21 @@ public class FeedItemlistAdapter extends ArrayAdapter<FeedItem> {
|
||||||
holder.feedtitle.setText(item.getFeed().getTitle());
|
holder.feedtitle.setText(item.getFeed().getTitle());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isInProgress()) {
|
if (item.isPlaying()) {
|
||||||
holder.title.setTypeface(Typeface.DEFAULT_BOLD);
|
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);
|
holder.statusLabel.setVisibility(View.VISIBLE);
|
||||||
} else if (!item.isRead()) {
|
} else if (!item.isRead()) {
|
||||||
holder.title.setTypeface(Typeface.DEFAULT_BOLD);
|
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);
|
holder.statusLabel.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
holder.title.setTypeface(Typeface.DEFAULT);
|
holder.title.setTypeface(Typeface.DEFAULT);
|
||||||
|
|
|
@ -50,8 +50,13 @@ public class FeedItemMenuHandler {
|
||||||
selectedItem.getLink() != null);
|
selectedItem.getLink() != null);
|
||||||
|
|
||||||
menu.findItem(R.id.mark_unread_item).setVisible(
|
menu.findItem(R.id.mark_unread_item).setVisible(
|
||||||
selectedItem.isRead() || selectedItem.isInProgress());
|
!selectedItem.isPlaying()
|
||||||
menu.findItem(R.id.mark_read_item).setVisible(!selectedItem.isRead() || selectedItem.isInProgress());
|
&& (selectedItem.isRead() || selectedItem
|
||||||
|
.isInProgress()));
|
||||||
|
menu.findItem(R.id.mark_read_item).setVisible(
|
||||||
|
!selectedItem.isPlaying()
|
||||||
|
&& (!selectedItem.isRead() || selectedItem
|
||||||
|
.isInProgress()));
|
||||||
|
|
||||||
if (selectedItem.getLink() != null) {
|
if (selectedItem.getLink() != null) {
|
||||||
menu.findItem(R.id.visit_website_item).setVisible(true);
|
menu.findItem(R.id.visit_website_item).setVisible(true);
|
||||||
|
|
Loading…
Reference in New Issue