There is a ListView and FAB. Is it possible to make FAB disappear when scrolling down the list, and appear when scrolling up? Just do not offer to use RecyclerView, I need a version with existing elements.

  • Put the list and FAB inside the CoordinatorLayout and set the floatingActionButtonBehaviour for the FAB - just copy the code of this class from the network. Either hang the scroll listener on the ListView and hide it manually - YuriiSPb
  • FAB in CoordinatorLayout will only work with recyclerView. Doesn’t work with ListView - pavel163

1 answer 1

Use CoordinatorLayout, this is the best way for this task.

Here's an example where Fab is hidden by a ListView scroll.