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
Post a Comment