I have a layout with a Floating Action Search View, which should be alway on top of my AppBarLayout. My search view is a sibling of the AppBarLayout as show you can see bellow:
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorBackground"
tools:context=".activity.DashboardActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content />
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true" />
<com.lapism.searchview.SearchView
android:minHeight="?android:attr/actionBarSize"
android:id="@+id/searchView"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</android.support.design.widget.CoordinatorLayout>
When the AppbarLayout is full collapsed my view gets hide, I don't know why. The view can't be a child of the AppBarLayout because it's need to get the full height of the view in order to display the results.