Remove Title Bar on Android Application

This one’s real simple. If you want to get rid of the title bar in an Android application, you can do it programmatically with:

requestWindowFeature(Window.FEATURE_NO_TITLE);

or in the manifest for your entire application inside the ‘activity’ element with

android:theme="@android:style/Theme.NoTitleBar"
Source
  • http://profiles.google.com/senoctar Vlad Patras

    Thanks for the tutorial. It’s straight to the point.

  • sherry

    I tried this but it didn’t work. If i do it programmatically, the activity i’m calling it from crashes with a force close. Making changes in the manifest has no effect.

  • Ricardo

    Try to put this code
    android:theme=”@android:style/Theme.NoTitleBar”at the end of the tag. It works for me

  • http://www.outhorand.com outhorand

     @cb6f932ad08a90b9d1f03ef4b11736d3:disqus  It works if you have this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    NB: including the ‘this.’ and also have it on the first line of the onCreate() method of the Activity.

  • Vineeth

    Thanx for the tutorial…it really helped me …..

  • Kustaa Nyholm

    Note that the setting the theme in manifest is different from requesting no title in the code, some visual effects are different.

  • Paresh

    This is really short and sweet tutorial.. loved it..

  • Coadjoni

    Thanks. This works perfect!

  • Guest

    But *WHERE* do you have to put it?
    And how do you show *AND* hide it?

  • Al O

    Awesome.. works! Straight forward tutorial!
    I was so puzzled until I came to this page.

  • http://tech.xster.net/ xster

    glad I can help

  • Guest
  • Achint Behal

    where to put it

  • Pawan
  • Ivan

    this works but not perfect. when you lunching your app you still able to see for a short moment application title and icon “unwrapping” from shortcut to upper line on the screen. do you have an idea – how to get rid of this title bar completely but still have an icon for app shrtcut in application tray?

  • Abhinav Saxena

    getActionBar().setTitle(singleSpaceString);

    Where singleSpaceString=” “,//there is a single space as null is not allowed.