Genadinik
Genadinik

Reputation: 18649

Android - if I support Android 1.6, can I still use a Holo Theme for newer phones?

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

Upvotes: 3

Views: 821

Answers (3)

Necronet
Necronet

Reputation: 6813

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

Upvotes: 3

Booger
Booger

Reputation: 18725

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

https://github.com/Prototik/HoloEverywhere

Upvotes: 2

TronicZomB
TronicZomB

Reputation: 8747

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.

Upvotes: 2

Related Questions