SensorRotationProvider

A RotationProvider that provides device rotation. It uses OrientationEventListener to get device orientation. It follows the orientation of the sensor, so it will change when the device is rotated.

It will notify listeners when the device orientation changes.

Parameters

context

The application context

Constructors

Link copied to clipboard
constructor(context: Context)

Types

Link copied to clipboard
object Companion

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)