From 1d415c9f7f11a4454448c20e4ce1a17aaf20cbe7 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Sun, 5 Nov 2023 15:31:07 +0100 Subject: [PATCH] Announce played/unplayed in TalkBack (#6744) --- .../antennapod/view/viewholder/EpisodeItemViewHolder.java | 6 ++++++ ui/i18n/src/main/res/values/strings.xml | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java b/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java index 03df844b1..b4f61a19a 100644 --- a/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java +++ b/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java @@ -103,6 +103,12 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder { 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); diff --git a/ui/i18n/src/main/res/values/strings.xml b/ui/i18n/src/main/res/values/strings.xml index db7e74033..a35f5ab90 100644 --- a/ui/i18n/src/main/res/values/strings.xml +++ b/ui/i18n/src/main/res/values/strings.xml @@ -686,9 +686,10 @@ Decrease speed Video Episode is being downloaded - Episode is in the queue - Episode is marked as favorite - Episode is in the inbox + In the queue + Marked as favorite + In the inbox + Played Load next page Position: %1$s Remaining time: %1$s