共用方式為


AnimationSet Class

Definition

Represents a group of Animations that should be played together.

[Android.Runtime.Register("android/view/animation/AnimationSet", DoNotGenerateAcw=true)]
public class AnimationSet : Android.Views.Animations.Animation
[<Android.Runtime.Register("android/view/animation/AnimationSet", DoNotGenerateAcw=true)>]
type AnimationSet = class
    inherit Animation
Inheritance
AnimationSet
Attributes

Remarks

Represents a group of Animations that should be played together. The transformation of each individual animation are composed together into a single transform. If AnimationSet sets any properties that its children also set (for example, duration or fillBefore), the values of AnimationSet override the child values.

The way that AnimationSet inherits behavior from Animation is important to understand. Some of the Animation attributes applied to AnimationSet affect the AnimationSet itself, some are pushed down to the children, and some are ignored, as follows: <ul> <li>duration, repeatMode, fillBefore, fillAfter: These properties, when set on an AnimationSet object, will be pushed down to all child animations.</li> <li>repeatCount, fillEnabled: These properties are ignored for AnimationSet.</li> <li>startOffset, shareInterpolator: These properties apply to the AnimationSet itself.</li> </ul> Starting with android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH, the behavior of these properties is the same in XML resources and at runtime (prior to that release, the values set in XML were ignored for AnimationSet). That is, calling setDuration(500) on an AnimationSet has the same effect as declaring android:duration="500" in an XML resource for an AnimationSet object.

Java documentation for android.view.animation.AnimationSet.

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

AnimationSet(Boolean)

Constructor to use when building an AnimationSet from code

AnimationSet(Context, IAttributeSet)

Constructor used when an AnimationSet is loaded from a resource.

AnimationSet(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Fields

Infinite

Repeat the animation indefinitely.

(Inherited from Animation)
StartOnFirstFrame

Can be used as the start time to indicate the start time should be the current time when #getTransformation(long, Transformation) is invoked for the first animation frame.

(Inherited from Animation)

Properties

Animations
BackdropColor

Returns the background color to show behind the animating windows. -or- Set the color to use for the backdrop shown behind the animating windows.

(Inherited from Animation)
BackgroundColor

Returns the background color behind the animation. -or- Set background behind animation.

(Inherited from Animation)
Class

Returns the runtime class of this Object.

(Inherited from Object)
DetachWallpaper

Return value of #setDetachWallpaper(boolean). -or- If detachWallpaper is true, and this is a window animation of a window that has a wallpaper background, then the window will be detached from the wallpaper while it runs.

(Inherited from Animation)
Duration

How long this animation should last -or- How long this animation should last.

(Inherited from Animation)
FillAfter

If fillAfter is true, this animation will apply its transformation after the end time of the animation. -or- If fillAfter is true, the transformation that this animation performed will persist when it is finished.

(Inherited from Animation)
FillBefore

If fillBefore is true, this animation will apply its transformation before the start time of the animation. -or- If fillBefore is true, this animation will apply its transformation before the start time of the animation.

(Inherited from Animation)
FillEnabled

If fillEnabled is true, this animation will apply the value of fillBefore. -or- If fillEnabled is true, the animation will apply the value of fillBefore.

(Inherited from Animation)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
HasEnded

Indicates whether this animation has ended or not.

(Inherited from Animation)
HasStarted

Indicates whether this animation has started or not.

(Inherited from Animation)
Interpolator

Gets the acceleration curve type for this animation. -or- Sets the acceleration curve for this animation.

(Inherited from Animation)
IsInitialized

Whether or not the animation has been initialized.

(Inherited from Animation)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
RepeatCount

Defines how many times the animation should repeat. -or- Sets how many times the animation should be repeated.

(Inherited from Animation)
RepeatMode

Defines what this animation should do when it reaches the end. -or- Defines what this animation should do when it reaches the end.

(Inherited from Animation)
ScaleFactor

The scale factor is set by the call to getTransformation.

(Inherited from Animation)
ShowBackdrop

If showBackdrop is true and this animation is applied on a window, then the windows in the animation will animate with the background associated with this window behind them. -or- If showBackdrop is true and this animation is applied on a window, then the windows in the animation will animate with the background associated with this window behind them.

(Inherited from Animation)
StartOffset

When this animation should start, relative to StartTime -or- When this animation should start relative to the start time.

(Inherited from Animation)
StartTime

When this animation should start. -or- When this animation should start.

(Inherited from Animation)
ThresholdClass

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

ThresholdType

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

ZAdjustment

Returns the Z ordering mode to use while running the animation as previously set by #setZAdjustment. -or- Set the Z ordering mode to use while running the animation.

(Inherited from Animation)

Methods

AddAnimation(Animation)

Add a child animation to this animation set.

ApplyTransformation(Single, Transformation)

Helper for getTransformation.

(Inherited from Animation)
Cancel()

Cancel the animation.

(Inherited from Animation)
Clone()

Creates and returns a copy of this object.

(Inherited from Object)
ComputeDurationHint()

Compute a hint at how long the entire animation may last, in milliseconds.

(Inherited from Animation)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
EnsureInterpolator()

Gurantees that this animation has an interpolator.

(Inherited from Animation)
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)
GetTransformation(Int64, Transformation, Single)

Gets the transformation to apply at a specified point in time.

(Inherited from Animation)
GetTransformation(Int64, Transformation)

Gets the transformation to apply at a specified point in time.

(Inherited from Animation)
Initialize(Int32, Int32, Int32, Int32)

Initialize this animation with the dimensions of the object being animated as well as the objects parents.

(Inherited from Animation)
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)
Reset()

Reset the initialization state of this animation.

(Inherited from Animation)
ResolveSize(Dimension, Single, Int32, Int32)

Convert the information in the description of a size to an actual dimension

(Inherited from Animation)
RestrictDuration(Int64)

Ensure that the duration that this animation will run is not longer than <var>durationMillis</var>.

(Inherited from Animation)
ScaleCurrentDuration(Single)

How much to scale the duration by.

(Inherited from Animation)
SetAnimationListener(Animation+IAnimationListener)

Binds an animation listener to this animation.

(Inherited from Animation)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetInterpolator(Context, Int32)

Sets the acceleration curve for this animation.

(Inherited from Animation)
Start()

Convenience method to start the animation the first time #getTransformation(long, Transformation) is invoked.

(Inherited from Animation)
StartNow()

Convenience method to start the animation at the current time in milliseconds.

(Inherited from Animation)
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)
WillChangeBounds()

Indicates whether or not this animation will affect the bounds of the animated view.

(Inherited from Animation)
WillChangeTransformationMatrix()

Indicates whether or not this animation will affect the transformation matrix.

(Inherited from Animation)

Events

AnimationEnd (Inherited from Animation)
AnimationRepeat (Inherited from Animation)
AnimationStart (Inherited from Animation)

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