mirror of
https://github.com/androidx/media.git
synced 2025-05-11 17:49:52 +08:00
Ensure TalkBack announces the selected playback speed in the UI menu
Issue: google/ExoPlayer#10298 #minor-release PiperOrigin-RevId: 457991028 (cherry picked from commit bf86b603a30211ec2b48a78223683f758e6d5f83)
This commit is contained in:
parent
d3b5f71f25
commit
315bf6b898
@ -1817,7 +1817,13 @@ public class StyledPlayerControlView extends FrameLayout {
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user