简体   繁体   English

更改ActionBar和其他元素的颜色

[英]Change the color of the ActionBar and other elemets

I'm trying to change the color scheme of my application and want to change the color of the ActionBar, menu items, etc. 我正在尝试更改应用程序的配色方案,并想要更改ActionBar,菜单项等的颜色。

I came across this tool : http://jgilfelt.github.io/android-actionbarstylegenerator/ 我遇到了这个工具: http : //jgilfelt.github.io/android-actionbarstylegenerator/

And I used it to generate the necessary files to get everything in the color that I want to. 然后我用它来生成必要的文件,以使所有内容都达到我想要的颜色。 However, when I add the files to my res directory, the theme still does not change. 但是,当我将文件添加到res目录时,主题仍然没有改变。

Does anyone know how I can use it to change my app's color scheme to whatever I want? 有谁知道我可以用它来改变我的应用程序的配色方案到我想要的吗?

The tool you mentioned is deprecated, that means no longer supported. 您提到的工具已过时,即不再受支持。 You should use Toolbar . 您应该使用工具栏 Which is mentioned in the android support docs. 在android support docs中提到过。 or use the AppCompat version (to support older devices) 或使用AppCompat版本 (以支持较旧的设备)

查看您的样式并将其与此页面进行比较https://developer.android.com/training/material/theme.html请记住,需要将样式设置为有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM