【问题标题】:How to animate movement of android circular reveal animation如何为android圆形显示动画的运动设置动画
【发布时间】:2017-01-31 14:31:17
【问题描述】:
我在 api 21 到更高版本中使用显示动画,以使用漂亮的圆形动画来动画显示视图。
但是当我尝试为视图的位置设置动画时,圆形显示动画将无法正确设置动画并显示错误的帧(错过有边距的行为!)。
我正在使用 ValueAnimator 并在其 updateListener 中更新视图边距进行翻译。
我正在寻找与圆形显示动画并行播放移动动画的最佳做法。
【问题讨论】:
标签:
android
android-layout
android-animation
android-view
circularreveal
【解决方案1】:
终于明白了!
使用 ViewPropertyAnimator 解决了这个问题。
final Animator anim = ViewAnimationUtils
.createCircularReveal(animatedView, startPos[0], startPos[1], initRadius, targetRadius);
myView.animate().x(100).y(100);
anim.start();