NavigationRail

interface NavigationRail<T : Modifier> : Layout<T>

Material Design 导航栏.

导航栏在使用平板和桌面屏幕时提供对应用程序主要目标的访问。

Author

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

See also

androidx.compose.material3.NavigationRail

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 setContainerColor(colorBuilder: Color.() -> Unit)

设置此导航栏背景的颜色。

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

设置此导航栏的内容,通常是 3-7 个 NavigationRailItem

Link copied to clipboard
abstract fun setContentColor(colorBuilder: Color.() -> Unit)

设置此导航栏内部内容的首选颜色。

Link copied to clipboard
abstract fun setHeader(slotBuilder: ColumnScopeSlot.() -> Unit)

设置可选的头部内容,可能包含一个浮动操作按钮(FAB)或 Logo。

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

设置显示/隐藏当前 Composable

Link copied to clipboard
abstract fun setWindowInsets(windowInsets: (WindowInsetsProviders) -> WindowInsets)

设置导航栏的窗口边衬区。

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