Backward Compatible Android Holo Themes

I have an Android app with support android:minSdkVersion="7" android:targetSdkVersion="15". I use my custom theme that inherits the default Android theme.

so now I want to change the whole theme of the app on the Holo theme. Can anyone help me on this.

+5
source share
3 answers

You can implement a "style selector" using different XML styles.

Just define a theme called "StyleSelector" or something like this in /res/**values**/styles.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="ThemeSelector" parent="@android:style/Theme.Black">
    ... Your theme definitions
    </style>
</resources>

Then create /res/**values-v11**/styles.xml:

<resources>
    <style name="ThemeSelector" parent="@android:style/Theme.Holo">
    </style>
</resources>

@style/ThemeSelector ", Android . Android Holo, Holo.

+10
+3

AndroidManifest.xml, :

android:theme="@style/Theme.Holo"

, :

<application android:icon="@drawable/ic_launcher"
             android:label="@string/app_name"
             android:theme="@style/Theme.Holo">

. : https://developer.android.com/guide/topics/ui/themes.html

+1