# ReportDrawnAfter

## Functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/activity/compose/ReportDrawnAfter.composable#ReportDrawnAfter(kotlin.coroutines.SuspendFunction0)(block: suspend () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Adds `https://developer.android.com/reference/kotlin/androidx/activity/compose/package-summary#ReportDrawnAfter(kotlin.coroutines.SuspendFunction0)` to the methods that must complete prior to `https://developer.android.com/reference/android/app/Activity.html#reportFullyDrawn()` being called. |

## Functions

### ReportDrawnAfter

Artifact: [androidx.activity:activity-compose](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/compose/ReportDrawn.kt+function:ReportDrawnAfter) Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/activity#1.7.0)

```
@Composable
fun ReportDrawnAfter(block: suspend () -> Unit): Unit
```

Adds `https://developer.android.com/reference/kotlin/androidx/activity/compose/package-summary#ReportDrawnAfter(kotlin.coroutines.SuspendFunction0)` to the methods that must complete prior to `https://developer.android.com/reference/android/app/Activity.html#reportFullyDrawn()` being called.

The `https://developer.android.com/reference/android/app/Activity.html` used is extracted from the `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/package-summary#LocalView()`'s context.

After `https://developer.android.com/reference/android/app/Activity.html#reportFullyDrawn()` has been called, `https://developer.android.com/reference/kotlin/androidx/activity/compose/package-summary#ReportDrawnAfter(kotlin.coroutines.SuspendFunction0)` will not be called again, even on recomposition.

```kotlin
import androidx.activity.compose.ReportDrawn
import androidx.activity.compose.ReportDrawnAfter
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.runtime.remember

val lazyListState = remember { LazyListState() }
ReportDrawnAfter { lazyListState.animateScrollToItem(10) }
```