On Wed, Sep 28, 2011 at 6:00 PM, TreKing <treking...@gmail.com> wrote:
> On Wed, Sep 28, 2011 at 10:40 AM, John Goche > <johngoch...@googlemail.com>wrote: > >> The problem is that it refreshes the whole list view and the row the user >> is editing loses the focus. Instead >> I need to only refresh individual rows in the list. Is there a way to do >> this? > > > Oh. Your life got complicated. You could make the map be Map<MyType, > List<EditText>>, so as one EditText is updated, it sends an event, finds its > corresponding MyType, uses that to index the map, finds the dependent > EditText's, and updates those. Yes this is basically what I want to do. You would refresh the map in getView() as necessary since the ListRecycles > views. OK so I refresh the Map<MyType, List<EditText>> in getView() by adding the EditText handles to the data stucture you suggested. Then each time the user changes data in an EditText, I update my data model, then look in Map<MyType, List<EditText>> to see what needs to be refreshed, and refresh each EditText with setText(). I am going to try this approach and hope that the result is not too sluggish. Should be just fine from what I gather. In fact I already have a List<MyType>, If I set up another List<EditText> I could refresh this inside getView() instead I think, right? Thanks, John Goche -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en