Skip to content

Instantly share code, notes, and snippets.

@MasoudFallahpour
Created September 10, 2020 17:54
Show Gist options
  • Save MasoudFallahpour/1da67c6230f9fd6fe3801ccfab6b09e7 to your computer and use it in GitHub Desktop.
Save MasoudFallahpour/1da67c6230f9fd6fe3801ccfab6b09e7 to your computer and use it in GitHub Desktop.
private fun setTextChangeListener() {
doAfterTextChanged {
if (it.isNullOrBlank()) {
setRightDrawable(0)
} else {
setRightDrawable(android.R.drawable.ic_menu_close_clear_cancel)
}
queryTextListener?.onQueryTextChange(it.toString())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment