androidkotlinandroid-recyclerviewepoxy

The problem that the data of RecyclerView changes randomly


(Image 1 & Image 2)

enter image description here enter image description here


(Image 3)

enter image description here


I'm currently using the Epoxy library instead of RecyclerView. However, since Epoxy is built on the basis of RecyclerView, let's just call it RecyclerView.

Problem 1 . (Image 1 & Image 2)

When i return to another screen after entering a value in the EditText of the RecyclerView item, the entered data is moved randomly.

Problem 2 . (Image 3)

After adding enough items to be scrollable, i also enter values ​​into the EditText. And if i scroll down and come back, the data is moved to a random location.

Please tell me what is the reason and what is the proper solution.


Solution

  • Make sure you're overriding getItemViewType, getItemId and getItemCount properly.