Skip to content

Instantly share code, notes, and snippets.

@tmaxxdd
Created March 21, 2020 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmaxxdd/cdab660a1f5aef3f429e79dc03811ed2 to your computer and use it in GitHub Desktop.
Save tmaxxdd/cdab660a1f5aef3f429e79dc03811ed2 to your computer and use it in GitHub Desktop.
list.addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
super.onScrollStateChanged(recyclerView, newState)
if (newState == RecyclerView.SCROLL_STATE_DRAGGING) {
motionLayout.transitionToStart()
editText.setText("")
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment