Android Question opting out of edge-to-edge Admob

Douglas Farias

Expert
Licensed User
Longtime User
Hello everyone.

How can I disable Admob's edge-to-edge (interstitial) feature?


The app is already working fine without edge-to-edge.

I'm using it in manifest.
XML:
SetApplicationAttribute(android:theme, "@style/LightTheme")
CreateResource(values, theme.xml,
<resources>
    <style
        name="LightTheme" parent="@android:style/Theme.Material.Light">
       <item name="android:actionMenuTextAppearance">@style/LowerCaseMenu</item>
       <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
    </style>
     <style name="LowerCaseMenu" parent="android:TextAppearance.Material.Widget.ActionBar.Menu">
        <item name="android:textAllCaps">false</item>
    </style>
</resources>
)



But Admob uses a separate activity for the interstitial.

How do I disable edge-to-edge interstitial Admob?

Note: The attached image shows an ad (interstitial) cut off at the bottom.

I need to set

XML:

for the interstitial admob.


thxx
 

Attachments

  • 3176ebe8-00a1-4c0a-8206-895c58d244a4.jpg
    3176ebe8-00a1-4c0a-8206-895c58d244a4.jpg
    81.8 KB · Views: 19

Computersmith64

Well-Known Member
Licensed User
Longtime User
Believe it or not, the AdMob SDK is not yet compatible with Edge to Edge. They are saying the compatibility update will be released "early September", but they've been setting & pushing back release dates for a while. Unbelievable that Google would allow a product that makes them $billions to be incompatible with Android 15+ devices. To make matters worse, I've heard of developers being penalised by AdMob because the ads don't display correctly...
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
EDIT: Actually, if I change my device to use 3 button navigation (vs gestures) the bottom bar does cover the ad, but when the ad is in a cancelable state, pressing the back button will close it.

Having said that, I'm not seeing the issue in any of my apps that I'm running on an Android 16 device. The apps themselves all have edge to edge enabled though.

Using ads v24.4.0
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
The apps themselves all have edge to edge enabled though.
Your Apps would not be accepted by Google if you actually not using opt out of edge-to-edge.

Remember that
Starting from B4A v13.4, the default themes (Themes.LightTheme / Themes.DarkTheme) already include the snippet that opts out of edge-edge. You only need this if you use a customize theme.

So you are probably using one of these Themes.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Your Apps would not be accepted by Google if you actually not using opt out of edge-to-edge.

Remember that
Starting from B4A v13.4, the default themes (Themes.LightTheme / Themes.DarkTheme) already include the snippet that opts out of edge-edge. You only need this if you use a customize theme.

So you are probably using one of these Themes.
You can't opt out if you're targeting Android 16. But regardless, these apps aren't written using B4A, so no they don't opt out.
 
Last edited:
Upvote 0
Top