Skip to content

Instantly share code, notes, and snippets.

@nanlabsweb
Created April 5, 2018 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanlabsweb/c5951b3338647e37018e055761ef2371 to your computer and use it in GitHub Desktop.
Save nanlabsweb/c5951b3338647e37018e055761ef2371 to your computer and use it in GitHub Desktop.
Light Weight Thread Example
syncPets.setOnClickListener({
launch(UI) {
syncPets.isEnabled = false
val message = petViewModel.syncPets()
Toast.makeText(baseContext, message, Toast.LENGTH_LONG).show()
syncPets.isEnabled = true
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment