google-developer-training / basic-android-kotlin-compose-training-affirmations

Apache License 2.0
68 stars 146 forks source link

Android Compose Add a Scrollable List #138

Open kotlinProgrammingLover opened 2 weeks ago

kotlinProgrammingLover commented 2 weeks ago

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

Describe the problem In this code snippet:

import com.example.affirmations.data.Datasource

@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), ), ) { } }

function is called AffirmationApp() before in the code, so compiler doesn't recognise it. And first Modifier has to be written in lowercase (modifier = Modifier).

Thanks for the great job doing this training programs! Please do not missunderstand my intentions pointing errors. I just do it as a way to collaborate, not complain.

ShawnDGitHub commented 1 week ago

Yeah, it is correct, but this repository does not appear to be regularly managed.