Udostępnij za pośrednictwem


View.HasTransientState Property

Definition

Indicates whether the view is currently tracking transient state that the app should not need to concern itself with saving and restoring, but that the framework should take special note to preserve when possible. -or- Set whether this view is currently tracking transient state that the framework should attempt to preserve when possible.

public virtual bool HasTransientState { [Android.Runtime.Register("hasTransientState", "()Z", "GetHasTransientStateHandler")] get; [Android.Runtime.Register("setHasTransientState", "(Z)V", "GetSetHasTransientState_ZHandler")] set; }
[<get: Android.Runtime.Register("hasTransientState", "()Z", "GetHasTransientStateHandler")>]
[<set: Android.Runtime.Register("setHasTransientState", "(Z)V", "GetSetHasTransientState_ZHandler")>]
member this.HasTransientState : bool with get, set

Property Value

true if the view has transient state

Attributes

Remarks

Property getter documentation:

Indicates whether the view is currently tracking transient state that the app should not need to concern itself with saving and restoring, but that the framework should take special note to preserve when possible.

A view with transient state cannot be trivially rebound from an external data source, such as an adapter binding item views in a list. This may be because the view is performing an animation, tracking user selection of content, or similar.

Java documentation for android.view.View.hasTransientState().

Property setter documentation:

Set whether this view is currently tracking transient state that the framework should attempt to preserve when possible. This flag is reference counted, so every call to setHasTransientState(true) should be paired with a later call to setHasTransientState(false).

A view with transient state cannot be trivially rebound from an external data source, such as an adapter binding item views in a list. This may be because the view is performing an animation, tracking user selection of content, or similar.

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