Package-level declarations

Types

Link copied to clipboard
data class ScreenResolution(val width: Int, val height: Int)

Data class representing the screen resolution.

Functions

Link copied to clipboard

Gets the screen resolution.

Link copied to clipboard

Checks if the device has a bluetooth.

Link copied to clipboard

Checks if the device has a camera.

Link copied to clipboard

Checks if the device is in landscape orientation.

Link copied to clipboard

Checks if the device is in multi-window mode.

Link copied to clipboard

Checks if the device has a NFC.

Link copied to clipboard

Check if the device is a phone (small screen)

Link copied to clipboard

Checks if the device is in portrait orientation.

Link copied to clipboard

Check if the device is a tablet (large screen)

Link copied to clipboard

Checks if the device has a Telephony capability.

Link copied to clipboard
fun Activity.lockToLandscapeOrientation(phone: Boolean = false, tablet: Boolean = false)

Lock the activity to landscape orientation on a phone, tablet or desktop

Link copied to clipboard
fun Activity.lockToOrientation(type: Int, phone: Boolean = false, tablet: Boolean = false)

Lock the activity to the specified orientation on a phone, tablet or desktop

Link copied to clipboard
fun Activity.lockToPortraitOrientation(phone: Boolean = false, tablet: Boolean = false)

Lock the activity to portrait orientation on a phone, tablet or desktop.

Link copied to clipboard
fun Activity.setOrientation(type: Int = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)

Set the orientation of the activity