Skip to content Skip to sidebar Skip to footer

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?

Solution 1:

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:

<stylename="MyTheme"parent="android:Theme.Holo.Light"><itemname="android:windowActionBar">false</item><itemname="android:windowNoTitle">true</item></style>

Solution 2:

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.

Post a Comment for "Android: Theme.holo.light.noactionbar Vs Theme.light.notitlebar"