把AdMob广告AdView放置于屏幕webview底部
将AdMob广告AdView放置于屏幕webview底部,并且不遮拦界面webview内部文字,看下面的布局xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ScrollView android:id="@+id/scrollLayout"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:layout_above="@+id/adView">
<LinearLayout android:layout_height="fill_parent"
android:layout_width="fill_parent">
<TextView android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Place very long string here..."/>
</LinearLayout>
</ScrollView>
<com.google.ads.AdView
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:id="@id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
ads:adUnitId="INSERT_YOUR_AD_UNIT_ID_HERE"
ads:adSize="BANNER"
ads:testDevices="TEST_EMULATOR"
ads:loadAdOnCreate="true"/>
</RelativeLayout>