I have a GridView that displays several dozen rows worth of a custom layout, each of which consists of an EditText and a TextView object.
If I understand correctly, I should extend the BaseAdapter class to accomplish that. If so, how can I get access to a specific EditText object?
Also, will recycling of views cause me to lose the text that the user has entered if one of the EditText views is no longer visible?
Is there a simpler means to accomplish what I am describing here (perhaps something other than GridView) ?
When you extend
BaseAdapterone of the methods you have to override isgetView(...). In this method, you create the view that needs to be shown. If you want to persist text that is entered in theEditText, what you need to do is set a aTextWatcheron the EditText, passing in the position of the EditText (parameter ingetView(...)), and whenever the text is changed, save the text in an array of sorts. Then, whenever that position comes back through thegetView(...)method, grab the text from the array and populate theEditText.