This question has been asked before, but its not working for me. Not even "adjustPan" is working. Here is my layout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/navbg" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="2dp"
android:contentDescription="@string/hello_world"
android:src="@drawable/navtitle" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:layout_marginLeft="5dp"
android:contentDescription="@string/hello_world"
android:src="@drawable/navbaricon" />
<ImageView
android:id="@+id/share_app"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:contentDescription="@string/hello_world"
android:paddingBottom="10dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingTop="10dp"
android:src="@drawable/moreoptions" />
</FrameLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3" >
<TextView
android:id="@+id/tut_tab"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.8"
android:gravity="center"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:text="@string/s13"
android:textColor="@color/text_patti"
android:textSize="12sp" />
<View
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="@color/tab_lines" />
<TextView
android:id="@+id/downpost_tab"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1.3"
android:gravity="center"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:text="@string/s14"
android:textColor="@color/text_patti"
android:textSize="12sp" />
<View
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="@color/tab_lines" />
<TextView
android:id="@+id/downloads_tab"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.9"
android:gravity="center"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:text="@string/s15"
android:textColor="@color/text_patti"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="3dp"
android:orientation="horizontal"
android:weightSum="3" >
<View
android:id="@+id/tutorial_bar"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="0.8"
android:background="@color/text_patti"
android:visibility="invisible" />
<View
android:id="@+id/downpost_bar"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_marginLeft="-1dp"
android:layout_marginRight="-1dp"
android:layout_weight="1.3"
android:background="@color/text_patti"
android:visibility="invisible" />
<View
android:id="@+id/downloads_bar"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="0.9"
android:background="@color/text_patti"
android:visibility="invisible" />
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="@color/tab_lines" />
<android.support.v4.view.ViewPager
android:id="@+id/my_pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<com.google.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-7574057688734526/7494789493"
ads:loadAdOnCreate="true"
android:gravity="center"
android:isScrollContainer="false" />
The admob goes up when keyboard opens. Maybe because of weight in viewpager. Howto avoid it?