Search code examples
androidandroid-fragmentsandroid-recyclerviewandroid-coordinatorlayout

How can I make RecyclerView slide in and out of the screen?


I need to achieve the following behavior: Imgur

I have an activity with some data and views in it. At the bottom there is a search bar. What I need is to make RecyclerView slide into the screen or just pull it up when you start typing in the search bar. When RecyclerView is on the screen and user keeps scrolling down I need to collapse it back to the starting position.

What would be the right approach to achieve this behavior?


Solution

  • You can use BottomSheetDialog as an option and put there your recycler as a part of its layout. Here is the design guidelines and here is the implementation.