# RotationProvider.Listener

Artifact: [androidx.camera:camera-view](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/view/RotationProvider.java+class:androidx.camera.view.RotationProvider.Listener) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/camera#1.1.0)

*** ** * ** ***


```
public interface RotationProvider.Listener
```

<br />

*** ** * ** ***

Callback interface to receive rotation updates.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/camera/view/RotationProvider.Listener#onRotationChanged(int)(int rotation)` Called when the physical rotation of the device changes. |

## Public methods

### onRotationChanged

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/camera#1.1.0)

```
abstract void onRotationChanged(int rotation)
```

Called when the physical rotation of the device changes.

The rotation is one of the `https://developer.android.com/reference/android/view/Surface.html` rotations mapped from orientation degrees.

| Orientation degrees | Surface rotation |
|---|---|
| \[-45°, 45°) | `https://developer.android.com/reference/android/view/Surface.html#ROTATION_0` |
| \[45°, 135°) | `https://developer.android.com/reference/android/view/Surface.html#ROTATION_270` |
| \[135°, 225°) | `https://developer.android.com/reference/android/view/Surface.html#ROTATION_180` |
| \[225°, 315°) | `https://developer.android.com/reference/android/view/Surface.html#ROTATION_90` |