Chk0nDanger Chk0nDanger - 5 months ago 56
Android Question

android:windowNoTitle will not hide actionbar with 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>

I set it to specific activity.

<activity android:name=".NoActionBarActivity"

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

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


@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>

without parent element, everything will be white color (textviews,buttons,chekcboxs, etc)!

in your manifest.xml file :

    <activity android:name=".MyClass"

updated 2015 29 July

make sure android:windowNoTitle should be replaced by windowNoTitle when Upgraded to AppCompat v22.1.0