allow clicking through the fastscroller when scrolling is disabled

This commit is contained in:
tibbi 2018-01-08 18:44:06 +01:00
parent da9cc609b0
commit b5d0e91c16

View file

@ -185,7 +185,11 @@ class FastScroller : FrameLayout {
override fun onTouchEvent(event: MotionEvent): Boolean {
// allow dragging only the handle itself
if (!handle!!.isSelected && isScrollingEnabled) {
if (!isScrollingEnabled) {
return super.onTouchEvent(event)
}
if (!handle!!.isSelected) {
if (isHorizontal) {
val min = handle!!.x
val max = min + handleWidth