URL of codelab
Calculate a custom tip
In which task and step of the codelab can this issue be found?
[Calculate a custom tip]--->[Add a switch]--->[8th code box]
Describe the problem
The switch statement uses a modifier from a higher-level component, causing the "verticalAlignment" field of the row component to malfunction. Specifically, the switch component appears in an unexpected position instead of being vertically centered.
Steps to reproduce?
Switch(
modifier = modifier
.fillMaxWidth()
.wrapContentWidth(Alignment.End),
checked = roundUp,
onCheckedChange = onRoundUpChanged,
)
Versions
Android Studio version: 2025.1.3.7
API version of the emulator: API 36.1
Additional information
just use modifier = Modifier


URL of codelab
Calculate a custom tip
In which task and step of the codelab can this issue be found?
[Calculate a custom tip]--->[Add a switch]--->[8th code box]
Describe the problem
The switch statement uses a modifier from a higher-level component, causing the "verticalAlignment" field of the row component to malfunction. Specifically, the switch component appears in an unexpected position instead of being vertically centered.
Steps to reproduce?
Versions
Android Studio version: 2025.1.3.7
API version of the emulator: API 36.1
Additional information


just use
modifier = Modifier