Android Change Text Color of Spinner (displayed text - not items in spinner) -


except 1 screen, spinner needs have 'black' text. 1 screen requires spinner have 'white' color (both displayed text selected item , spinner items).

here image better clarity. top image how appears in black color , bottom spinner items image white text color

i'm able 'white' color spinner items not selected displayed text. again, don't want globally change styling - 1 screen. possible?

public void onitemselected(adapterview<?> adapterview, view view, int i, long l) {      int index = adapterview.getselecteditemposition();     ((textview) spinner.getselectedview()).settextcolor(getresources().getcolor(r.color.white)); } 

Comments