diff --git a/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt b/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt index 443ef2bf8..f66635458 100644 --- a/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt +++ b/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt @@ -3,7 +3,9 @@ package io.legado.app.ui.bookinfo import android.os.Bundle import android.view.Menu import android.view.MenuItem +import android.widget.LinearLayout import androidx.lifecycle.Observer +import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.LinearLayoutManager import io.legado.app.R import io.legado.app.base.VMBaseActivity @@ -132,9 +134,10 @@ class BookInfoActivity : VMBaseActivity(R.layout.activity_boo } private fun initRecyclerView() { - ATH.applyEdgeEffectColor(rv_chapter_list) adapter = ChapterListAdapter(this) + ATH.applyEdgeEffectColor(rv_chapter_list) rv_chapter_list.layoutManager = LinearLayoutManager(this) + rv_chapter_list.addItemDecoration(DividerItemDecoration(this, LinearLayout.VERTICAL)) rv_chapter_list.adapter = adapter } diff --git a/app/src/main/java/io/legado/app/ui/bookinfo/ChapterListAdapter.kt b/app/src/main/java/io/legado/app/ui/bookinfo/ChapterListAdapter.kt index b6fd0cdfc..5969d0b37 100644 --- a/app/src/main/java/io/legado/app/ui/bookinfo/ChapterListAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/bookinfo/ChapterListAdapter.kt @@ -11,7 +11,7 @@ class ChapterListAdapter(context: Context) : SimpleRecyclerAdapter( override fun convert(holder: ItemViewHolder, item: BookChapter, payloads: MutableList) { holder.itemView.apply { - tv_chapter_name + tv_chapter_name.text = item.title } }