@Override
public SkinAnimator apply(@NonNull final View view, @Nullable final Action action) {
animator = ObjectAnimator.ofPropertyValuesHolder(view,
PropertyValuesHolder.ofFloat("alpha", 1, 0),
PropertyValuesHolder.ofFloat("rotation", 0, 360),
PropertyValuesHolder.ofFloat("translationY", 0, view.getHeight()),
PropertyValuesHolder.ofFloat("translationX", 0, view.getWidth()));
animator.setDuration(5 * PRE_DURATION);
animator.setInterpolator(new AccelerateInterpolator());
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
resetView(view);
if (action != null) {
action.action();
}
}
});
return this;
}
TranslationRotationHideAnimator2.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:AndroidSkinAnimator
作者:
评论列表
文章目录