1

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:

Android 11 white bar

How it works on 8-10: works properly on 8-10

I'm stumped here, so any advice is greatly appreciated.

osunick
  • 11
  • 2
  • The question is misleading as the issue is the status bar with Android 11, and doesn't look to be specific to multi window – david Feb 04 '22 at 21:19
  • This [answer](https://stackoverflow.com/a/68492550/230825) may contain the solution. – david Feb 04 '22 at 21:23

0 Answers0