I'm trying to achieve an effect like the videos in the "behavior section" at this [URL](https://material.google.com/components/bottom-navigation.html#bottom-navigation-behavior) ( Google Design official site ). It's the same effect of Google Photo, I guess, with a search bar on the top of the RecyclerView that disappear/appear on scrolling up/down

I don't know how to get it, I started with [CoordinatorLayout](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.html) and [AppBarLayout](https://developer.android.com/reference/android/support/design/widget/AppBarLayout.html), but I can't get the RecyclerView visible behind the AppBarLayout, it always remains white, covering the RecyclerView as show below ( result and code [edit: added image with layout layers] ). 

Or it's a custom [CoordinatorLayout.Behavior](https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.Behavior.html) ?

Any help or suggestion would be appreciated, thank you

![result](https://i.stack.imgur.com/Xmd0D.gif)

```
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/recyclerview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent">

        <android.support.design.widget.CollapsingToolbarLayout
            android:id="@+id/collapsingToolbar"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_scrollFlags="scroll|enterAlways"
            android:background="@android:color/transparent">

            <SearchView
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:background="@android:color/holo_green_light"
                android:layout_marginTop="40dp"
                android:layout_marginStart="16dp"
                android:layout_marginEnd="16dp"
                android:layout_marginBottom="16dp"/>

        </android.support.design.widget.CollapsingToolbarLayout>

    </android.support.design.widget.AppBarLayout>

</android.support.design.widget.CoordinatorLayout>

```

Sample layout

[![enter image description here](https://i.stack.imgur.com/Tbr38.png)](https://i.stack.imgur.com/Tbr38.png)