Udostępnij za pośrednictwem


LayoutTransition.SetAnimateParentHierarchy(Boolean) Method

Definition

This flag controls whether CHANGE_APPEARING or CHANGE_DISAPPEARING animations will cause the default changing animation to be run on the parent hierarchy as well.

[Android.Runtime.Register("setAnimateParentHierarchy", "(Z)V", "GetSetAnimateParentHierarchy_ZHandler")]
public virtual void SetAnimateParentHierarchy (bool animateParentHierarchy);
[<Android.Runtime.Register("setAnimateParentHierarchy", "(Z)V", "GetSetAnimateParentHierarchy_ZHandler")>]
abstract member SetAnimateParentHierarchy : bool -> unit
override this.SetAnimateParentHierarchy : bool -> unit

Parameters

animateParentHierarchy
Boolean

A boolean value indicating whether the parents of transitioning views should also be animated during the transition. Default value is true.

Attributes

Remarks

This flag controls whether CHANGE_APPEARING or CHANGE_DISAPPEARING animations will cause the default changing animation to be run on the parent hierarchy as well. This allows containers of transitioning views to also transition, which may be necessary in situations where the containers bounds change between the before/after states and may clip their children during the transition animations. For example, layouts with wrap_content will adjust their bounds according to the dimensions of their children.

The default changing transitions animate the bounds and scroll positions of the target views. These are the animations that will run on the parent hierarchy, not the custom animations that happen to be set on the transition. This allows custom behavior for the children of the transitioning container, but uses standard behavior of resizing/rescrolling on any changing parents.

Java documentation for android.animation.LayoutTransition.setAnimateParentHierarchy(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