Setting Holo theme for Android application

点点圈 提交于 2019-11-30 02:41:54

The original Android Holo Theme is just for API Level 11+. But there is an open source project called HoloEverywhere.

Take a look at this. This should solve your Problems.

So if you refere it as an Library you can set your Theme like this:

android:theme=“@style/Theme.Holo
// or if you want to use the Holo light theme:
android:theme=“@style/Theme.Holo.Light

Try doing it on a per-activity basis. That's how I've always done it. It looks to me like the theme is not taking effect at all in your screenshot. Theme.Holo is dark. The white theme is Theme.Holo.Light.

<activity
        android:name=".login"
        android:label="@string/login"
        android:noHistory="true"
        android:theme="@android:style/Theme.Holo.Light"/>

<activity
        android:name=".Preferences"
        android:theme="@android:style/Theme.Holo.Light" >

etc rather than in the app level

Also, to correct Ahmad, Holo is available from Honeycomb and on, or 11+.

Aleq

Actually, Holo is available since API 11; it's just Theme.Holo.Light.DarkActionBar that came in API level 14. There is no need for 15+.

For older API Levels, HoloEverywhere, ActionBarSherlock, ViewPageIndicator and such are neccessary, as mentioned by Ahmad as well.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!