Understanding exit/reenter shared element transitions

后端 未结 2 772
时光说笑
时光说笑 2020-12-25 15:29

I\'m doing some rudimentary exploration of Shared Element Transitions in Android L. The simple example I\'ve setup has an image view translating from the top of the screen t

2条回答
  •  失恋的感觉
    2020-12-25 15:56

    As I recall, there is a bug in L that causes the shared element return transition to be interrupted if it takes longer than the reenter transition duration. If you adjust your reenter transition duration (on the calling Activity), that should fix the interruption problem until the bug is fixed in MR1.

    The exit and reenter transitions are for executing stuff before the shared element is allowed to transition. For example, if you want to lift your shared element before transferring it, that would be done in the shared element exit transition. The reenter would be used to do the opposite -- drop the view after it was transferred back. Most apps don't need it, but it is there for the rare one that does.

提交回复
热议问题