GemSurfaceView

SDK Surface object. If GemSdk wasn't initialized yet then this surface will call GemSdk.initSdkWithDefaults inside of onAttachedToWindow.

A MapView is created by default. To disable this please use the attribute app:createDefaultMapView="false"

This surface is released by default when onDetachedFromWindow is triggered. To disable this please use the attribute app:autoReleaseOnDetachedFromWindow="false"

Constructors

Link copied to clipboard
constructor(context: <Error class: unknown class>, attrs: <Error class: unknown class>)
constructor(context: <Error class: unknown class>, doCreateDefaultMapView: Boolean? = null, sdkToken: String? = null, autoReleaseOnDetachedFromWindow: Boolean? = null, postLambdasOnMain: Boolean? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class TouchEventCustom(val eventType: ETouchEvent, val pointerId: Int, val x: Int, val y: Int, var valid: Boolean)

Data class for custom touch event

Link copied to clipboard

Listener interface for visibility changes

Properties

Link copied to clipboard

Gem context if created.

Link copied to clipboard

Gem screen if created.

Link copied to clipboard

Flag that indicates if this instance had been initialized.

Link copied to clipboard

Flag that indicates if this instance had been released.

Link copied to clipboard

Default MapView. If attribute app:createDefaultMapView="false" hasn't been used then it had been auto created at initialization of this GemSurfaceView. It's lambda triggers will be called on main thread.

Link copied to clipboard
var onDefaultMapViewCreated: (defaultMapView: MapView) -> Unit?

Triggered after the default map view had been created. Will be called on SdkCall.

Link copied to clipboard
var onDrawFrameCustom: (<Error class: unknown class>?) -> Unit?

Triggered on system's GLThread. GemSdk's thread is locked.

Link copied to clipboard
var onInitSdk: (sdkToken: String?) -> Boolean?

Triggered when view is at the point of initializing SDK. If user provides an implementation, he is responsible of SDK initialization, otherwise SDK initialization will be performed using default parameters.

Link copied to clipboard
var onPostHandleTouchListener: (<Error class: unknown class>?) -> Boolean

Triggered after the screen will handle the current touch event.

Link copied to clipboard
var onPreHandleTouchListener: (<Error class: unknown class>?) -> Boolean

Triggered before the screen will handle the current touch event.

Link copied to clipboard
var onScreenCreated: (screen: Screen) -> Unit?

Triggered after the screen has been successfully created. Will be called on SdkCall.

Link copied to clipboard

Triggered if this surface called GemSdk.initSdkWithDefaults and it returned success. Will be called on SdkCall.

Link copied to clipboard

Define a variable to hold the listener

Functions

Link copied to clipboard
open fun finalize()

Overrides finalize that garbage collector will call when needed.

Link copied to clipboard

This method is used as part of the View class and is not normally called or subclassed by clients of GLSurfaceView.

Link copied to clipboard

This is called when the view is detached from a window. At this point it no longer has a surface for drawing.

Link copied to clipboard
open fun onVisibilityChanged(changedView: <Error class: unknown class>, visibility: Int)

Notify the listener when the visibility changes

Link copied to clipboard
fun release()

Releases the drawing context.

Link copied to clipboard

Releases the default MapView that has been created using attribute "app:createDefaultMapView="true"". You might want to hide this full surface map view and use custom separated views, consider using this.