gpt4 book ai didi

android admob 未显示 - 屏幕尺寸太小

转载 作者:太空宇宙 更新时间:2023-11-03 10:55:03 25 4
gpt4 key购买 nike

我在底部有一个 webview 和一个 admob 广告。它正在获取广告但未显示它,因为屏幕太小。以前,当我仅在 linear layout 中运行它时,广告会正常显示。

这是我现在的代码:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:orientation="vertical">
<com.google.ads.AdView
android:id="@+id/ad"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
ads:adUnitId="a14e0b54f42c7c7"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"/>
<WebView
android:id="@+id/sdrwebview"
android:layout_width="fill_parent"
android:layout_above="@+id/ad"
android:layout_height="fill_parent"/>
</RelativeLayout>

最佳答案

尝试交换周围的 View ...您的 Webview 可能覆盖了 Adview

<RelativeLayout...>
<WebView.../>
<com.google.ads.AdView.../>
</RelativeLayout>

关于android admob 未显示 - 屏幕尺寸太小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6529265/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com