title: windowSoftInputMode="adjustPan|adjustResize" did not work with coordinatelayout
body: <p>I have a layout with multiple <code>EditText</code> and a button in the bottom of it. I want to my layout stay on above of keyboard when keyboard is showing. I search for this problem and I found should put <code>android:windowSoftInputMode="adjustPan|adjustResize"</code> attribute in <code>activity</code> tag of <code>manifest</code>. I do this But did not work for me. I put also <code>android:fitsSystemWindows="true"</code> in the root view. This is my xml Layout file of my fragment:</p>
  
  <pre><code>&lt;ScrollView
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fillViewport="true"
      android:id="@+id/scrollView2"
      android:fitsSystemWindows="true"&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context=".ui.LoginByUserNameFragment"
          android:layoutDirection="rtl"
          android:fitsSystemWindows="true"
          &gt;
      &lt;ImageView
              android:src="@drawable/ic_back_arrow"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/imgBack_lbu"
              app:layout_constraintTop_toTopOf="parent"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintStart_toStartOf="parent"
              android:layout_marginStart="8dp"
              android:layout_marginLeft="8dp"
              app:layout_constraintHorizontal_bias="0.02"
              android:layout_marginTop="8dp"/&gt;
      &lt;ImageView
              android:src="@drawable/img_typewriter"
              android:layout_width="289dp"
              android:layout_height="152dp"
              android:id="@+id/imageView3" android:layout_marginTop="8dp"
              app:layout_constraintTop_toBottomOf="@+id/imgBack_lbu" app:layout_constraintEnd_toEndOf="parent"
              android:layout_marginEnd="8dp" app:layout_constraintStart_toStartOf="parent"
              android:layout_marginStart="8dp"/&gt;
      &lt;com.google.android.material.button.MaterialButton
              android:text="@string/login_with_sms"
              android:layout_width="150dp"
              android:layout_height="60dp"
              android:id="@+id/btnLoginByOpt"
              android:layout_marginTop="16dp"
              app:layout_constraintTop_toBottomOf="@+id/imageView3"
              app:layout_constraintEnd_toEndOf="parent"
              android:layout_marginEnd="16dp"
              app:layout_constraintStart_toStartOf="parent"
              android:layout_marginStart="16dp"
              android:textColor="@color/darkGreen"
              app:icon="@drawable/ic_sms"
              app:iconTint="#083316"
              app:iconGravity="textStart"
              android:gravity="center"
              android:textAlignment="center"
              app:cornerRadius="5dp"
              app:backgroundTint="@color/mainGrey"
              app:layout_constraintHorizontal_bias="0.497"/&gt;
      &lt;ImageView android:layout_width="0dp"
              android:layout_height="2dp"
              app:layout_constraintStart_toStartOf="parent"
              android:layout_marginStart="16dp"
              android:layout_marginLeft="16dp"
              android:background="@color/anotherGrey" android:id="@+id/view"
              app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toStartOf="@+id/textView"
              app:layout_constraintTop_toTopOf="@+id/textView"
              app:layout_constraintBottom_toBottomOf="@+id/textView" android:layout_marginRight="16dp"
              android:layout_marginEnd="16dp"/&gt;
      &lt;TextView
              android:text="@string/or"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/textView"
              android:layout_marginTop="16dp"
              app:layout_constraintTop_toBottomOf="@+id/btnLoginByOpt"
              android:textColor="@color/anotherGrey"
              android:textSize="14sp"
              app:layout_constraintStart_toEndOf="@+id/view" app:layout_constraintHorizontal_bias="0.5"
              app:layout_constraintEnd_toStartOf="@+id/view2"/&gt;
      &lt;ImageView android:layout_width="0dp"
              android:layout_height="2dp"
              android:background="@color/anotherGrey"
              app:layout_constraintTop_toTopOf="@+id/textView"
              android:id="@+id/view2"
              app:layout_constraintEnd_toEndOf="parent"
              android:layout_marginEnd="16dp"
              android:layout_marginRight="16dp"
              app:layout_constraintStart_toEndOf="@+id/textView"
              app:layout_constraintHorizontal_bias="0.5"
              app:layout_constraintBottom_toBottomOf="@+id/textView" android:layout_marginLeft="16dp"
              android:layout_marginStart="16dp"/&gt;
      &lt;TextView
              android:text="@string/login_with_phone_and_password"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/textView2"
              app:layout_constraintEnd_toEndOf="parent"
              android:layout_marginEnd="8dp"
              app:layout_constraintStart_toStartOf="parent"
              android:layout_marginStart="8dp"
              app:layout_constraintTop_toBottomOf="@+id/textView"
              android:layout_marginTop="16dp"
              app:layout_constraintHorizontal_bias="0.497"
              android:textColor="@color/anotherGrey"/&gt;
  
      &lt;com.google.android.material.textfield.TextInputLayout
              android:id="@+id/edtPhon_input"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:hint="@string/prompt_phone"
              style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
              app:layout_constraintTop_toBottomOf="@+id/textView2"
              android:layout_marginTop="28dp"
              android:layout_marginEnd="8dp"
              app:layout_constraintEnd_toEndOf="parent"
              android:layout_marginStart="8dp"
              app:layout_constraintStart_toStartOf="parent"
              &gt;
  
          &lt;com.google.android.material.textfield.TextInputEditText
                  android:id="@+id/edtPhon"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:inputType="phone"
                  android:maxLines="1"
                  android:background="@drawable/drw_bg_edt"
                  android:padding="@dimen/padding_button"
                  app:drawableLeftCompat="@drawable/phone_drawable_selector"
                  android:drawablePadding="3dp"
                  android:imeOptions="actionNext"
                  /&gt;
  
      &lt;/com.google.android.material.textfield.TextInputLayout&gt;
  
      &lt;com.google.android.material.textfield.TextInputLayout
              android:id="@+id/edtPassword_input"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
              app:layout_constraintTop_toBottomOf="@+id/edtPhon_input"
              android:layout_marginStart="8dp"
              app:layout_constraintStart_toStartOf="parent"
              android:layout_marginEnd="8dp"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintHorizontal_bias="0.0"
              android:layout_marginTop="20dp"&gt;
          &lt;com.google.android.material.textfield.TextInputEditText
                  android:id="@+id/edtPassword"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:inputType="textPassword"
                  android:maxLines="1"
                  android:background="@drawable/drw_bg_edt"
                  android:padding="@dimen/padding_button"
                  app:drawableLeftCompat="@drawable/pass_drw"
                  android:drawablePadding="3dp"
                  android:imeOptions="actionDone"&gt;
  
          &lt;/com.google.android.material.textfield.TextInputEditText&gt;
  
      &lt;/com.google.android.material.textfield.TextInputLayout&gt;
  
      &lt;com.google.android.material.button.MaterialButton
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              app:layout_constraintTop_toBottomOf="@+id/edtPassword_input"
              app:layout_constraintStart_toStartOf="parent"
              android:layout_marginStart="8dp"
              android:layout_marginEnd="8dp"
              app:layout_constraintEnd_toEndOf="parent"
              android:layout_marginTop="20dp"
              app:layout_constraintHorizontal_bias="0.0"
              android:textColor="@color/White"
              android:text="@string/general_login"
              android:gravity="center"
              app:cornerRadius="5dp"
              app:backgroundTint="@color/back_color_sign_btn"
              android:enabled="false"
              android:padding="@dimen/padding_button"
              android:id="@+id/btn_login"
              android:layout_marginBottom="8dp"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintVertical_bias="0.07"/&gt;
  
      &lt;TextView
              android:text="@string/do_register"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/txtSignUp"
              android:textColor="@color/mainGreen"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintStart_toEndOf="@+id/txtMember"
              app:layout_constraintHorizontal_bias="0.5"
              app:layout_constraintTop_toBottomOf="@+id/btn_login"
              android:layout_marginTop="16dp"
              android:layout_marginBottom="8dp"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintVertical_bias="0.25"/&gt;
      &lt;TextView
              android:text="@string/not_member"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/txtMember"
              android:background="?attr/selectableItemBackground"
              android:paddingEnd="5dp"
              android:paddingRight="5dp"
              android:textColor="@color/generalGrey"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintHorizontal_bias="0.5"
              app:layout_constraintEnd_toStartOf="@+id/txtSignUp"
              app:layout_constraintTop_toBottomOf="@+id/btn_login"
              app:layout_constraintHorizontal_chainStyle="packed"
              android:layout_marginTop="16dp" android:layout_marginBottom="8dp"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintVertical_bias="0.25"/&gt;
  
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  
  <p>
  And this is the layout of main Activity:</p>
  
  <pre><code>    &lt;androidx.coordinatorlayout.widget.CoordinatorLayout
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context=".ui.MainActivity"
      android:fitsSystemWindows="true"
  android:id="@+id/rootLayout"&gt;
  
      &lt;fragment
              android:id="@+id/nav_host_fragment"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:name="androidx.navigation.fragment.NavHostFragment"
              app:navGraph="@navigation/mobile_navigation"
              app:defaultNavHost="true"
              app:layout_behavior="@string/appbar_scrolling_view_behavior"/&gt;
  
  &lt;/androidx.coordinatorlayout.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>This is the screenshot of the layout:
  <a href="https://i.stack.imgur.com/mfg88.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mfg88.png" alt="enter image description here"></a></p>
  
  <p>And When keyboard is showing:
  <a href="https://i.stack.imgur.com/c4Rde.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c4Rde.png" alt="enter image description here"></a></p>