State of Compose 2023 results are in! Click here to learn more

← Back to Foundation

LazyLayoutPinnableItem

Component
in
Foundation
. Since 1.4.0

Overview

Code Examples

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

@param key key of the item inside the lazy layout @param index index of the item inside the lazy layout @param pinnedItemList container of currently pinned items @param content inner content of this item

Note: this function 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.

Overloads

LazyLayoutPinnableItem

@ExperimentalFoundationApi
@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 Note: this function 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