wealthfront / blend

An Android animation framework that gracefully handles interruption

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for coroutines

ryanmoelter opened this issue · comments

Some ideas:

  • Have a suspending AnimatorSetBuilder.start() that suspends until the animation is complete
    • Handle cancellation, so animations stop when e.g. the current screen is hidden
  • Maybe have a non-suspending AnimatorSetBuilder.startInScope(CoroutineScope) for when we don't want to call launch directly?
  • Can refactor all of blend to be based on coroutines, and the regular, non-suspending start() can use GlobalScope under the hood
    • Should we deprecate non-suspending start()?