'Did split screen (multi window) change status bar behavior with Android 11
I've been building an instrument cluster app that supports multi window (so you can split screen with navigation or media). For Android 6-10 I have no issues by making the following changes upon entering splitscreen mode:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
window?.insetsController?.hide(WindowInsets.Type.statusBars())
window?.insetsController?.systemBarsBehavior =
WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
val wm = activity?.windowManager
wm?.removeViewImmediate(window?.getDecorView());
wm?.addView(window?.getDecorView(), window?.getAttributes());
}
However in Android 11+ instead of having a transparent status bar in split screen with the UI for my app rendering behind it, I get a white bar:
How it works on 8-10: works properly on 8-10
I'm stumped here, so any advice is greatly appreciated.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
