I need to update my animations per frame, on iOS I have CADisplayLink
, on WinPhone I have CompositionTarget
, but how do I do that on Android?
Currently I'm using a Timer
alongside a Handler
, but I believe there is a way to sync the callback with the refresh rate.
The most direct equivalent I'm aware of is Choreographer
(as of API 16).
It looks like how your animations are written determines the best way to sync it. Choreographer is not generally useful. Choreographer is useful if your animation is written outside of the "animation framework" which AFAIK includes ViewPropertyAnimator
and ... maybe XML defined animations? Exactly what is undocumented.
Choreographer
looks like it's mainly useful for syncing GLSurfaceView
animations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With