Android Question navigation bar over the app in android 16 (api 36)

fastlingo

Member
Licensed User
Longtime User
Updating to android 16 target sdk, I have users telling me the navigation bar at the bottom is overlayed on top of the app. I also see the top bar overlayed on top of the app.
I have the following lines
#FullScreen: False
#IncludeTitle: false

overlayed.jpg
 

fastlingo

Member
Licensed User
Longtime User
I fixed it by changing the target sdk to 35. It was 36. Apparently opting out of the edge to edge enforcement does not work if target sdk is 36.
This fixed the issue on devices running sdk 35, but not 36. After asking ChatGpt and arguing with it for about an hour because it invented directives that do not exist, I added these lines in the manifest and it works (the system bars are no longer on top of the app)

B4X:
CreateResource(values-v35, themes.xml,
<resources>
    <style name="AppTheme.OptOut" parent="@android:style/Theme.DeviceDefault.NoActionBar">
        <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
        <item name="android:statusBarColor">#FF000000</item>
        <item name="android:navigationBarColor">#FF000000</item>
    </style>
</resources>
)
SetApplicationAttribute(android:theme, "@style/AppTheme.OptOut")
 
Upvote 0
Top