Läs på engelska

Dela via


View.OnAttachedToWindow Method

Definition

This is called when the view is attached to a window.

C#
[Android.Runtime.Register("onAttachedToWindow", "()V", "GetOnAttachedToWindowHandler")]
protected virtual void OnAttachedToWindow ();
Attributes

Remarks

This is called when the view is attached to a window. At this point it has a Surface and will start drawing. Note that this function is guaranteed to be called before #onDraw(android.graphics.Canvas), however it may be called any time before the first onDraw -- including before or after #onMeasure(int, int).

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

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

See also