15

i would like to get rid of the defualt grey bar which apears at the top of my application. I just can't seem to find the attribute or setting to do so. how can this be achived? thanks

Jason
  • 4,034
  • 4
  • 40
  • 62

4 Answers4

34

Use android:theme="@android:style/Theme.NoTitleBar", either for this specific <activity> element in your manifest, or for the whole <application> element if you want it gone for all of them. Here's a FAQ entry about it.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
4

I tried the manifest method but for some reason it wasn't working. However using the .java method as described here worked.

requestWindowFeature(Window.FEATURE_NO_TITLE);
KRL
  • 223
  • 3
  • 12
3

Open app/src/main/res/values/styles.xml

<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
    </style>

</resources>
Qiu
  • 5,651
  • 10
  • 49
  • 56
Charlie
  • 33
  • 3
0

A good article why you should avoid removing the title bar from an app by Googler Reto Meier: http://blog.radioactiveyak.com/2010/07/how-to-display-android-status-bar-in.html

Read and rethink if you really need to remove the title bar from your app.

Ben Weiss
  • 17,182
  • 6
  • 67
  • 87
  • 1
    I am just removing the Title bar not the notification bar. (the one that says the name of the application) – Jason Aug 20 '10 at 23:44