title: Layout not adjust when keyboard opens
body: <p>Hi i have the following layout in <code>activity.xml</code> file</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/activity_change_password"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="0dp"
  android:paddingLeft="0dp"
  android:paddingRight="0dp"
  android:paddingTop="0dp"
  android:layout_marginTop="0dp"
  tools:context="com.kdpl.motodriver.ChangePassword"&gt;
  &lt;android.support.v7.widget.Toolbar
      android:id="@+id/toolbar1"
      android:layout_width="fill_parent"
      android:layout_height="58dp"
      android:background="?attr/colorPrimary"
      android:minHeight="?attr/actionBarSize"
      android:titleTextColor="#ffffff"&gt;
      &lt;Button
          android:layout_width="25dp"
          android:layout_height="25dp"
          android:background="@drawable/back_arrow" android:onClick="onBackPressed" /&gt;
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/change_password_header"
          android:layout_gravity="center"
          android:id="@+id/toolbar_title"
          style="@style/TitleStyle"/&gt;
  &lt;/android.support.v7.widget.Toolbar&gt;
  &lt;android.support.design.widget.TextInputLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginTop="30dp"
      android:layout_below="@+id/toolbar1"
      android:id="@+id/txt1"&gt;
      &lt;EditText
          android:layout_width="match_parent"
          android:layout_height="50dp"
          android:layout_marginLeft="16dp"
          android:layout_marginRight="16dp"
          android:id="@+id/txtOldPIN"
          android:hint="@string/txt_old_pin"
          android:maxLength="4"
          android:paddingLeft="10dp"
          android:textColor="#ffffff"
          android:inputType="numberPassword"
          android:textColorHint="@color/lightGray"
          android:gravity="center_vertical"/&gt;
  &lt;/android.support.design.widget.TextInputLayout&gt;
  &lt;android.support.design.widget.TextInputLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginTop="20dp"
      android:layout_below="@+id/txt1"
      android:id="@+id/txt2"&gt;
      &lt;EditText
          android:layout_width="match_parent"
          android:layout_height="50dp"
          android:layout_marginLeft="16dp"
          android:layout_marginRight="16dp"
          android:paddingLeft="10dp"
          android:textColor="#ffffff"
          android:id="@+id/txtNewPin"
          android:inputType="numberPassword"
          android:maxLength="4"
          android:hint="@string/txt_new_pin"
          android:textColorHint="@color/lightGray"
          android:gravity="center_vertical"/&gt;
  &lt;/android.support.design.widget.TextInputLayout&gt;
  &lt;android.support.design.widget.TextInputLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginTop="20dp"
      android:layout_below="@+id/txt2"
      android:id="@+id/txt3"&gt;
      &lt;EditText
          android:layout_width="match_parent"
          android:layout_height="50dp"
          android:layout_marginLeft="16dp"
          android:layout_marginRight="16dp"
          android:paddingLeft="10dp"
          android:id="@+id/txtConfirmPin"
          android:inputType="numberPassword"
          android:maxLength="4"
          android:textColor="#ffffff"
          android:layout_below="@+id/txt2"
          android:hint="@string/txt_confirm_new_pin"
          android:textColorHint="@color/lightGray"
          android:gravity="center_vertical"/&gt;
  &lt;/android.support.design.widget.TextInputLayout&gt;
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:layout_alignParentBottom="true"&gt;
      &lt;Button
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:id="@+id/btnChangePIN"
          android:layout_marginRight="16dp"
          android:layout_marginLeft="16dp"
          android:layout_centerHorizontal="true"
          android:background="@drawable/my_custom_btn_1"
          android:layout_below="@id/txt3"
          style="@style/buttonStyle"
          android:text="@string/txt_change_pin"
          android:enabled="false"/&gt;
      &lt;Button
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:id="@+id/btnCancelPIN"
          android:layout_marginTop="20dp"
          android:layout_marginRight="16dp"
          android:layout_marginLeft="16dp"
          android:layout_centerHorizontal="true"
          android:background="@drawable/my_custom_btn_1"
          android:layout_below="@id/btnChangePIN"
          style="@style/buttonStyle"
          android:text="@string/btn_cancel_text" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have added the following line in <code>Manifest.xml</code> </p>
  
  <pre><code>  &lt;activity android:name=".ChangePassword"
          android:configChanges="orientation|keyboardHidden"
          android:screenOrientation="portrait"
          android:windowSoftInputMode="adjustResize"
          /&gt;
  </code></pre>
  
  <p>But the <code>Buttons align parent bottom</code> hides when keyboard open. Layout does not resize itself.</p>
  
  <p>What i am missing ?</p>
  
  <p><strong>Updated View</strong></p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/activity_change_password"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="0dp"
  android:paddingLeft="0dp"
  android:paddingRight="0dp"
  android:paddingTop="0dp"
  android:layout_marginTop="0dp"
  tools:context="com.kdpl.motodriver.ChangePassword"&gt;
  &lt;android.support.v7.widget.Toolbar
      android:id="@+id/toolbar1"
      android:layout_width="fill_parent"
      android:layout_height="58dp"
      android:background="?attr/colorPrimary"
      android:minHeight="?attr/actionBarSize"
      android:titleTextColor="#ffffff"&gt;
      &lt;Button
          android:layout_width="25dp"
          android:layout_height="25dp"
          android:background="@drawable/back_arrow" android:onClick="onBackPressed" /&gt;
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/change_password_header"
          android:layout_gravity="center"
          android:id="@+id/toolbar_title"
          style="@style/TitleStyle"/&gt;
  &lt;/android.support.v7.widget.Toolbar&gt;
  &lt;ScrollView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_below="@+id/toolbar1"&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"&gt;
          &lt;android.support.design.widget.TextInputLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_below="@+id/toolbar1"
              android:id="@+id/txt1"&gt;
              &lt;EditText
                  android:layout_width="match_parent"
                  android:layout_height="50dp"
                  android:layout_marginLeft="16dp"
                  android:layout_marginRight="16dp"
                  android:id="@+id/txtOldPIN"
                  android:hint="@string/txt_old_pin"
                  android:maxLength="4"
                  android:paddingLeft="10dp"
                  android:textColor="#ffffff"
                  android:inputType="numberPassword"
                  android:textColorHint="@color/lightGray"
                  android:gravity="center_vertical"/&gt;
          &lt;/android.support.design.widget.TextInputLayout&gt;
          &lt;android.support.design.widget.TextInputLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_below="@+id/txt1"
              android:id="@+id/txt2"&gt;
              &lt;EditText
                  android:layout_width="match_parent"
                  android:layout_height="50dp"
                  android:layout_marginLeft="16dp"
                  android:layout_marginRight="16dp"
                  android:paddingLeft="10dp"
                  android:textColor="#ffffff"
                  android:id="@+id/txtNewPin"
                  android:inputType="numberPassword"
                  android:maxLength="4"
                  android:hint="@string/txt_new_pin"
                  android:textColorHint="@color/lightGray"
                  android:gravity="center_vertical"/&gt;
          &lt;/android.support.design.widget.TextInputLayout&gt;
          &lt;android.support.design.widget.TextInputLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_below="@+id/txt2"
              android:id="@+id/txt3"&gt;
              &lt;EditText
                  android:layout_width="match_parent"
                  android:layout_height="50dp"
                  android:layout_marginLeft="16dp"
                  android:layout_marginRight="16dp"
                  android:paddingLeft="10dp"
                  android:id="@+id/txtConfirmPin"
                  android:inputType="numberPassword"
                  android:maxLength="4"
                  android:textColor="#ffffff"
                  android:layout_below="@+id/txt2"
                  android:hint="@string/txt_confirm_new_pin"
                  android:textColorHint="@color/lightGray"
                  android:gravity="center_vertical"/&gt;
          &lt;/android.support.design.widget.TextInputLayout&gt;
      &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:paddingBottom="10dp"
      android:layout_alignParentBottom="true"&gt;
      &lt;Button
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:id="@+id/btnChangePIN"
          android:layout_marginRight="16dp"
          android:layout_marginLeft="16dp"
          android:layout_centerHorizontal="true"
          android:background="@drawable/my_custom_btn_1"
          android:layout_below="@id/txt3"
          style="@style/buttonStyle"
          android:text="@string/txt_change_pin"
          android:enabled="false"/&gt;
      &lt;Button
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:id="@+id/btnCancelPIN"
          android:layout_marginTop="20dp"
          android:layout_marginRight="16dp"
          android:layout_marginLeft="16dp"
          android:layout_centerHorizontal="true"
          android:background="@drawable/my_custom_btn_1"
          android:layout_below="@id/btnChangePIN"
          style="@style/buttonStyle"
          android:text="@string/btn_cancel_text" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have updated my view to add <code>scrollview</code> in between <code>toolbar</code> and <code>buttons</code>. I have also added <code>getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);</code> in my activity as suggested.. It works but not perfectly. Now <code>Buttons</code> overlap the views in <code>scroll view</code>. Attached is image <a href="https://i.stack.imgur.com/7RH7E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7RH7E.png" alt="My App Images"></a></p>