5

我正在尝试以相关图像(卡片)翻转到其另一侧的方式旋转/翻转 imageView,即沿其 Z 轴的 3d 旋转动画。那可能吗?

我在下面写了这段代码,但它只在 2d 中旋转,只改变它的方向而不是它的侧面。

// animations
    private static final float ROTATE_FROM = 0.0f;
    private static final float ROTATE_TO = -10.0f * 360.0f;
    private RotateAnimation mRotateAnimation;

mRotateAnimation = new RotateAnimation(ROTATE_FROM, ROTATE_TO, Animation.RELATIVE_TO_SELF, 0.5f,
            Animation.RELATIVE_TO_SELF, 0.5f);
        mRotateAnimation.setDuration((long)2 * 150);
        mRotateAnimation.setRepeatCount(0);


mCardImage.startAnimation(mRotateAnimation);
4

0 回答 0