共用方式為


AnimatorSet Class

Definition

This class plays a set of Animator objects in the specified order.

[Android.Runtime.Register("android/animation/AnimatorSet", DoNotGenerateAcw=true)]
public sealed class AnimatorSet : Android.Animation.Animator
[<Android.Runtime.Register("android/animation/AnimatorSet", DoNotGenerateAcw=true)>]
type AnimatorSet = class
    inherit Animator
Inheritance
AnimatorSet
Attributes

Remarks

This class plays a set of Animator objects in the specified order. Animations can be set up to play together, in sequence, or after a specified delay.

There are two different approaches to adding animations to a AnimatorSet: either the AnimatorSet#playTogether(Animator[]) playTogether() or AnimatorSet#playSequentially(Animator[]) playSequentially() methods can be called to add a set of animations all at once, or the AnimatorSet#play(Animator) can be used in conjunction with methods in the AnimatorSet.Builder Builder class to add animations one by one.

It is possible to set up a AnimatorSet with circular dependencies between its animations. For example, an animation a1 could be set up to start before animation a2, a2 before a3, and a3 before a1. The results of this configuration are undefined, but will typically result in none of the affected animations being played. Because of this (and because circular dependencies do not make logical sense anyway), circular dependencies should be avoided, and the dependency flow of animations should only be in one direction.

<div class="special reference"> <h3>Developer Guides</h3>

For more information about animating with AnimatorSet, read the Property Animation developer guide.

</div>

Java documentation for android.animation.AnimatorSet.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

AnimatorSet()

Fields

DurationInfinite

The value used to indicate infinite duration (e.

(Inherited from Animator)

Properties

ChildAnimations

Returns the current list of child Animator objects controlled by this AnimatorSet.

Class

Returns the runtime class of this Object.

(Inherited from Object)
CurrentPlayTime

Returns the milliseconds elapsed since the start of the animation. -or- Sets the position of the animation to the specified point in time.

Duration

Gets the length of each of the child animations of this AnimatorSet.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
Interpolator

Returns the timing interpolator that this animation uses.

(Inherited from Animator)
IsPaused

Returns whether this animator is currently in a paused state.

(Inherited from Animator)
IsRunning

Returns true if any of the child animations of this AnimatorSet have been started and have not yet ended.

IsStarted

Returns whether this Animator has been started and not yet ended.

(Inherited from Animator)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Listeners

Gets the set of android.animation.Animator.AnimatorListener objects that are currently listening for events on this Animator object.

(Inherited from Animator)
PeerReference (Inherited from Object)
StartDelay

The amount of time, in milliseconds, to delay starting the animation after #start() is called. -or- The amount of time, in milliseconds, to delay starting the animation after #start() is called.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Animator)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Animator)
TotalDuration

Gets the total duration of the animation, accounting for animation sequences, start delay, and repeating.

(Inherited from Animator)

Methods

AddListener(Animator+IAnimatorListener)

Adds a listener to the set of listeners that are sent events through the life of an animation, such as start, repeat, and end.

(Inherited from Animator)
AddPauseListener(Animator+IAnimatorPauseListener)

Adds a pause listener to this animator.

(Inherited from Animator)
Cancel()

Cancels the animation.

(Inherited from Animator)
Clone()

Creates and returns a copy of this Object.

(Inherited from Animator)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
End()

Ends the animation.

(Inherited from Animator)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
Pause()

Pauses a running animation.

(Inherited from Animator)
Play(Animator)

This method creates a Builder object, which is used to set up playing constraints.

PlaySequentially(Animator[])

Sets up this AnimatorSet to play each of the supplied animations when the previous animation ends.

PlaySequentially(IList<Animator>)

Sets up this AnimatorSet to play each of the supplied animations when the previous animation ends.

PlayTogether(Animator[])

Sets up this AnimatorSet to play all of the supplied animations at the same time.

PlayTogether(ICollection<Animator>)

Sets up this AnimatorSet to play all of the supplied animations at the same time.

RemoveAllListeners()

Removes all #addListener(android.animation.Animator.AnimatorListener) listeners and #addPauseListener(android.animation.Animator.AnimatorPauseListener) pauseListeners from this object.

(Inherited from Animator)
RemoveListener(Animator+IAnimatorListener)

Removes a listener from the set listening to this animation.

(Inherited from Animator)
RemovePauseListener(Animator+IAnimatorPauseListener)

Removes a pause listener from the set listening to this animation.

(Inherited from Animator)
Resume()

Resumes a paused animation, causing the animator to pick up where it left off when it was paused.

(Inherited from Animator)
Reverse()

Plays the AnimatorSet in reverse.

SetDuration(Int64)

Sets the length of each of the current child animations of this AnimatorSet.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetInterpolator(ITimeInterpolator)

Sets the TimeInterpolator for all current #getChildAnimations() child animations of this AnimatorSet.

SetTarget(Object)

Sets the target object whose property will be animated by this animation.

(Inherited from Animator)
SetupEndValues()

This method tells the object to use appropriate information to extract ending values for the animation.

(Inherited from Animator)
SetupStartValues()

This method tells the object to use appropriate information to extract starting values for the animation.

(Inherited from Animator)
Start()

Starts this animation.

(Inherited from Animator)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Events

AnimationCancel (Inherited from Animator)
AnimationEnd (Inherited from Animator)
AnimationPause (Inherited from Animator)
AnimationRepeat (Inherited from Animator)
AnimationResume (Inherited from Animator)
AnimationStart (Inherited from Animator)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to