SurfaceControlViewHost Constructors

Definition

Overloads

Name Description
SurfaceControlViewHost(IntPtr, JniHandleOwnership)

Creates a managed peer for an existing Java Native Interface object reference.

SurfaceControlViewHost(Context, Display, IBinder)

Construct a new SurfaceControlViewHost.

SurfaceControlViewHost(Context, Display, InputTransferToken)

Construct a new SurfaceControlViewHost.

SurfaceControlViewHost(IntPtr, JniHandleOwnership)

Creates a managed peer for an existing Java Native Interface object reference.

protected SurfaceControlViewHost(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Views.SurfaceControlViewHost : nativeint * Android.Runtime.JniHandleOwnership -> Android.Views.SurfaceControlViewHost

Parameters

javaReference
IntPtr

nativeint

The System.IntPtr value used for java reference.

transfer
JniHandleOwnership

The Android.Runtime.JniHandleOwnership value used for transfer.

Remarks

For details, see the Android reference documentation for android.view.SurfaceControlViewHost.

Applies to

SurfaceControlViewHost(Context, Display, IBinder)

Construct a new SurfaceControlViewHost.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/view/Display;Landroid/os/IBinder;)V", "", ApiSince=30)]
public SurfaceControlViewHost(Android.Content.Context context, Android.Views.Display display, Android.OS.IBinder? hostToken);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/view/Display;Landroid/os/IBinder;)V", "", ApiSince=30)>]
new Android.Views.SurfaceControlViewHost : Android.Content.Context * Android.Views.Display * Android.OS.IBinder -> Android.Views.SurfaceControlViewHost

Parameters

context
Context

The Context object for your activity or application.

display
Display

The Display the hierarchy will be placed on.

hostToken
IBinder

The host token, as discussed above.

Attributes

Remarks

Construct a new SurfaceControlViewHost. The root Surface will be allocated internally and is accessible via getSurfacePackage().

The parameter, primarily used for ANR reporting, must be obtained from whomever will be hosting the embedded hierarchy. It's accessible from SurfaceView#getHostToken.

Java documentation for android.view.SurfaceControlViewHost.SurfaceControlViewHost(android.content.Context, android.view.Display, android.os.IBinder).

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

SurfaceControlViewHost(Context, Display, InputTransferToken)

Construct a new SurfaceControlViewHost.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/view/Display;Landroid/window/InputTransferToken;)V", "", ApiSince=35)]
public SurfaceControlViewHost(Android.Content.Context context, Android.Views.Display display, Android.Window.InputTransferToken? hostInputTransferToken);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/view/Display;Landroid/window/InputTransferToken;)V", "", ApiSince=35)>]
new Android.Views.SurfaceControlViewHost : Android.Content.Context * Android.Views.Display * Android.Window.InputTransferToken -> Android.Views.SurfaceControlViewHost

Parameters

context
Context

The Context object for your activity or application.

display
Display

The Display the hierarchy will be placed on.

hostInputTransferToken
InputTransferToken

The host input transfer token, as discussed above.

Attributes

Remarks

Construct a new SurfaceControlViewHost. The root Surface will be allocated internally and is accessible via getSurfacePackage().

The hostInputTransferToken parameter allows the host and embedded to be associated with each other to allow transferring touch gesture and focus. This is also used for ANR reporting. It's accessible from AttachedSurfaceControl#getInputTransferToken().

Java documentation for android.view.SurfaceControlViewHost.SurfaceControlViewHost(android.content.Context, android.view.Display, android.window.InputTransferToken).

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