In res/values-v11/styles.xml
, I can't use Theme.Holo.Light.NoActionBar
because it was added in API level 13. Can I use Theme.Light.NoTitleBar
instead, with no visual differences? As far as I can tell, they should both have a white background, status and navigation bars, and nothing else.
Asked
Active
Viewed 6.6k times
26

1''
- 26,823
- 32
- 143
- 200
2 Answers
92
Theme.Light.NoTitleBar is slightly different. The easiest way to resolve this and stay compatible back to Honeycomb is to create your own style that extends Theme.Holo.Light, but removes the Action Bar. Just create a style with the following definition:
<style name="MyTheme" parent="android:Theme.Holo.Light">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
</style>

Vatev
- 7,493
- 1
- 32
- 39

Alexander Lucas
- 22,171
- 3
- 46
- 43
-
5How to make compatible for API 8 ?? – Srikanth Pai Apr 22 '13 at 06:30
-
Srikanth, you'd need a different theme completely for API 8, as Holo wasn't introduced until API 11. – Alexander Lucas May 30 '13 at 15:58
-
@contactmeandroid `` – AlexAndro Nov 04 '13 at 10:35
-
@AlexAndro - Thanks.. I need help of yours for this question http://stackoverflow.com/questions/19649023/custom-slide-to-unlock – Srikanth Pai Nov 04 '13 at 10:59
-
@contactmeandroid by using Android Support Library you can use Holo Theme in APIs such as 8. – VSB Apr 15 '14 at 15:04
3
As far as I know, the Theme.Light.NoTitleBar is based on older API level. You will get the style of Android 2.3. But Theme.Holo.Light.NoActionBar can give you the style of 4.0 or upper.

jedichen
- 91
- 1
- 7