@ -458,7 +458,7 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo
*/
override fun upContent(relativePosition: Int, resetScrollOffset: Boolean) {
launch {
page_view.upContent(relativePosition)
page_view.upContent(relativePosition, resetScrollOffset)
}
@ -180,11 +180,11 @@ abstract class PageDelegate(protected val pageView: PageView) :
onAnimStart()
abstract fun onAnimStart()//scroller start
open fun onAnimStart() {}//scroller start
open fun onDraw(canvas: Canvas) {}//绘制
abstract fun onAnimStop()//scroller finish
open fun onAnimStop() {}//scroller finish
open fun onScroll() {}//移动contentView, slidePage
@ -24,12 +24,6 @@ class ScrollPageDelegate(pageView: PageView) : PageDelegate(pageView) {
curPage.onScroll(touchY - lastY)
override fun onAnimStop() {
if (!isCancel) {
pageView.fillPage(mDirection)
override fun onTouch(event: MotionEvent): Boolean {
if (event.action == MotionEvent.ACTION_DOWN) {
setStartPoint(event.x, event.y)