title: Toolbar moves up Android
body: <p>I have a Message sending and receiving layout and toolbar on top now when I focus on edittext for wrting message the whole layout moves up but the toolbar also moves upI used adjustPan and adjustResize,fitwindows true isScrollSontainer true. In short tries all solutions but all in vain.
  I opened this message view layout in fragment as child</p>
  
  <p><a href="https://i.stack.imgur.com/00A7o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/00A7o.png" alt="like that"></a></p>
  
  <pre><code>//main
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v4.widget.DrawerLayout 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:id="@+id/drawer_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"
      tools:openDrawer="start"&gt;
  
      &lt;include
          layout="@layout/app_bar_main"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  
      &lt;android.support.design.widget.NavigationView
          android:id="@+id/nav_view"
          android:layout_width="wrap_content"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          android:fitsSystemWindows="true"
          app:headerLayout="@layout/nav_header_main"
          app:menu="@menu/activity_main_drawer" /&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  
  appbarmain:
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout 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:fitsSystemWindows="true"
      tools:context="com.app.collbatt.ui.NavigationActivity"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/appbar"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="?attr/actionBarSize"
              android:background="?attr/colorPrimary"
              android:minHeight="?attr/actionBarSize"
              app:contentInsetLeft="0dp"
              app:contentInsetStart="0dp"
              app:contentInsetStartWithNavigation="0dp"
              app:layout_scrollFlags="enterAlways"&gt;
  
              &lt;TextView
                  android:id="@+id/tv_name"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:textColor="@android:color/white"
                  android:textSize="@dimen/text_size_medium" /&gt;
  
              &lt;ImageView
                  android:id="@+id/img_createRecord"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="right"
                  android:layout_marginRight="10dp"
                  android:src="@drawable/icon_createrec_white" /&gt;
  
              &lt;ImageView
                  android:id="@+id/img_avatar"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="right"
                  android:layout_marginRight="10dp"
                  android:src="@drawable/app_logo" /&gt;
  
  
          &lt;/android.support.v7.widget.Toolbar&gt;
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;include
          android:id="@+id/content_main"
          layout="@layout/content_main"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_below="@+id/appbar" /&gt;
  
  
  &lt;/RelativeLayout&gt;
  
  
  
  //contentMain:
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"
      tools:context="com.app.collbatt.ui.NavigationActivity"&gt;
  
      &lt;FrameLayout
          android:id="@+id/content_frame"
          android:layout_width="match_parent"
          android:fitsSystemWindows="true"
          android:isScrollContainer="true"
          android:layout_height="match_parent" /&gt;
  
  &lt;/RelativeLayout&gt;
  
  
  //MessageView:
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;RelativeLayout 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:id="@+id/view_main"
      android:fitsSystemWindows="true"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@drawable/app_bg"&gt;
  
  
      &lt;com.github.rahatarmanahmed.cpv.CircularProgressView xmlns:app="http://schemas.android.com/apk/res-auto"
          android:id="@+id/progress_view"
          android:layout_width="40dp"
          android:layout_height="40dp"
          android:layout_centerHorizontal="true"
          android:layout_centerVertical="true"
          app:cpv_animAutostart="true"
          app:cpv_indeterminate="true" /&gt;
  
      &lt;android.support.v7.widget.RecyclerView
          android:id="@+id/rv_Messages"
          android:layout_width="0dp"
          android:layout_height="0dp"
          android:layout_above="@+id/layout_messagebox"
          android:layout_alignParentLeft="true"
          android:layout_alignParentRight="true"
          android:layout_alignParentTop="true"
          android:layout_marginBottom="8dp" /&gt;
  
      &lt;!-- A horizontal line between the chatbox and RecyclerView --&gt;
      &lt;View
          android:layout_width="0dp"
          android:layout_height="2dp"
          android:layout_above="@+id/layout_messagebox"
          android:layout_alignParentLeft="true"
          android:layout_alignParentRight="true"
          android:layout_marginBottom="0dp"
          android:background="#dfdfdf" /&gt;
  
      &lt;LinearLayout
          android:id="@+id/layout_messagebox"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentLeft="true"
          android:layout_alignParentRight="true"
          android:background="#ffffff"
          android:minHeight="48dp"
          android:orientation="horizontal"&gt;
  
          &lt;EditText
              android:id="@+id/et_messagebox"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_gravity="center"
              android:layout_marginLeft="16dp"
              android:layout_marginRight="16dp"
              android:layout_weight="1"
              android:background="@android:color/transparent"
              android:hint="Type Message..."
              android:imeOptions="actionSend"
              android:maxLines="6" /&gt;
  
          &lt;Button
              android:id="@+id/btn_send"
              android:layout_width="56dp"
              android:layout_height="56dp"
              android:background="@drawable/icon_send" /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/RelativeLayout&gt;
  
  
  //Manifest:
      &lt;application
          android:name=".App"
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="APP"
          android:roundIcon="@mipmap/ic_launcher_round"
          android:supportsRtl="true"
          tools:replace="icon,label"&gt;
  
  
          &lt;!--Navigation Activity--&gt;
          &lt;activity
              android:name=".ui.NavigationActivity"
              android:screenOrientation="portrait"
              android:theme="@style/AppTheme_Nav"&gt;&lt;/activity&gt;
  
  
  
      &lt;/application&gt;
  </code></pre>