Created
May 5, 2019 11:24
-
-
Save mplacona/6f2e2c1a2622cb57a8eb720d6f99ecd5 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
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
- val myData = DataSource() | |
- tvMagicNumber.text = myData.getMagicNumber().toString() | |
+ val model = ViewModelProviders.of(this).get(DataSource::class.java) | |
+ tvMagicNumber.text = model.getMagicNumber().toString() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment