Note that there are some explanatory texts on larger screens.

plurals
  1. POOverlapping with Admob and Webview
    text
    copied!<p>For the first time I'm developing an Android application and so far it's going really well except for one thing. I made a webview layout and I wanted to show ads in the app. So I added the AdMob ads and they're working really well. But there's one problem. </p> <p>The AdMob covers a part of the WebView, so it's not shifting the WebView layout up but it's covering it. And that's annoying because you can't read a part of the webview's text. How can I fix it? </p> <p>This is my main.xml file:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" android:layout_width="fill_parent" android:id="@+id/rltvLayout01" android:layout_height="fill_parent" android:background="@color/white"&gt; &lt;ScrollView android:id="@+id/ScrollView01" android:layout_width="fill_parent" android:layout_height="wrap_content"&gt; &lt;WebView android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:fitsSystemWindows="true" android:scrollbars="none" /&gt; &lt;/ScrollView&gt; &lt;LinearLayout android:id="@+id/ad_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="bottom" android:layout_alignParentBottom="true"&gt; &lt;com.google.ads.AdView android:id="@+id/ad" android:layout_width="fill_parent" android:layout_height="wrap_content" ads:adUnitId="helloworldcode" ads:loadAdOnCreate="true" ads:adSize="BANNER" /&gt; &lt;/LinearLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p>I tried to give the ScrollView an <code>android:layout_above="@+id/ad_layout"</code> but then my app force closes... So I really hope somebody can help me as I'm looking for it now for hours :(</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload