Sdílet prostřednictvím


ViewTreeObserver.IOnDrawListener.OnDraw Method

Definition

Callback method to be invoked when the view tree is about to be drawn.

[Android.Runtime.Register("onDraw", "()V", "GetOnDrawHandler:Android.Views.ViewTreeObserver/IOnDrawListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void OnDraw ();
[<Android.Runtime.Register("onDraw", "()V", "GetOnDrawHandler:Android.Views.ViewTreeObserver/IOnDrawListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnDraw : unit -> unit
Attributes

Remarks

Callback method to be invoked when the view tree is about to be drawn. At this point, views cannot be modified in any way.

Unlike with OnPreDrawListener, this method cannot be used to cancel the current drawing pass.

An OnDrawListener listener <strong>cannot be added or removed</strong> from this method.

Java documentation for android.view.ViewTreeObserver.OnDrawListener.onDraw().

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

See also

  • <xref:Android.Views.View.OnMeasure(System.Int32%2c+System.Int32)>
  • <xref:Android.Views.View.OnLayout(System.Boolean%2c+System.Int32%2c+System.Int32%2c+System.Int32%2c+System.Int32)>
  • OnDraw(Canvas)