跳到主要内容

bn.onDeviceOrientationChange

onDeviceOrientationChange(cb): void

description Listens on the landscape/portrait mode switchover event.

example

 bn.onDeviceOrientationChange(callback)

Parameters

NameType
cbOnDeviceOrientationChangeCallback

Returns

void


OnDeviceOrientationChangeCallback

Ƭ OnDeviceOrientationChangeCallback: (result: OnDeviceOrientationChangeCallbackResult) => void

Type declaration

▸ (result): void

The callback function for the landscape/portrait mode switchover event

Parameters

NameType
resultOnDeviceOrientationChangeCallbackResult

Returns

void


Interface: OnDeviceOrientationChangeCallbackResult

NameTypeDescription
valueOrientationValueIndicates whether the screen is in landscape or portrait mode.