ReportDrawnAfter
Functions summary
Unit |
@ComposableAdds |
Functions
ReportDrawnAfter
@Composable
fun ReportDrawnAfter(block: suspend () -> Unit): Unit
Adds block to the methods that must complete prior to Activity.reportFullyDrawn being called.
The Activity used is extracted from the LocalView's context.
After Activity.reportFullyDrawn has been called, block will not be called again, even on recomposition.
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) }