Created
April 7, 2019 15:58
-
-
Save gfreivasc/9b2e6e8c022b24a202451821a985b4f6 to your computer and use it in GitHub Desktop.
v 3
This file contains hidden or 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 MainActivity : ComponentActivity(R.layout.activity_main) { | |
private val viewModel = GenericProvider.provide { MainViewModel() } | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
textView.text = "${viewModel.count}" | |
button.setOnClickListener { | |
viewModel.inc() | |
textView.text = "${viewModel.count}" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment