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

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -