Skip to content

Instantly share code, notes, and snippets.

@igorwojda
Last active January 7, 2019 19:39
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 igorwojda/13267128ae224f33dca08ac4659d9082 to your computer and use it in GitHub Desktop.
Save igorwojda/13267128ae224f33dca08ac4659d9082 to your computer and use it in GitHub Desktop.
Classic ViewModel
class RegisterActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val viewModel = ViewModelProviders.of(this).get(RegisterViewModel::class.java)
//..observe live steams exposed by view model
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment