Skip to content

Instantly share code, notes, and snippets.

@Shivamdhuria
Created November 29, 2020 20:01
Show Gist options
  • Save Shivamdhuria/d1f6964a9b7d1afb66d76bd249efef6e to your computer and use it in GitHub Desktop.
Save Shivamdhuria/d1f6964a9b7d1afb66d76bd249efef6e to your computer and use it in GitHub Desktop.
search.addTextChangedListener {
viewModel.setSearchQuery(it.toString())
}
lifecycleScope.launch {
viewModel.networkOperationResult.collect { value ->
textView.append(value)
textView.append("\n")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment