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

Apache License 2.0
61 stars 93 forks source link

Calculate a custom tip: Android Basics with Compose #196

Open veydoge opened 5 months ago

veydoge commented 5 months ago

URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-compose-calculate-tip

In which task and step of the codelab can this issue be found? task 6, step 8

Describe the problem

this step shows this: Switch( modifier = modifier .fillMaxWidth() .wrapContentWidth(Alignment.End), //... )

but in source code it will be this: Switch( modifier = Modifier .fillMaxWidth() .wrapContentWidth(Alignment.End), //... )

because it needed to use Modifier instead of modifier or it will inherit padding and layout will be wrong just check pinned screens

Steps to reproduce?

  1. Render preview

Versions Android Studio version: 2023.2.1 API version of the emulator: 34

Additional information how it actually look image expected: image