ISurfaceHolder Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 |
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 |
Finalized() |
Called when the instance has been finalized. (Inherited from IJavaPeerable) |
LockCanvas() |
Start editing the pixels in the surface. |
LockCanvas(Rect) |
Just like |
LockHardwareCanvas() |
Just like |
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 |
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 |
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) |