ISurfaceHolder ISurfaceHolder Interface

Definition

Abstract interface to someone holding a display surface.

[Android.Runtime.Register("android/view/SurfaceHolder", "", "Android.Views.ISurfaceHolderInvoker", ApiSince=1)]
public interface ISurfaceHolder : Android.Runtime.IJavaObject, IDisposable
type ISurfaceHolder = interface
    interface IJavaObject
    interface IDisposable
Attributes
Implements

Remarks

Android platform documentation

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.

Properties

Handle Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
IsCreating IsCreating

Use this method to find out if the surface is in the process of being created from Callback methods.

Surface Surface

Direct access to the surface object.

SurfaceFrame SurfaceFrame

Retrieve the current size of the surface.

Methods

AddCallback(ISurfaceHolderCallback) AddCallback(ISurfaceHolderCallback)

Add a Callback interface for this holder.

LockCanvas() LockCanvas()

Start editing the pixels in the surface.

LockCanvas(Rect) LockCanvas(Rect)

Just like LockCanvas() but allows specification of a dirty rectangle.

RemoveCallback(ISurfaceHolderCallback) RemoveCallback(ISurfaceHolderCallback)

Removes a previously added Callback interface from this holder.

SetFixedSize(Int32, Int32) SetFixedSize(Int32, Int32)

Make the surface a fixed size.

SetFormat(Format) SetFormat(Format)

Set the desired PixelFormat of the surface.

SetKeepScreenOn(Boolean) SetKeepScreenOn(Boolean)

Enable or disable option to keep the screen turned on while this surface is displayed.

SetSizeFromLayout() SetSizeFromLayout()

Allow the surface to resized based on layout of its container (this is the default).

SetType(SurfaceType) SetType(SurfaceType)

Sets the surface's type.

UnlockCanvasAndPost(Canvas) UnlockCanvasAndPost(Canvas)

Finish editing pixels in the surface.

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Applies to