增加书籍详情界面与有声书界面的根据封面生成主题色功能
This commit is contained in:
6 files changed
+813
-401
No files matched your search
@@ -47,9 +47,20 @@ class LabelsBar @JvmOverloads constructor(
|
||||
usedChips.add(it)
|
||||
}
|
||||
}
|
||||
style(chip) // 在这里应用外部传入的样式
|
||||
style(chip)
|
||||
chip.text = label
|
||||
addView(chip)
|
||||
}
|
||||
|
||||
fun applyColorScheme(colorPrimaryContainer: Int, colorOnPrimaryContainer: Int) {
|
||||
usedChips.forEach { chip ->
|
||||
chip.chipBackgroundColor = ColorStateList.valueOf(colorPrimaryContainer)
|
||||
chip.setTextColor(colorOnPrimaryContainer)
|
||||
}
|
||||
unUsedChips.forEach { chip ->
|
||||
chip.chipBackgroundColor = ColorStateList.valueOf(colorPrimaryContainer)
|
||||
chip.setTextColor(colorOnPrimaryContainer)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user