# AnnotationsView.OnAnnotationLocatedListener

Artifact: [androidx.pdf:pdf-viewer](https://developer.android.com/jetpack/androidx/releases/pdf) [View Source](https://cs.android.com/search?q=file:androidx/pdf/annotation/AnnotationsView.kt+class:androidx.pdf.annotation.AnnotationsView.OnAnnotationLocatedListener) Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

*** ** * ** ***


```
fun interface AnnotationsView.OnAnnotationLocatedListener
```

<br />

*** ** * ** ***

Callback interface for annotation hit events.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/pdf/annotation/AnnotationsView.OnAnnotationLocatedListener#onAnnotationsLocated(kotlin.Float,kotlin.Float,kotlin.collections.List)( x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, annotations: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/pdf/annotation/content/KeyedPdfAnnotation> )` Called when one or more annotations are successfully located at a specific touch location. |

## Public functions

### onAnnotationsLocated

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

```
fun onAnnotationsLocated(
    x: Float,
    y: Float,
    annotations: List<KeyedPdfAnnotation>
): Unit
```

Called when one or more annotations are successfully located at a specific touch location.

| Parameters |
|---|---|
| `x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The x-coordinate of the touch event in view coordinates. |
| `y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The y-coordinate of the touch event in view coordinates. |
| `annotations: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/pdf/annotation/content/KeyedPdfAnnotation>` | The list of `https://developer.android.com/reference/kotlin/androidx/pdf/annotation/content/KeyedPdfAnnotation` objects found at the (x, y) location, typically ordered by visual stacking order (Z-index) (top-bottom). |