安卓:Theme.Holo.Light.NoActionBar VS Theme.Light.NoTitleBar [英] Android: Theme.Holo.Light.NoActionBar vs Theme.Light.NoTitleBar

查看:640
本文介绍了安卓:Theme.Holo.Light.NoActionBar VS Theme.Light.NoTitleBar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

RES /值-V11 / styles.xml ,我不能使用 Theme.Holo.Light.NoActionBar ,因为它被添加在API层面13.我可以使用 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.

推荐答案

Theme.Light.NoTitleBar略有不同。解决这个并保持兼容回到蜂巢的最简单的方法是创建你自己的风格,扩展Theme.Holo.Light,但删除操作栏。只要创建一个风格的定义如下:

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>

这篇关于安卓:Theme.Holo.Light.NoActionBar VS Theme.Light.NoTitleBar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆