Ravi Raksha
Ravi Raksha

Reputation: 1

updating the values of a listView onClick on a button which not a part of the listview

I have a listView with a edittext in all the rows of the listView and i want get all the changed editText values when i clicked to a button which is in same layout but is not part of the listView.

Please help me.

Upvotes: 0

Views: 44

Answers (1)

dmon
dmon

Reputation: 30168

If you built your Adapter properly, your EditTexts will be recycled, so you won't have one EditText for all of your items. Instead, you should be saving the data to the backing array every time an EditText is updated (using a listener). When the user clicks on the button you should read the data from the backing array, not the actual ListView views.

Upvotes: 1

Related Questions