如何使卡翻转动画到support.v4.fragment工作?
试图与support.v4.fragment卡翻转动画的工作,下面这个教程http://developer.android.com/training/animation/cardflip.html如何使卡翻转动画到support.v4.fragment工作?
回答:
对于动画DONOT认为,因为它是那么难
使用动画与下面的代码
Animation animation = AnimationUtils.loadAnimation(MainActivity.this, R.anim.rotate);      imageView.startAnimation(animation); //image view is the widget in your respective layout file 
制作在res文件夹中创建一个名为anims的目录,并创建一个名为的动画文件rotate
将此代码放在那里
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> 
<rotate 
    android:duration="750" 
    android:fromDegrees="0" 
    android:toDegrees="15" 
    android:pivotX="50%" 
    android:pivotY="50%"> 
</rotate> 
</set> 
这是用于旋转动画,您可以创建自己。
以上是 如何使卡翻转动画到support.v4.fragment工作? 的全部内容, 来源链接: utcz.com/qa/262616.html

