performance - Jerk in android animation when expanding a view -


i have been developing 1 application expand view property animation(using 9 old androids lib). , on animation end call set grid view's adapter. if remove set adapter part animation works fine. if add @ end of animation i'm getting jerk. why happens so?

the jerkiness caused setting adapter (as have guessed). setting adapter not easy task , since you're presumably doing on ui thread jerkiness result.

you can move setting of adapter thread allow animation continue smoothly while setting of adapter occurs asynchronously. see making listview scrolling smooth | android developers more information on moving heavy tasks thread main thread can focus on drawing ui.


Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -