Skip to content

Instantly share code, notes, and snippets.

@JoseAlcerreca
Created April 26, 2018 10:21
Show Gist options
  • Save JoseAlcerreca/cf4f5341b80f00e50f0a53dc4dbd0e14 to your computer and use it in GitHub Desktop.
Save JoseAlcerreca/cf4f5341b80f00e50f0a53dc4dbd0e14 to your computer and use it in GitHub Desktop.
class ListViewModel : ViewModel {
private val _navigateToDetails = SingleLiveEvent<Any>()
val navigateToDetails : LiveData<Any>
get() = _navigateToDetails
fun userClicksOnButton() {
_navigateToDetails.call()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment