google / google/ExoPlayer

Styles Player settingsWindow override current window flags

Open
#10,029 5 comments 0 reactions 1 assignee Assigned to @icbaker View on GitHub
bug
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

ExoPlayer: 2.17.0
Android: at least 7.1 but probably other versions too.

---

I have a full screen activity that is configured to hide status and navigation bar like this:

```kotlin
override fun onStart() {
super.onStart()

// should be perform on each start
val ctrl = ViewCompat.getWindowInsetsController(binding.root) ?: return
ctrl.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
ctrl.hide(WindowInsetsCompat.Type.systemBars())
}
```

This activity contains a StyledPlayerView using default settings and `useController` and `controllerAutoShow` both set to `true`

When the Player setting button is clicked, it open the `settingsWindow` that does not replicate the parent window flags, and so make the status bar and navigation bar visible.

This is not something expected for a popup window, as from the user point of view, the main window remain the player window.

And the most annoying part is that when the `settingsWindow` is closed, Android does not hide the status bar and navigation bar automatically. Which means that is should be done programmatically.

But there is no API in ExoPlayer to monitor the settingsWindow visibility.

Expected behavior: That opening the settingsWindow does not change the status bar and navigation bar visibility.
Or at least, an easy way to workaround that issue by having a `settingsWindow` visibility listener.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.