Android: Holo theme previous version

I really like the 4.0 ICS Holo Light theme, and I would like to have it in my support application and 4.0 smartphones.

I found Android layoutlib.jar in the platform folder, but its 8mb !!! and I really have no way to increase my application from 8 MB. Any advice?

// Pew Labs PS ive tried https://github.com/ChristopheVersieux/HoloEverywhere , but it does not support TabVIew, which I use

Thanks!

+7
source share
3 answers

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.

+46
source

Check the ActionbarSherlock . It also provides a TabView style. The samples directory is a good example for TabView, which works like a charm on Android 2.2.

+4
source

You can use Holo in Android 2.3 <with this simple library: http://www.holoeverywhere.com/ His name is Holo everywhere and works great in previous versions of Android. The library is hosted on Github .

+3
source

All Articles