Created
February 10, 2020 00:14
-
-
Save OssamaDroid/e9dd206e0a9db87ecc0992d0fd5115a7 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
// Create Observable for button clicks | |
val submitEvents: Observable<SubmitEvent> = | |
submit_btn.clicks() | |
.map { SubmitEvent(edit_text.text.toString()) } | |
// Create Observable for text typing | |
val checkNameEvents: Observable<CheckNameEvent> = | |
edit_text.afterTextChangeEvents() | |
.map { CheckNameEvent(it.editable?.toString()) } | |
// Merged events | |
val events: Observable<UIEvent> = Observable.merge(submitEvents, checkNameEvents) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment