blob: f91173d43d193242337fb89d14f2b5b61374bd1e [file] [log] [blame]
Tiem Song6fed3de2021-06-14 14:48:10 -07001<html devsite="true">
2 <head>
3 <title>LazyListItemInfo</title>
4{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %}
5{% include "_shared/_reference-head-tags.html" %}
6 </head>
7 <body>
Tiem Song6f896de2022-11-03 14:55:52 -07008 <div id="metadata-info-block"></div>
Tiem Song6fed3de2021-06-14 14:48:10 -07009 <h1>LazyListItemInfo</h1>
Tiem Song6fed3de2021-06-14 14:48:10 -070010 <p>
Owen Gray22f20572022-08-08 13:48:02 -040011 <pre>public interface <a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html">LazyListItemInfo</a></pre>
Tiem Song6fed3de2021-06-14 14:48:10 -070012 </p>
13 <hr>
Paweł Marks4724d6f2021-12-22 17:11:51 +010014 <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>
Tiem Song6fed3de2021-06-14 14:48:10 -070015 <div class="devsite-table-wrapper">
16 <table class="responsive">
17 <thead>
18 <tr>
Andrea Falcone80f1a8f2022-08-23 11:22:33 -040019 <th colspan="100%">See also</th>
Tiem Song6fed3de2021-06-14 14:48:10 -070020 </tr>
21 </thead>
Andrea Falcone80f1a8f2022-08-23 11:22:33 -040022 <tbody class="list">
Tiem Song6fed3de2021-06-14 14:48:10 -070023 <tr>
24 <td width="40%"><code><a href="/reference/androidx/compose/foundation/lazy/LazyListLayoutInfo.html">LazyListLayoutInfo</a></code></td>
25 <td></td>
26 </tr>
27 </tbody>
28 </table>
29 </div>
30 <h2>Summary</h2>
31 <div class="devsite-table-wrapper">
32 <table class="responsive">
33 <thead>
34 <tr>
Andrea Falcone80f1a8f2022-08-23 11:22:33 -040035 <th colspan="100%"><h3>Public fields</h3></th>
Tiem Song6fed3de2021-06-14 14:48:10 -070036 </tr>
37 </thead>
Andrea Falcone80f1a8f2022-08-23 11:22:33 -040038 <tbody class="list">
Tiem Song6fed3de2021-06-14 14:48:10 -070039 <tr>
40 <td width="40%"><code>abstract int</code></td>
41 <td>
42 <div><code><a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#index()">index</a></code></div>
43 <p>The index of the item in the list.</p>
44 </td>
45 </tr>
46 <tr>
47 <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>
48 <td>
49 <div><code><a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#key()">key</a></code></div>
50 <p>The key of the item which was passed to the item() or items() function.</p>
51 </td>
52 </tr>
53 <tr>
54 <td width="40%"><code>abstract int</code></td>
55 <td>
56 <div><code><a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#offset()">offset</a></code></div>
57 <p>The main axis offset of the item.</p>
58 </td>
59 </tr>
60 <tr>
61 <td width="40%"><code>abstract int</code></td>
62 <td>
63 <div><code><a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#size()">size</a></code></div>
64 <p>The main axis size of the item.</p>
65 </td>
66 </tr>
67 </tbody>
68 </table>
69 </div>
70 <h2>Public fields</h2>
71 <div><a name="getIndex()"></a><a name="setIndex()"></a><a name="getIndex--"></a><a name="setIndex--"></a>
72 <h3 class="api-name" id="index()">index</h3>
Owen Grayb31b2462021-08-24 14:38:24 -040073 <pre class="api-signature no-pretty-print">abstract&nbsp;int&nbsp;<a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#index()">index</a></pre>
Tiem Song6fed3de2021-06-14 14:48:10 -070074 <p>The index of the item in the list.</p>
75 </div>
76 <div><a name="getKey()"></a><a name="setKey()"></a><a name="getKey--"></a><a name="setKey--"></a>
77 <h3 class="api-name" id="key()">key</h3>
Owen Grayb31b2462021-08-24 14:38:24 -040078 <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>
Tiem Song6fed3de2021-06-14 14:48:10 -070079 <p>The key of the item which was passed to the item() or items() function.</p>
80 </div>
81 <div><a name="getOffset()"></a><a name="setOffset()"></a><a name="getOffset--"></a><a name="setOffset--"></a>
82 <h3 class="api-name" id="offset()">offset</h3>
Owen Grayb31b2462021-08-24 14:38:24 -040083 <pre class="api-signature no-pretty-print">abstract&nbsp;int&nbsp;<a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#offset()">offset</a></pre>
Tiem Song6fed3de2021-06-14 14:48:10 -070084 <p>The main axis offset of the item. It is relative to the start of the lazy list container.</p>
85 </div>
86 <div><a name="getSize()"></a><a name="setSize()"></a><a name="getSize--"></a><a name="setSize--"></a>
87 <h3 class="api-name" id="size()">size</h3>
Owen Grayb31b2462021-08-24 14:38:24 -040088 <pre class="api-signature no-pretty-print">abstract&nbsp;int&nbsp;<a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#size()">size</a></pre>
Tiem Song6fed3de2021-06-14 14:48:10 -070089 <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>
90 </div>
91 </body>
92</html>