Search code examples
androidandroid-recyclerviewandroid-xmlandroid-coordinatorlayout

Show View below RecyclerView after scrolling all items down


I have RecyclerView which contains Users and I need button "Add user" at the bottom of RecyclerView (should looks like last item of RecyclerView and must be scrollable).

What is the best way to achieve this? Add new itemViewType to my Adapter? Or maybe there is more simple way with CoordinatorLayout (to scroll view below RecyclerView after one was scrolled all items down, if it is possible)? Second way is really convenient to show scrollable headers with RecyclerView.


Solution

  • In this case you should add another ViewType with its ViewHolder. Here is a link to an answer where everything is explained https://stackoverflow.com/a/26245463/6329985