androidx.wear.compose.foundation.lazy

Interfaces

ScalingLazyListItemInfo

Contains useful information about an individual item in a ScalingLazyColumn.

ScalingLazyListItemScope

Receiver scope being used by the item content parameter of ScalingLazyColumn.

ScalingLazyListLayoutInfo

Contains useful information about the currently displayed layout state of ScalingLazyColumn.

ScalingLazyListScope

Receiver scope which is used by ScalingLazyColumn.

ScalingParams

Parameters to control the scaling of the contents of a ScalingLazyColumn.

TransformingLazyColumnItemScope

Receiver scope being used by the item content parameter of TransformingLazyColumn.

TransformingLazyColumnLayoutInfo

Holds the layout information for a TransformingLazyColumn.

TransformingLazyColumnScope

Receiver scope which is used by TransformingLazyColumn.

TransformingLazyColumnVisibleItemInfo

Represents an item that is visible in the TransformingLazyColumn component.

Classes

AutoCenteringParams

Parameters to determine which list item and offset to calculate auto-centering spacing for.

ScalingLazyListAnchorType
ScalingLazyListState

A state object that can be hoisted to control and observe scrolling.

TransformingLazyColumnItemScrollProgress

Scroll progress of an item in a TransformingLazyColumn before any modifications to the item's height are applied (using TransformingLazyColumnItemScope.transformedHeight modifier).

TransformingLazyColumnState

A state object that can be hoisted to control and observe scrolling in a TransformingLazyColumn.

Objects

ScalingLazyColumnDefaults

Contains the default values used by ScalingLazyColumn

TransformingLazyColumnDefaults

Contains the default values used by TransformingLazyColumn

Annotations

ScalingLazyScopeMarker

DSL marker used to distinguish between lazy layout scope and the item scope.

TransformingLazyColumnScopeMarker

DSL marker used to distinguish between lazy layout scope and the item scope.

Composables

ScalingLazyColumn

A scrolling scaling/fisheye list component that forms a key part of the Wear Material Design language.

TransformingLazyColumn

The vertically scrolling list that only composes and lays out the currently visible items.

rememberScalingLazyListState

Creates a ScalingLazyListState that is remembered across compositions.

rememberTransformingLazyColumnState

Creates a TransformingLazyColumnState that is remembered across compositions.

Extension functions summary

inline Unit
<T : Any?> ScalingLazyListScope.items(
    items: Array<T>,
    noinline key: ((item) -> Any)?,
    crossinline itemContent: @Composable ScalingLazyListItemScope.(item) -> Unit
)

Adds an array of items.

inline Unit
<T : Any?> ScalingLazyListScope.items(
    items: List<T>,
    noinline key: ((item) -> Any)?,
    crossinline itemContent: @Composable ScalingLazyListItemScope.(item) -> Unit
)

Adds a list of items.

inline Unit
<T : Any?> TransformingLazyColumnScope.items(
    items: List<T>,
    noinline key: ((item) -> Any)?,
    noinline contentType: (item) -> Any?,
    crossinline itemContent: @Composable TransformingLazyColumnItemScope.(item) -> Unit
)

Adds a list of items.

inline Unit
<T : Any?> ScalingLazyListScope.itemsIndexed(
    items: Array<T>,
    noinline key: ((index: Int, item) -> Any)?,
    crossinline itemContent: @Composable ScalingLazyListItemScope.(index: Int, item) -> Unit
)

Adds an array of items where the content of an item is aware of its index.

inline Unit
<T : Any?> ScalingLazyListScope.itemsIndexed(
    items: List<T>,
    noinline key: ((index: Int, item) -> Any)?,
    crossinline itemContent: @Composable ScalingLazyListItemScope.(index: Int, item) -> Unit
)

Adds a list of items where the content of an item is aware of its index.

inline Unit
<T : Any?> TransformingLazyColumnScope.itemsIndexed(
    items: List<T>,
    noinline key: ((index: Int, item) -> Any)?,
    crossinline contentType: (index: Int, item) -> Any?,
    crossinline itemContent: @Composable TransformingLazyColumnItemScope.(index: Int, item) -> Unit
)

Adds a list of items where the content of an item is aware of its index.

Extension functions

ScalingLazyListScope.items

inline fun <T : Any?> ScalingLazyListScope.items(
    items: Array<T>,
    noinline key: ((item) -> Any)? = null,
    crossinline itemContent: @Composable ScalingLazyListItemScope.(item) -> Unit
): Unit

Adds an array of items.

Parameters
items: Array<T>

the data array

noinline key: ((item) -> Any)? = null

a factory of stable and unique keys representing the item. Using the same key for multiple items in the list is not allowed. Type of the key should be saveable via Bundle on Android. If null is passed the position in the list will represent the key. When you specify the key the scroll position will be maintained based on the key, which means if you add/remove items before the current visible item the item with the given key will be kept as the first visible one.

crossinline itemContent: @Composable ScalingLazyListItemScope.(item) -> Unit

the content displayed by a single item

ScalingLazyListScope.items

inline fun <T : Any?> ScalingLazyListScope.items(
    items: List<T>,
    noinline key: ((item) -> Any)? = null,
    crossinline itemContent: @Composable ScalingLazyListItemScope.(item) -> Unit
): Unit

Adds a list of items.

Parameters
items: List<T>

the data list

noinline key: ((item) -> Any)? = null

a factory of stable and unique keys representing the item. Using the same key for multiple items in the list is not allowed. Type of the key should be saveable via Bundle on Android. If null is passed the position in the list will represent the key. When you specify the key the scroll position will be maintained based on the key, which means if you add/remove items before the current visible item the item with the given key will be kept as the first visible one.

crossinline itemContent: @Composable ScalingLazyListItemScope.(item) -> Unit

the content displayed by a single item

TransformingLazyColumnScope.items

inline fun <T : Any?> TransformingLazyColumnScope.items(
    items: List<T>,
    noinline key: ((item) -> Any)? = null,
    noinline contentType: (item) -> Any? = { null },
    crossinline itemContent: @Composable TransformingLazyColumnItemScope.(item) -> Unit
): Unit

Adds a list of items.

Parameters
items: List<T>

the data list

noinline key: ((item) -> Any)? = null

a factory of stable and unique keys representing the item. Using the same key for multiple items in the TransformingLazyColumn is not allowed. Type of the key should be saveable via Bundle on Android. If null is passed the position in the TransformingLazyColumn will represent the key. When you specify the key the scroll position will be maintained based on the key, which means if you add/remove items before the current visible item the item with the given key will be kept as the first visible one.

noinline contentType: (item) -> Any? = { null }

a factory of the content types for the item. The item compositions of the same type could be reused more efficiently. Note that null is a valid type and items of such type will be considered compatible.

crossinline itemContent: @Composable TransformingLazyColumnItemScope.(item) -> Unit

the content displayed by a single item.

ScalingLazyListScope.itemsIndexed

inline fun <T : Any?> ScalingLazyListScope.itemsIndexed(
    items: Array<T>,
    noinline key: ((index: Int, item) -> Any)? = null,
    crossinline itemContent: @Composable ScalingLazyListItemScope.(index: Int, item) -> Unit
): Unit

Adds an array of items where the content of an item is aware of its index.

Parameters
items: Array<T>

the data array

noinline key: ((index: Int, item) -> Any)? = null

a factory of stable and unique keys representing the item. Using the same key for multiple items in the list is not allowed. Type of the key should be saveable via Bundle on Android. If null is passed the position in the list will represent the key. When you specify the key the scroll position will be maintained based on the key, which means if you add/remove items before the current visible item the item with the given key will be kept as the first visible one.

crossinline itemContent: @Composable ScalingLazyListItemScope.(index: Int, item) -> Unit

the content displayed by a single item

ScalingLazyListScope.itemsIndexed

inline fun <T : Any?> ScalingLazyListScope.itemsIndexed(
    items: List<T>,
    noinline key: ((index: Int, item) -> Any)? = null,
    crossinline itemContent: @Composable ScalingLazyListItemScope.(index: Int, item) -> Unit
): Unit

Adds a list of items where the content of an item is aware of its index.

Parameters
items: List<T>

the data list

noinline key: ((index: Int, item) -> Any)? = null

a factory of stable and unique keys representing the item. Using the same key for multiple items in the list is not allowed. Type of the key should be saveable via Bundle on Android. If null is passed the position in the list will represent the key. When you specify the key the scroll position will be maintained based on the key, which means if you add/remove items before the current visible item the item with the given key will be kept as the first visible one.

crossinline itemContent: @Composable ScalingLazyListItemScope.(index: Int, item) -> Unit

the content displayed by a single item

TransformingLazyColumnScope.itemsIndexed

inline fun <T : Any?> TransformingLazyColumnScope.itemsIndexed(
    items: List<T>,
    noinline key: ((index: Int, item) -> Any)? = null,
    crossinline contentType: (index: Int, item) -> Any? = { _, _ -> null },
    crossinline itemContent: @Composable TransformingLazyColumnItemScope.(index: Int, item) -> Unit
): Unit

Adds a list of items where the content of an item is aware of its index.

Parameters
items: List<T>

the data list

noinline key: ((index: Int, item) -> Any)? = null

a factory of stable and unique keys representing the item. Using the same key for multiple items in the TransformingLazyColumn is not allowed. Type of the key should be saveable via Bundle on Android. If null is passed the position in the list will represent the key. When you specify the key the scroll position will be maintained based on the key, which means if you add/remove items before the current visible item the item with the given key will be kept as the first visible one.

crossinline contentType: (index: Int, item) -> Any? = { _, _ -> null }

a factory of the content types for the item. The item compositions of the same type could be reused more efficiently. Note that null is a valid type and items of such type will be considered compatible.

crossinline itemContent: @Composable TransformingLazyColumnItemScope.(index: Int, item) -> Unit

the content displayed by a single item