ListItemDefaults
-
Cmn
object ListItemDefaults
Contains the default values used by list items.
Summary
Public functions |
||
|---|---|---|
ListItemColors |
Creates a |
Cmn
|
ListItemColors |
@ComposableCreates a |
Cmn
|
ListItemColors |
@ComposableCreates a |
Cmn
|
ListItemElevation |
@ExperimentalMaterial3ExpressiveApiCreates a |
Cmn
|
ListItemColors |
Creates a |
Cmn
|
ListItemColors |
@ExperimentalMaterial3ExpressiveApiCreates a |
Cmn
|
ListItemShapes |
@ExperimentalMaterial3ExpressiveApiConstructor for |
Cmn
|
ListItemShapes |
Creates a |
Cmn
|
ListItemShapes |
@ExperimentalMaterial3ExpressiveApiCreates a |
Cmn
|
Alignment.Vertical |
Returns the default vertical alignment of children content within a |
Cmn
|
Public properties |
||
|---|---|---|
PaddingValues |
The default padding applied to all content within a list item. |
Cmn
|
Dp |
The default elevation of a list item |
Cmn
|
Dp |
The vertical space between different |
Cmn
|
Color |
The container color of a list item |
Cmn
|
Color |
The content color of a list item |
Cmn
|
Shape |
The default shape of a list item |
Cmn
|
Public functions
colors
@Composable
fun colors(): ListItemColors
Creates a ListItemColors that represents the default colors for a ListItem in different states.
colors
@Composable
fun colors(
containerColor: Color = Color.Unspecified,
headlineColor: Color = Color.Unspecified,
leadingIconColor: Color = Color.Unspecified,
overlineColor: Color = Color.Unspecified,
supportingColor: Color = Color.Unspecified,
trailingIconColor: Color = Color.Unspecified,
disabledHeadlineColor: Color = Color.Unspecified,
disabledLeadingIconColor: Color = Color.Unspecified,
disabledTrailingIconColor: Color = Color.Unspecified
): ListItemColors
Creates a ListItemColors that represents the default container and content colors used in a ListItem.
| Parameters | |
|---|---|
containerColor: Color = Color.Unspecified |
the container color of this list item when enabled. |
headlineColor: Color = Color.Unspecified |
the headline text content color of this list item when enabled. |
leadingIconColor: Color = Color.Unspecified |
the color of this list item's leading content when enabled. |
overlineColor: Color = Color.Unspecified |
the overline text color of this list item |
supportingColor: Color = Color.Unspecified |
the supporting text color of this list item |
trailingIconColor: Color = Color.Unspecified |
the color of this list item's trailing content when enabled. |
disabledHeadlineColor: Color = Color.Unspecified |
the content color of this list item when not enabled. |
disabledLeadingIconColor: Color = Color.Unspecified |
the color of this list item's leading content when not enabled. |
disabledTrailingIconColor: Color = Color.Unspecified |
the color of this list item's trailing content when not enabled. |
colors
@Composable
fun colors(
containerColor: Color = Color.Unspecified,
contentColor: Color = Color.Unspecified,
leadingContentColor: Color = Color.Unspecified,
trailingContentColor: Color = Color.Unspecified,
overlineContentColor: Color = Color.Unspecified,
supportingContentColor: Color = Color.Unspecified,
disabledContainerColor: Color = Color.Unspecified,
disabledContentColor: Color = Color.Unspecified,
disabledLeadingContentColor: Color = Color.Unspecified,
disabledTrailingContentColor: Color = Color.Unspecified,
disabledOverlineContentColor: Color = Color.Unspecified,
disabledSupportingContentColor: Color = Color.Unspecified,
selectedContainerColor: Color = Color.Unspecified,
selectedContentColor: Color = Color.Unspecified,
selectedLeadingContentColor: Color = Color.Unspecified,
selectedTrailingContentColor: Color = Color.Unspecified,
selectedOverlineContentColor: Color = Color.Unspecified,
selectedSupportingContentColor: Color = Color.Unspecified,
draggedContainerColor: Color = Color.Unspecified,
draggedContentColor: Color = Color.Unspecified,
draggedLeadingContentColor: Color = Color.Unspecified,
draggedTrailingContentColor: Color = Color.Unspecified,
draggedOverlineContentColor: Color = Color.Unspecified,
draggedSupportingContentColor: Color = Color.Unspecified
): ListItemColors
Creates a ListItemColors that represents the default colors for a ListItem in different states.
| Parameters | |
|---|---|
containerColor: Color = Color.Unspecified |
the container color of the list item. |
contentColor: Color = Color.Unspecified |
the content color of the list item. |
leadingContentColor: Color = Color.Unspecified |
the leading content color of the list item. |
trailingContentColor: Color = Color.Unspecified |
the trailing content color of the list item. |
overlineContentColor: Color = Color.Unspecified |
the overline content color of the list item. |
supportingContentColor: Color = Color.Unspecified |
the supporting content color of the list item. |
disabledContainerColor: Color = Color.Unspecified |
the container color of the list item when disabled. |
disabledContentColor: Color = Color.Unspecified |
the content color of the list item when disabled. |
disabledLeadingContentColor: Color = Color.Unspecified |
the leading content color of the list item when disabled. |
disabledTrailingContentColor: Color = Color.Unspecified |
the trailing content color of the list item when disabled. |
disabledOverlineContentColor: Color = Color.Unspecified |
the overline content color of the list item when disabled. |
disabledSupportingContentColor: Color = Color.Unspecified |
the supporting content color of the list item when disabled. |
selectedContainerColor: Color = Color.Unspecified |
the container color of the list item when selected. |
selectedContentColor: Color = Color.Unspecified |
the content color of the list item when selected. |
selectedLeadingContentColor: Color = Color.Unspecified |
the leading content color of the list item when selected. |
selectedTrailingContentColor: Color = Color.Unspecified |
the trailing content color of the list item when selected. |
selectedOverlineContentColor: Color = Color.Unspecified |
the overline content color of the list item when selected. |
selectedSupportingContentColor: Color = Color.Unspecified |
the supporting content color of the list item when selected. |
draggedContainerColor: Color = Color.Unspecified |
the container color of the list item when dragged. |
draggedContentColor: Color = Color.Unspecified |
the content color of the list item when dragged. |
draggedLeadingContentColor: Color = Color.Unspecified |
the leading content color of the list item when dragged. |
draggedTrailingContentColor: Color = Color.Unspecified |
the trailing content color of the list item when dragged. |
draggedOverlineContentColor: Color = Color.Unspecified |
the overline content color of the list item when dragged. |
draggedSupportingContentColor: Color = Color.Unspecified |
the supporting content color of the list item when dragged. |
elevation
@ExperimentalMaterial3ExpressiveApi
fun elevation(
elevation: Dp = ListTokens.ItemContainerElevation,
draggedElevation: Dp = ListTokens.ItemDraggedContainerElevation
): ListItemElevation
Creates a ListItemElevation that represents the elevation for a ListItem in different states.
segmentedColors
@ExperimentalMaterial3ExpressiveApi
@Composable
fun segmentedColors(): ListItemColors
Creates a ListItemColors that represents the default colors for a SegmentedListItem in different states.
segmentedColors
@ExperimentalMaterial3ExpressiveApi
@Composable
fun segmentedColors(
containerColor: Color = Color.Unspecified,
contentColor: Color = Color.Unspecified,
leadingContentColor: Color = Color.Unspecified,
trailingContentColor: Color = Color.Unspecified,
overlineContentColor: Color = Color.Unspecified,
supportingContentColor: Color = Color.Unspecified,
disabledContainerColor: Color = Color.Unspecified,
disabledContentColor: Color = Color.Unspecified,
disabledLeadingContentColor: Color = Color.Unspecified,
disabledTrailingContentColor: Color = Color.Unspecified,
disabledOverlineContentColor: Color = Color.Unspecified,
disabledSupportingContentColor: Color = Color.Unspecified,
selectedContainerColor: Color = Color.Unspecified,
selectedContentColor: Color = Color.Unspecified,
selectedLeadingContentColor: Color = Color.Unspecified,
selectedTrailingContentColor: Color = Color.Unspecified,
selectedOverlineContentColor: Color = Color.Unspecified,
selectedSupportingContentColor: Color = Color.Unspecified,
draggedContainerColor: Color = Color.Unspecified,
draggedContentColor: Color = Color.Unspecified,
draggedLeadingContentColor: Color = Color.Unspecified,
draggedTrailingContentColor: Color = Color.Unspecified,
draggedOverlineContentColor: Color = Color.Unspecified,
draggedSupportingContentColor: Color = Color.Unspecified
): ListItemColors
Creates a ListItemColors that represents the default colors for a SegmentedListItem in different states.
| Parameters | |
|---|---|
containerColor: Color = Color.Unspecified |
the container color of the list item. |
contentColor: Color = Color.Unspecified |
the content color of the list item. |
leadingContentColor: Color = Color.Unspecified |
the leading content color of the list item. |
trailingContentColor: Color = Color.Unspecified |
the trailing content color of the list item. |
overlineContentColor: Color = Color.Unspecified |
the overline content color of the list item. |
supportingContentColor: Color = Color.Unspecified |
the supporting content color of the list item. |
disabledContainerColor: Color = Color.Unspecified |
the container color of the list item when disabled. |
disabledContentColor: Color = Color.Unspecified |
the content color of the list item when disabled. |
disabledLeadingContentColor: Color = Color.Unspecified |
the leading content color of the list item when disabled. |
disabledTrailingContentColor: Color = Color.Unspecified |
the trailing content color of the list item when disabled. |
disabledOverlineContentColor: Color = Color.Unspecified |
the overline content color of the list item when disabled. |
disabledSupportingContentColor: Color = Color.Unspecified |
the supporting content color of the list item when disabled. |
selectedContainerColor: Color = Color.Unspecified |
the container color of the list item when selected. |
selectedContentColor: Color = Color.Unspecified |
the content color of the list item when selected. |
selectedLeadingContentColor: Color = Color.Unspecified |
the leading content color of the list item when selected. |
selectedTrailingContentColor: Color = Color.Unspecified |
the trailing content color of the list item when selected. |
selectedOverlineContentColor: Color = Color.Unspecified |
the overline content color of the list item when selected. |
selectedSupportingContentColor: Color = Color.Unspecified |
the supporting content color of the list item when selected. |
draggedContainerColor: Color = Color.Unspecified |
the container color of the list item when dragged. |
draggedContentColor: Color = Color.Unspecified |
the content color of the list item when dragged. |
draggedLeadingContentColor: Color = Color.Unspecified |
the leading content color of the list item when dragged. |
draggedTrailingContentColor: Color = Color.Unspecified |
the trailing content color of the list item when dragged. |
draggedOverlineContentColor: Color = Color.Unspecified |
the overline content color of the list item when dragged. |
draggedSupportingContentColor: Color = Color.Unspecified |
the supporting content color of the list item when dragged. |
segmentedShapes
@ExperimentalMaterial3ExpressiveApi
@Composable
fun segmentedShapes(
index: Int,
count: Int,
defaultShapes: ListItemShapes = shapes()
): ListItemShapes
Constructor for ListItemShapes to be used by a SegmentedListItem which has an index in a list that has a total of count items.
| Parameters | |
|---|---|
index: Int |
the index for this list item in the overall list. |
count: Int |
the total count of list items in the overall list. |
defaultShapes: ListItemShapes = shapes() |
the default |
shapes
@ExperimentalMaterial3ExpressiveApi
@Composable
fun shapes(): ListItemShapes
Creates a ListItemShapes that represents the default shapes for a ListItem in different states.
shapes
@ExperimentalMaterial3ExpressiveApi
@Composable
fun shapes(
shape: Shape? = null,
selectedShape: Shape? = null,
pressedShape: Shape? = null,
focusedShape: Shape? = null,
hoveredShape: Shape? = null,
draggedShape: Shape? = null
): ListItemShapes
Creates a ListItemShapes that represents the default shapes for a ListItem in different states.
| Parameters | |
|---|---|
shape: Shape? = null |
the default shape of the list item. |
selectedShape: Shape? = null |
the shape of the list item when selected. |
pressedShape: Shape? = null |
the shape of the list item when pressed. |
focusedShape: Shape? = null |
the shape of the list item when focused. |
hoveredShape: Shape? = null |
the shape of the list item when hovered. |
draggedShape: Shape? = null |
the shape of the list item when dragged. |
verticalAlignment
@ExperimentalMaterial3ExpressiveApi
@Composable
fun verticalAlignment(): Alignment.Vertical
Returns the default vertical alignment of children content within a ListItem. This is equivalent to Alignment.CenterVertically for shorter items and Alignment.Top for taller items.
Public properties
ContentPadding
val ContentPadding: PaddingValues
The default padding applied to all content within a list item.
SegmentedGap
@ExperimentalMaterial3ExpressiveApi
val SegmentedGap: Dp
The vertical space between different SegmentedListItems.