google-developer-training / basic-android-kotlin-compose-birthday-card-app

Apache License 2.0
125 stars 95 forks source link

Add images: Android Basics with Compose #854

Open samircamposlima opened 2 months ago

samircamposlima commented 2 months ago

URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-compose-add-images?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-1-pathway-3&hl=pt-br#3

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

Build a basic layout > Add images to your Android app > 4. Add Box layout> 4. At the end of the Box composable, call the GreetingText() function, and pass it the birthday message, signature, and the modifier as shown:

Describe the problem

@Composable fun GreetingImage(message: String, from: String, modifier: Modifier = Modifier) { val image = painterResource(R.drawable.androidparty) Box(modifier) { Image( painter = image, contentDescription = null ) GreetingText( message = message, from = from, modifier = Modifier /*

Steps to reproduce?

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

Versions Android Studio version: 2024.1.0.0 API version of the emulator: @Composable @Preview

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