title: How to make toolbar fixed while scrolling in android?
body: <p>I have researched all the previous question before posting this question none of the previous solution worked for me. I need to make my <code>Toolbar</code> static while scrolling it goes up while scrolling butI need to make it static how can i do this. Now let me explain what are all the methods I have tried so far, </p>
  
  <ol>
  <li><p>I have entered <code>windowSoftInputMode</code> to adjust resize  </p></li>
  <li><p><code>fitwindows</code>
      true in layout</p></li>
  </ol>
  
  <p>This is the code i have written :</p>
  
  <p>This is the main <code>CoordinatorLayout</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/main_content"
      android:fitsSystemWindows="true"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/appbar"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"&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"
              app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
              app:layout_scrollFlags="scroll|enterAlways" /&gt;
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;include layout="@layout/activity_incident"
         /&gt;
  
  
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>This is the layout file :</p>
  
  <pre><code>&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"
      android:id="@+id/activity_incident"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
      &lt;android.support.v7.widget.RecyclerView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/incident_recyclerview"
          android:divider="#fff"
           android:keepScreenOn="true"
          android:dividerHeight="0.5dp"
          /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I just want to make my <code>Toolbar</code> static how can I achieve Thanks in advance!!</p>