ToggleButtonDefaults
Contains the default values for all five toggle button types.
Summary
Public functions |
||
|---|---|---|
ToggleButtonColors |
Creates a |
Cmn
|
ToggleButtonColors |
@ComposableCreates a |
Cmn
|
ToggleButtonColors |
Creates a |
Cmn
|
ToggleButtonColors |
@ComposableCreates a |
Cmn
|
ToggleButtonShapes |
Creates a |
Cmn
|
ToggleButtonShapes |
@ComposableCreates a |
Cmn
|
ToggleButtonShapes |
@ComposableRecommended |
Cmn
|
ToggleButtonColors |
Creates a |
Cmn
|
ToggleButtonColors |
@ComposableCreates a |
Cmn
|
ToggleButtonColors |
Creates a |
Cmn
|
ToggleButtonColors |
@ComposableCreates a |
Cmn
|
Public properties |
||
|---|---|---|
PaddingValues |
The default content padding used by all toggle buttons. |
Cmn
|
Dp |
The default size of the spacing between an icon and a text when they used inside any toggle button. |
Cmn
|
Dp |
The default size of the spacing between an icon and a text when they used inside any toggle button. |
Cmn
|
Dp |
The default min height applied for all toggle buttons. |
Cmn
|
Shape |
The default checked shape for |
Cmn
|
Shape |
The default checked square shape for a extra large toggle button |
Cmn
|
Shape |
The default pressed shape for a extra large toggle button |
Cmn
|
Shape |
The default square shape for a extra large toggle button |
Cmn
|
Shape |
The default checked square shape for a extra small toggle button |
Cmn
|
Shape |
The default pressed shape for a extra small toggle button |
Cmn
|
Shape |
The default square shape for a extra small toggle button |
Cmn
|
Shape |
The default checked square shape for a large toggle button |
Cmn
|
Shape |
The default pressed shape for a large toggle button |
Cmn
|
Shape |
The default square shape for a large toggle button |
Cmn
|
Shape |
The default checked square shape for a medium toggle button |
Cmn
|
Shape |
The default pressed shape for a medium toggle button |
Cmn
|
Shape |
The default square shape for a medium toggle button |
Cmn
|
Shape |
The default pressed shape for |
Cmn
|
Shape |
A round shape that can be used for all |
Cmn
|
Shape |
The default unchecked shape for |
Cmn
|
Shape |
A square shape that can be used for all |
Cmn
|
Public functions
elevatedToggleButtonColors
@Composable
fun elevatedToggleButtonColors(): ToggleButtonColors
Creates a ToggleButtonColors that represents the default container and content colors used in a ElevatedToggleButton.
elevatedToggleButtonColors
@Composable
fun elevatedToggleButtonColors(
containerColor: Color = Color.Unspecified,
contentColor: Color = Color.Unspecified,
disabledContainerColor: Color = Color.Unspecified,
disabledContentColor: Color = Color.Unspecified,
checkedContainerColor: Color = Color.Unspecified,
checkedContentColor: Color = Color.Unspecified
): ToggleButtonColors
Creates a ToggleButtonColors that represents the default container and content colors used in a ElevatedToggleButton.
| Parameters | |
|---|---|
containerColor: Color = Color.Unspecified |
the container color of this |
contentColor: Color = Color.Unspecified |
the content color of this |
disabledContainerColor: Color = Color.Unspecified |
the container color of this |
disabledContentColor: Color = Color.Unspecified |
the content color of this |
checkedContainerColor: Color = Color.Unspecified |
the container color of this |
checkedContentColor: Color = Color.Unspecified |
the content color of this |
outlinedToggleButtonColors
@Composable
fun outlinedToggleButtonColors(): ToggleButtonColors
Creates a ToggleButtonColors that represents the default container and content colors used in a OutlinedToggleButton.
outlinedToggleButtonColors
@Composable
fun outlinedToggleButtonColors(
containerColor: Color = Color.Unspecified,
contentColor: Color = Color.Unspecified,
disabledContainerColor: Color = Color.Unspecified,
disabledContentColor: Color = Color.Unspecified,
checkedContainerColor: Color = Color.Unspecified,
checkedContentColor: Color = Color.Unspecified
): ToggleButtonColors
Creates a ToggleButtonColors that represents the default container and content colors used in a OutlinedToggleButton.
| Parameters | |
|---|---|
containerColor: Color = Color.Unspecified |
the container color of this |
contentColor: Color = Color.Unspecified |
the content color of this |
disabledContainerColor: Color = Color.Unspecified |
the container color of this |
disabledContentColor: Color = Color.Unspecified |
the content color of this |
checkedContainerColor: Color = Color.Unspecified |
the container color of this |
checkedContentColor: Color = Color.Unspecified |
the content color of this |
shapes
@Composable
fun shapes(): ToggleButtonShapes
Creates a ToggleButtonShapes that represents the default shape, pressedShape, and checkedShape used in a ToggleButton.
shapes
@Composable
fun shapes(shape: Shape? = null, pressedShape: Shape? = null, checkedShape: Shape? = null): ToggleButtonShapes
Creates a ToggleButtonShapes that represents the default shape, pressedShape, and checkedShape used in a ToggleButton and its variants.
| Parameters | |
|---|---|
shape: Shape? = null |
the unchecked shape for |
pressedShape: Shape? = null |
the unchecked shape for |
checkedShape: Shape? = null |
the unchecked shape for |
shapesFor
@Composable
fun shapesFor(buttonHeight: Dp): ToggleButtonShapes
Recommended ToggleButtonShapes for a provided toggle button height.
| Parameters | |
|---|---|
buttonHeight: Dp |
The height of the button |
toggleButtonColors
@Composable
fun toggleButtonColors(): ToggleButtonColors
Creates a ToggleButtonColors that represents the default container and content colors used in a ToggleButton.
toggleButtonColors
@Composable
fun toggleButtonColors(
containerColor: Color = Color.Unspecified,
contentColor: Color = Color.Unspecified,
disabledContainerColor: Color = Color.Unspecified,
disabledContentColor: Color = Color.Unspecified,
checkedContainerColor: Color = Color.Unspecified,
checkedContentColor: Color = Color.Unspecified
): ToggleButtonColors
Creates a ToggleButtonColors that represents the default container and content colors used in a ToggleButton.
| Parameters | |
|---|---|
containerColor: Color = Color.Unspecified |
the container color of this |
contentColor: Color = Color.Unspecified |
the content color of this |
disabledContainerColor: Color = Color.Unspecified |
the container color of this |
disabledContentColor: Color = Color.Unspecified |
the content color of this |
checkedContainerColor: Color = Color.Unspecified |
the container color of this |
checkedContentColor: Color = Color.Unspecified |
the content color of this |
tonalToggleButtonColors
@Composable
fun tonalToggleButtonColors(): ToggleButtonColors
Creates a ToggleButtonColors that represents the default container and content colors used in a TonalToggleButton.
tonalToggleButtonColors
@Composable
fun tonalToggleButtonColors(
containerColor: Color = Color.Unspecified,
contentColor: Color = Color.Unspecified,
disabledContainerColor: Color = Color.Unspecified,
disabledContentColor: Color = Color.Unspecified,
checkedContainerColor: Color = Color.Unspecified,
checkedContentColor: Color = Color.Unspecified
): ToggleButtonColors
Creates a ToggleButtonColors that represents the default container and content colors used in a TonalToggleButton.
| Parameters | |
|---|---|
containerColor: Color = Color.Unspecified |
the container color of this |
contentColor: Color = Color.Unspecified |
the content color of this |
disabledContainerColor: Color = Color.Unspecified |
the container color of this |
disabledContentColor: Color = Color.Unspecified |
the content color of this |
checkedContainerColor: Color = Color.Unspecified |
the container color of this |
checkedContentColor: Color = Color.Unspecified |
the content color of this |
Public properties
ContentPadding
val ContentPadding: PaddingValues
The default content padding used by all toggle buttons.
IconSize
val IconSize: Dp
The default size of the spacing between an icon and a text when they used inside any toggle button.
IconSpacing
val IconSpacing: Dp
The default size of the spacing between an icon and a text when they used inside any toggle button.
MinHeight
val MinHeight: Dp
The default min height applied for all toggle buttons. Note that you can override it by applying Modifier.heightIn directly on the toggle button composable.
extraLargeCheckedSquareShape
val extraLargeCheckedSquareShape: Shape
The default checked square shape for a extra large toggle button
extraLargePressedShape
val extraLargePressedShape: Shape
The default pressed shape for a extra large toggle button
extraLargeSquareShape
val extraLargeSquareShape: Shape
The default square shape for a extra large toggle button
extraSmallCheckedSquareShape
val extraSmallCheckedSquareShape: Shape
The default checked square shape for a extra small toggle button
extraSmallPressedShape
val extraSmallPressedShape: Shape
The default pressed shape for a extra small toggle button
extraSmallSquareShape
val extraSmallSquareShape: Shape
The default square shape for a extra small toggle button
largeCheckedSquareShape
val largeCheckedSquareShape: Shape
The default checked square shape for a large toggle button
mediumCheckedSquareShape
val mediumCheckedSquareShape: Shape
The default checked square shape for a medium toggle button
mediumPressedShape
val mediumPressedShape: Shape
The default pressed shape for a medium toggle button
roundShape
val roundShape: Shape
A round shape that can be used for all ToggleButtons and its variants
squareShape
val squareShape: Shape
A square shape that can be used for all ToggleButtons and its variants