【发布时间】:2015-08-14 04:56:15
【问题描述】:
我正在尝试将 ActionBar 的颜色从默认的深灰色更改为不同的颜色。我使用了来自相关问题here 的@inclement 的建议。这是我的代码:
ActionBar:
background_normal: 'white_background.png'
background_down: 'white_background.png'
background_color: [51, 102, 255, .5]
white_background.png 是 8px * 8px 白色 png 图片。
这样做会将 ActionBar 的背景颜色从深灰色更改为浅灰色(不是我期望的颜色)。我猜这是由于@inclement 提到的关于background_color 具有着色效果而不是块颜色替换的行为。
按照@AronBordin 的建议,我还尝试将background_normal 和background_down 设置为空字符串,但这不会覆盖着色行为。
替换ActionBar背景色的正确方法是什么?
【问题讨论】: