RotationProvider.Listener
public interface RotationProvider.Listener
Callback interface to receive rotation updates.
Summary
Public methods |
|
|---|---|
abstract void |
onRotationChanged(int rotation)Called when the physical rotation of the device changes. |
Public methods
onRotationChanged
Added in 1.1.0
abstract void onRotationChanged(int rotation)
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 |