Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 067ce350 authored by Robin Lee's avatar Robin Lee
Browse files

Convert wear progress drawable to animation-list

AnimatedVectorDrawable doesn't natively support looping like
AnimationDrawable does with oneShot="false". Because this animation
already consists of 60 independent frames we can directly convert the
animation into individual android:drawable frames in an animation-set
instead.

This has the following pros:

- The pause at the end of the animation that was previously done in
  code can be expressed in the animation-list now and will not
  generate any new frames.

- The amount of resources used in the rendering of this animation
  ought to be lower as there is no need to tween frames any more.
  In case this needs to be tweaked further for lower-end SoCs we
  can remove some of the frames and just run at a lower framerate.

- We temporarily avoid the problem of adding a repeat option to
  animated vector drawable or writing a more powerful version of
  this class.

And the following cons:

- Loss of flexibility to run on higher framerates: a fixed number
  of frames means no interpolation at 120fps (although currently the
  number of frames generated is already capped)

- Care when exporting new versions of the animation: this must be
  exported as an animation-list instead of an animated-vector.

Test: Visual inspection of progress bars
Bug: 272533898
Change-Id: I40d38b76d77f5065c271f1a6bc0f909a5d3d56a4
parent 7f7a3e1d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment