优化
This commit is contained in:
@@ -215,6 +215,7 @@ class TitleBar @JvmOverloads constructor(
|
|||||||
|
|
||||||
override fun setBackgroundColor(color: Int) {
|
override fun setBackgroundColor(color: Int) {
|
||||||
if (color.alpha < 255) {
|
if (color.alpha < 255) {
|
||||||
|
//这里不能改为0f,改为0f在横屏模式下文字和图标颜色会变
|
||||||
elevation = 0.1f
|
elevation = 0.1f
|
||||||
}
|
}
|
||||||
super.setBackgroundColor(color)
|
super.setBackgroundColor(color)
|
||||||
@@ -223,6 +224,7 @@ class TitleBar @JvmOverloads constructor(
|
|||||||
override fun setBackground(background: Drawable?) {
|
override fun setBackground(background: Drawable?) {
|
||||||
if (background is ColorDrawable) {
|
if (background is ColorDrawable) {
|
||||||
if (background.alpha < 255) {
|
if (background.alpha < 255) {
|
||||||
|
//这里不能改为0f,改为0f在横屏模式下文字和图标颜色会变
|
||||||
elevation = 0.1f
|
elevation = 0.1f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user