blob: e5903e72c11042bacfbe0ddb9f4dce215467e421 [file] [log] [blame]
<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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/GridCells.html">GridCells</a>&nbsp;cells,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/[JVM root]/&lt;ERROR CLASS&gt;.html">&lt;ERROR CLASS&gt;</a>&nbsp;modifier,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyListState.html">LazyListState</a>&nbsp;state,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/PaddingValues.html">PaddingValues</a>&nbsp;contentPadding,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a>,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;content<br>)</code></div>
<p>The DSL implementation of a lazy grid layout.</p>
</td>
</tr>
<tr>
<td width="40%"><code>static&nbsp;final @<a href="/reference/androidx/compose/foundation/ExperimentalFoundationApi.html">ExperimentalFoundationApi</a> void</code></td>
<td>
<div><code>&lt;T&nbsp;extends&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a>&nbsp;receiver,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/util/List.html">List</a>&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> T&gt;&nbsp;items,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;itemContent<br>)</code></div>
<p>Adds a list of items.</p>
</td>
</tr>
<tr>
<td width="40%"><code>static&nbsp;final @<a href="/reference/androidx/compose/foundation/ExperimentalFoundationApi.html">ExperimentalFoundationApi</a> void</code></td>
<td>
<div><code>&lt;T&nbsp;extends&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a>&nbsp;receiver,<br>&nbsp;&nbsp;&nbsp;&nbsp;T[]&nbsp;items,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;itemContent<br>)</code></div>
<p>Adds an array of items.</p>
</td>
</tr>
<tr>
<td width="40%"><code>static&nbsp;final @<a href="/reference/androidx/compose/foundation/ExperimentalFoundationApi.html">ExperimentalFoundationApi</a> void</code></td>
<td>
<div><code>&lt;T&nbsp;extends&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a>&nbsp;receiver,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/util/List.html">List</a>&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> T&gt;&nbsp;items,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Integer.html">Integer</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;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&nbsp;final @<a href="/reference/androidx/compose/foundation/ExperimentalFoundationApi.html">ExperimentalFoundationApi</a> void</code></td>
<td>
<div><code>&lt;T&nbsp;extends&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a>&nbsp;receiver,<br>&nbsp;&nbsp;&nbsp;&nbsp;T[]&nbsp;items,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Integer.html">Integer</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;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&nbsp;static&nbsp;final&nbsp;void&nbsp;<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>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/GridCells.html">GridCells</a>&nbsp;cells,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/[JVM root]/&lt;ERROR CLASS&gt;.html">&lt;ERROR CLASS&gt;</a>&nbsp;modifier,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyListState.html">LazyListState</a>&nbsp;state,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/layout/PaddingValues.html">PaddingValues</a>&nbsp;contentPadding,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a>,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;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>&nbsp;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]/&lt;ERROR CLASS&gt;.html">&lt;ERROR CLASS&gt;</a>&nbsp;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>&nbsp;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>&nbsp;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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a>,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;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&nbsp;static&nbsp;final&nbsp;void&nbsp;&lt;T&nbsp;extends&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a>&nbsp;receiver,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/util/List.html">List</a>&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> T&gt;&nbsp;items,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;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&nbsp;static&nbsp;final&nbsp;void&nbsp;&lt;T&nbsp;extends&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a>&nbsp;receiver,<br>&nbsp;&nbsp;&nbsp;&nbsp;T[]&nbsp;items,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;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&nbsp;static&nbsp;final&nbsp;void&nbsp;&lt;T&nbsp;extends&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a>&nbsp;receiver,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/util/List.html">List</a>&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> T&gt;&nbsp;items,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Integer.html">Integer</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;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>&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> T&gt;&nbsp;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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Integer.html">Integer</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;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&nbsp;static&nbsp;final&nbsp;void&nbsp;&lt;T&nbsp;extends&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyGridScope.html">LazyGridScope</a>&nbsp;receiver,<br>&nbsp;&nbsp;&nbsp;&nbsp;T[]&nbsp;items,<br>&nbsp;&nbsp;&nbsp;&nbsp;@<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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Integer.html">Integer</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;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[]&nbsp;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&lt;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/lazy/LazyItemScope.html">LazyItemScope</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Integer.html">Integer</a>,&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> item,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;itemContent</code></td>
<td>
<p>the content displayed by a single item</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>