/**@class android.animation.Animator implements java.lang.Cloneable @extends java.lang.Object This is the superclass for classes which provide basic support for animations which can be started, ended, and have <code>AnimatorListeners</code> added to them. */ var Animator = { /** The value used to indicate infinite duration (e.g. when Animators repeat infinitely). */ DURATION_INFINITE : "-1", /**Starts this animation. If the animation has a nonzero startDelay, the animation will start running after that delay elapses. A non-delayed animation will have its initial value(s) set immediately, followed by calls to {@link android.animation.Animator.AnimatorListener#onAnimationStart(Animator)} for any listeners of this animator. <p>The animation started by calling this method will be run on the thread that called this method. This thread should have a Looper on it (a runtime exception will be thrown if this is not the case). Also, if the animation will animate properties of objects in the view hierarchy, then the calling thread should be the UI thread for that view hierarchy.</p> */ start : function( ) {}, /**Cancels the animation. Unlike {@link #end}(), <code>cancel()</code> causes the animation to stop in its tracks, sending an {@link android.animation.Animator.AnimatorListener#onAnimationCancel(Animator)} to its listeners, followed by an {@link android.animation.Animator.AnimatorListener#onAnimationEnd(Animator)} message. <p>This method must be called on the thread that is running the animation.</p> */ cancel : function( ) {}, /**Ends the animation. This causes the animation to assign the end value of the property being animated, then calling the {@link android.animation.Animator.AnimatorListener#onAnimationEnd(Animator)} method on its listeners. <p>This method must be called on the thread that is running the animation.</p> */ end : function( ) {}, /**Pauses a running animation. This method should only be called on the same thread on which the animation was started. If the animation has not yet been {@link #isStarted() started} or has since ended, then the call is ignored. Paused animations can be resumed by calling {@link #resume}(). @see #resume() @see #isPaused() @see AnimatorPauseListener */ pause : function( ) {}, /**Resumes a paused animation, causing the animator to pick up where it left off when it was paused. This method should only be called on the same thread on which the animation was started. Calls to resume() on an animator that is not currently paused will be ignored. @see #pause() @see #isPaused() @see AnimatorPauseListener */ resume : function( ) {}, /**Returns whether this animator is currently in a paused state. @return {Boolean} True if the animator is currently paused, false otherwise. @see #pause() @see #resume() */ isPaused : function( ) {}, /**The amount of time, in milliseconds, to delay processing the animation after {@link #start}() is called. @return {Number} the number of milliseconds to delay running the animation */ getStartDelay : function( ) {}, /**The amount of time, in milliseconds, to delay processing the animation after {@link #start}() is called. @param {Number} startDelay The amount of the delay, in milliseconds */ setStartDelay : function( ) {}, /**Sets the duration of the animation. @param {Number} duration The length of the animation, in milliseconds. */ setDuration : function( ) {}, /**Gets the duration of the animation. @return {Number} The length of the animation, in milliseconds. */ getDuration : function( ) {}, /**Gets the total duration of the animation, accounting for animation sequences, start delay, and repeating. Return {@link #DURATION_INFINITE} if the duration is infinite. @return {Number} Total time an animation takes to finish, starting from the time {@link #start()} is called. {@link #DURATION_INFINITE} will be returned if the animation or any child animation repeats infinite times. */ getTotalDuration : function( ) {}, /**The time interpolator used in calculating the elapsed fraction of the animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}. @param {Object {TimeInterpolator}} value the interpolator to be used by this animation */ setInterpolator : function( ) {}, /**Returns the timing interpolator that this animation uses. @return {Object {android.animation.TimeInterpolator}} The timing interpolator for this animation. */ getInterpolator : function( ) {}, /**Returns whether this Animator is currently running (having been started and gone past any initial startDelay period and not yet ended). @return {Boolean} Whether the Animator is running. */ isRunning : function( ) {}, /**Returns whether this Animator has been started and not yet ended. For reusable Animators (which most Animators are, apart from the one-shot animator produced by {@link android.view.ViewAnimationUtils#createCircularReveal( android.view.View, int, int, float, float) createCircularReveal()}), this state is a superset of {@link #isRunning}(), because an Animator with a nonzero {@link #getStartDelay() startDelay} will return true for {@link #isStarted}() during the delay phase, whereas {@link #isRunning}() will return true only after the delay phase is complete. Non-reusable animators will always return true after they have been started, because they cannot return to a non-started state. @return {Boolean} Whether the Animator has been started and not yet ended. */ isStarted : function( ) {}, /**Adds a listener to the set of listeners that are sent events through the life of an animation, such as start, repeat, and end. @param {Object {Animator.AnimatorListener}} listener the listener to be added to the current set of listeners for this animation. */ addListener : function( ) {}, /**Removes a listener from the set listening to this animation. @param {Object {Animator.AnimatorListener}} listener the listener to be removed from the current set of listeners for this animation. */ removeListener : function( ) {}, /**Gets the set of {@link android.animation.Animator.AnimatorListener} objects that are currently listening for events on this <code>Animator</code> object. @return {Object {java.util.ArrayList}} ArrayList<AnimatorListener> The set of listeners. */ getListeners : function( ) {}, /**Adds a pause listener to this animator. @param {Object {Animator.AnimatorPauseListener}} listener the listener to be added to the current set of pause listeners for this animation. */ addPauseListener : function( ) {}, /**Removes a pause listener from the set listening to this animation. @param {Object {Animator.AnimatorPauseListener}} listener the listener to be removed from the current set of pause listeners for this animation. */ removePauseListener : function( ) {}, /**Removes all {@link #addListener(android.animation.Animator.AnimatorListener) listeners} and {@link #addPauseListener(android.animation.Animator.AnimatorPauseListener) pauseListeners} from this object. */ removeAllListeners : function( ) {}, /**Return a mask of the configuration parameters for which this animator may change, requiring that it should be re-created from Resources. The default implementation returns whatever value was provided through setChangingConfigurations(int) or 0 by default. @return {Number} Returns a mask of the changing configuration parameters, as defined by {@link android.content.pm.ActivityInfo}. @see android.content.pm.ActivityInfo @hide */ getChangingConfigurations : function( ) {}, /**Set a mask of the configuration parameters for which this animator may change, requiring that it be re-created from resource. @param {Number} configs A mask of the changing configuration parameters, as defined by {@link android.content.pm.ActivityInfo}. @see android.content.pm.ActivityInfo @hide */ setChangingConfigurations : function( ) {}, /**Sets the changing configurations value to the union of the current changing configurations and the provided configs. This method is called while loading the animator. @hide */ appendChangingConfigurations : function( ) {}, /**Return a {@link android.content.res.ConstantState} instance that holds the shared state of this Animator. <p> This constant state is used to create new instances of this animator when needed, instead of re-loading it from resources. Default implementation creates a new {@link android.animation.AnimatorConstantState}. You can override this method to provide your custom logic or return null if you don't want this animator to be cached. @return {Object {android.content.res.ConstantState}} The ConfigurationBoundResourceCache.BaseConstantState associated to this Animator. @see android.content.res.ConstantState @see #clone() @hide */ createConstantState : function( ) {}, /** */ clone : function( ) {}, /**This method tells the object to use appropriate information to extract starting values for the animation. For example, a AnimatorSet object will pass this call to its child objects to tell them to set up the values. A ObjectAnimator object will use the information it has about its target object and PropertyValuesHolder objects to get the start values for its properties. A ValueAnimator object will ignore the request since it does not have enough information (such as a target object) to gather these values. */ setupStartValues : function( ) {}, /**This method tells the object to use appropriate information to extract ending values for the animation. For example, a AnimatorSet object will pass this call to its child objects to tell them to set up the values. A ObjectAnimator object will use the information it has about its target object and PropertyValuesHolder objects to get the start values for its properties. A ValueAnimator object will ignore the request since it does not have enough information (such as a target object) to gather these values. */ setupEndValues : function( ) {}, /**Sets the target object whose property will be animated by this animation. Not all subclasses operate on target objects (for example, {@link android.animation.ValueAnimator}, but this method is on the superclass for the convenience of dealing generically with those subclasses that do handle targets. <p> <strong>Note:</strong> The target is stored as a weak reference internally to avoid leaking resources by having animators directly reference old targets. Therefore, you should ensure that animator targets always have a hard reference elsewhere. @param {Object {Object}} target The object being animated */ setTarget : function( ) {}, /** @hide */ canReverse : function( ) {}, /** @hide */ reverse : function( ) {}, /**<p>Whether or not the Animator is allowed to run asynchronously off of the UI thread. This is a hint that informs the Animator that it is OK to run the animation off-thread, however the Animator may decide that it must run the animation on the UI thread anyway. <p>Regardless of whether or not the animation runs asynchronously, all listener callbacks will be called on the UI thread.</p> <p>To be able to use this hint the following must be true:</p> <ol> <li>The animator is immutable while {@link #isStarted}() is true. Requests to change duration, delay, etc... may be ignored.</li> <li>Lifecycle callback events may be asynchronous. Events such as {@link android.animation.Animator.android.animation.AnimatorListener#onAnimationEnd(android.animation.Animator)} or {@link android.animation.Animator.android.animation.AnimatorListener#onAnimationRepeat(android.animation.Animator)} may end up delayed as they must be posted back to the UI thread, and any actions performed by those callbacks (such as starting new animations) will not happen in the same frame.</li> <li>State change requests ({@link #cancel}(), {@link #end}(), {@link #reverse}(), etc...) may be asynchronous. It is guaranteed that all state changes that are performed on the UI thread in the same frame will be applied as a single atomic update, however that frame may be the current frame, the next frame, or some future frame. This will also impact the observed state of the Animator. For example, {@link #isStarted}() may still return true after a call to {@link #end}(). Using the lifecycle callbacks is preferred over queries to {@link #isStarted}(), {@link #isRunning}(), and {@link #isPaused}() for this reason.</li> </ol> @hide */ setAllowRunningAsynchronously : function( ) {}, };