안녕하세요.

animation resource 를 구현하고 있습니다.

오른쪽 아래에서 왼쪽 위로 360도 회전하면서 올라가는 animation을 구현하고 있습니다.

xml 파일로 아래와 같이 작성을 했는데, 원하는 동작이 나오지 않아서요.

 

res\anim\test.xml

<set xmlns:android="http://schemas.android.com/apk/res/android">
    <translate
     android:fromXDelta="100%p"
     android:toXDelta="0"
     android:fromYDelta="100%p"
     android:toYDelta="0"
     android:duration="5000" />
 <rotate
     android:fromDegrees="0"
     android:toDegrees="360"
        android:pivotX="50%"
        android:pivotY="50%"
        android:duration="5000" />
 <alpha
     android:fromAlpha="1.0"
     android:toAlpha="0"
     android:duration="5000" /> 
</set>

 

res\layout\main.xml

<RelativeLayout
  android:layout_width="382dip"
  android:layout_height="143dip"
  android:layout_marginTop="17dip"
  android:layout_marginLeft="138dip"
  android:layout_marginRight="3dip"
  android:visibility="visible">  
    <ImageView
      android:id="@+id/leaf"
      android:layout_width="43dip"
      android:layout_height="43dip"
      android:src="@drawable/leaf"
      android:visibility="visible" />
  </RelativeLayout>

 

<translate> 와 <rotate>를 동시에 사용하지 않으면 정상적으로 이동만 하거나, 회전만 하거나 합니다.

그런데 이 두가지를 같이 사용하면 아무 동작도 하지 않는 것 같아서요.

 

고수님들, 조언 부탁드립니다.