0

I need to add to my translate animation a rotate animation that tilts the left corner down 2 degrees and will be able to stay that way also at the end of the translate. Any idea?

<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" />

4

1 回答 1

0

请试试这个

<?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() 方法将此动画添加到您的视图中

于 2012-04-23T10:10:48.263 回答