如何更改微调器所选项目的颜色
How to change the color of the selected item of a spinner
如何更改微调器的文本颜色,即下拉按钮左侧的文本? (图中"Denmark")
你必须这样尝试
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
TextView selectedText = (TextView) parent.getChildAt(0);
if (selectedText != null) {
selectedText.setTextColor(Color.RED);
}
}
如何更改微调器的文本颜色,即下拉按钮左侧的文本? (图中"Denmark")
你必须这样尝试
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
TextView selectedText = (TextView) parent.getChildAt(0);
if (selectedText != null) {
selectedText.setTextColor(Color.RED);
}
}