Android:Theme.Holo.Light.NoActionBar 与 Theme.Light.NoTitleBar [英] Android: Theme.Holo.Light.NoActionBar vs Theme.Light.NoTitleBar

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

问题描述

res/values-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 略有不同.解决此问题并保持与 Honeycomb 兼容的最简单方法是创建您自己的样式,扩展 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>

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

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