【发布时间】:2015-09-13 10:56:22
【问题描述】:
试用新的设计支持库,我添加了一个快餐栏;但与主背景不同的是,文本区域没有使用默认值#323232 着色。相反,它看起来像like this。它的颜色似乎来自我的styles.xml 的自定义主题中定义的android:background 值,如下所示:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
...
<item name="android:background">#4f4f5e</item>
...
</style>
如果我尝试用
强行着色View snackbarView = snackbar.getView();
snackbarView.setBackgroundColor(Color.YELLOW);
它只影响主背景like this,并且文本背景仍然会被自定义主题着色。有没有办法既保留我的自定义主题,又拥有标准的小吃店?谢谢!
【问题讨论】:
标签: android material-design android-design-library androiddesignsupport android-snackbar