From 2a93dc2ba3d8e7ec3f3febdf4a5f94a4adbe7ed1 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 18 Aug 2019 07:55:47 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt | 5 ++++- .../java/io/legado/app/ui/bookinfo/ChapterListAdapter.kt | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) 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 } }