We just launched Compose Examples featuring over 150+ components! Check it out →

LazyLayoutPinnableItem

Common

Component in Compose Foundation

Wrapper supporting [PinnableContainer] in lazy layout items. Each pinned item is considered important to keep alive even if it would be discarded otherwise.

Last updated:

Installation

dependencies {
   implementation("androidx.compose.foundation:foundation:1.8.0-alpha03")
}

Overloads

@Composable
fun LazyLayoutPinnableItem(
    key: Any?,
    index: Int,
    pinnedItemList: LazyLayoutPinnedItemList,
    content: @Composable () -> Unit
)

Parameters

namedescription
keykey of the item inside the lazy layout
indexindex of the item inside the lazy layout
pinnedItemListcontainer of currently pinned items
contentinner content of this item
by @alexstyl