DeviceOrientation

DeviceOrientation interface defines the device orientation-related properties and methods. This interface is used to represent and check the orientation of a device (such as portrait or landscape). It provides constants to represent orientation states and methods to check the current orientation.

It also includes methods to check the current orientation and to retrieve the device's orientation.

Author

Swapnil Musale

Inheritors

AndroidDeviceOrientation
IosDeviceOrientationImpl

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val isLandscape: Boolean

isLandscape returns true if the device is currently in landscape orientation

Link copied to clipboard
abstract val isPortrait: Boolean

isPortrait returns true if the device is currently in portrait orientation

Functions

Link copied to clipboard

Method to get the current orientation of the device