Created
August 1, 2018 00:26
-
-
Save luthfihariz/1923138c6ea8e2f5dcb127048de92a80 to your computer and use it in GitHub Desktop.
ViewModel & LiveData
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 EventListViewModel : ViewModel(){ | |
val eventList = MutableLiveData<List<Event>>() | |
init { | |
eventList.postValue(arrayListOf(Event("Google IO 2018"), | |
Event("Droidcon London 2018"), | |
Event("GOTO Berlin 2018"))) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment