OnsenUi

object OnsenUi

Contains global Onsen UI functions.

Functions

Link copied to clipboard
fun createElement(template: String): <Error class: unknown class>

Create HTML element from a given template.

Link copied to clipboard

Disable all animations.

Link copied to clipboard

Disable status bar fill on IOS7 and above (except iPhone X)

Link copied to clipboard

Disable automatic styling.

Link copied to clipboard

Disable default handler for the device back button.

Link copied to clipboard

Disable adding fa- prefix for icons.

Link copied to clipboard

Enable all animations.

Link copied to clipboard

Enable status bar fill on IOS7 and above (except iPhone X)

Link copied to clipboard

Enable automatic styling.

Link copied to clipboard

Enable default handler for the device back button.

Link copied to clipboard

Force styling for the given platform.

Link copied to clipboard

Applies a scroll fix for iOS UIWebView.

Link copied to clipboard
fun init()

Initialize Onsen UI module.

Link copied to clipboard
fun isAndroid(forceActualPlatform: Boolean = false): Boolean

Whether device is Android.

Link copied to clipboard

Whether device is Android phone.

Link copied to clipboard

Whether device is Android tablet.

Link copied to clipboard
fun isBlackBerry(forceActualPlatform: Boolean = false): Boolean

Whether device is BlackBerry.

Link copied to clipboard
fun isChrome(forceActualPlatform: Boolean = false): Boolean

Whether browser is Chrome.

Link copied to clipboard
fun isEdge(forceActualPlatform: Boolean = false): Boolean

Whether browser is Edge.

Link copied to clipboard
fun isFirefox(forceActualPlatform: Boolean = false): Boolean

Whether browser is Firefox.

Link copied to clipboard
fun isIE(forceActualPlatform: Boolean = false): Boolean

Whether browser is IE.

Link copied to clipboard
fun isIOS(forceActualPlatform: Boolean = false): Boolean

Whether device is iPhone.

Link copied to clipboard

Whether device is iOS 7 or above.

Link copied to clipboard

Whether device is iOS Safari.

Link copied to clipboard

Whether device is iPad.

Link copied to clipboard

Whether device is iPhone.

Link copied to clipboard

Whether device is iPhone X, XS, XS Max, or XR.

Link copied to clipboard

Whether orientation is landscape.

Link copied to clipboard
fun isOpera(forceActualPlatform: Boolean = false): Boolean

Whether browser is Opera.

Link copied to clipboard

Whether orientation is portrait.

Link copied to clipboard

Whether OnsenUI engine is loaded and ready.

Link copied to clipboard
fun isSafari(forceActualPlatform: Boolean = false): Boolean

Whether browser is Safari.

Link copied to clipboard

Whether device is UIWebView.

Link copied to clipboard

Whether app is running inside Cordova.

Link copied to clipboard

Whether device is WKWebView.

Link copied to clipboard
fun isWP(forceActualPlatform: Boolean = false): Boolean

Whether device is Windows Phone.

Link copied to clipboard

Creates a static element similar to iOS/Android status bar.

Link copied to clipboard
fun offOrientationChange(callback: (OrientationEvent) -> Unit? = undefined)

Remove orientation change event listener/all listeners.

Link copied to clipboard

Function called on orientation change event.

Link copied to clipboard

Function called on a single orientation change event.

Link copied to clipboard
fun platformSelect(platform: Platform)

Set styling for the given platform (preferred)

Link copied to clipboard
fun ready(callback: () -> Unit)

A function called when engine is loaded and ready.

Link copied to clipboard
fun setDefaultDeviceBackButtonListener(listener: (dynamic) -> Unit)

Set default listener for the device back button event.