@ Override protected boolean onLevelChange ( int level ) { if ( mIsRunning ) { // If the client called start on us, they expect us to run the animation. In that case, // we ignore level changes. return false ; } if ( mLastFrameAnimationTimeMs != level ) { mLastFrameAnimationTimeMs = level ; invalidateSelf ( ) ; return true ; } return false ; }
Set the animation to the given level . The level represents the animation time in ms . If the animation time is greater than the last frame time for the last loop the last frame will be displayed .