From 273915f33781b3f2c08c28c862f07b31df32237f Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 27 Sep 2022 12:11:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/TTS.kt | 2 +- .../java/io/legado/app/ui/book/read/TextActionMenu.kt | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/help/TTS.kt b/app/src/main/java/io/legado/app/help/TTS.kt index 1959d64f4..5807e8468 100644 --- a/app/src/main/java/io/legado/app/help/TTS.kt +++ b/app/src/main/java/io/legado/app/help/TTS.kt @@ -101,7 +101,7 @@ class TTS { @Deprecated("Deprecated in Java") override fun onError(utteranceId: String?) { - + //Deprecated } } diff --git a/app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt b/app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt index c8bfbf7b8..200cb623b 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt @@ -20,6 +20,7 @@ import io.legado.app.base.adapter.RecyclerAdapter import io.legado.app.constant.PreferKey import io.legado.app.databinding.ItemTextBinding import io.legado.app.databinding.PopupActionMenuBinding +import io.legado.app.help.config.AppConfig import io.legado.app.utils.* @SuppressLint("RestrictedApi") @@ -180,6 +181,16 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac } callBack.onMenuActionFinally() } + holder.itemView.setOnLongClickListener { + if (AppConfig.contentSelectSpeakMod == 0) { + AppConfig.contentSelectSpeakMod = 1 + context.toastOnUi("切换为从选择的地方开始一直朗读") + } else { + AppConfig.contentSelectSpeakMod = 0 + context.toastOnUi("切换为朗读选择内容") + } + true + } } }