pull/298/head
w568w 4 years ago
commit dea52205b4
  1. 4
      app/src/main/assets/updateLog.md
  2. 6
      app/src/main/java/io/legado/app/service/BaseReadAloudService.kt
  3. 12
      app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt
  4. 1
      app/src/main/java/io/legado/app/ui/widget/prefs/ColorPreference.kt
  5. 10
      app/src/main/res/layout/dialog_read_aloud.xml

@ -3,6 +3,10 @@
* 请关注公众号[开源阅读]()支持我,同时关注合作公众号[小说拾遗](),阅读公众号小编。
* 公众号会发布更新,请去公众号下载官方版本,防止软件包被篡改。
**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
)

@ -79,6 +79,16 @@ class ThemeConfigFragment : BasePreferenceFragment(),
}
}
}
findPreference<ColorPreference>(PreferKey.cAccent)?.let {
it.onSaveColor = { color ->
false
}
}
findPreference<ColorPreference>(PreferKey.cNAccent)?.let {
it.onSaveColor = { color ->
false
}
}
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
@ -182,7 +192,7 @@ class ThemeConfigFragment : BasePreferenceFragment(),
}
3 -> {
putPrefInt(PreferKey.cPrimary, getCompatColor(R.color.white))
putPrefInt(PreferKey.cAccent, getCompatColor(R.color.black))
putPrefInt(PreferKey.cAccent, getCompatColor(R.color.lightBlue_color))
putPrefInt(PreferKey.cBackground, getCompatColor(R.color.white))
putPrefInt(PreferKey.cBBackground, getCompatColor(R.color.white))
AppConfig.isNightTheme = false

@ -142,6 +142,7 @@ class ColorPreference(context: Context, attrs: AttributeSet) : Preference(contex
}
override fun onColorSelected(dialogId: Int, @ColorInt color: Int) {
//返回值为true时说明已经处理过,不再处理
if (onSaveColor?.invoke(color) == true) {
return
}

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