Settings PopUp dialog isn't displayed properly when using setDecorFitsSystemWindows(false)
@icbaker is already working on this.
Since Dec 21, 2022.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Media3 Version
1.0.0-beta03
Devices that reproduce the issue
NOTE: This happens only on 1.0.0-beta01 and up. On 1.0.0-alpha03, this cannot be reproduced, there's no bug.
Pixel 4 Emulator running Android 12
Xiaomi Poco F3 running Android 12
Xiaomi Redmi 8 running Android 9
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
NOTE: This happens only on 1.0.0-beta01 and up. On 1.0.0-alpha03, this cannot be reproduced, there's no bug.
Try to hide the SystemUI (Status bar and Navigation bar) by using setDecorFitsSystemWindows(false)
Full code:
fun Activity.hideSystemUI() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
window.setDecorFitsSystemWindows(false)
window.insetsController?.let {
it.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
it.hide(WindowInsetsCompat.Type.systemBars())
}
} else {
WindowCompat.setDecorFitsSystemWindows(window, false)
WindowCompat.getInsetsController(window, window.decorView).apply {
systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
hide(WindowInsetsCompat.Type.systemBars())
}
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
window?.attributes?.layoutInDisplayCutoutMode =
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
}
}
Expected result
NOTE: This happens only on 1.0.0-beta01 and up. On 1.0.0-alpha03, this cannot be reproduced, there's no bug.
Version 1.0.0-alpha03
Actual result
NOTE: This happens only on 1.0.0-beta01 and up. On 1.0.0-alpha03, this cannot be reproduced, there's no bug.
Version 1.0.0-beta03
Media
Bug Report
- You will email the zip file produced by
adb bugreportto dev.exoplayer@gmail.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.