【发布时间】:2012-10-10 22:05:23
【问题描述】:
我有布局结构:
<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>
一切看起来都很好,直到我的 AdMob 消失了。然后我可以看到带有 admob 大小的空白黑色区域。
更新:我的屏幕截图:
通常我会在这里看到广告块,但是当我收到 onFailedToReceiveAd(广告请求成功,但由于缺少广告库存而没有返回广告。)广告消散并且我的布局没有填满整个屏幕。
【问题讨论】:
-
“AdMob 消失”是什么意思?什么时候消失?
-
布局看起来不错,因为 admob 第一次显示。当广告显示时,所有元素都向下移动,但仍然看起来像我想要的那样。但是当广告消失时,我的布局并没有向上移动(到原始状态)。
-
能发个截图吗?我这么说是因为 admob 这个月遇到了问题。有点像这种视觉效果。
-
允许应用在没有可用的 admob 应用时接收谷歌广告。您可以在 Admob 应用设置中执行此操作。