Apache Cordova Android 5.0选择框选项颜色 [英] Apache Cordova Android 5.0 Select Box Option color
问题描述
我正在尝试将Apache Cordova应用程式更新为指定Android 5.0。一切似乎是功能的,只要我能告诉,但我遇到一个装饰问题,打开一个选择框。列表选项出现在我的运行5.0的Nexus 7上,白色背景和浅灰色文本颜色,这些选项几乎不可读。我已尝试过以下操作:
I am attempting to update an Apache Cordova Application to target Android 5.0. Everything seems to be functional so far as I can tell but I am encountering a cosmetic issue when opening a select box. The list options appear on my Nexus 7 running 5.0 with a white background and light gray text color such that the options are nearly unreadable. I have already attempted the following and more:
- 通过CSS设置选项的颜色和背景颜色。
- 在SELECT和OPTION元素上通过CSS设置-webkit-appearance:none。
- 将Theme.Black.NoTitleBar中的主题更改为几乎每个选项标题栏。唯一的做法是将选项的颜色设置为白色,并将背景颜色设置为白色。
HTML代码是的,我知道我现在不包括cordova.js。
Sample HTML code and yes I know I'm not including cordova.js at this time.
<!DOCTYPE html>
<html>
<head>
<title>This is my title</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
</head>
<body>
<form>
<select name="hellow">
<option>A</option>
<option>B</option>
<option>C</option>
<option>D</option>
</select>
<input type="text" value="Text!"/>
<select name="world">
<option>A</option>
<option>B</option>
<option>C</option>
<option>D</option>
</select>
</form>
</body>
</html>
推荐答案
过了一段时间后, 。我显然是jsut更改为manifest.xml中的应用程序标记的主题,需要在应用程序和活动标记中进行更改。在将两个更改为android:style / Theme.Light.NoTitleBar后,我现在在我的应用程序中有白色背景上的黑色文本。
After quite some time I was able to figure this out. I was apparently jsut changing the theme for the Application tag in the manifest.xml and needed to make the change in both the application and activity tags. After changing both to "android:style/Theme.Light.NoTitleBar" I now have black text on white backgrounds in my app.
这篇关于Apache Cordova Android 5.0选择框选项颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!