0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

WIP : AndroidでMotionLayoutを使う時の注意点()

Posted at

結論

  1. setTransitionListener()に設定するTransitionListenerのonTransitionCompleted()が発動されないこともある
    他の
    onTransitionStarted()
    onTransitionChange()
    onTransitionTrigger()
    でも同じく発動されない可能性があると思っておくと安心。

  2. MotionLayoutの配下の要素に.animate()でViewPropertyAnimatorを適用してそのアニメーションが終わると
    MotionLayoutのTransitionが中断される。
    回避策としてViewPropertyAnimatorに.setListener()で元々実行中だったTransitionを改めて実行させる処理を
    onAnimationEnd()に入れたリスナーを設定してあげると最後までTransitionが行われる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?