[英]Android - set default menu inflater color to white?
我想将在OnCreateMenuOptions活动中创建的所有菜单项的默认菜单充气机背景颜色设置为白色吗?
You will need to create a Theme based on another one (Or create one from scratch). 您将需要基于另一个主题创建主题(或从头开始创建主题)。 Something like this will define your theme in the resources:
这样的事情将在资源中定义您的主题:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Base" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:background">@android:color/white</item>
</style>
</resources>
Then you need to apply it to the application in your manifest: 然后,您需要将其应用于清单中的应用程序:
<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/Base">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.