kvision / pl.treksoft.kvision.cordova / Screen

Screen

object Screen

Main object for Cordova screen.

Types

Orientation

enum class Orientation

Screen orientations

Functions

addOrientationChangeListener

fun addOrientationChangeListener(listener: (Screen.Orientation) -> Unit): Unit

Add listeners for screen orientation change Cordova events.

getOrientation

fun getOrientation(): Screen.Orientation

Get screen orientation.

lock

fun lock(orientation: Screen.Orientation): Unit

Lock screen orientation.

unlock

fun unlock(): Unit

Unlock screen orientation.

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.