How to make sure specific view is visible when keyboard appears?
<p>I have a layout with a graphic at the top, an <code>EditText</code> in the middle and a button some distance below it, like so:</p>

<p><img src="http://i.stack.imgur.com/GTvTF.jpg" alt="Example layout"></p>

<p>When the user is typing in the <code>EditText</code>, I want to pan the layout so that the "Go" button is still visible, even if that means clipping the image off the top, like so:</p>

<p><img src="http://i.stack.imgur.com/AsJDm.jpg" alt="Wanted layout"></p>

<p>I know about <code>windowSoftInputMode="adjustPan"</code> in the manifest, but that doesn't work because it only pans far enough for the EditText to be visible. Is there a way to make sure it pans until the button is visible too?</p>

<hr>

<p>For comments with K_Anas, this is my layout. It has all the extra margins and spacing removed compared to the first screenshot, to remove any other source of problems.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"&gt;

    &lt;View
        android:layout_width="300dp"
        android:layout_height="150dp"
        android:layout_alignParentTop="true"
        android:background="#999"/&gt;

    &lt;EditText
        android:layout_width="280dp"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:hint="Sample..."/&gt;

    &lt;Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:text="Go"/&gt;

&lt;/RelativeLayout&gt;
</code></pre>
