小编Tho*_*mas的帖子

如何实现Material Design Choreographing表面动画

我想知道如何实现Choreographing表面动画(例如https://material.google.com/motion/choreography.html#choreography-creation in Choreographic surface部分).

我实际上使用了Alpha动画和翻译动画,但看起来它并不完全是我们在材料设计网站上看到的.

有人有一个如何做到这一点的好例子吗?

animation android material-design

11
推荐指数
1
解决办法
542
查看次数

替换片段时圆形显示动画

我想知道如何在替换片段时制作圆形透视动画.

我正在使用此代码替换我的片段:

        getFragmentManager()
            .beginTransaction()
            .replace(R.id.mission_detail_appointment_container, new AppointmentDeclineFragment())
            .commit();
Run Code Online (Sandbox Code Playgroud)

我得到了这个代码来做圆形揭示动画:

Animator anim = ViewAnimationUtils.createCircularReveal(appointmentContainer, (int)motionEventX, (int)motionEventY, 0, finalRadius);
anim.start();
Run Code Online (Sandbox Code Playgroud)

当我替换我的片段时,有没有办法启动动画师?我刚刚看到了setCustomAnimation方法,但是它将int资源作为参数,我去了一个Animator对象.

谢谢你的帮助

java animation android fragment

6
推荐指数
1
解决办法
4199
查看次数

标签 统计

android ×2

animation ×2

fragment ×1

java ×1

material-design ×1