RotationProvider.Listener

public static interface RotationProvider.Listener

androidx.camera.view.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

public 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 degreesSurface rotation
[-45°, 45°)Surface.ROTATION_0
[45°, 135°)Surface.ROTATION_270
[135°, 225°)Surface.ROTATION_180
[225°, 315°)Surface.ROTATION_90

Parameters
rotation int