Android Question To opt out of Edge to Edge using the manifest changes - issue

Markos

Active Member
Licensed User
Longtime User
Hi All,

I want to opt out of the edge to edge using sdk 35 with the manifest provided by Erel, however my current manifest requires the following, how do I include the changes to not compromise my manifest requirements for the app?

B4X:
AddManifestText(
AddManifestText(
<uses-sdk android:minSdkVersion="13" android:compileSdkVersion="33" android:targetSdkVersion="35"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.DarkTheme) 'new
AddPermission(android.permission.CALL_PHONE)

SetApplicationAttribute(android:theme, "@style/MyAppTheme") 'new
'SetApplicationAttribute(android:theme, "@style/Theme.AppCompat")
AddPermission("android.permission.VIBRATE")
AddPermission("android.permission.CAMERA")
AddManifestText(<uses-feature android:name="android.hardware.camera" android:required="true" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.autofocus" android:required="true" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.flash" android:required="true" />)
AddPermission(android.permission.USE_FINGERPRINT)
AddPermission("android.permission.FLASHLIGHT")
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResource(values, theme.xml,
<resources>
    <style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">#0098FF</item>
        <item name="colorPrimaryDark">#007CF5</item>
        <item name="colorAccent">#AAAA00</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>'
        <item name="android:windowTranslucentNavigation">false</item>
         <item name="android:windowTranslucentStatus">true</item>
    </style>
</resources>
)
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
 
Upvote 0

mcqueccu

Well-Known Member
Licensed User
Longtime User
Add this code to the last line:

<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>

B4X:
<item name="android:windowTranslucentNavigation">false</item>
 <item name="android:windowTranslucentStatus">true</item>
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
 
Upvote 0

Markos

Active Member
Licensed User
Longtime User
Thanks Erel! I will look into using that library instead. I'm not using B4xPages model but the standing B4x, hope that is seamlessly compatible as well
 
Upvote 0

Markos

Active Member
Licensed User
Longtime User
Add this code to the last line:

<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>

B4X:
<item name="android:windowTranslucentNavigation">false</item>
 <item name="android:windowTranslucentStatus">true</item>
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
Wow that's easy! cheers!

I think most of my Apps needs minor tweaks to compensate for the edge2edge so I will proactively migrate most now to be edge to edge and avoid the mad rush in 1 or 2 years
 
Upvote 0
Top