私のアンドロイドアプリのAdmobバナー広告はメインレイアウトの下部に重なっていますが、ここには多くの解決策がありますが、それらのものは私のために働いていません。あるBOTTOM WRT親、従ってその重なり合うあなたのWebView |admobバナー広告がメインレイアウトと重複する
AdMobの広告がTOPに揃えている:私のactivity.main.xmlされ、次の
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:ads="http://schemas.android.com/apk/res-auto">
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:indeterminate="false"
android:layout_gravity="center" />
<WebView
android:id="@+id/webView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_gravity="bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="SMART_BANNER"
ads:adUnitId="@string/banner_ad_unit_id">
</com.google.android.gms.ads.AdView>
</android.support.design.widget.CoordinatorLayout>
<android.support.design.widget.NavigationView
android:id="@+id/navigation_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:itemIconTint="#d20b0d"
app:itemTextColor="#333"
app:menu="@menu/navigation_items" />
</android.support.v4.widget.DrawerLayout>
@Dnyneshは広告が表示されない非推奨されているとして、あなたのレイアウトでfill_parentを使用しないでください。 –
adviewへのハードコードの高さを教えてください。もう一度コードをチェックしてください。コードを更新します。 – Dnyanesh