LazyVerticalGridScope

Interface

Android
@JvmDefaultWithCompatibility

@LazyScopeMarker
interface LazyVerticalGridScope

Receiver scope which is used by LazyColumn.

Functions

fun item(itemId: Long = UnspecifiedItemId, content: @Composable LazyItemScope.() -> Unit)

Adds a single item.

Parameters

itemIda stable and unique id representing the item. The value may not be less than or equal to -2^62, as these values are reserved by the Glance API. Specifying the list item ids will maintain the scroll position through app widget updates in Android S and higher devices.
contentthe content of the item
fun items(
        count: Int,
        itemId: ((index: Int) -> Long) = { UnspecifiedItemId },
        itemContent: @Composable LazyItemScope.(index: Int) -> Unit
    )

Adds a count of items.

Parameters

countthe count of items
itemIda factory of stable and unique ids representing the item. The value may not be less than or equal to -2^62, as these values are reserved by the Glance API. Specifying the list item ids will maintain the scroll position through app widget updates in Android S and higher devices.
itemContentthe content displayed by a single item