This commit is contained in:
kunfei
2022-10-06 13:12:35 +08:00
parent 1f44aded5f
commit 98b7362377
@@ -215,6 +215,7 @@ class TitleBar @JvmOverloads constructor(
override fun setBackgroundColor(color: Int) {
if (color.alpha < 255) {
//这里不能改为0f,改为0f在横屏模式下文字和图标颜色会变
elevation = 0.1f
}
super.setBackgroundColor(color)
@@ -223,6 +224,7 @@ class TitleBar @JvmOverloads constructor(
override fun setBackground(background: Drawable?) {
if (background is ColorDrawable) {
if (background.alpha < 255) {
//这里不能改为0f,改为0f在横屏模式下文字和图标颜色会变
elevation = 0.1f
}
}