我阅读了有关更改 TimePicker 文本颜色的链接,但我没有从中受益
我用了这段代码
<style name="MyTimePicker1" parent="@android:style/Widget.TimePicker">
<item name="android:textColor">#000000</item>
</style>
我得到这个错误
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.TimePicker'.
我也试过这段代码
void applyFontRecursively(ViewGroup parent, Integer textColor)
{
for(int i = 0; i < parent.getChildCount(); i++)
{
View child = parent.getChildAt(i);
if(child instanceof ViewGroup)
{
applyFontRecursively((ViewGroup)child, textColor);
}
else if(child != null)
{
if(child instanceof TextView)
{
TextView textView = (TextView) child;
textView.setTextColor(textColor);
}
}
}
}
我得到了这个结果