朗读定时增加到3个小时

pull/298/head^2
gedoor 4 years ago
parent 09ea207d1d
commit c3c63b5464
  1. 1
      app/src/main/assets/updateLog.md
  2. 6
      app/src/main/java/io/legado/app/service/BaseReadAloudService.kt
  3. 10
      app/src/main/res/layout/dialog_read_aloud.xml

@ -5,6 +5,7 @@
**2020/08/08**
* 继续适配主题,现在应该所有地方都按照主题变色了
* 朗读定时增加到3个小时
**2020/08/07**
* 修复其它一些主题色没有适配到的地方

@ -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
)

@ -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" />
<ImageView
@ -62,7 +62,7 @@
android:tooltipText="@string/audio_play"
android:contentDescription="@string/audio_play"
android:src="@drawable/ic_play_24dp"
android:tint="@color/tv_text_default"
app:tint="@color/tv_text_default"
tools:ignore="UnusedAttribute" />
<ImageView
@ -75,7 +75,7 @@
android:contentDescription="@string/stop"
android:tooltipText="@string/stop"
android:src="@drawable/ic_stop_black_24dp"
android:tint="@color/tv_text_default"
app:tint="@color/tv_text_default"
tools:ignore="UnusedAttribute" />
<ImageView
@ -88,7 +88,7 @@
android:contentDescription="@string/next_sentence"
android:tooltipText="@string/next_sentence"
android:src="@drawable/ic_skip_next"
android:tint="@color/tv_text_default"
app:tint="@color/tv_text_default"
tools:ignore="UnusedAttribute" />
<View
@ -134,7 +134,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:max="60" />
android:max="180" />
<TextView
android:id="@+id/tv_timer"

Loading…
Cancel
Save