如何使用动画使卡片看起来像3D图像

时间:2019-07-24 06:40:39

标签: android animation android-animation

我有使用动画的卡图像,我只是想使其看起来像3D卡。 我认为翻转动画可以做到,但无法实现。

动画xml

 <?xml version="1.0" encoding="utf-8"?>
    <objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
        android:propertyName="rotationX"
        android:valueFrom="180"
        android:valueTo="40"/>

Java代码

      ImageView imageView = findViewById(R.id.iv_1);
            ObjectAnimator anim = (ObjectAnimator) AnimatorInflater.
                    loadAnimator(this, R.animator.flipper);
            anim.setTarget(imageView);
            anim.setDuration(3000);
            anim.start();

我使用过代码,但是它使imageview看起来像正方形。

i want result like this

0 个答案:

没有答案