Skip to content

Instantly share code, notes, and snippets.

@guuilp
Created December 9, 2018 00:42
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 guuilp/98872bc114c44ed621b0c7c723eb9d13 to your computer and use it in GitHub Desktop.
Save guuilp/98872bc114c44ed621b0c7c723eb9d13 to your computer and use it in GitHub Desktop.
class PeopleViewModel : ViewModel() {
private val selectedPerson = MutableLiveData<Person>()
fun setSelectedPerson(person: Person){
selectedPerson.value = person
}
fun getSelectedPerson() = selectedPerson
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment