如何隐藏操作栏(Theme.Holo)如果Android版本低于3.0 [英] How to to hide action bar (Theme.Holo) if Android version below 3.0

查看:92
本文介绍了如何隐藏操作栏(Theme.Holo)如果Android版本低于3.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到操作栏(Theme.Holo)仅在Android 3.0以上heigher看起来很酷,但它不喜欢的,例如Android 2.3的不错。

I notice the action bar (Theme.Holo) looks cool only in android 3.0 or heigher, but it doesn't like nice on for example Android 2.3.

有远基于Android版本显示操作栏(Theme.Holo)?

is there away to show the action bar ( Theme.Holo) based on Android version?

推荐答案

这是因为没有添加的动作条,直到Android 3.0的(API级别11),因此Android的任何版本低于将有一个标题栏,而不是行动起来吧。

That is because the ActionBar wasn't added until Android 3.0 (API level 11) so any version of Android lower than that will have a title bar, not an action bar.

在ActionBar还没有官方的兼容性库的一部分,所以在此期间,该 ActionBarSherlock 库将让你有一个看起来在所有版本的API相同的动作条。

The ActionBar is not yet a part of the official compatibility library, so in the mean time, the ActionBarSherlock library will allow you to have an ActionBar that looks the same across all API versions.

如果你想隐藏的动作条完全只需添加添加机器人:在清单风格/ Theme.Holo.NoActionBar的活动

If you want to hide the ActionBar completely just add adding android:style/Theme.Holo.NoActionBar to the activities in the manifest.

这篇关于如何隐藏操作栏(Theme.Holo)如果Android版本低于3.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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