I am using ActionBarCompat and both Title texts, followed by the caster in the ActionBar. I am using Theme.AppCompat.Light.DarkActionBar theme, which should display white text on a black background. The header text is displayed in white, but the spinner text is displayed in black. Switching themes to Theme.AppCompat.Light has both black text on white. Can anyone suggest how I can get white text in a spinner? I saw suggestions for ActionBar and ActionBarSherlock, but I can not get them to work on ActionBarCompat. I tried the styles as follows:
<style name="SBRRTheme" parent="AppTheme"> <item name="android:spinnerDropDownItemStyle">@style/SBRRCustomDropDownItemStyle</item> </style> <style name="SBRRCustomDropDownItemStyle"> parent="@android:style/Widget.AppCompat.Light.DropDownItem.Spinner"> <item name="android:textAppearance">@style/SBRRCustomDropDownItemTextStyle</item> </style> <style name="SBRRCustomDropDownItemTextStyle"> parent="@android:style/Widget.AppCompat.Spinner.DropDown.ActionBar"> <item name="android:textColor">@color/white</item> </style>
Definition of activity in the manifest:
<activity android:theme="@style/Theme.AppCompat.Light.DarkActionBar" android:name="com.example.actionbar2.RaceResultsActivity" android:label="@string/action_raceresults" android:parentActivityName=".MainActivity" > <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> </activity>
Additional information, after testing with the Nexus-S emulator and on the physical Galaxy S2 working with JellyBean, the problem with the spinner appearing in ActionBarCompat itself appears only on my development device, Galaxy Y works on 2.3.5 Gingerbread. Also displayed on 2.3.3 AVD.
source share