Item pinned in a lazy layout. Pinned item should be always measured and laid out, even if the item is beyond the boundaries of the layout.
Note: this interface is a part of LazyLayout harness that allows for building custom lazy layouts. LazyLayout and all corresponding APIs are still under development and are subject to change.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-15 UTC.
[null,null,["Last updated 2025-05-15 UTC."],[],[],null,["# LazyLayoutPinnedItemList.PinnedItem\n===================================\n\nArtifact: [androidx.compose.foundation:foundation](/jetpack/androidx/releases/compose-foundation) \n[View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/lazy/layout/LazyLayoutPinnableItem.kt+class:androidx.compose.foundation.lazy.layout.LazyLayoutPinnedItemList.PinnedItem) \nAdded in [1.4.0](/jetpack/androidx/releases/compose-foundation#1.4.0)\nCommon/AllAndroid/JVM\n - Cmn \n\n ```\n sealed interface LazyLayoutPinnedItemList.PinnedItem\n ```\n\n*** ** * ** ***\n\nItem pinned in a lazy layout. Pinned item should be always measured and laid out, even if the item is beyond the boundaries of the layout.\n\nNote: this interface is a part of [LazyLayout](/reference/kotlin/androidx/compose/foundation/lazy/layout/package-summary#LazyLayout(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.layout.LazyLayoutPrefetchState,kotlin.Function2)) harness that allows for building custom lazy layouts. LazyLayout and all corresponding APIs are still under development and are subject to change.\n\nSummary\n-------\n\n| ### Public properties |\n|--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|-----|\n| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [index](/reference/kotlin/androidx/compose/foundation/lazy/layout/LazyLayoutPinnedItemList.PinnedItem#index()) Last known index of the pinned item. | Cmn |\n| [Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?` | [key](/reference/kotlin/androidx/compose/foundation/lazy/layout/LazyLayoutPinnedItemList.PinnedItem#key()) Key of the pinned item. | Cmn |\n\nPublic properties\n-----------------\n\n### index\n\nCmn \nAdded in [1.4.0](/jetpack/androidx/releases/compose-foundation#1.4.0) \n\n```\nval index: Int\n```\n\nLast known index of the pinned item. Note: it is possible for index to change during lifetime of the object. \n\n### key\n\nCmn \nAdded in [1.4.0](/jetpack/androidx/releases/compose-foundation#1.4.0) \n\n```\nval key: Any?\n```\n\nKey of the pinned item."]]