google-developer-training/android-basics-kotlin-unscramble-app

Android Basics: ViewModel

cmcoffeedev opened this issue · 3 comments

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-viewmodel

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

Describe the problem
The first issue is a small typo. Step 5 tells you to copy over currentWordCount to the ViewModel. Step 7 uses _currentWordCount in the examples. We don't create a backing property for currentWordCount until step 11.

The second issue is small as well. It doesn't mention using viewModel.score and viewModel.currentWordCount in onViewCreated. It is not updated in the solution step as well (step 13).

Steps to reproduce?

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

Versions
Android Studio version:
Android Studio Chipmunk | 2021.2.1 Patch 2
Build #AI-212.5712.43.2112.8815526, built on July 10, 2022
Runtime version: 11.0.12+0-b1504.28-7817840 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.4
GC: G1 Young Generation, G1 Old Generation
Memory: 1920M
Cores: 8

API version of the emulator:
30

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

I see the same error/problem.... Do they want us to add a backing property to currentWordCount as it was done to currentScrambledWord

I see the same error/problem.... Do they want us to add a backing property to currentWordCount as it was done to currentScrambledWord

I believe so. They have a backing property for currentWordCount in Step 11