Share via


ObjectAnimator.SetAutoCancel(Boolean) Method

Definition

autoCancel controls whether an ObjectAnimator will be canceled automatically when any other ObjectAnimator with the same target and properties is started.

[Android.Runtime.Register("setAutoCancel", "(Z)V", "")]
public void SetAutoCancel (bool cancel);
[<Android.Runtime.Register("setAutoCancel", "(Z)V", "")>]
member this.SetAutoCancel : bool -> unit

Parameters

cancel
Boolean

Whether future ObjectAnimators with the same target and properties as this ObjectAnimator will cause this ObjectAnimator to be canceled.

Attributes

Remarks

autoCancel controls whether an ObjectAnimator will be canceled automatically when any other ObjectAnimator with the same target and properties is started. Setting this flag may make it easier to run different animators on the same target object without having to keep track of whether there are conflicting animators that need to be manually canceled. Canceling animators must have the same exact set of target properties, in the same order.

Java documentation for android.animation.ObjectAnimator.setAutoCancel(boolean).

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.

Applies to