Created
August 5, 2019 14:18
-
-
Save HarryTylenol/39cc8079203241178be924b6f6371941 to your computer and use it in GitHub Desktop.
0003_6
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
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