I want to implement RadioButton and EditText inside a row of a ListView. I am using an ArrayAdapter to populate the List. But the problem is that when i am selecting a RadioButton and scroll down the list and scroll up again the Radiobutton which had been selected is unselected. Same with the content of the EditText. The text getting removed when I scroll up.
Share
Check your adapter, you are probably don’t do the job right on
bindView(). You have to set again onbindView()the values.I will reformulate the sentence and you will probably will understand.
The
newView()creates only 5-10 views (as many they fit on the screen), and they are reused for other rows. If you have aListViewwith 200 lines in it, actually you have only 5-10 views, and you have to make sure you update the views with the valid changes inbindView(). You have to store/save the changes to an object for later reuse.