Share via


View.SetWillNotDraw(Boolean) Method

Definition

If this view doesn't do any drawing on its own, set this flag to allow further optimizations.

[Android.Runtime.Register("setWillNotDraw", "(Z)V", "GetSetWillNotDraw_ZHandler")]
public virtual void SetWillNotDraw (bool willNotDraw);
[<Android.Runtime.Register("setWillNotDraw", "(Z)V", "GetSetWillNotDraw_ZHandler")>]
abstract member SetWillNotDraw : bool -> unit
override this.SetWillNotDraw : bool -> unit

Parameters

willNotDraw
Boolean

whether or not this View draw on its own

Attributes

Remarks

If this view doesn't do any drawing on its own, set this flag to allow further optimizations. By default, this flag is not set on View, but could be set on some View subclasses such as ViewGroup.

Typically, if you override #onDraw(android.graphics.Canvas) you should clear this flag.

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