I have a recyclerview which works as expected. I have a button in the layout that fills the list. The button is supposed to make a async call, and on result, I change the button
Without code to look at, this is going to be difficult (if not impossible) for people to provide an exact answer. However, based on this description it sounds as though your async network loading (using an AsyncTask
or custom Loader
?) is not specifically tied to an element being tracked by your adapter. You'll need to have some way of tying the two together since the child View
objects shown by the RecyclerView
are re-used to be more efficient. This also means that if a View
is being reused and there is an active async operation tied to it, that async operation will need to be canceled. Otherwise you'll see what you see now: the wrong child View
being updated with content from an older async call.