@ -37,7 +37,10 @@ abstract class HorizontalPageDelegate(pageView: PageView) : PageDelegate(pageVie
override fun onTouch(event: MotionEvent) {
when (event.action) {
MotionEvent.ACTION_DOWN -> {
abort()
if (abort()) {
onAnimStop()
stopScroll()
}
MotionEvent.ACTION_MOVE -> {
if (isTextSelected) {
@ -154,10 +154,12 @@ abstract class PageDelegate(protected val pageView: PageView) :
fun abort() {
fun abort(): Boolean {
if (!scroller.isFinished) {
scroller.abortAnimation()
return true
return false
open fun onAnimStart() {}//scroller start