[修复] 听书界面按钮状态显示错误与优化 #398

This commit is contained in:
HapeLee
2025-11-30 14:14:57 +08:00
parent 8ec91efcc4
commit edfdfb341f
2 changed files with 59 additions and 35 deletions
@@ -538,7 +538,19 @@ class AudioPlayActivity :
binding.cdTimer.setCardBackgroundColor(colorSurfaceContainer)
binding.cdSpeed.setCardBackgroundColor(colorSurfaceContainer)
val stateList = ColorStateList.valueOf(colorOnSurface)
val states = arrayOf(
intArrayOf(android.R.attr.state_enabled, android.R.attr.state_checked),
intArrayOf(android.R.attr.state_enabled, -android.R.attr.state_checked),
intArrayOf(-android.R.attr.state_enabled)
)
val colors = intArrayOf(
colorSurface,
colorOnSurface,
colorOnSurface.copy(alpha = 0.3f)
)
val stateList = ColorStateList(states, colors)
listOf(
binding.ivSkipNext, binding.ivSkipPrevious, binding.ivPlayMode, binding.ivTimer,
binding.ivChapter, binding.ivFastForward, binding.btnReset, binding.fabPlayStop