Share via


IViewParent.ChildHasTransientStateChanged(View, Boolean) Method

Definition

Called when a child view now has or no longer is tracking transient state.

[Android.Runtime.Register("childHasTransientStateChanged", "(Landroid/view/View;Z)V", "GetChildHasTransientStateChanged_Landroid_view_View_ZHandler:Android.Views.IViewParentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void ChildHasTransientStateChanged (Android.Views.View child, bool hasTransientState);
[<Android.Runtime.Register("childHasTransientStateChanged", "(Landroid/view/View;Z)V", "GetChildHasTransientStateChanged_Landroid_view_View_ZHandler:Android.Views.IViewParentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member ChildHasTransientStateChanged : Android.Views.View * bool -> unit

Parameters

child
View

Child view whose state has changed

hasTransientState
Boolean

true if this child has transient state

Attributes

Remarks

Called when a child view now has or no longer is tracking transient state.

"Transient state" is any state that a View might hold that is not expected to be reflected in the data model that the View currently presents. This state only affects the presentation to the user within the View itself, such as the current state of animations in progress or the state of a text selection operation.

Transient state is useful for hinting to other components of the View system that a particular view is tracking something complex but encapsulated. A ListView for example may acknowledge that list item Views with transient state should be preserved within their position or stable item ID instead of treating that view as trivially replaceable by the backing adapter. This allows adapter implementations to be simpler instead of needing to track the state of item view animations in progress such that they could be restored in the event of an unexpected recycling and rebinding of attached item views.

This method is called on a parent view when a child view or a view within its subtree begins or ends tracking of internal transient state.

Java documentation for android.view.ViewParent.childHasTransientStateChanged(android.view.View, 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