Saturday, April 30, 2011

[android-developers] Re: Flaky Touch Screen on Nexus One

Yes, you're right about that. Calling notifyDataSetChanged on the adapter is the best way to go and you should use it in 99% of cases. However, in some cases rules should be broken. :)
A call to notifyDataSetChanged redraws all the children in the ListView and is relatively expensive and you get the side effects you notice in your example (touch issues).
In this case, another solution may be necessary, where visible list-items (child-views of the ListView) or their children update themselves.
You could do this by tagging list-item views (contentView-s) by calling setTag an do a getTag on all the ListView's child-views to be able to find them back when they need updating.

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate