Skip to content

Instantly share code, notes, and snippets.

@HarryTylenol
Created August 5, 2019 14:18
Show Gist options
  • Save HarryTylenol/39cc8079203241178be924b6f6371941 to your computer and use it in GitHub Desktop.
Save HarryTylenol/39cc8079203241178be924b6f6371941 to your computer and use it in GitHub Desktop.
0003_6
binding.btnRequest.setOnClickListener {
viewModel.requestFestival( ... )
}
binding.btnRetry.setOnClickListener {
viewModel.refreshFestival()
}
viewModel.festival.observer {
// 페스티벌 데이터가 나옵니다.
}
val observer = { state: NetworkState? ->
("Festival Request" to state.toString()).debug()
Unit
}
viewModel.festivalRefreshState.observer(observer)
viewModel.festivalState.observer(observer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment