Skip to content

Commit

Permalink
Ensure TalkBack announces the selected playback speed in the UI menu
Browse files Browse the repository at this point in the history
Issue: google/ExoPlayer#10298
PiperOrigin-RevId: 457991028
(cherry picked from commit 3fc6a66)
  • Loading branch information
icbaker authored and rohitjoins committed Jun 29, 2022
1 parent 8b2b786 commit 258d936
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions RELEASENOTES.md
Expand Up @@ -12,6 +12,10 @@
([#2092](https://github.com/google/ExoPlayer/issues/2092)).
* Fix parsing of H265 short term reference picture sets
([#10316](https://github.com/google/ExoPlayer/issues/10316)).
* UI:
* Ensure TalkBack announces the currently active speed option in the
playback controls menu
([#10298](https://github.com/google/ExoPlayer/issues/10298)).
* RTSP:
* Add RTP reader for H263
([#63](https://github.com/androidx/media/pull/63)).
Expand Down
Expand Up @@ -1811,7 +1811,13 @@ public void onBindViewHolder(SubSettingViewHolder holder, int position) {
if (position < playbackSpeedTexts.length) {
holder.textView.setText(playbackSpeedTexts[position]);
}
holder.checkView.setVisibility(position == selectedIndex ? VISIBLE : INVISIBLE);
if (position == selectedIndex) {
holder.itemView.setSelected(true);
holder.checkView.setVisibility(VISIBLE);
} else {
holder.itemView.setSelected(false);
holder.checkView.setVisibility(INVISIBLE);
}
holder.itemView.setOnClickListener(
v -> {
if (position != selectedIndex) {
Expand Down

0 comments on commit 258d936

Please sign in to comment.