Lottie on Android: Part 2— Animation listeners

Matt Carron
Jul 2 · 3 min read

Animation Listeners

  • Adjusting the speed of the animation at certain points, think dynamic interpolator.
  • Other UI or behaviour reacting to progress, e.g. moving to the next screen once the animation finishes.

Coding time

Example 1 — Animation Percentage

Alriiight, so lets try out this listener. For this first example lets simply surface the progress of the animation as a percentage.

Example 2—Short circuiting animation

Next up lets try a progress spinner that morphs into a tick but control when that morph happens 😲

Compare the Market

The people behind comparethemarket.com and the Meerkat App

Thanks to Daniel Wilkie.

Matt Carron

Written by

Senior Android Developer at comparethemarket.com https://www.linkedin.com/in/mcarron/

Compare the Market

The people behind comparethemarket.com and the Meerkat App