我创建了一个微调器,用户可以从中选择一个值。我可以改变的微调本身的文字颜色一样显示在这张照片:如何更改微调器中选择列表的字体颜色?
不幸的是,当我按下微调的项目列表,被选中,被显示,但这些上有一个白色的字体颜色白色背景,我只是没有能够改变这一点:
我google了这个问题和其他人都遇到了同样的问题。没有任何修复建议为我工作。 据我了解,我必须制作某种自定义列表,但是,我无法使其工作。有什么建议么?
我的代码看起来像这样(array_spinner是一个字符串数组):
ArrayAdapter adapter = new ArrayAdapter(this, R.layout.row, array_spinner);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
而且我row.xml:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/spinnerText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:textColor="#000000"
android:textSize="14dp" />
非常感谢!它工作得很好! 感谢您的非常有用和快速的答案:) – Casper 2011-05-11 15:43:54