How to change the text color of default spinner. I need to set color grey but by default it shows Black.
Please help me out. Thanks.
How to change the text color of default spinner. I need to set color grey but by default it shows Black.
Please help me out. Thanks.
Override the adapter to change spinner text color :-
your_adpter = new ArrayAdapter<String>(getApplicationContext(),android.R.layout.simple_spinner_dropdown_item, array){
@Override
public View getDropDownView(int position, View convertView,ViewGroup parent) {
// TODO Auto-generated method stub
View view = super.getView(position, convertView, parent);
TextView text = (TextView)view.findViewById(android.R.id.text1);
text.setTextColor(Color.BLACK);
return view;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
View view = super.getView(position, convertView, parent);
TextView text = (TextView)view.findViewById(android.R.id.text1);
text.setTextColor(Color.BLACK);
return view;
}
};
item.xml