From 1b1ea3767934a7a0c8ae7df23cd4bfde77e5d100 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 18 Aug 2019 12:13:31 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/readbook/ReadBookActivity.kt | 5 +++++ .../main/java/io/legado/app/ui/widget/page/PageView.kt | 10 ++++++++++ app/src/main/res/layout/activity_read_book.xml | 1 + 3 files changed, 16 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt index fc8c07d49..01264d61d 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt @@ -282,6 +282,11 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_rea } } + fun upStyle() { + content_view.upStyle() + page_view.upStyle() + } + private fun onClickReadAloud() { if (!ReadAloudService.isRun) { readAloudStatus = Status.STOP diff --git a/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt b/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt index f8d08a7e2..e567a3090 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt @@ -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? diff --git a/app/src/main/res/layout/activity_read_book.xml b/app/src/main/res/layout/activity_read_book.xml index 76e164e93..7e72bc822 100644 --- a/app/src/main/res/layout/activity_read_book.xml +++ b/app/src/main/res/layout/activity_read_book.xml @@ -5,6 +5,7 @@ android:orientation="vertical">