Tiem Song | 6fed3de | 2021-06-14 14:48:10 -0700 | [diff] [blame] | 1 | <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 Song | 6f896de | 2022-11-03 14:55:52 -0700 | [diff] [blame^] | 8 | <div id="metadata-info-block"></div> |
Tiem Song | 6fed3de | 2021-06-14 14:48:10 -0700 | [diff] [blame] | 9 | <h1>LazyListItemInfo</h1> |
Tiem Song | 6fed3de | 2021-06-14 14:48:10 -0700 | [diff] [blame] | 10 | <p> |
Owen Gray | 22f2057 | 2022-08-08 13:48:02 -0400 | [diff] [blame] | 11 | <pre>public interface <a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html">LazyListItemInfo</a></pre> |
Tiem Song | 6fed3de | 2021-06-14 14:48:10 -0700 | [diff] [blame] | 12 | </p> |
| 13 | <hr> |
Paweł Marks | 4724d6f | 2021-12-22 17:11:51 +0100 | [diff] [blame] | 14 | <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 Song | 6fed3de | 2021-06-14 14:48:10 -0700 | [diff] [blame] | 15 | <div class="devsite-table-wrapper"> |
| 16 | <table class="responsive"> |
| 17 | <thead> |
| 18 | <tr> |
Andrea Falcone | 80f1a8f | 2022-08-23 11:22:33 -0400 | [diff] [blame] | 19 | <th colspan="100%">See also</th> |
Tiem Song | 6fed3de | 2021-06-14 14:48:10 -0700 | [diff] [blame] | 20 | </tr> |
| 21 | </thead> |
Andrea Falcone | 80f1a8f | 2022-08-23 11:22:33 -0400 | [diff] [blame] | 22 | <tbody class="list"> |
Tiem Song | 6fed3de | 2021-06-14 14:48:10 -0700 | [diff] [blame] | 23 | <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 Falcone | 80f1a8f | 2022-08-23 11:22:33 -0400 | [diff] [blame] | 35 | <th colspan="100%"><h3>Public fields</h3></th> |
Tiem Song | 6fed3de | 2021-06-14 14:48:10 -0700 | [diff] [blame] | 36 | </tr> |
| 37 | </thead> |
Andrea Falcone | 80f1a8f | 2022-08-23 11:22:33 -0400 | [diff] [blame] | 38 | <tbody class="list"> |
Tiem Song | 6fed3de | 2021-06-14 14:48:10 -0700 | [diff] [blame] | 39 | <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 Gray | b31b246 | 2021-08-24 14:38:24 -0400 | [diff] [blame] | 73 | <pre class="api-signature no-pretty-print">abstract int <a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#index()">index</a></pre> |
Tiem Song | 6fed3de | 2021-06-14 14:48:10 -0700 | [diff] [blame] | 74 | <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 Gray | b31b246 | 2021-08-24 14:38:24 -0400 | [diff] [blame] | 78 | <pre class="api-signature no-pretty-print">abstract @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a> <a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#key()">key</a></pre> |
Tiem Song | 6fed3de | 2021-06-14 14:48:10 -0700 | [diff] [blame] | 79 | <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 Gray | b31b246 | 2021-08-24 14:38:24 -0400 | [diff] [blame] | 83 | <pre class="api-signature no-pretty-print">abstract int <a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#offset()">offset</a></pre> |
Tiem Song | 6fed3de | 2021-06-14 14:48:10 -0700 | [diff] [blame] | 84 | <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 Gray | b31b246 | 2021-08-24 14:38:24 -0400 | [diff] [blame] | 88 | <pre class="api-signature no-pretty-print">abstract int <a href="/reference/androidx/compose/foundation/lazy/LazyListItemInfo.html#size()">size</a></pre> |
Tiem Song | 6fed3de | 2021-06-14 14:48:10 -0700 | [diff] [blame] | 89 | <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> |