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

Apache License 2.0
103 stars 163 forks source link

Android Basics: Shared ViewModel #64

Closed Raikonif closed 8 months ago

Raikonif commented 2 years ago

URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-shared-viewmodel#2

In which task and step of the codelab can this issue be found? Step 3 complete navigation bar - Update title in the app bar

Describe the problem Attribute in NavGraph isn't working, don't change the AppBar Name when I change the strings

Steps to reproduce?

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

Versions Android Studio version: Android Studio Chipmunk | 2021.2.1 API version of the emulator: API 30

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

eclipsn commented 2 years ago

Carefully consider which fun onCreate you are overriding, if it looks like this fun onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?), then this is not what you need. Just copy and paste what is written in codelab. I mean the block with MainActivity.