There is a RecyclerView list, at the bottom of which the LinearLayout and FAB panel is bolted, which stands on the border between this panel and the retractable panel. In general, it is better to see once ...

 <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"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <FrameLayout android:id="@+id/container_sheet" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1"> <LinearLayout android:layout_width="match_parent" android:orientation="vertical" android:layout_height="match_parent"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:layout_width="match_parent" android:layout_height="?android:actionBarSize" android:background="@color/toolbar_bg"/> <android.support.v4.widget.SwipeRefreshLayout android:id="@+id/swiper" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.RecyclerView android:layout_width="match_parent" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_height="match_parent" android:id="@+id/audio_list"/> </android.support.v4.widget.SwipeRefreshLayout> </LinearLayout> <include layout="@layout/music_sheet"/> </FrameLayout> <include layout="@layout/music_panel"/> </LinearLayout> <android.support.design.widget.FloatingActionButton android:id="@+id/sheet_door" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="16dp" android:clickable="true" android:src="@drawable/fab" app:backgroundTint="#527dad" app:borderWidth="0dp" app:elevation="6dp" app:fabSize="normal" app:layout_anchor="@id/container_sheet" app:layout_anchorGravity="bottom|right|end"/> </android.support.design.widget.CoordinatorLayout> 

Well, what does it look like

enter image description here

FAB opens / closes the extended panel

enter image description here

It is necessary to hide / show the panel when scrolling through the list. When scrolling down, the FAB must first decrease, then the panel fall through. When scrolling up, the panel should come up from below, then increase the FAB . In general, FAB can be animated the way I want, using the show and hide methods. I do not understand how to animate them one by one, there is a way to separately animate FAB when scrolling, I also found this . for swimming the panel (the answer did not understand, there SnackBar for some reason). There is a way to hang a scrolling listener, but that does not help at all. How can I unify these options and is it worth it at all?

  • one
    look for the coordinatorlayout behavior , here you can see how this is done with the toolbar (in your case, if you turn it over then this is the same toolbar))): guides.codepath.com/android/… - ermak0ff
  • Toolbar is located above the list, my toolbar is on top of it below it. I think this is not what I need - Flippy
  • You did not understand, by the link that I gave all the examples are given for the toolbar, but what prevents you from seeing how it is implemented for him and dragging it onto your panel, because the behavior is in principle too - hiding during scrolling - ermak0ff

0