pull/32/head
kunfei 5 years ago
parent 2ef5fbc987
commit 1b1ea37679
  1. 5
      app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt
  2. 10
      app/src/main/java/io/legado/app/ui/widget/page/PageView.kt
  3. 1
      app/src/main/res/layout/activity_read_book.xml

@ -282,6 +282,11 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_rea
}
}
fun upStyle() {
content_view.upStyle()
page_view.upStyle()
}
private fun onClickReadAloud() {
if (!ReadAloudService.isRun) {
readAloudStatus = Status.STOP

@ -22,6 +22,10 @@ class PageView(context: Context, attrs: AttributeSet) : FrameLayout(context, att
private var nextPage: ContentView? = null
init {
prevPage = ContentView(context)
addView(prevPage)
nextPage = ContentView(context)
addView(nextPage)
curPage = ContentView(context)
addView(curPage)
@ -73,6 +77,12 @@ class PageView(context: Context, attrs: AttributeSet) : FrameLayout(context, att
return true
}
fun upStyle() {
curPage?.upStyle()
prevPage?.upStyle()
nextPage?.upStyle()
}
interface CallBack {
fun durChapterIndex(): Int
fun textChapter(chapterOnDur: Int = 0): TextChapter?

@ -5,6 +5,7 @@
android:orientation="vertical">
<io.legado.app.ui.widget.page.ContentView
android:id="@+id/content_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible" />

Loading…
Cancel
Save