I put a spinner in AlertDialog
and from some reason colors there are displayed differently than in normal activity. That brings me to this problem:
When I have that spinner in normal activity, text color is black and background color of dropdown list is gray. Here is the opposite, background color of dropdown list is black and text color is white. That would also be OK but the problem is, as you can see on that image, that white text is almost invisible on that gray background.
I tried to define new TextView and apply new adapter but that affects only color of the dropdown list. After the item is selected, text is still white.
spinner_text.xml
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:textColor="@android:color/black"
/>
Adapter
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.spinner_text, values);
spinner.setAdapter(adapter);
All I want is the same look like it would be if I have put a spinner in layout which is used by activity.