mirror of
https://github.com/samsonjs/media.git
synced 2026-04-17 13:15:47 +00:00
Workaround for focus issues on API levels less than 26
Issue: #9061 PiperOrigin-RevId: 380640601
This commit is contained in:
parent
de16dea006
commit
8287b2529b
2 changed files with 11 additions and 0 deletions
|
|
@ -32,6 +32,9 @@
|
|||
* Add `PendingIntent.FLAG_IMMUTABLE` flag when creating a broadcast intent
|
||||
in `PlayerNotificationManager`. This is required to avoid an error on
|
||||
Android 12.
|
||||
* Fix focusability of `StyledPlayerView` and `StyledPlayerControlView`
|
||||
popup menus on API levels prior to 26
|
||||
([#9061](https://github.com/google/ExoPlayer/issues/9061)).
|
||||
|
||||
### 2.14.1 (2021-06-11)
|
||||
|
||||
|
|
|
|||
|
|
@ -1945,6 +1945,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);
|
||||
|
|
@ -2271,6 +2275,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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue