# 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)

*** ** * ** ***


```
class TapToFocusInfo
```

<br />

*** ** * ** ***

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

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

## Summary

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

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/view/TapToFocusInfo#focusState()` The focus state of the camera. |
| `https://developer.android.com/reference/android/graphics/PointF.html?` | `https://developer.android.com/reference/kotlin/androidx/camera/view/TapToFocusInfo#tapPoint()` 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)

```
TapToFocusInfo(focusState: Int, tapPoint: PointF?)
```

## Public properties

### focusState

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

```
val focusState: Int
```

The focus state of the camera.

### tapPoint

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

```
val tapPoint: PointF?
```

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.