I am using a spinner like this:
ArrayAdapter<String> adapter = new ArrayAdapter<String>(mContext, android.R.layout.simple_spinner_item, templateTitles);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
mySpinner.setAdapter(adapter);
And my manifest is:
<application
android:name="MyApplication"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/AppTheme" >
Where the style is:
<style name="AppTheme" parent="android:Theme.WithActionBar">
<item name="android:textColor">#000000</item>
</style>
The problem is that when you click on spinner and display the dialog with selection items, the background is white and the text is invisible (because it is white). When you click and hold on a selection, then the text appears as it changes to black.
Why wouldn't the text default to black/grey to show? How can I overcome this issue? This issue seemed to happen only on devices running API 6 or above. I guess the older devices showed the color properly.
Any suggestion? Thanks.
EDIT: This only happens when the spinner is on a dialog.