title: How to scroll my entire layout when the keyboard appears?
body: <p>This is my layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/scroll_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:padding="@dimen/defaut_padding" &gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical" &gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginBottom="@dimen/defaut_padding"
          android:orientation="vertical" &gt;
  
          &lt;FrameLayout
              android:id="@+id/photo"
              android:layout_width="match_parent"
              android:layout_height="wrap_content" &gt;
  
              &lt;ImageView
                  android:id="@+id/picture"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:scaleType="fitXY" /&gt;
  
              &lt;ImageView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="right"
                  android:layout_margin="10dp"
                  android:background="@drawable/watermark" /&gt;
  
              &lt;ProgressBar
                  android:id="@+id/bitmap_loading"
                  style="?android:attr/progressBarStyleLarge"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:visibility="visible" /&gt;
          &lt;/FrameLayout&gt;
  
          &lt;FrameLayout
              android:id="@+id/user"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_below="@id/photo"
              android:layout_marginLeft="15dp"
              android:layout_marginTop="-30dp"
              android:background="@android:color/white"
              android:padding="@dimen/smallest_padding" &gt;
  
              &lt;ImageView
                  android:id="@+id/user_picture"
                  android:layout_width="50dp"
                  android:layout_height="50dp"
                  android:src="@drawable/anonymous_user" /&gt;
          &lt;/FrameLayout&gt;
  
          &lt;TextView
              android:id="@+id/user_name"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignBottom="@id/user"
              android:layout_marginLeft="@dimen/defaut_padding"
              android:layout_toRightOf="@id/user"
              android:text="@string/anonymous_user"
              android:textStyle="bold" /&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;FrameLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content" &gt;
  &lt;EditText
      android:id="@+id/input_description"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:gravity="top"
      android:padding="5dp"
      android:layout_marginBottom="@dimen/defaut_padding"
      android:background="@drawable/textfield"
      android:hint="@string/description_hint"
      android:focusableInTouchMode="true"
      android:maxLines="3"
      android:scrollbars="vertical" /&gt;
  
  &lt;Button
      android:id="@+id/publish"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:background="@drawable/confirm_button_selector"
      android:text="@string/confirm_button"
      android:textColor="@android:color/white"
      android:textSize="@dimen/big_text_size"
      android:textStyle="bold" /&gt;
  
      &lt;/FrameLayout&gt;
  &lt;/LinearLayout&gt;
  
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>I want to scroll it when the soft keyboard appears when I start to digit at the EditText. How can I do this? Currenty the scroll works, but the keyboard appears above the button, and I want the button above the keyboard</p>
  
  <p>I've tried to move the scrool when the user clicks in the EditText, doing something like this:</p>
  
  <pre><code>mSv.scrollTo(0, mSv.getBottom());
  </code></pre>
  
  <p>where mSv is my ScrollView</p>
  
  <p>But it only works when the user clicks in the EditText at the second time.</p>
  
  <p>Thank you for any help.</p>