How to Remove Title Bar/Toolbar in Android | Top 3 Methods

There are multiple ways to remove title bar or toolbar in Android Studio. If you’ve been coding for some time, you might call it the “action bar”, anyway, let’s jump straight into how we can remove the title bar in Android Studio.

Activity with Title Bar / Toolbar
Activity without Title Bar / Toolbar

You can check out YouTube tutorial on how to remove title bar too, if you’re a video person:

Removing Title Bar – Method 1

In this method, we’ll be removing the title bar programmatically. Removing title bar / toolbar programmatically is quite easy, we just request window feature first, and then we call the hide function on the actionbar. The the code below:

//hiding the title bar
requestWindowFeature(Window.FEATURE_NO_TITLE);
getSupportActionBar().hide();

Removing Title Bar – Method 2

This method is even easier than removing the title bar programmatically, we just need to use the inbuilt noactionbar or notitlebar themes according to if you’re using appcompat or not. You can just copy and paste the theme from the example below:

 <activity
   android:name=".MainActivity"
   android:theme="@style/Theme.AppCompat.NoActionBar">
</activity>

If you’re not using AppCompat, you can use this theme: @android:style/Theme.Black.NoTitleBar

NoActionBar Theme Applied to Activity

Removing Title Bar – Method 3

This method is pretty much same the second method to remove the title bar, but instead of applying the theme to an activity, we apply it to the application tag so that it is applied to all the activities and there is no title bar in all the activities.

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

If you’re using AppCompat, you can use the theme @android:style/Theme.AppCompat.NoActionBar as used in number 2 above

NoActionBar theme applied to application

There it is, now you can choose method of your liking to remove or hide title bar in your Android app, you can learn more about Android here: Android Tutorials. If you have any issue, feel free to let me now in the comment section below.

Don’t miss these tips!

We don’t spam! Read our privacy policy for more info.

You’ve been successfully subscribed to our newsletter! See you on the other side!

Sharing is caring!

Leave a Comment

Your email address will not be published.

Exit mobile version