Currently I have a theme specified in AndroidManifest.xml file:
android:theme="@android:style/Theme.Holo.Light"
Now I'm working to create the application backward compatible. As long as Gingerbread doesn't have Theme.Holo.Light I'll use Theme.Light but how to apply needed theme depending on OS version?
Use resource qualifiers for your values folder:
e.g. res/values-v11
Have your style reference Theme.Light in the standard res/values/styles.xml, then reference Theme.Holo.Light in res/values-v11/styles.xml. If it's running on API 11+, it will automatically choose Holo; otherwise, it will fall back to the standard Theme.Light specified in res/values/styles.xml.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With