Skip to content

Instantly share code, notes, and snippets.

@putrarifin
Created December 4, 2020 17:51
Show Gist options
  • Save putrarifin/4ed83e68680f47eb4ba3b662b2750e68 to your computer and use it in GitHub Desktop.
Save putrarifin/4ed83e68680f47eb4ba3b662b2750e68 to your computer and use it in GitHub Desktop.
private fun initView() {
button_plus.setOnClickListener(::incrementCounter)
button_minus.setOnClickListener(::decrementCounter)
}
private fun incrementCounter(view: View) {
viewModel.incrementCount()
}
private fun decrementCounter(view: View) {
viewModel.decrementCount()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment