Skip to content

Instantly share code, notes, and snippets.

@JosephRoskopfOPI
Last active Nov 25, 2017
Embed
What would you like to do?
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
//get reference to our model
val model = ViewModelProviders.of(this).get(TestViewModel::class.java)
val users = model.getUsers()
//Use list of users to put in recycler view
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment