title: how to hide/show a layout when recyclerview scroll (like twitter's new tweet layout)
body: <p>i want to add a layout which hides/shows when recyclerview scroll. that layout will hide when recyclerview scroll down, will show when recyclerview scroll up, like twitter's new tweet layout. i can do it for appbarlayout but i can not do for that layout. how can i do that?</p>
  
  <p><a href="http://i.hizliresim.com/rVyDq3.png" rel="nofollow">http://i.hizliresim.com/rVyDq3.png</a></p>
  
  <p>the purple layout will hide show like actionbar :</p>
  
  <p><a href="http://i.hizliresim.com/gAMp92.png" rel="nofollow">http://i.hizliresim.com/gAMp92.png</a></p>
  
  <p>here is my layout file :</p>
  
  <pre><code>&lt;android.support.v4.widget.DrawerLayout
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/drawerLayout"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:elevation="7dp"&gt;
  
  &lt;!-- my main content --&gt;
  &lt;android.support.design.widget.CoordinatorLayout
      android:id="@+id/coordinatorLayout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/appBarLayout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/tool_bar"
              style="@style/ToolBarStyle"
              android:layout_width="match_parent"
              android:layout_height="?attr/actionBarSize"
              android:background="?attr/colorPrimary"
              android:minHeight="?attr/actionBarSize"
              app:layout_scrollFlags="scroll|enterAlways" /&gt;
  
          &lt;LinearLayout
              android:orientation="vertical"
              android:id="@+id/linearLayout"
              android:layout_width="match_parent"
              android:layout_height="48dp"
              android:background="@color/color_accent_pink"&gt;
  
          &lt;/LinearLayout&gt;
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
  
      &lt;android.support.v7.widget.RecyclerView
          android:id="@+id/newsRecyclerView"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:scrollbars="vertical"
          android:clickable="true"
          app:layout_behavior="@string/appbar_scrolling_view_behavior" /&gt;
  
      &lt;!-- that layout will hide/show when recyclerview scroll --&gt;
      &lt;LinearLayout
          android:orientation="horizontal"
          android:id="@+id/takimlar"
          android:layout_width="match_parent"
          android:layout_height="48dp"
          android:background="@color/bg_group_item_swiping_active_state"
          android:layout_gravity="bottom" &gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  
  &lt;!-- my navigation drawer --&gt;
  &lt;RelativeLayout
      android:id="@+id/container"
      android:layout_width="235dp"
      android:layout_height="match_parent"
      android:layout_gravity="left"
      android:background="@color/myDrawerBackground"&gt;
  
  
      &lt;TextView
          android:id="@+id/merhabaText"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginTop="400dp"
          android:layout_marginRight="40dp"
          android:layout_alignParentRight="true"
          android:text="Hello!"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></p>