Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Theme.Holo.Light.NoActionBar vs Theme.Light.NoTitleBar

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.

like image 695
1'' Avatar asked Dec 27 '12 21:12

1''


2 Answers

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> 
like image 62
Alexander Lucas Avatar answered Sep 28 '22 03:09

Alexander Lucas


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.

like image 42
jedichen Avatar answered Sep 28 '22 04:09

jedichen