URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-calculate-tip?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-2-pathway-3%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-calculate-tip#5
In which task and step of the codelab can this issue be found?
Task 6: Add a Switch
Step 8: "In the Switch composable, add this modifier to align the Switch composable to the end of the screen:"
Describe the problem
The modifier for:
Switch(
modifier = modifier
.fillMaxWidth()
.wrapContentWidth(Alignment.End),
//...
)
Should not take the passed modifier, but create its own Modifier object, such that the corrections look like:
Switch(
modifier = Modifier
.fillMaxWidth()
.wrapContentWidth(Alignment.End),
//...
)
This ensures that the Switch is aligned with the Row its akin to.
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-calculate-tip?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-2-pathway-3%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-calculate-tip#5
In which task and step of the codelab can this issue be found?
Task 6: Add a Switch
Step 8: "In the Switch composable, add this modifier to align the Switch composable to the end of the screen:"
Describe the problem
The modifier for:
Switch(
modifier = modifier
.fillMaxWidth()
.wrapContentWidth(Alignment.End),
//...
)
Should not take the passed modifier, but create its own Modifier object, such that the corrections look like:
Switch(
modifier = Modifier
.fillMaxWidth()
.wrapContentWidth(Alignment.End),
//...
)
This ensures that the Switch is aligned with the Row its akin to.