Summary and Next Steps
Kotlin and Android Development featuring Jetpack — by Michael Fazio (21 / 125)
👈 Build Another Fragment (G ame) | TOC | Chapter 3 Bind Data with ViewModels 👉
Not bad! The coins aren’t able to be toggled yet and the buttons aren’t functional, but we’re in a good spot. While we could spend a bit more time in here adding extra properties, I think it’s time to move on to the proper approach: using a ViewModel with LiveData to update the views as needed. Having ViewModel classes will let us bind data from code in our Fragment classes in a life-cycle aware way. Head over to the next chapter to find out what that means!
Copyright © 2021, The Pragmatic Bookshelf.
👈 Build Another Fragment (G ame) | TOC | Chapter 3 Bind Data with ViewModels 👉
Kotlin and Android Development featuring Jetpack by Michael Fazio can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.