Class DynamicFABScrollBehavior


public class DynamicFABScrollBehavior extends AppBarLayout.ScrollingViewBehavior
A FloatingActionButton behavior to automatically show or hide it according to the nested scroll. Set this behavior in the layout file having CoordinatorLayout as root element to show or hide the FAB according to the scroll direction.

Scrolling in upwards direction will hide the FAB and scrolling in downwards direction will make it visible.