I have layout structure:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<com.google.ads.AdView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
ads:adSize="BANNER"
/>
<LinearLayout style="@style/TitleBar"
android:layout_width="fill_parent"
android:layout_height="45dip"
// title bar
</LinearLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
// main layout with all needed elements and background!" >
</RelativeLayout>
</LinearLayout>
Everything look fine, until my AdMob disappered. Then I can see empty black region with admob size.
UPDATE: my screen shot:
normally I cas see here ad block, but when I get onFailedToReceiveAd(Ad request successful, but no ad returned due to lack of ad inventory.) ad disappers and my layout not fill all screen.
Another way to look at this would be to set up your own 'house ad' in AdMob to target your app. Then when AdMob doesn't have an ad to serve it would display your own ad to 'fill the blank'.
Just to confirm does your adView has this as height parameter?
android:layout_height="wrap_content"
Use the Set Visibility function to remove it from the layout.
SetVisibility()
Check this post also on hiding the AdView
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With