Created
September 30, 2020 12:47
-
-
Save robotsquidward/4763911b3a7051ea233f7b67cd12a94b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyActivity : AppCompatActivity() { | |
private val model: MyViewModel by viewModels() | |
override fun onCreate(savedInstanceState: Bundle?) { | |
model.getUsers().observe(this, Observer<List<User>>{ users -> | |
// update UI | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment