to childs until there’s a “consumed” view Dispatch to childs until there’s a “handled” view View#setOnApplyWindowInsetListener( listener) View#setOnTouchListener(listener)
E2E with Gestural Navigation Light Status Bar Light Bottom Navigation Bar E2E 21 -> 22 TRANSLUCENT NO PARTIAL NO 23 -> 25 YES NO PARTIAL - 26 -> 28 - - 29 -> 30 - - Edge to edge availability
make system bars transparently window.navigationBarColor = Color.TRANSPARENT window.statusBarColor = Color.TRANSPARENT // 3. light or dark icons in system bars val darkIcons = true WindowInsetsControllerCompat(window, window.peekDecorView()).apply { isAppearanceLightNavigationBars = darkIcons isAppearanceLightStatusBars = darkIcons } Setting up 12:30 // 4. drawing behind the cutout area window.attributes.layoutInDisplayCutoutMode =
v, windowInsets-> val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars() windownInsets } // now add some padding or margin to conflict views …