I'm using Google AdMob Ads SDK 4.0.4 for Android
By default, The AdView will have no size until the ad is loaded. Which could cause problem if you have buttons above or below the ad.
User could accidentally click on the ad if the ad returned at the exact moment they are about to click a button.
In old admob SDK I solved this by using setGoneWithoutAd(false). This way, the space will be preserved even when the ad is not returned yet.
In the new SDK (Google Admob Ads SDK 4.0.4) I manage to do the same by using this quick fix: reserve the space by putting ad in some layout that has width="320dp" and height="50dp"
<LinearLayout
android:layout_width="320dp"
android:layout_height="50dp" >
<com.google.ads.AdView android:id="@+id/adview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="xxxxxxxxxxx"
ads:adSize="BANNER"/>
</LinearLayout>
It works but I'm not sure if this is a proper method.(Will I run into the famous "Not enough space to show ad!" issue? )
To sum up the question: How to(properly) make AdView "occupy" space even while requesting an ad?
Thank you in advance!