AnimatorSet.Play(Animator) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This method creates a Builder object, which is used to
set up playing constraints.
[Android.Runtime.Register("play", "(Landroid/animation/Animator;)Landroid/animation/AnimatorSet$Builder;", "")]
public Android.Animation.AnimatorSet.Builder? Play(Android.Animation.Animator? anim);
[<Android.Runtime.Register("play", "(Landroid/animation/Animator;)Landroid/animation/AnimatorSet$Builder;", "")>]
member this.Play : Android.Animation.Animator -> Android.Animation.AnimatorSet.Builder
Parameters
- anim
- Animator
The animation that is the dependency used in later calls to the
methods in the returned Builder object. A null parameter will result
in a null Builder return value.
Returns
Builder The object that constructs the AnimatorSet based on the dependencies outlined in the calls to play and the other methods in the Builder
- Attributes
Remarks
This method creates a Builder object, which is used to set up playing constraints. This initial play() method tells the Builder the animation that is the dependency for the succeeding commands to the Builder. For example, calling play(a1).with(a2) sets up the AnimatorSet to play a1 and a2 at the same time, play(a1).before(a2) sets up the AnimatorSet to play a1 first, followed by a2, and play(a1).after(a2) sets up the AnimatorSet to play a2 first, followed by a1.
Note that play() is the only way to tell the Builder the animation upon which the dependency is created, so successive calls to the various functions in Builder will all refer to the initial parameter supplied in play() as the dependency of the other animations. For example, calling play(a1).before(a2).before(a3) will play both a2 and a3 when a1 ends; it does not set up a dependency between a2 and a3.
Android reference for android.animation.AnimatorSet.play.
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.