我有一个包含每行一个TextView和NumberPicker的ListView。每当我启动活动时,NumberPicker的数字都是白色(与背景颜色相同)。
我尝试应用建议这里, 这里, 和 这里 的样式; 但是都无济于事。
还有其他建议吗?
我尝试应用建议这里, 这里, 和 这里 的样式; 但是都无济于事。
还有其他建议吗?
-
NumberPicker.xml
<NumberPicker
android:id="@+id/npMaterialAmount"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="75dp"
style="@style/npColour"/>
-
尝试样式1:
<style name = "npColour" >
<item name = "android:textColor">#000000</item>
</style>
-
尝试样式2:
<style name = "npColour" parent ="@android:style/Theme.Holo.Light">
</style>
-
...而且还有很多其他的...
numberPicker
的样式,请使用类似这样的代码 - <style name="npColour" parent="@style/Holo.NumberPicker"> <item name="selectionDivider">#ff5500</item> </style>` 看看是否有效。 - g00dy<item name="numberPickerStyle">@style/Theme.Holo.NumberPicker</item>
- g00dy