Skip to content

Instantly share code, notes, and snippets.

@whalemare
Created November 3, 2018 04:56
Show Gist options
  • Save whalemare/022120ac932691c14e27ac1fcc367229 to your computer and use it in GitHub Desktop.
Save whalemare/022120ac932691c14e27ac1fcc367229 to your computer and use it in GitHub Desktop.
editSearch.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(editable: Editable?) {
}
override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
}
override fun onTextChanged(charSequence: CharSequence?, p1: Int, p2: Int, p3: Int) {
val text = charSequence?.toString() ?: ""
val founded = presenter.search(text)
showResults(founded)
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment