@@ -8192,7 +8192,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
|
||||
*/
|
||||
public void clearAnimation() {
|
||||
if (mCurrentAnimation != null) {
|
||||
mCurrentAnimation.cancel();
|
||||
mCurrentAnimation.detach();
|
||||
}
|
||||
mCurrentAnimation = null;
|
||||
}
|
||||
|
||||
@@ -277,6 +277,16 @@ public abstract class Animation implements Cloneable {
|
||||
mMore = mOneMoreTime = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public void detach() {
|
||||
if (mStarted && !mEnded) {
|
||||
if (mListener != null) mListener.onAnimationEnd(this);
|
||||
mEnded = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not the animation has been initialized.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user