# TapToFocusInfo

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/TapToFocusInfo.kt+class:androidx.camera.view.TapToFocusInfo) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/camera#1.5.0)

*** ** * ** ***


```
public final class TapToFocusInfo
```

<br />

*** ** * ** ***

Describes the focus state and tap location that `https://developer.android.com/reference/androidx/camera/view/CameraController` uses for tap-to-focus feature corresponding to the `https://developer.android.com/reference/androidx/camera/view/PreviewView` touch events.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/view/CameraController` |   |
| `https://developer.android.com/reference/androidx/camera/view/CameraController#getTapToFocusInfoState()` |   |
| `https://developer.android.com/reference/androidx/camera/core/CameraControl#startFocusAndMetering(androidx.camera.core.FocusMeteringAction)` |   |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/camera/view/TapToFocusInfo#TapToFocusInfo(kotlin.Int,android.graphics.PointF)(int focusState, https://developer.android.com/reference/android/graphics/PointF.html tapPoint)` |

| ### Public methods |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/camera/view/TapToFocusInfo#getFocusState()()` The focus state of the camera. |
| `final https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/androidx/camera/view/TapToFocusInfo#getTapPoint()()` The `PreviewView` co-ordinates of user's touch event corresponding to this focusing event. |

## Public constructors

### TapToFocusInfo

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

```
public TapToFocusInfo(int focusState, PointF tapPoint)
```

## Public methods

### getFocusState

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

```
public final int getFocusState()
```

The focus state of the camera.

### getTapPoint

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

```
public final PointF getTapPoint()
```

The `PreviewView` co-ordinates of user's touch event corresponding to this focusing event. This can be null when a focusing event is not due to the user's touch event. For example, `FocusOnTap(TAP_TO_FOCUS_NOT_STARTED, null)` is used when there is no focusing event ongoing e.g. during initialization or after a focus event has been completed.