google-developer-training / basic-android-kotlin-compose-training-tip-calculator

Apache License 2.0
61 stars 93 forks source link

Calculate a custom tip: Wrong Modifier is set to the Switch #189

Closed rydwan10 closed 6 months ago

rydwan10 commented 6 months ago

URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-compose-calculate-tip?authuser=1&continue=https://developer.android.com/courses/pathways/android-basics-compose-unit-2-pathway-3?authuser%3D1%23codelab-https://developer.android.com/codelabs/basic-android-kotlin-compose-calculate-tip#5

In which task and step of the codelab can this issue be found? Task : Calculate Custom Tip Step : 6. Add a switch Point : 8. In the Switch composable, add this modifier to align the Switch composable to the end of the screen:

Describe the problem When adding the modifier into the Switch instead of using new Modifier object in the codelab it's using the modifier that passed through the parameter causing the Title and Switch not center vertically

Steps to reproduce?

  1. Go to... Codelab that just described above

  2. Click on... Step 6 and Follow the instruction on point 8

  3. See error... notice that the code snippets showing modifier instead of 'Modifier`

Versions Android Studio version: Android Studio Giraffe | 2022.3.1 Patch 2

API version of the emulator: API 30

Additional information Include screenshots if they would be useful in clarifying the problem.

image
android-dev-lxl commented 6 months ago

@rydwan10 Thank you for reporting this issue. This is fixed and published soon.