So your problem is empty space? if so, an alternative solution is to avoid the empty banner space as shown below:
- place the AdMob banner inside FrameLayout along with the placeholder view (e.g. image, etc.)
- implement "public void onReceiveAd (announcement)" to exchange views, since you know that a banner has appeared.
on the other hand,
(my humble opinion) with a banner inside Dialog, by its nature, is not the best place.
I would suggest placing a banner only in the main activities, this is where the user spends most of his time.
source share