Android Guides | Samples

Android.Views.Animations.AnimationSet Class

Represents a group of Animations that should be played together.

See Also: AnimationSet

Syntax

[Android.Runtime.Register("android/view/animation/AnimationSet", DoNotGenerateAcw=true)]
public class AnimationSet : Animation

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:

  • duration, repeatMode, fillBefore, fillAfter: These properties, when set on an AnimationSet object, will be pushed down to all child animations.
  • repeatCount, fillEnabled: These properties are ignored for AnimationSet.
  • startOffset, shareInterpolator: These properties apply to the AnimationSet itself.
Starting with NoType:android/os/Build$VERSION_CODES;Href=../../../../reference/android/os/Build.VERSION_CODES.html#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.

[Android Documentation]

Requirements

Namespace: Android.Views.Animations
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Views.Animations.AnimationSet are listed below.

See Also: Animation

Public Constructors

Constructor to use when building an AnimationSet from code
Constructor used when an AnimationSet is loaded from a resource.

Protected Constructors

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

Public Properties

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

AddAnimation(Animation)
Add a child animation to this animation set.