共用方式為


IViewParent.OnDescendantInvalidated(View, View) Method

Definition

The target View has been invalidated, or has had a drawing property changed that requires the hierarchy to re-render.

[Android.Runtime.Register("onDescendantInvalidated", "(Landroid/view/View;Landroid/view/View;)V", "GetOnDescendantInvalidated_Landroid_view_View_Landroid_view_View_Handler:Android.Views.IViewParent, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public virtual void OnDescendantInvalidated (Android.Views.View child, Android.Views.View target);
[<Android.Runtime.Register("onDescendantInvalidated", "(Landroid/view/View;Landroid/view/View;)V", "GetOnDescendantInvalidated_Landroid_view_View_Landroid_view_View_Handler:Android.Views.IViewParent, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member OnDescendantInvalidated : Android.Views.View * Android.Views.View -> unit
override this.OnDescendantInvalidated : Android.Views.View * Android.Views.View -> unit

Parameters

child
View

Direct child of this ViewParent containing target

target
View

The view that needs to redraw

Attributes

Remarks

The target View has been invalidated, or has had a drawing property changed that requires the hierarchy to re-render.

This method is called by the View hierarchy to signal ancestors that a View either needs to re-record its drawing commands, or drawing properties have changed. This is how Views schedule a drawing traversal.

This signal is generally only dispatched for attached Views, since only they need to draw.

Java documentation for android.view.ViewParent.onDescendantInvalidated(android.view.View, android.view.View).

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