Android.Views.ISurfaceHolder.Surface Property
Direct access to the surface object.

Syntax

[get: Android.Runtime.Register("getSurface", "()Landroid/view/Surface;", "GetGetSurfaceHandler:Android.Views.ISurfaceHolderInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Surface Surface { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Direct access to the surface object. The Surface may not always be available -- for example when using a Android.Views.SurfaceView the holder's Surface is not created until the view has been attached to the window manager and performed a layout in order to determine the dimensions and screen position of the Surface. You will thus usually need to implement ISurfaceHolderCallback.SurfaceCreated(ISurfaceHolder) to find out when the Surface is available for use.

Note that if you directly access the Surface from another thread, it is critical that you correctly implement ISurfaceHolderCallback.SurfaceCreated(ISurfaceHolder) and ISurfaceHolderCallback.SurfaceDestroyed(ISurfaceHolder) to ensure that thread only accesses the Surface while it is valid, and that the Surface does not get destroyed while the thread is using it.

This method is intended to be used by frameworks which often need direct access to the Surface object (usually to pass it to native code).

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1