Reputation: 4022
This line style="@android:style/Widget.Holo.Light.Spinner"
makes my minSdkVersion go from 1 to 11!
How can I design my views for newer versions but still display ugly views for older versions (but allowing them to get the app) ?
Upvotes: 0
Views: 94
Reputation: 1778
The Spinner was added in API 1. It's the style you are attempting to use that is API 11+.
To solve this, you put another styles.xml file in the values-v11 folder. Then you have the Spinner use a style from your styles.xml file. In the styles.xml file in the default values folder you have your new style inherit from the android style you want to use. In the styles.xml file in values-v11, you modify that same style to use something can be used in older APIs.
Upvotes: 1
Reputation: 738
The spinner is not supported on old versions. You can create the specific style that uses the spinner on a folder named values-v11, and on the style default folder (only "values") design a "ugly" spinner. Note that the styles must have the same name on both folders. Check this answer https://stackoverflow.com/a/15339215/799979
Upvotes: 1