1

I am using paging library for loading data in recyclerview.It loads data as soon as the view is created.I need to retrict that and need to make the request and load the data ony after clicking the button.

Saravana
  • 81
  • 1
  • 8

1 Answers1

0

Can you share your code please .

Try to save the list into a variable when observing

Then set the list to the adapter onClickListener() of the button

  • Need to acheive same like instagram search..On load need to show empty list and while search need to display the result with pagination – Saravana Jul 13 '20 at 08:20
  • Just pass the empty list at first then while searching set that originallist equal to result list and use notifyDataSetChanged() – Bhavesh Purohit Jul 13 '20 at 10:25