【发布时间】:2021-10-27 14:26:47
【问题描述】:
Google 广告在此布局中的网络视图上方重叠。这就是 Google Admob 警告我的原因。我希望广告显示在 web 视图的末尾。我该怎么做?
我尝试这样做,但做不到。有人可以帮助我吗?我需要修复它...... 我尝试这样做,但做不到。有人可以帮助我吗?我需要修复它.....
?xml version="1.0" encoding="utf-8"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout width="match parent"
android:layout height="match parent"
tools:context=".TeamInfo.Team1">
<com.github.ybq.android.spinkit.SpinKitView
android:id="@+id/spin kit"
style="@style/SpinKitView.Large.Circle"
android:layout width="wrap content"
android:layout height="wrap content"
android:layout gravity="center"
app:SpinKit Color="#E53935"
android:layout centerInParent="true"/>
<ImageView
android:id="@+id/teamimage1"
android:layout width="match parent"
android:layout height="match parent"
android:background="@drawable/commoninfo"
android:visibility="gone"/>
<WebView
android:id="@+id/team1web"
android:layout width="match parent"
android:layout height="match parent"
android:visibility="gone">
</WebView>
!—Google Admob Link—>
<com.google.android.gms.ads.AdView
android:id="@+id/banner container1"
android:layout width="wrap content"
android:layout height="wrap content"
android:layout alignParentBottom="true"
android:layout centerHorizontal="true"
app:adSize="BANNER"
app:adUnitId="@string/ad id">
</com.google.android.gms.ads.AdView>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".TeamInfo.Team1">
<com.github.ybq.android.spinkit.SpinKitView
android:id="@+id/spin_kit"
style="@style/SpinKitView.Large.Circle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:SpinKit_Color="#E53935"
android:layout_centerInParent="true"/>
<ImageView
android:id="@+id/teamimage1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/commoninfo"
android:visibility="gone"/>
<WebView
android:id="@+id/team1web"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
</WebView>
<!--Google Admob Code-->
<com.google.android.gms.ads.AdView
android:id="@+id/banner_container1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
app:adSize="BANNER"
app:adUnitId="@string/ad_id">
</com.google.android.gms.ads.AdView>
</RelativeLayout>
【问题讨论】:
标签: android android-studio android-layout admob android-relativelayout