From 1f98c7ba005d04df5ee8ad1270ecd4e5da559d7d Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 17 Mar 2020 15:05:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../legado/app/ui/book/read/TextActionMenu.kt | 3 +- app/src/main/res/drawable/ic_launcher.xml | 18 ------- app/src/main/res/drawable/ic_launcher_5.xml | 54 +++++++++++++++++++ app/src/main/res/drawable/ic_launcher_5b.xml | 12 +++++ .../res/mipmap-anydpi-v26/ic_launcher.xml | 4 +- 5 files changed, 70 insertions(+), 21 deletions(-) delete mode 100644 app/src/main/res/drawable/ic_launcher.xml create mode 100644 app/src/main/res/drawable/ic_launcher_5.xml create mode 100644 app/src/main/res/drawable/ic_launcher_5b.xml 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 357f2d437..361c7c014 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 @@ -154,11 +154,12 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac @SuppressLint("SetJavaScriptEnabled") private fun readAloud(text: String) { - if (textToSpeech == null && !ttsInitFinish) { + if (textToSpeech == null) { lastText = text textToSpeech = TextToSpeech(context, this) return } + if (!ttsInitFinish) return if (text == "") return if (textToSpeech?.isSpeaking == true) textToSpeech?.stop() diff --git a/app/src/main/res/drawable/ic_launcher.xml b/app/src/main/res/drawable/ic_launcher.xml deleted file mode 100644 index 1bb711f8f..000000000 --- a/app/src/main/res/drawable/ic_launcher.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/ic_launcher_5.xml b/app/src/main/res/drawable/ic_launcher_5.xml new file mode 100644 index 000000000..caa666949 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_5.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_launcher_5b.xml b/app/src/main/res/drawable/ic_launcher_5b.xml new file mode 100644 index 000000000..6abd9cbac --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_5b.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index 7f9b677b9..40ee239b2 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file