Läs på engelska

Dela via


View.SetWillNotDraw(Boolean) Method

Definition

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

C#
[Android.Runtime.Register("setWillNotDraw", "(Z)V", "GetSetWillNotDraw_ZHandler")]
public virtual void SetWillNotDraw(bool willNotDraw);

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

Produkt Versioner
.NET for Android .NET for Android API 34, .NET for Android API 35