Reputation: 579
Assuming that the current item we're displaying in a recycler view is always the correct one even if the index of it changes, how do we simply modify the data set without/or delay, the call to onVindViewHolder to the next time we swipe?
Upvotes: 0
Views: 460
Reputation: 1794
I think we no need to modify notifyDataSetChanged()
in this case. Just need to create boolean variable like:
boolean firstLoad = true;
then check it in onBindViewHolder()
to skip the first time, set it to false to bind data in the second time we swipe (scroll)
Upvotes: 1