Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Compose Add a Scrollable List #127

Open
gloglo1980 opened this issue Aug 23, 2024 · 0 comments
Open

Android Compose Add a Scrollable List #127

gloglo1980 opened this issue Aug 23, 2024 · 0 comments

Comments

@gloglo1980
Copy link

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
A clear and concise description of what the problem is.
When you use the final block of code on the page, the compiler is not happy.
The two problems are "Modifier = Modifier" (I think it's supposed to be "modifier = Modifier"), and safeDrawing, which I have no option to import

In which lesson and step of the codelab can this issue be found?
Lesson number + step number.
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
it's the final step before running the app at the end of the page

How to reproduce?
What are the exact steps to reproduce the problem?
paste this in your code and try to run:
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),
),
) {
AffirmationsList(
affirmationList = Datasource().loadAffirmations(),
)
}
}

Versions

  1. What version of Android Studio are you using?
    Android Studio Koala | 2024.1.1 Patch 2
  2. What API level are you targeting?
    I don't know

Additional information
Add any other context about the problem here.

codelab: basic-android-compose-training-add-scrollable-list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant