Android 如何修复“广告和内容重叠”
我有一个实时应用程序,并在其中使用admob横幅。 今天我收到一则警告广告,内容重叠 这是我放置广告横幅的xml代码Android 如何修复“广告和内容重叠”,android,admob,Android,Admob,我有一个实时应用程序,并在其中使用admob横幅。 今天我收到一则警告广告,内容重叠 这是我放置广告横幅的xml代码 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:ads="http://schemas.android.com/apk/res-auto" android:layou
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="info.white.kora.Main" >
<ProgressBar
android:layout_width="fill_parent"
android:layout_height="5dip"
android:layout_alignParentTop="true"
style="?android:attr/progressBarStyleHorizontal"
android:id="@+id/progressbar_Horizontal"
android:max="100"
android:background="#228b22"
/>
<WebView
android:id="@+id/webView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" />
<com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom|center|end"
ads:adSize="SMART_BANNER"
ads:adUnitId="ca-app-pub-xxxxxxxxxxxxxxxxxxxxxx"></com.google.android.gms.ads.AdView>
如何在webview中正确使用admob横幅?在webview中添加以下属性
android:layout_above="@+id/adView"
将以下属性添加到Webview
android:layout_above="@+id/adView"
我只是想用我的横幅广告来发布我必须做的事情,它放在每个视图的底部 这会在屏幕底部放置横幅广告:
<com.google.android.gms.ads.AdView
xmlns:googleads="http://schemas.android.com/apk/lib/com.google.ads"
android:id="@+id/ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="center"
android:visibility="gone"
com.google.android.gms:adSize="SMART_BANNER"
com.google.android.gms:adUnitId="ca-app-pub-xxxxx"
googleads:adUnitId="ca-app-pub-xxxxx" />
您可能还发现需要在广告上方添加边距:
android:layout_marginTop="8dp"
或低于您的内容:
android:layout_marginBottom="8dp"
此链接比admob中的“了解有关此违规行为的更多信息”链接有更多有用信息:
上述步骤将删除重叠冲突。我浏览了我整个应用程序的布局,大约有50个布局,任何带有广告的布局我都必须明确设置。尽管应用程序在用户看来可能看起来很好,例如横幅广告正确地出现在屏幕底部,但我怀疑有机器人正在admob端进行检查,因为我给他们发电子邮件时没有收到回复,而且被拒绝的时间很快就过去了1个小时。删除违规行为花费了10多次尝试。只是想用我的横幅广告发布我必须做的事情来删除违规行为,横幅广告放在每个视图的底部 这会在屏幕底部放置横幅广告:
<com.google.android.gms.ads.AdView
xmlns:googleads="http://schemas.android.com/apk/lib/com.google.ads"
android:id="@+id/ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="center"
android:visibility="gone"
com.google.android.gms:adSize="SMART_BANNER"
com.google.android.gms:adUnitId="ca-app-pub-xxxxx"
googleads:adUnitId="ca-app-pub-xxxxx" />
您可能还发现需要在广告上方添加边距:
android:layout_marginTop="8dp"
或低于您的内容:
android:layout_marginBottom="8dp"
此链接比admob中的“了解有关此违规行为的更多信息”链接有更多有用信息:
上述步骤将删除重叠冲突。我浏览了我整个应用程序的布局,大约有50个布局,任何带有广告的布局我都必须明确设置。尽管应用程序在用户看来可能看起来很好,例如横幅广告正确地出现在屏幕底部,但我怀疑有机器人正在admob端进行检查,因为我给他们发电子邮件时没有收到回复,而且被拒绝的时间很快就过去了1个小时。经过10多次尝试才消除了这一违规行为