Skip to content

Instantly share code, notes, and snippets.

@AshuTyagi16
Created November 16, 2020 09:20
Show Gist options
  • Save AshuTyagi16/f747609bdfb97f394312761ee5b938e0 to your computer and use it in GitHub Desktop.
Save AshuTyagi16/f747609bdfb97f394312761ee5b938e0 to your computer and use it in GitHub Desktop.
rvChat.addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy)
recyclerView.forEachVisibleHolder { holder: RecyclerView.ViewHolder ->
if (holder is OutgoingChatViewHolder) {
changeDrawableColor(holder)
}
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment