Created
April 26, 2018 10:20
-
-
Save JoseAlcerreca/45f1e8fcc10faa7fdc8b797f83d8636d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ListViewModel : ViewModel { | |
private val _navigateToDetails = MutableLiveData<Boolean>() | |
val navigateToDetails : LiveData<Boolean> | |
get() = _navigateToDetails | |
fun userClicksOnButton() { | |
_navigateToDetails.value = true | |
} | |
fun navigateToDetailsHandled() { | |
_navigateToDetails.value = false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment