我的班上有TranslateAnimation
。動畫自動啓動。如何取消動畫,但不能結束?
我設置按鈕,如果點擊,動畫將被取消(animation.cancel();
)。
我還爲我的班級設置了一個AnimationListener。如果我的動畫結束,我將開始一個新的活動(你去菜單)。
public void onAnimationEnd(Animation animation) {
startActivity(new Intent(Class.this, Class2.class));
}
我的應用程序依賴於用戶必須在動畫結束之前單擊該按鈕。 問題在於animation.cancel();
被認爲是動畫的結尾。
如何以另一種方式取消動畫,而不是以動畫結束?那可能嗎?
在此先感謝!
鏈接下一次文檔! – user3995789 2016-11-01 06:39:20
我已經添加了官方Android API文檔的鏈接。 – abbath 2016-11-02 08:18:41