3

I have this in my manifest:

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="15"/>

But I would like to use a HOLO theme or something similar.

I know HOLO theme requires Android 11, but what can I do if I want to have a nice unifying standard theme?

Thanks, Alex

Genadinik
  • 18,153
  • 63
  • 185
  • 284
  • Just a simple question: why are you supporting >= 1.6? Who cares? (really, I mean, it's like the 0,1%) – Enrichman May 31 '13 at 14:56
  • @Enrichman There is a small percentage of people still on it. Why not increase my download totals, especially since download totals are an app store ranking factor. What do you think? – Genadinik May 31 '13 at 14:57
  • Yep, I understand, but I would think also about the effort on build specific styles for them. Btw I've used with success HoloEverywhere, it's a nice library for what you're trying to do. – Enrichman May 31 '13 at 15:44

3 Answers3

3

Yes you can you just need to inherit different style, for instance in your

values/styles.xml

 <style name="MyTheme" parent="android:Theme.Light">
 </style>

And in then create values-v11/styles.xml

  <style name="MyTheme" parent="android:Theme.Holo.Light">
        <!-- API 11 theme customizations can go here. -->
    </style>

You might be interested about UI for developer

Necronet
  • 6,704
  • 9
  • 49
  • 89
2

Yes you can still use the HOLO theme while the minimum SDK is less than 11. You will need to create a folder values-v4 and also folders for v5 through v10 and put your styles.xml in there.

For more see here.

Also read this to keep it in mind.

Community
  • 1
  • 1
TronicZomB
  • 8,667
  • 7
  • 35
  • 50
  • thank you. That makes sense, but I am not sure what to specify in the Manifest so it knows to use HOLO for 11 and up and my custom theme for lower sdks – Genadinik May 31 '13 at 15:09
  • AFAIK You don't need to specify anything. Android will automatically search for the folders that best match the device settings for which the app is running on and pull the correct style from the correct folder, similar to the *layout* & *layout-land* folders. – TronicZomB May 31 '13 at 15:11
2

You could use the Holo everywhere library, which is designed to easily backport Holo back to 1.6.

https://github.com/Prototik/HoloEverywhere

Booger
  • 18,579
  • 7
  • 55
  • 72