RotationProvider.Listener

interface RotationProvider.Listener


Callback interface to receive rotation updates.

Summary

Public functions

Unit

Called when the physical rotation of the device changes.

Public functions

onRotationChanged

Added in 1.1.0
fun onRotationChanged(rotation: Int): Unit

Called when the physical rotation of the device changes.

The rotation is one of the Surface rotations mapped from orientation degrees.

Orientation degrees Surface rotation
[-45°, 45°) ROTATION_0
[45°, 135°) ROTATION_270
[135°, 225°) ROTATION_180
[225°, 315°) ROTATION_90