google-developer-training / basic-android-kotlin-compose-training-mars-photos

Solution code for Android Basics in Kotlin course
https://developer.android.com/courses/android-basics-kotlin/course?gclid=CjwKCAjw4c-ZBhAEEiwAZ105RTyT-iaLHzrhMBUXdMhO230ZDwOwxxI2x4RgK8DwBxK8t1h0wmU_QxoCi4YQAvD_BwE
Apache License 2.0
66 stars 54 forks source link

Load and Display Images from the Internet #159

Open hogansung opened 1 week ago

hogansung commented 1 week ago

URL of codelab: https://developer.android.com/codelabs/basic-android-kotlin-compose-load-images

Specify the language of the codelab if it is not English:

In which task and step of the codelab can this issue be found? At step 5 of the Add LazyVerticalGrid section.

Describe the problem The code below will result in the application name being partially blocked by the rendered LazyVerticalGrid.

when (marsUiState) {
       // ...
       is MarsUiState.Success -> PhotosGridScreen(marsUiState.photos, modifier)
       // ...
}

The correct code should be

when (marsUiState) {
    is MarsUiState.Success -> PhotosGridScreen(
        marsUiState.photos, modifier = modifier, contentPadding = contentPadding
    )
}

Steps to repr.oduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions Android Studio version: NA API version of the emulator: NA

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