title: Android adjustResize layout resize with soft keyboard
body: <p>I'm struggling to get a small EditText along with two buttons aligned to the bottom of the screen <em>or</em> bottom of software keyboard. Basically my problem is that every time I open up my activity (flagged with <strong>adjustResize&nbsp;|&nbsp;stateAlwaysVisible</strong>) and layout:</p>
  
  <pre><code>&lt;LinearLayout 
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:gravity="bottom" 
  android:layout_height="match_parent" 
  android:orientation="vertical" 
  android:layout_width="match_parent" 
  android:layout_alignParentBottom="true"&gt;
  
      &lt;LinearLayout android:orientation="vertical" android:layout_height="wrap_content" android:layout_width="match_parent" android:id="@+id/soft_input_edit_placeholder"&gt;
          &lt;EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/editText1"&gt;
              &lt;requestFocus&gt;&lt;/requestFocus&gt;
          &lt;/EditText&gt;
      &lt;/LinearLayout&gt;
      &lt;LinearLayout android:layout_height="wrap_content" android:layout_width="match_parent" android:weightSum="2" android:id="@+id/soft_input_layout_buttons"&gt;
          &lt;Button android:layout_width="0dp" android:text="xxx Submit xxx" android:layout_height="wrap_content" android:id="@+id/soft_input_button_submit" android:layout_weight="1"&gt;&lt;/Button&gt;
          &lt;Button android:layout_width="0dp" android:text="xxx Cancel xxx" android:layout_height="wrap_content" android:id="@+id/soft_input_button_cancel" android:layout_weight="1"&gt;&lt;/Button&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The keyboard slides up, it resizes the activity so that <strong>only the edit text is visible</strong>, and when I hide it (at least the keyboard has a button that allows me to hide it), layout remains in position, that is, it never slides back down, leaving half of the screen uncovered.</p>
  
  <p>I read that in most cases the alignment is achieved by introducing some scalable control to the layout, but I don't really wish to have any form of ListView there; I tried using RelativeLayout, still no go. Embedding one into the other - still no luck. I'd be very thankful for any suggestions you may have, I'm running out of ideas..</p>
  
  <p>Thank you!</p>