It’s best not to use the Holo theme on unsupported devices. You can do a simple trick for your application to run the Holo theme on 3.x and higher and one of the built-in themes in 2.3 and lower, for example:
In the manifest, use this line for your activity topic.
Android: theme = "@ style / Theme.MyTheme"
In the res / values folder, place the styles.xml file containing
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="Theme.MyTheme" parent="@android:style/Theme.Black" /> </resources>
Create a res / values-v11 folder and a styles.xml file containing:
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="Theme.MyTheme" parent="@android:style/Theme.Holo" /> </resources>
This will force Android to use the Holo theme if the application runs on a device that supports it (3.x and higher, this is API level 11 and higher, hence “v11 values”). This is the best solution so that your application matches the phone’s user interface and uses the Holo theme only where it is supported.
Nick
source share