Fix 'played' state on TalkBack when cover is hidden (#6796)
This commit is contained in:
parent
ae4205c6d3
commit
3852d50f92
|
@ -100,15 +100,13 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder {
|
|||
this.item = item;
|
||||
placeholder.setText(item.getFeed().getTitle());
|
||||
title.setText(item.getTitle());
|
||||
if (item.isPlayed()) {
|
||||
leftPadding.setContentDescription(item.getTitle() + ". " + activity.getString(R.string.is_played));
|
||||
} else {
|
||||
leftPadding.setContentDescription(item.getTitle());
|
||||
}
|
||||
pubDate.setText(DateFormatter.formatAbbrev(activity, item.getPubDate()));
|
||||
pubDate.setContentDescription(DateFormatter.formatForAccessibility(item.getPubDate()));
|
||||
if (item.isPlayed()) {
|
||||
cover.setContentDescription(activity.getString(R.string.is_played));
|
||||
cover.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
|
||||
} else {
|
||||
cover.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
}
|
||||
isInbox.setVisibility(item.isNew() ? View.VISIBLE : View.GONE);
|
||||
isFavorite.setVisibility(item.isTagged(FeedItem.TAG_FAVORITE) ? View.VISIBLE : View.GONE);
|
||||
isInQueue.setVisibility(item.isTagged(FeedItem.TAG_QUEUE) ? View.VISIBLE : View.GONE);
|
||||
|
|
Loading…
Reference in New Issue