Fast (100ms) update of ListView
I am attempting to update a ListView fast at 10fps. I use ListView properly (I think!) as covered in this google talk http://www.youtube.com/watch?v=wDBM6wVEO70&t=17m38s with Guy Romain.
I have been attaching listeners (in my extension of BaseAdapter's getView()) to a few widgets I place inside my custom view items. This works perfectly at 1s refresh, but at 0.1s refresh, most of the clicks are lost.
I've assumed this is because ListView is recycling things like crazy, and so my view with a registered listener is getting trashed and replaced with a new view, albeit with the same listener, before it can handle any clicks.
Since the List itself receives clicks perfectly (I use them to collapse and expand individual entries with visibility), I thought there must be a way to determine from the View received in onListItemClicked() what subview (widget) the mouse had actually been over when the click was received. I could then handle the clicks here in the persistent ListActivity object.
I've tried various variants of focusability to try to change the View v received in onListItemClicked(), but nothing has yet worked.
Does anyone know how to do thi开发者_JS百科s, or a functional alternate approach?
精彩评论