I have some basic piece of code on a Welcome Activity that simply binds List adapter as usual:
final ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, android.R.id.text1);
spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
This used to work until I updated to API level 25. At that point, with no other changes, the spinner dropdown's text has become un-readable:
My theme's parent is "Theme.AppCompat.Light.NoActionBar" but again, I'm not playing with colors there and nothing changed since when it was showing correctly (API < 25). Any idea?
I know I could fix it with some setTextColor()
inside spinner.setOnItemSelectedListener()
, but the main point is understanding why it was working and now it doesn't, as this may be a sign of something conceptuyally wrong on my side, or even some kind of Android bug. Infact, i noticed the same problem (black text on dark background) on pretty standard widgets/app, like the Cyanogen/LineageOS default weather one: