blob: f91173d43d193242337fb89d14f2b5b61374bd1e [file] [log] [blame]
<html devsite="true">
<head>
<title>LazyListItemInfo</title>
{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<div id="metadata-info-block"></div>
<h1>LazyListItemInfo</h1>
<p>
<pre>public interface <a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html">LazyListItemInfo</a></pre>
</p>
<hr>
<p>Contains useful information about an individual item in lazy lists like <code><a href="/reference/androidx/compose/foundation/lazy/package-summary.html#LazyColumn(androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Function1)">LazyColumn</a></code> or <code><a href="/reference/androidx/compose/foundation/lazy/package-summary.html#LazyRow(androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Horizontal,androidx.compose.ui.Alignment.Vertical,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Function1)">LazyRow</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="100%">See also</th>
</tr>
</thead>
<tbody class="list">
<tr>
<td width="40%"><code><a href="/reference/androidx/compose/foundation/lazy/LazyListLayoutInfo.html">LazyListLayoutInfo</a></code></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<h2>Summary</h2>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="100%"><h3>Public fields</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td width="40%"><code>abstract int</code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#index()">index</a></code></div>
<p>The index of the item in the list.</p>
</td>
</tr>
<tr>
<td width="40%"><code>abstract @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a></code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#key()">key</a></code></div>
<p>The key of the item which was passed to the item() or items() function.</p>
</td>
</tr>
<tr>
<td width="40%"><code>abstract int</code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#offset()">offset</a></code></div>
<p>The main axis offset of the item.</p>
</td>
</tr>
<tr>
<td width="40%"><code>abstract int</code></td>
<td>
<div><code><a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#size()">size</a></code></div>
<p>The main axis size of the item.</p>
</td>
</tr>
</tbody>
</table>
</div>
<h2>Public fields</h2>
<div><a name="getIndex()"></a><a name="setIndex()"></a><a name="getIndex--"></a><a name="setIndex--"></a>
<h3 class="api-name" id="index()">index</h3>
<pre class="api-signature no-pretty-print">abstract&nbsp;int&nbsp;<a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#index()">index</a></pre>
<p>The index of the item in the list.</p>
</div>
<div><a name="getKey()"></a><a name="setKey()"></a><a name="getKey--"></a><a name="setKey--"></a>
<h3 class="api-name" id="key()">key</h3>
<pre class="api-signature no-pretty-print">abstract&nbsp;@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>&nbsp;<a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#key()">key</a></pre>
<p>The key of the item which was passed to the item() or items() function.</p>
</div>
<div><a name="getOffset()"></a><a name="setOffset()"></a><a name="getOffset--"></a><a name="setOffset--"></a>
<h3 class="api-name" id="offset()">offset</h3>
<pre class="api-signature no-pretty-print">abstract&nbsp;int&nbsp;<a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#offset()">offset</a></pre>
<p>The main axis offset of the item. It is relative to the start of the lazy list container.</p>
</div>
<div><a name="getSize()"></a><a name="setSize()"></a><a name="getSize--"></a><a name="setSize--"></a>
<h3 class="api-name" id="size()">size</h3>
<pre class="api-signature no-pretty-print">abstract&nbsp;int&nbsp;<a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#size()">size</a></pre>
<p>The main axis size of the item. Note that if you emit multiple layouts in the composable slot for the item then this size will be calculated as the sum of their sizes.</p>
</div>
</body>
</html>