机器人:windowNoTitle不会隐藏动作条与appcompat-V7 21.0.0机器人、动作、windowNoTitle、appcompat

由网友(死在回忆里)分享简介:我更新appcompat-V7棒棒糖版(21.0.0)I updated appcompat-v7 to lollipop version(21.0.0)那么我不能隐藏动作条与下面的工作之前的风格。then I can't hide ActionBar with following style that work...

我更新appcompat-V7棒棒糖版(21.0.0)

I updated appcompat-v7 to lollipop version(21.0.0)

那么我不能隐藏动作条与下面的工作之前的风格。

then I can't hide ActionBar with following style that worked before.

<style name="AppTheme.NoActionBar">
    <item name="android:windowActionBar">false</item>
    <item name="android:windowNoTitle">true</item>
</style>

我将它设置为特定的活动。

I set it to specific activity.

<activity android:name=".NoActionBarActivity"
        android:theme="@style/AppTheme.NoActionBar"/>

当我使用appcompat-V7 20.0.0版本,动作条将被隐藏,因为它的目的。

When I use appcompat-v7 20.0.0 version, actionbar will be hidden as it is intended.

如何隐藏动作条带有自定义样式 AppCompat 21版库?

How can I hide actionbar with custom style with AppCompat version 21 library?

推荐答案

@ Chk0nDanger 你的答案是正确的,但是,你应该使用下面code:

@Chk0nDanger your answer is true but you should use below code :

<style name="Theme.AppCompat.NoActionBar" parent="Theme.AppCompat.Light">
   <item name="windowActionBar">false</item>
   <item name="android:windowNoTitle">true</item>
</style> 

无父元素,一切都将是白色( textviews 按钮 chekcboxs 等)!

的manifest.xml 文件:

    <activity android:name=".MyClass"
        android:theme="@style/Theme.AppCompat.NoActionBar"
        />

更新2015年7月29日

确认安卓windowNoTitle windowNoTitle 替换时升级到 AppCompat V22 .1.0

阅读全文

相关推荐

最新文章