Name of the Codelab or Codelab URL
https://developer.android.com/codelabs/basic-android-kotlin-compose-training-add-scrollable-list?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-3-pathway-2%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-training-add-scrollable-list#2
Add a scrollable list
Describe the problem
Under "Add a list to your app" section, the example code has a small typo. Under the Surface element, the variable name for the 'modifier' should be in small case. But here in the example it is mentioned with upper case. Due to that the program is NOT compiled.
@composable
fun AffirmationsApp() {
val layoutDirection = LocalLayoutDirection.current
Surface(
Modifier = Modifier
.fillMaxSize()
.statusBarsPadding()
.padding(
start = WindowInsets.safeDrawing.asPaddingValues()
.calculateStartPadding(layoutDirection),
end = WindowInsets.safeDrawing.asPaddingValues()
.calculateEndPadding(layoutDirection),
),
) {
}
}
In which lesson and step of the codelab can this issue be found?
Lesson step 3
How to reproduce?
I simply changed the Modifier variable name to small case and it started working.
Versions
- What version of Android Studio are you using?
- What API level are you targeting?
Additional information
Add any other context about the problem here.
codelab: basic-android-compose-training-add-scrollable-list
Name of the Codelab or Codelab URL
https://developer.android.com/codelabs/basic-android-kotlin-compose-training-add-scrollable-list?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-3-pathway-2%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-training-add-scrollable-list#2
Add a scrollable list
Describe the problem
Under "Add a list to your app" section, the example code has a small typo. Under the Surface element, the variable name for the 'modifier' should be in small case. But here in the example it is mentioned with upper case. Due to that the program is NOT compiled.
@composable
fun AffirmationsApp() {
val layoutDirection = LocalLayoutDirection.current
Surface(
Modifier = Modifier
.fillMaxSize()
.statusBarsPadding()
.padding(
start = WindowInsets.safeDrawing.asPaddingValues()
.calculateStartPadding(layoutDirection),
end = WindowInsets.safeDrawing.asPaddingValues()
.calculateEndPadding(layoutDirection),
),
) {
}
}
In which lesson and step of the codelab can this issue be found?
Lesson step 3
How to reproduce?
I simply changed the Modifier variable name to small case and it started working.
Versions
Additional information
Add any other context about the problem here.
codelab: basic-android-compose-training-add-scrollable-list