如何更改此标准微调器的颜色?:
因为白底白字并不酷:((谢谢。
它可能对更改微调器颜色有用:
mdt_spn=(Spinner)findViewById(R.id.xmdtm_spn);
ArrayAdapter<String> adapter1 = new ArrayAdapter<String>(
getApplicationContext(),android.R.layout.simple_spinner_item,mdt_arr) {
public View getView(int position, View convertView,
ViewGroup parent) {
View v = super.getView(position, convertView, parent);
((TextView) v).setTextSize(30);
((TextView) v).setTextColor(getResources().getColorStateList(R.color.mycolor1));
return v;
}
public View getDropDownView(int position, View convertView,
ViewGroup parent) {
View v = super.getDropDownView(position, convertView,
parent);
((TextView) v).setTextSize(35);
((TextView) v).setTextColor(getResources().getColorStateList(
R.color.mycolor));
return v;
}
};
mdt_spn.setAdapter(adapter1);
您应该添加:
android:background="@drawable/myspinner_background"