Udostępnij za pośrednictwem


ISurfaceHolder Interface

Definition

Abstract interface to someone holding a display surface.

[Android.Runtime.Register("android/view/SurfaceHolder", "", "Android.Views.ISurfaceHolderInvoker")]
public interface ISurfaceHolder : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/view/SurfaceHolder", "", "Android.Views.ISurfaceHolderInvoker")>]
type ISurfaceHolder = interface
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Attributes
Implements

Remarks

Abstract interface to someone holding a display surface. Allows you to control the surface size and format, edit the pixels in the surface, and monitor changes to the surface. This interface is typically available through the SurfaceView class.

When using this interface from a thread other than the one running its SurfaceView, you will want to carefully read the methods #lockCanvas and Callback#surfaceCreated Callback.surfaceCreated().

Java documentation for android.view.SurfaceHolder.

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

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
IsCreating

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

JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)
Surface

Direct access to the surface object.

SurfaceFrame

Retrieve the current size of the surface.

Methods

AddCallback(ISurfaceHolderCallback)

Add a Callback interface for this holder.

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
LockCanvas()

Start editing the pixels in the surface.

LockCanvas(Rect)

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

LockHardwareCanvas()

Just like #lockCanvas() but the returned canvas is hardware-accelerated.

RemoveCallback(ISurfaceHolderCallback)

Removes a previously added Callback interface from this holder.

SetFixedSize(Int32, Int32)

Make the surface a fixed size.

SetFormat(Format)

Set the desired PixelFormat of the surface.

SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetKeepScreenOn(Boolean)

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

SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
SetSizeFromLayout()

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

SetType(SurfaceType)
Obsolete.

Sets the surface's type.

UnlockCanvasAndPost(Canvas)

Finish editing pixels in the surface.

UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to