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

*** ** * ** ***


```
public fun interface AnnotationsView.OnAnnotationLocatedListener
```

<br />

*** ** * ** ***

Callback interface for annotation hit events.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/pdf/annotation/AnnotationsView.OnAnnotationLocatedListener#onAnnotationsLocated(kotlin.Float,kotlin.Float,kotlin.collections.List)( float x, float y, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/pdf/annotation/content/KeyedPdfAnnotation> annotations )` Called when one or more annotations are successfully located at a specific touch location. |

## Public methods

### onAnnotationsLocated

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

```
abstract void onAnnotationsLocated(
    float x,
    float y,
    @NonNull List<@NonNull KeyedPdfAnnotation> annotations
)
```

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

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