| <html devsite="true"> |
| <head> |
| <title>LazyGridKt</title> |
| {% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} |
| {% include "_shared/_reference-head-tags.html" %} |
| </head> |
| <body> |
| <h1>LazyGridKt</h1> |
| <p> |
| <pre>public final class LazyGridKt</pre> |
| </p> |
| <hr> |
| <h2>Summary</h2> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2"><h3>Public methods</h3></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td width="40%"><code>static final @<a href="/reference/androidx/compose/foundation/ExperimentalFoundationApi.html">ExperimentalFoundationApi</a> @<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a> void</code></td> |
| <td> |
| <div><code><a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html#LazyVerticalGrid(androidx.compose.foundation.lazy.GridCells,Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Function1)">LazyVerticalGrid</a>(<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/GridCells.html">GridCells</a> cells,<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a> modifier,<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyListState.html">LazyListState</a> state,<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/PaddingValues.html">PaddingValues</a> contentPadding,<br> @<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function1<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a>, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> content<br>)</code></div> |
| <p>The DSL implementation of a lazy grid layout.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>static final @<a href="/reference/androidx/compose/foundation/ExperimentalFoundationApi.html">ExperimentalFoundationApi</a> void</code></td> |
| <td> |
| <div><code><T extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html">LazyGridKt</a>.<a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html#(androidx.compose.foundation.lazy.LazyGridScope).items(kotlin.collections.List,kotlin.Function2)">items</a>(<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a> receiver,<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/util/List.html">List</a><@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> T> items,<br> @<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a> @<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function2<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> itemContent<br>)</code></div> |
| <p>Adds a list of items.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>static final @<a href="/reference/androidx/compose/foundation/ExperimentalFoundationApi.html">ExperimentalFoundationApi</a> void</code></td> |
| <td> |
| <div><code><T extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html">LazyGridKt</a>.<a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html#(androidx.compose.foundation.lazy.LazyGridScope).items(kotlin.Array,kotlin.Function2)">items</a>(<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a> receiver,<br> T[] items,<br> @<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a> @<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function2<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> itemContent<br>)</code></div> |
| <p>Adds an array of items.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>static final @<a href="/reference/androidx/compose/foundation/ExperimentalFoundationApi.html">ExperimentalFoundationApi</a> void</code></td> |
| <td> |
| <div><code><T extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html">LazyGridKt</a>.<a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html#(androidx.compose.foundation.lazy.LazyGridScope).itemsIndexed(kotlin.collections.List,kotlin.Function3)">itemsIndexed</a>(<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a> receiver,<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/util/List.html">List</a><@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> T> items,<br> @<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a> @<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function3<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Integer.html">Integer</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> itemContent<br>)</code></div> |
| <p>Adds a list of items where the content of an item is aware of its index.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>static final @<a href="/reference/androidx/compose/foundation/ExperimentalFoundationApi.html">ExperimentalFoundationApi</a> void</code></td> |
| <td> |
| <div><code><T extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html">LazyGridKt</a>.<a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html#(androidx.compose.foundation.lazy.LazyGridScope).itemsIndexed(kotlin.Array,kotlin.Function3)">itemsIndexed</a>(<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a> receiver,<br> T[] items,<br> @<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a> @<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function3<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Integer.html">Integer</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> itemContent<br>)</code></div> |
| <p>Adds an array of items where the content of an item is aware of its index.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <h2>Public methods</h2> |
| <div><a name="LazyVerticalGrid(androidx.compose.foundation.lazy.GridCells, Modifier, androidx.compose.foundation.lazy.LazyListState, androidx.compose.foundation.layout.PaddingValues, kotlin.Function1)"></a><a name="LazyVerticalGrid-androidx.compose.foundation.lazy.GridCells-Modifier-androidx.compose.foundation.lazy.LazyListState-androidx.compose.foundation.layout.PaddingValues-kotlin.Function1-"></a><a name="lazyverticalgrid"></a> |
| <h3 class="api-name" id="LazyVerticalGrid(androidx.compose.foundation.lazy.GridCells,Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Function1)">LazyVerticalGrid</h3> |
| <pre class="api-signature no-pretty-print">@<a href="/reference/androidx/compose/foundation/ExperimentalFoundationApi.html">ExperimentalFoundationApi</a><br>@<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a><br>public static final void <a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html#LazyVerticalGrid(androidx.compose.foundation.lazy.GridCells,Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Function1)">LazyVerticalGrid</a>(<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/GridCells.html">GridCells</a> cells,<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a> modifier,<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyListState.html">LazyListState</a> state,<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/PaddingValues.html">PaddingValues</a> contentPadding,<br> @<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function1<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a>, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> content<br>)</pre> |
| <p>The DSL implementation of a lazy grid layout. It composes only visible rows of the grid. This API is not stable, please consider using stable components like <code><a href="/reference/androidx/compose/foundation/lazy/package-summary.html#LazyColumn(Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Vertical,AlignmentHorizontal,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Function1)">LazyColumn</a></code> and <code><a href="/reference/androidx/compose/foundation/layout/package-summary.html#Row(Modifier,androidx.compose.foundation.layout.Arrangement.Horizontal,AlignmentVertical,kotlin.Function1)">Row</a></code> to achieve the same result.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td width="40%"><code>@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/GridCells.html">GridCells</a> cells</code></td> |
| <td> |
| <p>a class describing how cells form columns, see <code><a href="/reference/androidx/compose/foundation/lazy/GridCells.html">GridCells</a></code> doc for more information</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a> modifier</code></td> |
| <td> |
| <p>the modifier to apply to this layout</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyListState.html">LazyListState</a> state</code></td> |
| <td> |
| <p>the state object to be used to control or observe the list's state</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/PaddingValues.html">PaddingValues</a> contentPadding</code></td> |
| <td> |
| <p>specify a padding around the whole content</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>@<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function1<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a>, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> content</code></td> |
| <td> |
| <p>the <code><a href="/reference/androidx/compose/foundation/lazy/LazyListScope.html">LazyListScope</a></code> which describes the content</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="(androidx.compose.foundation.lazy.LazyGridScope).items(kotlin.collections.List, kotlin.Function2)"></a><a name="-androidx.compose.foundation.lazy.LazyGridScope-.items-kotlin.collections.List-kotlin.Function2-"></a><a name="items"></a> |
| <h3 class="api-name" id="(androidx.compose.foundation.lazy.LazyGridScope).items(kotlin.collections.List,kotlin.Function2)">LazyGridKt.items</h3> |
| <pre class="api-signature no-pretty-print">@<a href="/reference/androidx/compose/foundation/ExperimentalFoundationApi.html">ExperimentalFoundationApi</a><br>public static final void <T extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html">LazyGridKt</a>.<a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html#(androidx.compose.foundation.lazy.LazyGridScope).items(kotlin.collections.List,kotlin.Function2)">items</a>(<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a> receiver,<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/util/List.html">List</a><@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> T> items,<br> @<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a> @<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function2<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> itemContent<br>)</pre> |
| <p>Adds a list of items.</p> |
| <p>the data list</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td width="40%"><code>@<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a> @<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function2<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> itemContent</code></td> |
| <td> |
| <p>the content displayed by a single item</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="(androidx.compose.foundation.lazy.LazyGridScope).items(kotlin.Array, kotlin.Function2)"></a><a name="-androidx.compose.foundation.lazy.LazyGridScope-.items-kotlin.Array-kotlin.Function2-"></a><a name="items"></a> |
| <h3 class="api-name" id="(androidx.compose.foundation.lazy.LazyGridScope).items(kotlin.Array,kotlin.Function2)">LazyGridKt.items</h3> |
| <pre class="api-signature no-pretty-print">@<a href="/reference/androidx/compose/foundation/ExperimentalFoundationApi.html">ExperimentalFoundationApi</a><br>public static final void <T extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html">LazyGridKt</a>.<a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html#(androidx.compose.foundation.lazy.LazyGridScope).items(kotlin.Array,kotlin.Function2)">items</a>(<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a> receiver,<br> T[] items,<br> @<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a> @<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function2<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> itemContent<br>)</pre> |
| <p>Adds an array of items.</p> |
| <p>the data array</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td width="40%"><code>@<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a> @<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function2<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> itemContent</code></td> |
| <td> |
| <p>the content displayed by a single item</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="(androidx.compose.foundation.lazy.LazyGridScope).itemsIndexed(kotlin.collections.List, kotlin.Function3)"></a><a name="-androidx.compose.foundation.lazy.LazyGridScope-.itemsIndexed-kotlin.collections.List-kotlin.Function3-"></a><a name="itemsindexed"></a> |
| <h3 class="api-name" id="(androidx.compose.foundation.lazy.LazyGridScope).itemsIndexed(kotlin.collections.List,kotlin.Function3)">LazyGridKt.itemsIndexed</h3> |
| <pre class="api-signature no-pretty-print">@<a href="/reference/androidx/compose/foundation/ExperimentalFoundationApi.html">ExperimentalFoundationApi</a><br>public static final void <T extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html">LazyGridKt</a>.<a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html#(androidx.compose.foundation.lazy.LazyGridScope).itemsIndexed(kotlin.collections.List,kotlin.Function3)">itemsIndexed</a>(<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a> receiver,<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/util/List.html">List</a><@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> T> items,<br> @<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a> @<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function3<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Integer.html">Integer</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> itemContent<br>)</pre> |
| <p>Adds a list of items where the content of an item is aware of its index.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td width="40%"><code>@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/util/List.html">List</a><@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> T> items</code></td> |
| <td> |
| <p>the data list</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>@<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a> @<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function3<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Integer.html">Integer</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> itemContent</code></td> |
| <td> |
| <p>the content displayed by a single item</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="(androidx.compose.foundation.lazy.LazyGridScope).itemsIndexed(kotlin.Array, kotlin.Function3)"></a><a name="-androidx.compose.foundation.lazy.LazyGridScope-.itemsIndexed-kotlin.Array-kotlin.Function3-"></a><a name="itemsindexed"></a> |
| <h3 class="api-name" id="(androidx.compose.foundation.lazy.LazyGridScope).itemsIndexed(kotlin.Array,kotlin.Function3)">LazyGridKt.itemsIndexed</h3> |
| <pre class="api-signature no-pretty-print">@<a href="/reference/androidx/compose/foundation/ExperimentalFoundationApi.html">ExperimentalFoundationApi</a><br>public static final void <T extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html">LazyGridKt</a>.<a href="/reference/androidx/compose/foundation/lazy/LazyGridKt.html#(androidx.compose.foundation.lazy.LazyGridScope).itemsIndexed(kotlin.Array,kotlin.Function3)">itemsIndexed</a>(<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a> receiver,<br> T[] items,<br> @<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a> @<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function3<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Integer.html">Integer</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> itemContent<br>)</pre> |
| <p>Adds an array of items where the content of an item is aware of its index.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td width="40%"><code>T[] items</code></td> |
| <td> |
| <p>the data array</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>@<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a> @<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> Function3<@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Integer.html">Integer</a>, @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> itemContent</code></td> |
| <td> |
| <p>the content displayed by a single item</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| </body> |
| </html> |