26

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

Community
  • 1
  • 1
DayDayHappy
  • 1,679
  • 1
  • 15
  • 26
  • 1
    Try selecting a theme in the Manifest, see the second answer here: [How to hide the title bar for an Activity in XML with existing custom theme](http://stackoverflow.com/questions/2591036/how-to-hide-the-title-bar-for-an-activity-in-xml-with-existing-custom-theme) – Sam Nov 13 '12 at 23:34
  • 2
    On a side note: it's called an title bar, not an action bar. [Action bar](http://developer.android.com/design/patterns/actionbar.html) is a design pattern/window feature that's present in most newer Android apps. – LukaCiko Nov 13 '12 at 23:48

2 Answers2

75

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.

Eric Barr
  • 3,999
  • 5
  • 29
  • 42
LuxuryMode
  • 33,401
  • 34
  • 117
  • 188
15

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>
mikeswright49
  • 3,381
  • 19
  • 22
  • to add Theme.NoTitleBar in application is remove all the page theme effects. If you want to remove the action on First screen add the android:theme="@android:style/Theme.NoTitleBar". Save the theme for remaining pages. – gnganapath Mar 04 '15 at 10:14