简体   繁体   中英

Animation jerks in android device in titanium

I have explore almost anything but couldn't find anything convincing which can verify that why animation jerks if try to animate any window through its animate property.

And this jerk occurs only on android part, in IOS it works perfectly even in lower devices. But why does it jerk in android? Your inputs are welcome on this.

What I've found so far is that, it might happen because of heavyweight and lightweight window concept but as in Titanium 3.2.0 there is only heavyweight window and still it jerks.

Even if we adjust our animation time but still animation is not smooth and as we increase the time animation will jerks more. But decreasing animation time is not a solution as in this case animation is jerking but apparently not caught. So please give your inputs on this for future correspondence.

Thank You

The following native module increases performance: https://github.com/animecyc/TitaniumAnimator

Other things that cause animations to perform poorly (Android only):

  • Rounded corners on views (this prevents hardware acceleration). So use 9 patch images or image masks when you want to animate rounded child views in the parent view you animate.

  • Background images on the view you'r animating drastically decrease performance. Especially large view backgrounds. A pattern backgroundImage tile.png with a view attribute backgroundRepeat=true help to improve performance.

Unfortunately taking the above into account when trying what elements to animate, Android is still very much behind iOS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM