Delay shared element transition to complete statelist animation

前端 未结 2 897
醉话见心
醉话见心 2021-01-23 08:47

I\'ve been trying out shared element transition on Lollipop. i have a recyclerview which loads some cards and one click the card expands to its details in the next activity.

2条回答
  •  后悔当初
    2021-01-23 08:50

    The way that may help some that already have the Transitions setup in Second Activity:

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        getWindow().getSharedElementEnterTransition().setDuration(500);
        getWindow().getSharedElementReturnTransition().setDuration(500)
            .setInterpolator(new DecelerateInterpolator());
    }
    

提交回复
热议问题