Android 旋转图像以向下倾斜

Android 旋转图像以向下倾斜,android,android-animation,Android,Android Animation,我需要在我的平移动画中添加一个旋转动画,该动画将左角向下倾斜2度,并且在平移结束时也能够保持这种方式。有什么想法吗 <set xmlns:android="http://schemas.android.com/apk/res/android" android:fillAfter="true" > <!-- Move Two --> <translate android:fillAfter="true" android:fillEnabled="tr

我需要在我的平移动画中添加一个旋转动画,该动画将左角向下倾斜2度,并且在平移结束时也能够保持这种方式。有什么想法吗

<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true" >

<!-- Move Two -->
<translate
    android:fillAfter="true"
    android:fillEnabled="true"
    android:fromXDelta="-350"
    android:toXDelta="-700" />

请试试这个

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
     android:fillEnabled="true"
     android:fillAfter="true">
     <rotate
         android:fromDegrees="0"
         android:toDegrees="2"
         android:duration="1000"/>
     <translate
         android:fromXDelta="0"
         android:toXDelta="-100" 
         android:duration="1000"/>
</set>

根据视图位置更改“平移”标记的值

通过AnimationUtils.loadAnimation()方法将此动画添加到视图中