LazyRow

interface LazyRow<T : Modifier> : LazyList<T>

表示一个横向滚动的懒加载列表,它只合成和布局当前可见的项目。 内容 DSL 允许您发出不同类型的项目。

Author

M8Test, [email protected], https://m8test.com

See also

androidx.compose.foundation.lazy.LazyRow

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

获取其子项的水平排列方式。

Link copied to clipboard

获取应用于其子项的垂直对齐方式。

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 setContent(lazyListScopeBuilder: LazyListScope.() -> Unit)

设置描述列表内容的块。 在此块内部,您可以使用 LazyListScope.item 添加单个项目或 LazyListScope.items 添加项目列表等。

Link copied to clipboard
abstract fun setContentPadding(paddingValuesBuilder: PaddingValues.() -> Unit)

设置整个内容周围的内边距。 这将在内容裁剪后为其添加内边距,可用于在第一个项目之前或最后一个项目之后添加间距。

Link copied to clipboard
abstract fun setHorizontalArrangement(builder: (arrangements: RowArrangements) -> ArrangementHorizontal)

设置其子项的水平排列方式。 这允许在项目之间添加间距,并指定当项目不足以填充整个最小尺寸时的排列方式。

Link copied to clipboard
abstract fun setModifier(modifierBuilder: T.() -> Unit)
Link copied to clipboard
abstract fun setReverseLayout(value: Boolean)

设置是否反向滚动和布局方向。当为 true 时,项目将按相反顺序布局。

Link copied to clipboard
abstract fun setState(state: LazyListState)

设置用于控制或观察列表状态的 LazyListState 对象。

Link copied to clipboard
abstract fun setUserScrollEnabled(value: Boolean)

设置是否允许通过用户手势或无障碍操作进行滚动。 禁用后,仍可以通过状态以编程方式滚动。

Link copied to clipboard
abstract fun setVerticalAlignment(builder: (alignments: RowAlignments) -> AlignmentVertical)

设置应用于其子项的垂直对齐方式。

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