Skip to content

Latest commit

 

History

History

06-guessing-game

Guessing Game

A guessing game to discover how to use view models, in conjunction with live data and data binding.

Features

  • writing the game logic.
  • navigating between the two fragments.
  • holding game logic and data in a view model.
  • adding messages to logcat.
  • holding the result of the game in a second view model via a factory class.
  • using live data.
  • restricting direct access to a view model's properties using backing properties.
  • adding a game over property.
  • implementing data binding.
  • using data binding to call methods.
  • migrating the app to Compose.
  • sharing the game result with other apps.

Based on Head First Android Development: A Brain-Friendly Guide by David Griffiths and Dawn Griffiths (2021).