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

后端 未结 2 1000
盖世英雄少女心
盖世英雄少女心 2020-12-08 07:41

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.NoTitleB

相关标签:
2条回答
  • 2020-12-08 08:17

    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.

    0 讨论(0)
  • 2020-12-08 08:31

    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>
    
    0 讨论(0)
提交回复
热议问题