Closed feliperce closed 6 years ago
How to change fastScrollThumbColor when scrolled, I tried to set:
override fun onScrollStateChanged(recyclerView: RecyclerView?, newState: Int) { when (newState) { RecyclerView.SCROLL_STATE_IDLE -> categoryFilterRecyclerView.setThumbColor(Color.DKGRAY) RecyclerView.SCROLL_STATE_DRAGGING -> categoryFilterRecyclerView.setThumbColor(ResourcesCompat.getColor( resources, R.color.colorPrimaryDark, null)) RecyclerView.SCROLL_STATE_SETTLING-> categoryFilterRecyclerView.setThumbColor(ResourcesCompat.getColor( resources, R.color.colorPrimaryDark, null)) } } })
It changes when scrolled, but not change when FAST scrolled
You can attach an OnFastScrollStateChangedListener to the FastScrollRecyclerView.
OnFastScrollStateChangedListener
FastScrollRecyclerView
Alternatively, fork this library and find the code that detects when the fast scroll is touched, and change the colour there.
How to change fastScrollThumbColor when scrolled, I tried to set:
It changes when scrolled, but not change when FAST scrolled