Skip to content

Instantly share code, notes, and snippets.

@YashishDua
Created November 17, 2018 12:51
Show Gist options
  • Save YashishDua/1c8970c5f667014688e2aef48554e041 to your computer and use it in GitHub Desktop.
Save YashishDua/1c8970c5f667014688e2aef48554e041 to your computer and use it in GitHub Desktop.
class MainActivity: AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val viewModel = ViewModelProviders.of(this).get(SharedViewModel::class.java)
viewModel.data.observe(this, Observer {
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment