Skip to content

Instantly share code, notes, and snippets.

@vicky7230
Last active February 19, 2018 06:12
Show Gist options
  • Select an option

  • Save vicky7230/38766eebd10b4fa46eaadd7414d53bd0 to your computer and use it in GitHub Desktop.

Select an option

Save vicky7230/38766eebd10b4fa46eaadd7414d53bd0 to your computer and use it in GitHub Desktop.
val subject = PublishSubject.create<String>()
search_edit_text.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) {
subject.onNext(s.toString())
}
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
}
})
presenter.search(subject)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment