Сейчас мои объявления покрывают верхнюю часть моего веб-просмотра, и я хочу, чтобы они отображались над веб-обзором, а затем веб-просмотр начинается прямо под ними ... вот мой файл макета:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:myapp="http://schemas.android.com/apk/res/com.music.promotion.free"
xmlns:ads="http://schemas.android.com/apk/res/com.music.promotion.free"
android:layout_width="fill_parent"
android:background="#000000"
android:layout_height="fill_parent"
>
<WebView android:id="@+id/web_engine"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<com.google.ads.AdView android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="a14dc0dc7949bae"
ads:adSize="BANNER"/>
<LinearLayout android:id="@+id/footer" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="horizontal"
android:layout_alignParentBottom="true" style="@android:style/ButtonBar">
<Button android:id="@+id/btnPause" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="1"
android:text="Pause" />
<Button android:id="@+id/btnPlay" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="1"
android:text="Play" />
Я попробовал это, и теперь они, кажется, вообще не появляются ..
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:myapp="http://schemas.android.com/apk/res/com.music.promotion.free"
xmlns:ads="http://schemas.android.com/apk/res/com.music.promotion.free"
android:layout_width="fill_parent"
android:background="#000000"
android:layout_height="fill_parent"
>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="50dp">
<com.google.ads.AdView android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="a14dc0dc7949bae"
ads:adSize="BANNER"/>
</LinearLayout>
<WebView android:id="@+id/web_engine"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>