我有一个工具栏,我想将背景更改为黑色,但默认情况下项目颜色为黑色,我想将其颜色更改为灰色,我该怎么做?非常感谢: 关于工具栏的我的图片
这是我的toolbar.xml
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#2196F3"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
我的样式.xml
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
