Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface SelectableLazyItemScope : LazyItemScope
Link copied to clipboard

Represents a selectable key used in a selectable lazy list.

Link copied to clipboard

Interface defining the scope for building a selectable lazy list.

Link copied to clipboard
class SelectableLazyListState(val lazyListState: LazyListState) : ScrollableState, SelectableScope

State object for a selectable lazy list, which extends ScrollableState.

Link copied to clipboard
interface SelectableScope
Link copied to clipboard

Specifies the selection mode for a selectable lazy list.

Properties

Functions

Link copied to clipboard
fun <T : Any> SelectableLazyListScope.items(items: List<T>, key: (item: T) -> Any = { it }, contentType: (item: T) -> Any? = { it }, selectable: (item: T) -> Boolean = { true }, itemContent: @Composable SelectableLazyItemScope.(item: T) -> Unit)
Link copied to clipboard
fun <T : Any> SelectableLazyListScope.itemsIndexed(items: List<T>, key: (index: Int, item: T) -> Any = { _, item -> item }, contentType: (index: Int, item: T) -> Any? = { _, item -> item }, selectable: (index: Int, item: T) -> Boolean = { _, _ -> true }, itemContent: @Composable SelectableLazyItemScope.(index: Int, item: T) -> Unit)
Link copied to clipboard
@Composable
fun rememberSelectableLazyListState(firstVisibleItemIndex: Int = 0, firstVisibleItemScrollOffset: Int = 0): SelectableLazyListState

Remembers the state of a selectable lazy list.

Link copied to clipboard
@Composable
fun SelectableLazyColumn(modifier: Modifier = Modifier, selectionMode: SelectionMode = SelectionMode.Multiple, state: SelectableLazyListState = rememberSelectableLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, onSelectedIndexesChange: (List<Int>) -> Unit = {}, verticalArrangement: Arrangement.Vertical = if (!reverseLayout) Arrangement.Top else Arrangement.Bottom, horizontalAlignment: Alignment.Horizontal = Alignment.Start, flingBehavior: FlingBehavior = ScrollableDefaults.flingBehavior(), keyActions: KeyActions = DefaultSelectableLazyColumnKeyActions, pointerEventActions: PointerEventActions = DefaultSelectableLazyColumnEventAction(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: SelectableLazyListScope.() -> Unit)

A composable that displays a scrollable and selectable list of items in a column arrangement.

Link copied to clipboard
@Composable
fun LazyItemScope.SelectableLazyItemScope(isSelected: Boolean = false, isActive: Boolean = false): SelectableLazyItemScope