From e1c8c7c8e22da5c275864cd667faa259a6521519 Mon Sep 17 00:00:00 2001 From: hingbong Date: Thu, 27 Feb 2020 23:24:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=85=E8=AF=BB=E7=95=8C=E9=9D=A2=E5=B7=A6?= =?UTF-8?q?=E4=B8=8B=E8=A7=92=E7=AB=A0=E8=8A=82=E5=90=8D=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E7=AE=80=E4=BD=93/=E7=B9=81=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 +- .../java/io/legado/app/ui/book/read/page/ContentView.kt | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d6f63988d..1b0c7d4b0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -140,7 +140,7 @@ dependencies { implementation 'com.jeremyliao:live-event-bus-x:1.4.5' //协程 - def coroutines_version = '1.2.2' + def coroutines_version = '1.3.3' implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt index 7bbc2adc5..7f1dcec1c 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt @@ -5,8 +5,10 @@ import android.content.Context import android.graphics.drawable.Drawable import android.view.MotionEvent import android.widget.FrameLayout +import com.github.houbb.opencc4j.core.impl.ZhConvertBootstrap import io.legado.app.R import io.legado.app.constant.AppConst.TIME_FORMAT +import io.legado.app.help.AppConfig import io.legado.app.help.ReadBookConfig import io.legado.app.ui.book.read.page.entities.TextPage import io.legado.app.utils.* @@ -90,7 +92,11 @@ class ContentView(context: Context) : FrameLayout(context) { } fun setContent(textPage: TextPage) { - tv_bottom_left.text = textPage.title + tv_bottom_left.text = when (AppConfig.chineseConverterType) { + 1 -> ZhConvertBootstrap.newInstance().toSimple(textPage.title) + 2 -> ZhConvertBootstrap.newInstance().toTraditional(textPage.title) + else -> textPage.title + } setPageIndex(textPage.index, textPage.pageSize) content_text_view.resetPageOffset() content_text_view.setContent(textPage)