5

Is there a tutorial/example to include a load more button with recyclerview? I need to add a button after displaying 8 elements in the recyclerview. The user can click this button to load the next 8 contents.

Sammys
  • 1,443
  • 5
  • 14
  • 21

2 Answers2

9

Add a footer view to your recyclerview which includes Load More button. When clicking the button, make a request for next 8 items. After loading items, notify the adapter.

RecyclerView header and footer

Community
  • 1
  • 1
Oğuzhan Döngül
  • 7,856
  • 4
  • 38
  • 52
  • 1
    @SoliQuiD please remove your downvote, The answer is valid because Approved by OP. And its not a wrong answer, just you get it wrong, it doesn't means its not valid. I said "Add a footer view to your recycleview..." I did not say addFooterView() etc. Additionally, edited my answer for the users like you. – Oğuzhan Döngül Nov 23 '15 at 11:47
  • your answer didn't make sense before editing it to include the new answer link. I will remove the downvote now, since the answer at least points to the right answer – SoliQuiD Nov 23 '15 at 12:00
2

what you need is endless recycler view ,which will load the data while scrolling . Here I have attached link for that implementation.

Follow this link

Amarpreet Singh
  • 77
  • 1
  • 10