I saw many topics about how to change spinner\'s text color,but i couldnt understand how to use
spinner_item.xml
From the API level 16 and above, you can use following code to change the drop down icon in spinner. just goto onItemSelected in setonItemSelectedListener and change the drawable of textview selected like this.
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView> parent, View view, int position, long id) {
// give the color which ever you want to give to spinner item in this line of code
//API Level 16 and above only.
((TextView)parent.getChildAt(position)).setCompoundDrawablesRelativeWithIntrinsicBounds(null,null,ContextCompat.getDrawable(Activity.this,R.drawable.icon),null);
//Basically itis changing the drawable of textview, we have change the textview left drawable.
}
@Override
public void onNothingSelected(AdapterView> parent) {
}
});
hope it will help somebody.