Skip to content

Instantly share code, notes, and snippets.

@JoseAlcerreca
Last active April 26, 2018 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoseAlcerreca/a7a51a9d662ce268b9e2ea0a7b3888d2 to your computer and use it in GitHub Desktop.
Save JoseAlcerreca/a7a51a9d662ce268b9e2ea0a7b3888d2 to your computer and use it in GitHub Desktop.
// Don't use this for events
class ListViewModel : ViewModel {
private val _navigateToDetails = MutableLiveData<Boolean>()
val navigateToDetails : LiveData<Boolean>
get() = _navigateToDetails
fun userClicksOnButton() {
_navigateToDetails.value = true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment