diff --git a/RELEASENOTES.md b/RELEASENOTES.md index fd18c3deb3..7f67596288 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -41,6 +41,10 @@ * Remove `CastPlayer` specific playlist manipulation methods. Use `setMediaItems`, `addMediaItems`, `removeMediaItem` and `moveMediaItem` instead. +* UI + * Fix focusability of `StyledPlayerView` and `StyledPlayerControlView` + popup menus on API levels prior to 26 + ([#9061](https://github.com/google/ExoPlayer/issues/9061)). * Video: * Fix `IncorrectContextUseViolation` strict mode warning on Android 11 ([#8246](https://github.com/google/ExoPlayer/pull/8246)). diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java index 7ced3faec4..aa8df89b75 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java @@ -1926,6 +1926,10 @@ public class StyledPlayerControlView extends FrameLayout { public SettingViewHolder(View itemView) { super(itemView); + if (Util.SDK_INT < 26) { + // Workaround for https://github.com/google/ExoPlayer/issues/9061. + itemView.setFocusable(true); + } mainTextView = itemView.findViewById(R.id.exo_main_text); subTextView = itemView.findViewById(R.id.exo_sub_text); iconView = itemView.findViewById(R.id.exo_icon); @@ -2252,6 +2256,10 @@ public class StyledPlayerControlView extends FrameLayout { public SubSettingViewHolder(View itemView) { super(itemView); + if (Util.SDK_INT < 26) { + // Workaround for https://github.com/google/ExoPlayer/issues/9061. + itemView.setFocusable(true); + } textView = itemView.findViewById(R.id.exo_text); checkView = itemView.findViewById(R.id.exo_check); }