diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt index 52ea156b4..5fb7e5434 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt @@ -38,6 +38,7 @@ import io.legado.app.ui.widget.page.PageView import io.legado.app.ui.widget.page.delegate.PageDelegate import io.legado.app.utils.* import kotlinx.android.synthetic.main.activity_book_read.* +import kotlinx.android.synthetic.main.view_book_page.* import kotlinx.android.synthetic.main.view_read_menu.* import kotlinx.android.synthetic.main.view_title_bar.* import kotlinx.coroutines.Dispatchers.IO @@ -97,6 +98,7 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_boo * 初始化View */ private fun initView() { + ChapterProvider.textView = content_text_view tv_chapter_name.onClick { ReadBook.webBook?.let { startActivityForResult( @@ -421,6 +423,7 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_boo } observeEvent(Bus.UP_CONFIG) { upSystemUiVisibility() + content_view.upStyle() page_view.upBg() page_view.upStyle() if (it) { diff --git a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt index 083dac9b6..83f515a0c 100644 --- a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt +++ b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt @@ -24,10 +24,8 @@ import io.legado.app.ui.main.bookshelf.BookshelfFragment import io.legado.app.ui.main.explore.ExploreFragment import io.legado.app.ui.main.my.MyFragment import io.legado.app.ui.main.rss.RssFragment -import io.legado.app.ui.widget.page.ChapterProvider import io.legado.app.utils.* import kotlinx.android.synthetic.main.activity_main.* -import kotlinx.android.synthetic.main.view_book_page.* class MainActivity : VMBaseActivity(R.layout.activity_main), BottomNavigationView.OnNavigationItemSelectedListener, @@ -40,7 +38,6 @@ class MainActivity : VMBaseActivity(R.layout.activity_main), private val fragmentList = arrayListOf() override fun onActivityCreated(savedInstanceState: Bundle?) { - ChapterProvider.textView = content_text_view ATH.applyEdgeEffectColor(view_pager_main) ATH.applyBottomNavigationColor(bottom_navigation_view) view_pager_main.offscreenPageLimit = 3 @@ -136,9 +133,6 @@ class MainActivity : VMBaseActivity(R.layout.activity_main), observeEvent(Bus.RECREATE) { recreate() } - observeEvent(Bus.UP_CONFIG) { - content_view.upStyle() - } observeEvent(PreferKey.showRss) { bottom_navigation_view.menu.findItem(R.id.menu_rss).isVisible = showRss() upFragmentList() diff --git a/app/src/main/res/layout/activity_book_read.xml b/app/src/main/res/layout/activity_book_read.xml index 52eafcca2..1d86c11d0 100644 --- a/app/src/main/res/layout/activity_book_read.xml +++ b/app/src/main/res/layout/activity_book_read.xml @@ -4,6 +4,12 @@ android:layout_height="match_parent" android:orientation="vertical"> + + - -