fix a crash at setting fastscroller position
This commit is contained in:
parent
f995e6262d
commit
c355e1eb1a
2 changed files with 10 additions and 7 deletions
|
@ -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'
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue