Text on spinner is white on a white background Text on spinner is white on a white background android android

Text on spinner is white on a white background


I have same problem and have found the answer. You dont use application context, instead, just use getActivity() (if you are in fragment) or this (if you are in activity), it will work

 dateAdapter = new ArrayAdapter<String>(**this**,        android.R.layout.simple_spinner_item, list);


I solved this problem using

getBaseContext()

instead of

getApplicationContext()


i change it from

new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_spinner_item, some_list);

tonew ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, list);

it's fixed, although i don't want to use "this"