GemGlSurfaceAdapter

class GemGlSurfaceAdapter(val context: Context)

GemGlSurfaceAdapter will create a MapView using a GemSurfaceContainerAdapter.

If GemSdk wasn't initialized yet then this surface will call GemSdk.initSdkWithDefaults inside of init block.

A MapView is created by default. To disable this please use doCreateDefaultMapView = false

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard

androidx.car.app.CarContext or Context.

Link copied to clipboard

Flag to create a default map view once the init is done.

Link copied to clipboard
val dpi: Int

DPI of the surface

Link copied to clipboard

Gem context if created.

Link copied to clipboard

Flag that indicates if this instance had been initialized.

Link copied to clipboard
val height: Int

Height of the surface

Link copied to clipboard

Default Map View. This will be created only if doCreateDefaultMapView was true.

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: (gl: GL10?) -> Unit?

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

Link copied to clipboard

On Fling Callback

Link copied to clipboard

On Scale Callback

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

On Scroll Callback

Link copied to clipboard
var onVisibleAreaChanged: (rect: Rect) -> Unit?

Indicates that the visible area provided by the host has changed.

Link copied to clipboard

Gem screen if created.

Link copied to clipboard

Visible Area. See onVisibleAreaChanged

Link copied to clipboard
val width: Int

Width of the surface

Functions

Link copied to clipboard
fun onFling(velocityX: Float, velocityY: Float)

Must be called when androidx.car.app.SurfaceCallback.onFling is triggered.

Link copied to clipboard
fun onScale(focusX: Float, focusY: Float, scaleFactor: Float)

Must be called when androidx.car.app.SurfaceCallback.onScale is triggered.

Link copied to clipboard
fun onScroll(distanceX: Float, distanceY: Float)

Must be called when androidx.car.app.SurfaceCallback.onScroll is triggered.

Link copied to clipboard
fun onStableAreaChanged(stableArea: Rect)

Must be called when androidx.car.app.SurfaceCallback.onStableAreaChanged is triggered.

Link copied to clipboard

Must be called when androidx.car.app.SurfaceCallback.onSurfaceAvailable is triggered.

Link copied to clipboard

Must be called when androidx.car.app.SurfaceCallback.onSurfaceDestroyed is triggered.

Link copied to clipboard
fun onVisibleAreaChanged(visibleArea: Rect)

Must be called when androidx.car.app.SurfaceCallback.onVisibleAreaChanged is triggered.

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.