Source set: Common
public object ScrollFieldDefaults
Object to hold defaults used by ScrollField.
Properties
ScrollFieldHeight
Source set: Common
public val ScrollFieldHeight: Dp = 200.dp
The default height for a ScrollField. This can be used as a reference when providing a Modifier.height to the ScrollField to ensure enough vertical space is available to display the typical three-item layout.
shape
Source set: Common
public val shape: Shape
The default shape for the ScrollField container background.
Functions
colors
Source set: Common
@Composable
public fun colors(): ScrollFieldColors
Default colors used by a ScrollField.
colors
Source set: Common
@Composable
public fun colors(
containerColor: Color = Color.Unspecified,
contentColor: Color = Color.Unspecified,
selectedContentColor: Color = Color.Unspecified,
disabledContainerColor: Color = Color.Unspecified,
disabledContentColor: Color = Color.Unspecified,
disabledSelectedContentColor: Color = Color.Unspecified,
): ScrollFieldColors
Creates a ScrollFieldColors that represents the default container, content, and selected colors used in a ScrollField.
Parameters
| containerColor | The color of the ScrollField container, when enabled. |
| contentColor | The color of the numerical value(s) visible on the screen that are not chosen, when enabled. |
| selectedContentColor | The color of the numerical value that is centered and snapped into place, when enabled. |
| disabledContainerColor | The color of the ScrollField container, when disabled. |
| disabledContentColor | The color of the numerical value(s) visible on the screen that are not chosen, when disabled. |
| disabledSelectedContentColor | The color of the numerical value that is centered and snapped into place, when disabled. |
Item
Source set: Common
@Composable
public fun Item(
index: Int,
selected: Boolean,
enabled: Boolean = true,
colors: ScrollFieldColors = colors(),
)
The default item implementation for ScrollField.
Parameters
| index | the current item index. |
| selected | whether this item is currently selected (centered). |
| enabled | whether this item is currently enabled. |
| colors | the colors to use for the text content. |