DialogActivity.java 文件源码

java
阅读 39 收藏 0 点赞 0 评论 0

项目:Morphing-Material-Dialogs 作者:
public void setupSharedEelementTransitions() {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
        return; //Show dialog normally if below Lollipop
    ArcMotion arcMotion = new ArcMotion();
    arcMotion.setMinimumHorizontalAngle(50f);
    arcMotion.setMinimumVerticalAngle(50f);

    Interpolator easeInOut = AnimationUtils.loadInterpolator(this, android.R.interpolator.fast_out_slow_in);

    MorphFabToDialog sharedEnter = new MorphFabToDialog(getBackgroundColor());
    sharedEnter.setPathMotion(arcMotion);
    sharedEnter.setInterpolator(easeInOut);

    MorphDialogToFab sharedReturn = new MorphDialogToFab(getBackgroundColor());
    sharedReturn.setPathMotion(arcMotion);
    sharedReturn.setInterpolator(easeInOut);

    if (ui.container != null) {
        sharedEnter.addTarget(ui.container);
        sharedReturn.addTarget(ui.container);
    }
    getWindow().setSharedElementEnterTransition(sharedEnter);
    getWindow().setSharedElementReturnTransition(sharedReturn);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号