Admob ad will not appear in conversational thematic activities

I have a simple activity with some content inside it. Right below, I have an admob ad. And it works great.

However, when I add android:theme="@android:style/Theme.Dialog"to the activity in the manifest, the activity is still loading, the content is loading, but then the ad will NOT load.

If I just delete android:theme="@android:style/Theme.Dialog"and view the action as a regular action, it works fine again. But I need this to work in a dialog: / So, any ideas what I could do? Does anyone have the same problem?

Maybe admob error? I just don't understand why this is not working.

+3
source share
1 answer

I can display an ad in a dialog box. I had to display the dialog in the landscape layout, because there is not enough space for an ad in portrait mode (since the ad occupies the entire width of the screen). However, when you click on an ad, nothing is done (the ad is not redirected to the advertisers website).

0
source

Source: https://habr.com/ru/post/1763959/


All Articles