From 43dce8abe4bc59656c7b6a823cee70d169d24053 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 13 Oct 2019 20:25:52 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/main/bookshelf/BooksAdapter.kt | 6 ++---- .../java/io/legado/app/ui/main/explore/ExploreAdapter.kt | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksAdapter.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksAdapter.kt index 3bdbaf24e..9adb7c1ca 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksAdapter.kt @@ -10,9 +10,8 @@ import io.legado.app.R import io.legado.app.constant.BookType import io.legado.app.data.entities.Book import io.legado.app.help.ImageLoader -import io.legado.app.lib.theme.ThemeStore +import io.legado.app.lib.theme.ATH import io.legado.app.utils.LogUtils -import io.legado.app.utils.getCompatColor import io.legado.app.utils.invisible import kotlinx.android.synthetic.main.item_bookshelf_list.view.* import org.jetbrains.anko.sdk27.listeners.onClick @@ -63,11 +62,10 @@ class BooksAdapter(private val callBack: CallBack) : class MyViewHolder(view: View) : RecyclerView.ViewHolder(view) { init { - itemView.setBackgroundColor(ThemeStore.backgroundColor(itemView.context)) + ATH.applyBackgroundTint(itemView) } fun bind(book: Book, callBack: CallBack) = with(itemView) { - this.setBackgroundColor(context.getCompatColor(R.color.background)) tv_name.text = book.name tv_author.text = book.author tv_read.text = book.durChapterTitle diff --git a/app/src/main/java/io/legado/app/ui/main/explore/ExploreAdapter.kt b/app/src/main/java/io/legado/app/ui/main/explore/ExploreAdapter.kt index 0bc6c0891..15c4ecfdb 100644 --- a/app/src/main/java/io/legado/app/ui/main/explore/ExploreAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/main/explore/ExploreAdapter.kt @@ -9,6 +9,7 @@ import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.SimpleRecyclerAdapter import io.legado.app.data.entities.BookSource import io.legado.app.help.coroutine.Coroutine +import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.accentColor import io.legado.app.utils.ACache import io.legado.app.utils.gone @@ -28,6 +29,7 @@ class ExploreAdapter(context: Context, private val scope: CoroutineScope, val ca override fun convert(holder: ItemViewHolder, item: BookSource, payloads: MutableList) { with(holder.itemView) { if (payloads.isEmpty()) { + ATH.applyBackgroundTint(ll_title) tv_name.text = item.bookSourceName ll_title.onClick { val oldEx = exIndex