androidx / androidx/media

Settings PopUp dialog isn't displayed properly when using setDecorFitsSystemWindows(false)

Open
#234 1 comment 0 reactions 1 assignee View on GitHub

@icbaker is already working on this.

Since Dec 21, 2022.

bug needs triage
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

image image
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

image image
Media

https://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=51AF5F39AB0CEC3E5497CD9C900EBFEAECCCB5C7.8506521BFC350652163895D4C26DEE124209AA9E&key=ik0

Bug Report
  • You will email the zip file produced by adb bugreport to dev.exoplayer@gmail.com after filing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.