要实现ImageView绕中心垂直翻转

final ObjectAnimator oa1 = ObjectAnimator.ofFloat(imageView, "scaleX", 1f, 0f);
final ObjectAnimator oa2 = ObjectAnimator.ofFloat(imageView, "scaleX", 0f, 1f);
oa1.setInterpolator(new DecelerateInterpolator());
oa2.setInterpolator(new AccelerateDecelerateInterpolator());
oa1.addListener(new AnimatorListenerAdapter() {
    @Override
    public void onAnimationEnd(Animator animation) {
        super.onAnimationEnd(animation);
        imageView.setImageResource(R.drawable.frontSide);
        oa2.start();
    }
});
oa1.start();

标签: 安卓, 动画

添加新评论