Popup Background Spinner for AppCompat V21 is white with white text only in Android 4.0

I am using appcompat v21 and style (theme) inherited from Theme.AppCompat.NoActionBar. Text and background are white in the popup counter. I've tested on Android 4.0, 4.1, 4.2, 4.3, 4.4, but this only happens on Android 4.0 (ICS). Is it appcompat v21 bug? How do I change the background of all spinners with a theme style? Thank.

This is a screenshot from my application having an ICS issue:

http://i.stack.imgur.com/qZ1L3.png

[EDIT]

I found here that this is a bug which is present in appcompat v21

https://code.google.com/p/android/issues/detail?id=78118&can=1&q=appcompat%20spinner&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

+3


source to share


1 answer


You can create any 9-patch color background image and set it as your counter background. enter image description here

and set it in the background of your counter.



<Spinner
    android:id="@+id/spinner1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@color/blueSpinner"
    android:spinnerMode="dropdown"
    android:popupBackground="@drawable/blueSpinner"
    />

      

+1


source







All Articles