DisplayRotationProvider

A RotationProvider that provides display rotation. It uses DisplayManager to get display rotation. It follows the orientation of the display only. If device or application are locked in a specific orientation, it will not change.

It will notify listeners when the display orientation changes.

Parameters

context

The application context

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val rotation: Int

The rotation in one the Surface rotations from the device natural orientation.

Link copied to clipboard
@get:IntRange(from = 0, to = 359)
val IRotationProvider.rotationDegrees: Int

Functions

Link copied to clipboard
open override fun addListener(listener: IRotationProvider.Listener)
Link copied to clipboard
open override fun removeListener(listener: IRotationProvider.Listener)