I have built android app with supporting android:minSdkVersion="7"
android:targetSdkVersion="15"
. I use my customized theme inheriting Android default theme.
so now i want to change whole application theme to Holo theme.Can any one help me on this.
You can implement a "style selector" by using different style XMLs.
Just define a theme named "StyleSelector" or something like that 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 a /res/**values-v11**/styles.xml
:
<resources>
<style name="ThemeSelector" parent="@android:style/Theme.Holo">
</style>
</resources>
Now just apply your theme with "@style/ThemeSelector
" and let Android do the magic.
On older Android versions, your theme definition will be loaded, on newer versions with Holo-Support, your theme will be derived from Holo.
Try to use HoloEverywhere as parent theme.
Just modify the application tag in the AndroidManifest.xml that it contains the theme:
android:theme="@style/Theme.Holo"
For example like this:
<application android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.Holo">
Or you can do it on a per Activity basis. Here is the relevant documentation: https://developer.android.com/guide/topics/ui/themes.html
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