Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid screen shifts down with AdView
    text
    copied!<p>How do I prevent my Android screen from shifting down when a page is view is displayed and receives the first add? </p> <p>When the view is first displayed the screen is normal, then a ad is displayed and the screen shifts down a few lines. </p> <p>Here is my code. </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" android:id="@+id/LinearLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/background3" android:orientation="vertical" &gt; &lt;com.google.ads.AdView android:id="@+id/adView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="2dp" android:layout_gravity="top" ads:adSize="BANNER" ads:adUnitId="xxxxxxxxxx" android:gravity="center" ads:loadAdOnCreate="true" &gt; &lt;/com.google.ads.AdView&gt; &lt;TableRow android:id="@+id/tableRow2" android:layout_width="fill_parent" android:layout_height="50dp" android:layout_marginTop="34dp" &gt; &lt;EditText android:id="@+id/editText1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" /&gt; &lt;Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="3" android:text="Start" /&gt; &lt;/TableRow&gt; &lt;/LinearLayout&gt; </code></pre> <p>TIA, Trey</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