Android.Animation.LayoutTransition.SetAnimator Method
Sets the animation used during one of the transition types that may run.

Syntax

[Android.Runtime.Register("setAnimator", "(ILandroid/animation/Animator;)V", "GetSetAnimator_ILandroid_animation_Animator_Handler")]
public virtual void SetAnimator ([Android.Runtime.GeneratedEnum] LayoutTransitionType transitionType, Animator animator)

Parameters

transitionType
One of LayoutTransition.ChangeAppearing, LayoutTransition.ChangeDisappearing, LayoutTransition.Changing, LayoutTransition.Appearing, or LayoutTransition.Disappearing, which determines the animation whose animator is being set.
animator
The animation being assigned. A value of null means that no animation will be run for the specified transitionType.

Remarks

Sets the animation used during one of the transition types that may run. Any Animator object can be used, but to be most useful in the context of layout transitions, the animation should either be a ObjectAnimator or a AnimatorSet of animations including PropertyAnimators. Also, these ObjectAnimator objects should be able to get and set values on their target objects automatically. For example, a ObjectAnimator that animates the property "left" is able to set and get the left property from the View objects being animated by the layout transition. The transition works by setting target objects and properties dynamically, according to the pre- and post-layoout values of those objects, so having animations that can handle those properties appropriately will work best for custom animation. The dynamic setting of values is only the case for the CHANGE animations; the APPEARING and DISAPPEARING animations are simply run with the values they have.

It is also worth noting that any and all animations (and their underlying PropertyValuesHolder objects) will have their start and end values set according to the pre- and post-layout values. So, for example, a custom animation on "alpha" as the CHANGE_APPEARING animation will inherit the real value of alpha on the target object (presumably 1) as its starting and ending value when the animation begins. Animations which need to use values at the beginning and end that may not match the values queried when the transition begins may need to use a different mechanism than a standard ObjectAnimator object.

[Android Documentation]

Requirements

Namespace: Android.Animation
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11