From ae4290badc9807b286e6ad38f952c2f2fbeec457 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 2 Dec 2019 10:37:48 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/chapterlist/ChapterListActivity.kt | 2 ++ .../java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/chapterlist/ChapterListActivity.kt b/app/src/main/java/io/legado/app/ui/chapterlist/ChapterListActivity.kt index 514c2dc68..e1175bc6a 100644 --- a/app/src/main/java/io/legado/app/ui/chapterlist/ChapterListActivity.kt +++ b/app/src/main/java/io/legado/app/ui/chapterlist/ChapterListActivity.kt @@ -10,6 +10,7 @@ import androidx.fragment.app.FragmentPagerAdapter import io.legado.app.R import io.legado.app.base.VMBaseActivity import io.legado.app.lib.theme.ATH +import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.primaryTextColor import io.legado.app.utils.getViewModel import io.legado.app.utils.gone @@ -26,6 +27,7 @@ class ChapterListActivity : VMBaseActivity(R.layout.activi override fun onActivityCreated(savedInstanceState: Bundle?) { setSupportActionBar(toolbar) + tab_layout.setSelectedTabIndicatorColor(accentColor) viewModel.bookUrl = intent.getStringExtra("bookUrl") viewModel.loadBook { view_pager.adapter = TabFragmentPageAdapter(supportFragmentManager) diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt index 9f97521b7..e21929721 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt @@ -16,6 +16,7 @@ import io.legado.app.constant.AppConst import io.legado.app.data.entities.BookGroup import io.legado.app.lib.dialogs.selector import io.legado.app.lib.theme.ATH +import io.legado.app.lib.theme.accentColor import io.legado.app.ui.book.search.SearchActivity import io.legado.app.utils.getPrefBoolean import io.legado.app.utils.getViewModel @@ -73,6 +74,7 @@ class BookshelfFragment : VMBaseFragment(R.layout.fragment_b private fun initRecyclerView() { tab_layout.isTabIndicatorFullWidth = false tab_layout.tabMode = TabLayout.MODE_SCROLLABLE + tab_layout.setSelectedTabIndicatorColor(requireContext().accentColor) ATH.applyEdgeEffectColor(view_pager_bookshelf) view_pager_bookshelf.adapter = BookshelfAdapter(this, this) TabLayoutMediator(tab_layout, view_pager_bookshelf) { tab, position ->