1
我有一個測試應用程序在android和一個TextView顯示在它上面。 在左側滑動我'將動畫'TextView關閉屏幕。 我已經使用下面的代碼爲:如何反轉動畫 - android
RES /動畫/ swipoff1
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator"
android:fillAfter="true">
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:duration="500" >
</rotate>
<translate
android:fromXDelta="0%p"
android:toXDelta="75%p"
android:duration="500" />
</set>
和在活動
Animation swipe_off_1 =
AnimationUtils.loadAnimation(getApplicationContext(), R.anim.swipoff1);
上向左掃動:
dummy_textview.startAnimation(swipe_off_1);
右輕掃:
dummy_textview.clearAnimation();
我打算逆轉向右滑動動畫。
需要幫助來從代碼中反轉動畫。