From ca3b1a8334a3f01ea4773b2291a0b038cac126fa Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 8 Jun 2019 23:07:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/ui/main/MainActivity.kt | 2 ++ .../io/legado/app/ui/main/booksource/BookSourceAdapter.kt | 5 +++++ .../java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt | 2 ++ 3 files changed, 9 insertions(+) create mode 100644 app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt 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 ae30e38c8..b7ebfc759 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 @@ -16,6 +16,7 @@ import io.legado.app.constant.Bus import io.legado.app.help.permission.Permissions import io.legado.app.help.permission.PermissionsCompat import io.legado.app.help.storage.Restore +import io.legado.app.lib.theme.ThemeStore import io.legado.app.ui.main.bookshelf.BookshelfFragment import io.legado.app.ui.main.booksource.BookSourceFragment import io.legado.app.ui.main.findbook.FindBookFragment @@ -33,6 +34,7 @@ class MainActivity : BaseActivity(), BottomNavigationView.OnNavig get() = R.layout.activity_main override fun onViewModelCreated(viewModel: MainViewModel, savedInstanceState: Bundle?) { + bottom_navigation_view.setBackgroundColor(ThemeStore.backgroundColor(this)) view_pager_main.offscreenPageLimit = 3 view_pager_main.adapter = TabFragmentPageAdapter(supportFragmentManager) view_pager_main.addOnPageChangeListener(this) diff --git a/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceAdapter.kt b/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceAdapter.kt index 6f468b563..92581f4e1 100644 --- a/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceAdapter.kt @@ -13,6 +13,7 @@ import io.legado.app.R import io.legado.app.data.entities.BookSource import io.legado.app.help.ItemTouchCallback import io.legado.app.help.ItemTouchCallback.OnItemTouchCallbackListener +import io.legado.app.lib.theme.ThemeStore import kotlinx.android.synthetic.main.item_book_source.view.* import org.jetbrains.anko.sdk27.listeners.onClick import java.util.* @@ -71,6 +72,10 @@ class BookSourceAdapter : PagedListAdapter, callBack: CallBack?) = with(itemView) { cb_book_source.text = String.format("%s (%s)", bookSource.name, bookSource.group) cb_book_source.onClick { diff --git a/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt b/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt new file mode 100644 index 000000000..3509d5dca --- /dev/null +++ b/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt @@ -0,0 +1,2 @@ +package io.legado.app.ui.sourcedebug +