相关疑难解决方法(0)

通告揭示了新活动的过渡

根据https://developer.android.com/training/material/animations.html

通过该ViewAnimationUtils.createCircularReveal()方法,您可以设置剪贴圆的动画以显示或隐藏视图.

要使用此效果显示以前不可见的视图:

// previously invisible view
View myView = findViewById(R.id.my_view);

// get the center for the clipping circle
int cx = (myView.getLeft() + myView.getRight()) / 2;
int cy = (myView.getTop() + myView.getBottom()) / 2;

// get the final radius for the clipping circle
int finalRadius = Math.max(myView.getWidth(), myView.getHeight());

// create the animator for this view (the start radius is zero)
Animator anim =
    ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);

// make the view visible and start the …
Run Code Online (Sandbox Code Playgroud)

animation android material-design

67
推荐指数
4
解决办法
4万
查看次数

在转换期间,使新活动显示在旧活动之后

我想要实现的是覆盖启动活动动画.

动画应该给人留下旧活动位于新活动之上的印象,然后向下滑动并离开屏幕以显示新活动.我已经尝试了多种方式,比如使用overridePendingTransition(startAnim, exitAnim) 但问题是它们都在同一时间轴中生成动画.因此,overridePendingTransition(R.anim.hold, R.anim.exit_slide_down);您永远不会看到退出动画,因为新活动位于顶部.这可以使用框架实现吗?

在此输入图像描述

animation android android-activity

36
推荐指数
3
解决办法
3万
查看次数