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 + } } }