Skip to content

Instantly share code, notes, and snippets.

@florina-muntenescu
Created December 6, 2020 20:33
Show Gist options
  • Save florina-muntenescu/2544b0ff552289450251ac6ac0b0e289 to your computer and use it in GitHub Desktop.
Save florina-muntenescu/2544b0ff552289450251ac6ac0b0e289 to your computer and use it in GitHub Desktop.
/* Copyright 2020 Google LLC.
SPDX-License-Identifier: Apache-2.0 */
- editWordView.addTextChangedListener(object : TextWatcher {
- override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
- handleTextChanged(s)
- }
-
- override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {
- }
-
- override fun afterTextChanged(s: Editable) {
- }
- })
+ editWordView.doOnTextChanged { text, start, count, after -> handleTextChanged(text) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment