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.
Asked
Active
Viewed 309 times
1
-
please post code what you already done. – S T Jul 06 '20 at 02:18
1 Answers
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

Bhavesh Purohit
- 61
- 1
- 8
-
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