Thumb

interface Thumb<T : Modifier> : Widget<T> , Interactable

SliderRangeSlider 的默认拇指(可拖动部分)的视觉组件。

See also

androidx.compose.material3.SliderDefaults.Thumb

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 setColors(colors: SliderColors.() -> Unit)

配置此拇指在不同状态下的颜色。

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 setThumbSize(builder: (Dimensions) -> DpSize)

设置拇指的尺寸。

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 会重组