Check out this article on Medium for more detailed explaination,
https://medium.com/@codervishalsehgal/expand-collapse-fab-on-scrolling-like-googles-message-app-484df2d9d246?postPublishedType=initial
vishal-sehgal/Google-Message-App-FAB-Clone
In this app you'll get the FloatingActionButton like Google's Message App.
KotlinMIT