如何更改选项菜单背景为Android 2.3?选项、如何更改、菜单、背景

2023-09-04 04:00:39 作者:难以深拥

我有同样的标准选项菜单,但我想改变的项目从白到黑的背景。我已经看到了有关如何做到这一点很多帖子,但那些不为2.3工作。

I have the same standard options menu, but I want to change the background of the items from white to black. I've seen many postings about how to do it, but those don't work for 2.3.

有谁知道工作菜单充气使用自定义颜色的背景与2.3版本兼容的?

Does anyone know of a working menu inflater with a custom-colored background compatible with version 2.3?

的**注意*的 * 的 NO图像位置! NO code从其他的供求信息的,因为香港专业教育学院尝试他们都在这里!

**ATTENTION** NO IMAGE PLACEMENT!!! NO CODE FROM OTHER POSTINGS, BECAUSE IVE TRIED THEM ALL HERE!!!

推荐答案

在理想情况下,你不应该这样做。各种装置将有不同的颜色,因为它们决定。如果你真的真的要自定义菜单项的背景的话,我会建议不使用它。相反,创建某种上下文菜单,你可以完全定制按您的需求。

In an ideal scenario, you shouldn't be doing that. Various devices would have different colors, as they decide. If you really really have to customize the menu item's backgrounds, then, I would suggest don't use it. Instead, create some kind of context menu, which you can fully customize as per your needs.

我知道它可能不是一个解决方案,你所要求的,但无论变通方法,你会做这个,它可能工作了几个设备,而且很可能是一场灾难他人。

I know its probably not a solution you are asking for, but whatever workarounds you will be be doing for this, it might work for a few device, and would probably be a disaster for others.

 
精彩推荐
图片推荐