I’ve created a spinner in my activity and when i run my app on my Jelly Bean device the theme of the spinner is like 2.x, how can i get the ICS one?
Here’s my spinner code :
<Spinner
android:id="@+id/spinnermap"
style="@android:style/Theme.Holo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true" />
As you can see I tried to set the global style “Holo” but no results..
I had the same problem with a NumberPicker but can’t remember how I fixed it.
This is not the solution. You won’t have a fallback on pre HC devices.
You need to declare a Theme for your whole application if you want to use the holo theme in your whole app for HC+(I assume this is what you want to have).
In your Manifest:
values/styles.xml:
values-v11/styles.xml:
Now you’ll have a dropdown spinner on HC+(and also other holo widgets of course)
However if you just want to have the spinner to be “holofied” you can do this:
values/styles.xml:
values-v11/styles.xml: