Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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