pull/32/head
kunfei 5 years ago
parent 624e65a7a8
commit db62d46f13
  1. 2
      app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfAdapter.kt
  2. 1
      app/src/main/res/layout/item_bookshelf_list.xml

@ -11,6 +11,7 @@ import io.legado.app.constant.BookType
import io.legado.app.data.entities.Book import io.legado.app.data.entities.Book
import io.legado.app.help.ImageLoader import io.legado.app.help.ImageLoader
import io.legado.app.lib.theme.ThemeStore import io.legado.app.lib.theme.ThemeStore
import io.legado.app.utils.getCompatColor
import kotlinx.android.synthetic.main.item_bookshelf_list.view.* import kotlinx.android.synthetic.main.item_bookshelf_list.view.*
import kotlinx.android.synthetic.main.item_relace_rule.view.tv_name import kotlinx.android.synthetic.main.item_relace_rule.view.tv_name
import org.jetbrains.anko.sdk27.listeners.onClick import org.jetbrains.anko.sdk27.listeners.onClick
@ -61,6 +62,7 @@ class BookshelfAdapter : PagedListAdapter<Book, BookshelfAdapter.MyViewHolder>(D
} }
fun bind(book: Book, callBack: CallBack?) = with(itemView) { fun bind(book: Book, callBack: CallBack?) = with(itemView) {
this.setBackgroundColor(context.getCompatColor(R.color.background))
tv_name.text = book.name tv_name.text = book.name
tv_author.text = book.author tv_author.text = book.author
tv_read.text = book.durChapterTitle tv_read.text = book.durChapterTitle

@ -162,7 +162,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:visibility="gone"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" /> app:layout_constraintBottom_toBottomOf="parent" />

Loading…
Cancel
Save