How to change app open ad background admob

Viewed 493

I place the banner ad on the top of the main activity, but when the app switch app open ad shows and violate the AdMob (policy )

Is that possible to change the background of the app open ad, as you know that by default app open app ad's background is transparent, As a result, when the app open ad shows, the banner ad is also showing in the background.

1 Answers

Finally, After a lot of research, I found the answer,

First, create a theme in style.xml or them.xml file( make app open ad background black)

 <style name="Theme.AppThemeNoActionBar.AdTheme" >
    <item name="android:background">@color/black</item>
    <item name="android:windowBackground">@color/black</item>
    <item name="android:windowExitAnimation">@null</item>
    <item name="android:windowEnterAnimation">@null</item>
</style>

and declare the activity on the manifest.xml file, and apply the theme

 <activity
        android:name="com.google.android.gms.ads.AdActivity"
        android:theme="@style/Theme.AppThemeNoActionBar.AdTheme"
        tools:replace="android:theme"/>
Related