Created
January 22, 2019 00:54
-
-
Save weverb2/e716d333490e0f8fb8e94c2108f28d43 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 MainActivity : AppCompatActivity() { | |
lateinit var viewModel: MainViewModel | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
viewModel = ViewModelProviders.of(this).get(MainViewModel::class.java) | |
username.doAfterTextChanged { text -> viewModel.username = text?.toString() ?: "" } | |
password.doAfterTextChanged { text -> viewModel.password = text?.toString() ?: "" } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment