google-developer-training / android-basics-kotlin-mars-photos-app

Apache License 2.0
91 stars 193 forks source link

Android Basics: Load and display images from the Internet, parameters of bindStatus() problem #173

Closed ommos61 closed 8 months ago

ommos61 commented 1 year ago

name: Android Basics Unit 4 issue about: Report problems with the Android Basics Unit 4 codelabs title: 'Android Basics Unit 4 issue: parameters of bindStatus() problem' labels: '' assignees: ''


URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-training-internet-images#4

In which task and step of the codelab can this issue be found? Add a binding adapter for the status ImageView, step 1

Describe the problem The codelabs page describes to use a nullable MarsApiStatus in the parameter list (like 'status: MarsApiStatus?'). This causes a problem in the 'when' statement, because the 'null' case is not handled. The code on github doesn't have the nullable modifier, so leave it out in the codelabs page too.

Steps to reproduce?

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

Versions Android Studio version: Electric Eel | 2022.1.1 Patch 1 API version of the emulator: Not applicable

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