Android : How to disable or remove application name title bar


When building Android application, it will have Application Title on top bar as default. We can remove this app title bar with 2 ways. Here is how to remove title bar:

1. Using AndroidManifest.XML
In the Activity, we can set the Theme using NoTitleBar, like this:

1
2
3
4
5
<activity
     android:name="com.yodi.calendar.MainActivity"
     android:theme="@android:style/Theme.Black.NoTitleBar"
     android:label="@string/app_name" >
</activity>

2. Define in Activity
Which on the files that contain Activity, we can set the RequestWindowFeature with Window.FEATURE.NO_TITLE and set flags before we set the ContentView.

1
2
3
4
5
6
7
8
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Remove application title
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_main);

Now when we running the application, the title application will be dissapear 🙂


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.