diff --git a/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt b/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt index c2f6dfc56..c6318f016 100644 --- a/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt @@ -16,6 +16,7 @@ import io.legado.app.lib.theme.ThemeUtils import io.legado.app.lib.theme.accentColor import io.legado.app.utils.getCompatColor import io.legado.app.utils.gone +import io.legado.app.utils.longToastOnUi import io.legado.app.utils.visible import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.isActive @@ -145,6 +146,12 @@ class ChapterListAdapter(context: Context, val callback: Callback) : callback.openChapter(it) } } + holder.itemView.setOnLongClickListener { + getItem(holder.layoutPosition)?.let { + context.longToastOnUi(getDisplayTile(it)) + } + true + } } private fun upHasCache(binding: ItemChapterListBinding, isDur: Boolean, cached: Boolean) = diff --git a/app/src/main/res/layout/item_chapter_list.xml b/app/src/main/res/layout/item_chapter_list.xml index f80e52edc..0729a83da 100644 --- a/app/src/main/res/layout/item_chapter_list.xml +++ b/app/src/main/res/layout/item_chapter_list.xml @@ -13,7 +13,6 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:singleLine="true" - android:ellipsize="marquee" app:layout_constraintTop_toTopOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toLeftOf="@+id/iv_checked"