Android EditText within a ListView
Posted
by
metalideath
on Stack Overflow
See other posts from Stack Overflow
or by metalideath
Published on 2011-01-30T23:20:24Z
Indexed on
2011/01/30
23:26 UTC
Read the original article
Hit count: 280
I have created a custom Array Adapter to bind a custom row that contains some static text and an editable EditText. I am trying to register to be notified when the user changes the text within the edit text and when notified to determine which ArrayList row the modified EditText corresponds to.
In the past with other types of views such as a Spinner I could simply put a reference to the parent view and the row number into the tag for the Spinner view. And then when I was notified that the value changed I read the tag to determine how to correlate it back to the master ArrayList.
The problem with registering to be notifed with an EditText change is that you do not get back a view but instead get a TextWatcher and I have no way to correlate back to the parent view or ArrayList row.
What is the technique that you need to use in this circumstance?
© Stack Overflow or respective owner