Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove android default action bar [duplicate]

Possible Duplicate:
How to hide the title bar for an Activity in XML with existing custom theme

i remove the action bar by requestWindowFeature(Window.FEATURE_NO_TITLE); however, when the app starts, the action bar appears in a very short time before it executes the above statement. how can I make it totally disappear? thank

like image 299
DayDayHappy Avatar asked Sep 09 '25 15:09

DayDayHappy


2 Answers

I've noticed that if you set the theme in the AndroidManifest, it seems to get rid of that short time where you can see the action bar. So, try adding this to your manifest:

<android:theme="@android:style/Theme.NoTitleBar">

Just add it to your application tag to apply it app-wide.

like image 137
LuxuryMode Avatar answered Sep 13 '25 13:09

LuxuryMode


You can set it as a no title bar theme in the activity's xml in the AndroidManifest

    <activity 
        android:name=".AnActivity"
        android:label="@string/a_string"
        android:theme="@android:style/Theme.NoTitleBar">
    </activity>
like image 41
mikeswright49 Avatar answered Sep 13 '25 14:09

mikeswright49