I'm trying to use CSS3 animations in Android WebView but I'm getting a very annoying delay when starting the animation (roughly 500ms).
The animation runs smoothly, no lag, but it has the delay at start. Since there is no lag, I assume that's not a performance issue. Or it could be?
It's not the default 300ms onclick delay, I've already changed to ontouchstart and when I do anything else than animations/transitions, there is no delay. Only with these two.
It's not the animation-delay property as well, I've already set it to 0.
Any possible explanation/solution?
PS: The animation/transition I'm trying to run is with transform: translateX()
property. Before, I was trying with left: Xpx
, but it was lagging during the animation. With transform, there is no lag, but there is the delay.
I had the same problem and failed to find a reasonable solution. I've tried different approches and these are my conclusions:
translate3d
to translateX
/translateY
/translateZ
- no visual differencetransitionEnd
event) makes it slower with multiple hiccups on the way (each time when transitionEnd
is fired).My guess is that CSS animations are just slow on Android and require some pre-computation to display them; hence the delay at the beginning. We'll probably need to wait for Chrome to became the default browser for Android.
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