Card

interface Card<T : Modifier> : Layout<T> , Interactable

M3 填充卡片 (Filled Card) 的参数接口。 此接口代表了一个可交互的组件。

Inheritors

Functions

Link copied to clipboard
abstract fun DisposableEffect(disposableEffectBuilder: DisposableEffect.() -> Unit)
Link copied to clipboard
Link copied to clipboard
abstract fun <V> getCompositionLocalValue(compositionLocal: ProvidableCompositionLocal<V>): V?

获取 compositionLocal 的值

Link copied to clipboard
abstract fun getContext(): ScriptContext

获取脚本上下文对象 ScriptContext.

Link copied to clipboard
abstract fun LaunchedEffect(launchedEffectBuilder: LaunchedEffect.() -> Unit)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun setBorder(borderBuilder: BorderStroke.() -> Unit)

设置卡片周围绘制的边框。

Link copied to clipboard
abstract fun setColors(colors: CardColors.() -> Unit)

设置用于解析此卡片颜色的 CardColors

Link copied to clipboard
abstract fun setContent(contentBuilder: ColumnScopeSlot.() -> Unit)

设置卡片的内容。

Link copied to clipboard
abstract fun setElevation(elevationBuilder: CardElevation.() -> Unit)

设置用于解析此卡片阴影的 CardElevation

Link copied to clipboard
abstract fun setEnabled(enabled: Boolean)

设置卡片的启用状态。

Link copied to clipboard
abstract fun setInteractionSource(interactionSource: MutableInteractionSource)

设置用于观察和发出此组件交互的 MutableInteractionSource

Link copied to clipboard
abstract fun setModifier(modifierBuilder: T.() -> Unit)
Link copied to clipboard
abstract fun setOnClick(onClick: () -> Unit)

设置点击卡片时调用的函数。

Link copied to clipboard
abstract fun setShape(shapeBuilder: (Shapes) -> Shape)

设置卡片的形状。

Link copied to clipboard
abstract fun setVisible(visible: Boolean)

设置显示/隐藏当前 Composable

Link copied to clipboard
abstract fun SideEffect(sideEffectBuilder: SideEffect.() -> Unit)
Link copied to clipboard

设置所有需要用到的聚合状态,例如 DrawerState, BottomSheetState 等

Link copied to clipboard
abstract fun trackSingleState(state: SingleState)

添加当前 Composable 需要监听的状态,如果状态改变的话 Composable 会重组