|
|
@ -221,16 +221,20 @@ class PageView(context: Context, attrs: AttributeSet) : |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun scrollToLine(line: Int) { |
|
|
|
override fun scrollToLine(line: Int) { |
|
|
|
callback?.textChapter()?.let { |
|
|
|
if (isScrollDelegate()) { |
|
|
|
val pageIndex = it.getPageIndex(line) |
|
|
|
callback?.textChapter()?.let { |
|
|
|
curPage?.setPageIndex(pageIndex) |
|
|
|
val pageIndex = it.getPageIndex(line) |
|
|
|
callback?.setPageIndex(pageIndex) |
|
|
|
curPage?.setPageIndex(pageIndex) |
|
|
|
|
|
|
|
callback?.setPageIndex(pageIndex) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun scrollToLast() { |
|
|
|
override fun scrollToLast() { |
|
|
|
callback?.textChapter()?.let { |
|
|
|
if (isScrollDelegate()) { |
|
|
|
callback?.setPageIndex(it.lastIndex()) |
|
|
|
callback?.textChapter()?.let { |
|
|
|
|
|
|
|
callback?.setPageIndex(it.lastIndex()) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|