fix a crash at setting fastscroller position

This commit is contained in:
tibbi 2018-07-01 12:12:22 +02:00
parent f995e6262d
commit c355e1eb1a
2 changed files with 10 additions and 7 deletions

View file

@ -7,7 +7,7 @@ buildscript {
propMinSdkVersion = 16
propTargetSdkVersion = propCompileSdkVersion
propVersionCode = 1
propVersionName = '4.3.13'
propVersionName = '4.3.15'
kotlin_version = '1.2.50'
support_libs = '27.1.1'
}

View file

@ -258,12 +258,15 @@ class FastScroller : FrameLayout {
}
MotionEvent.ACTION_MOVE -> {
if (isScrollingEnabled) {
if (isHorizontal) {
setPosition(event.x)
setRecyclerViewPosition(event.x)
} else {
setPosition(event.y)
setRecyclerViewPosition(event.y)
try {
if (isHorizontal) {
setPosition(event.x)
setRecyclerViewPosition(event.x)
} else {
setPosition(event.y)
setRecyclerViewPosition(event.y)
}
} catch (ignored: Exception) {
}
}
true