feat: 添加文字两端对齐

pull/277/head
kunfei 5 years ago
parent 1f6c2777dc
commit 1c6ffda677
  1. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  2. 3
      app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt

@ -569,6 +569,8 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo
autoPageStop()
} else {
isAutoPage = true
page_view.upContent()
page_view.upContent(1)
autoPagePlus()
}
read_menu.setAutoPage(isAutoPage)

@ -118,9 +118,10 @@ class PageView(context: Context, attrs: AttributeSet) :
}
override fun upContent(relativePosition: Int, resetPageOffset: Boolean) {
if (ReadBookConfig.isScroll) {
if (ReadBookConfig.isScroll && !callBack.isAutoPage) {
curPage.setContent(pageFactory.currentPage, resetPageOffset)
} else {
curPage.resetPageOffset()
when (relativePosition) {
-1 -> prevPage.setContent(pageFactory.prevPage)
1 -> nextPage.setContent(pageFactory.nextPage)

Loading…
Cancel
Save