# ZoomState

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

*** ** * ** ***


```
public interface ZoomState
```

<br />

*** ** * ** ***

An interface which contains the zoom related information from a camera.

Applications can retrieve an instance via `https://developer.android.com/reference/androidx/camera/core/CameraInfo#getZoomState()`.

## Summary

| ### Public methods |
|---|---|
| `abstract float` | `https://developer.android.com/reference/androidx/camera/core/ZoomState#getLinearZoom()()` Returns the linearZoom which is in range \[0..1\]. |
| `abstract float` | `https://developer.android.com/reference/androidx/camera/core/ZoomState#getMaxZoomRatio()()` Returns the maximum zoom ratio. |
| `abstract float` | `https://developer.android.com/reference/androidx/camera/core/ZoomState#getMinZoomRatio()()` Returns the minimum zoom ratio. |
| `abstract float` | `https://developer.android.com/reference/androidx/camera/core/ZoomState#getZoomRatio()()` Returns the zoom ratio. |

## Public methods

### getLinearZoom

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

```
abstract float getLinearZoom()
```

Returns the linearZoom which is in range \[0..1\].

LinearZoom 0 represents the minimum zoom while linearZoom 1.0 represents the maximum zoom.

### getMaxZoomRatio

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

```
abstract float getMaxZoomRatio()
```

Returns the maximum zoom ratio.

### getMinZoomRatio

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

```
abstract float getMinZoomRatio()
```

Returns the minimum zoom ratio.

Typically 1.0, but can be less than 1.0 if the camera device supports zoom-out (only on android 11 or later).

### getZoomRatio

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

```
abstract float getZoomRatio()
```

Returns the zoom ratio. The value is 1.0 by default.