Created
July 11, 2017 17:01
-
-
Save theerasan/c064a74ac2d7c31bbc6ad738180df337 to your computer and use it in GitHub Desktop.
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
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| initView() | |
| initViewModel() | |
| initPresenter() | |
| initEvent() | |
| } | |
| . | |
| . | |
| . | |
| private fun initEvent() { | |
| val emailWatcher = object: TextWatcher { | |
| override fun afterTextChanged(s: Editable?) { | |
| } | |
| override fun beforeTextChanged(s: CharSequence?, | |
| start: Int, | |
| count: Int, | |
| after: Int) { | |
| } | |
| override fun onTextChanged(s: CharSequence?, | |
| start: Int, | |
| before: Int, | |
| count: Int) { | |
| presenter?.onEmailUpdate(s.toString()) | |
| } | |
| } | |
| val passwordWatcher = object: TextWatcher { | |
| override fun afterTextChanged(s: Editable?) { | |
| } | |
| override fun beforeTextChanged(s: CharSequence?, | |
| start: Int, | |
| count: Int, | |
| after: Int) { | |
| } | |
| override fun onTextChanged(s: CharSequence?, | |
| start: Int, | |
| before: Int, | |
| count: Int) { | |
| presenter?.onPasswordUpdate(s.toString()) | |
| } | |
| } | |
| binding?.email?.addTextChangedListener(emailWatcher) | |
| binding?.password?.addTextChangedListener(passwordWatcher) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment