Android Question Android OS update , edge to edge enforcement

Jayden25

New Member
Hi everyone , I trust that you are well.
Please help me , in all my current apps I have the following line in my manifest using a custom theme , to opt out of edge to edge enforcement:
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>

but my test phone had a software update recently to One UI 8 , and it is now as if my apps enforce edge to edge again even though I have that line in my manifest.
Theme snippet for context:
CreateResource(values-v20, theme.xml,
<resources>
<style name="LightTheme" parent="@android:style/Theme.Material.Light">
<item name="android:colorPrimary">@color/actionbar</item>
<item name="android:colorPrimaryDark">@color/statusbar</item>
<item name="android:textColorPrimary">@color/textColorPrimary</item>
<item name="android:navigationBarColor">@color/navigationBar</item>
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>

</style>
</resources>
)
CreateResource(values-v14, theme.xml,
<resources>
<style name="LightTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:actionBarStyle">@style/CustomActionBarStyle</item>
</style>
<style name="CustomActionBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">@color/actionbar</item>
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>
</resources>

please advise?
 

Jayden25

New Member
What is your targetSDK in your manifest?

Make sure to set it at 35. If you set it at 36, the edge enforcement wont work
Thank you so much for the reply.
it is currently set at 36 , and it did work up until the very latest software update was now recently. After the update it did not work.

Thank you for the advice , will set it to 35 , but for future purposes , how would we go around it for 36?

please advise if you know. :)
 
Upvote 0
Top