From c3c63b5464e4c7148ffd5840d002e66c2900f800 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 8 Aug 2020 10:57:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=97=E8=AF=BB=E5=AE=9A=E6=97=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=B03=E4=B8=AA=E5=B0=8F=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/assets/updateLog.md | 1 + .../java/io/legado/app/service/BaseReadAloudService.kt | 6 +++--- app/src/main/res/layout/dialog_read_aloud.xml | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index 143a2ea09..58912c392 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -5,6 +5,7 @@ **2020/08/08** * 继续适配主题,现在应该所有地方都按照主题变色了 +* 朗读定时增加到3个小时 **2020/08/07** * 修复其它一些主题色没有适配到的地方 diff --git a/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt b/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt index 7531b21bb..95d1904d9 100644 --- a/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt @@ -163,12 +163,12 @@ abstract class BaseReadAloudService : BaseService(), } private fun addTimer() { - if (timeMinute == 60) { + if (timeMinute == 180) { timeMinute = 0 handler.removeCallbacks(dsRunnable) } else { timeMinute += 10 - if (timeMinute > 60) timeMinute = 60 + if (timeMinute > 180) timeMinute = 180 handler.removeCallbacks(dsRunnable) handler.postDelayed(dsRunnable, 60000) } @@ -279,7 +279,7 @@ abstract class BaseReadAloudService : BaseService(), private fun upNotification() { var nTitle: String = when { pause -> getString(R.string.read_aloud_pause) - timeMinute in 1..60 -> getString( + timeMinute in 1..180 -> getString( R.string.read_aloud_timer, timeMinute ) diff --git a/app/src/main/res/layout/dialog_read_aloud.xml b/app/src/main/res/layout/dialog_read_aloud.xml index 422c1932b..aa72dbc99 100644 --- a/app/src/main/res/layout/dialog_read_aloud.xml +++ b/app/src/main/res/layout/dialog_read_aloud.xml @@ -49,7 +49,7 @@ android:tooltipText="@string/prev_sentence" android:contentDescription="@string/prev_sentence" android:src="@drawable/ic_skip_previous" - android:tint="@color/tv_text_default" + app:tint="@color/tv_text_default" tools:ignore="UnusedAttribute" /> + android:max="180" />