How to hide the application title in Android?

I want to hide the application title bar.

+64
android
May 19 '10 at 2:44
source share
3 answers

You can do this programmatically:

import android.app.Activity; import android.os.Bundle; import android.view.Window; import android.view.WindowManager; public class ActivityName extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // remove title requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.main); } } 

Or you can do it through the AndroidManifest.xml file:

 <activity android:name=".ActivityName" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"> </activity> 

Edit: I added a few lines so you can show them in full screen since it seems like you want to.

+117
May 19 '10 at 3:19 a.m.
source share
— -

use

 <activity android:name=".ActivityName" android:theme="@android:style/Theme.NoTitleBar"> 
+54
09 Oct 2018-11-11T00:
source share

You can do this programmatically: or without an action bar

 //It enough to remove the line requestWindowFeature(Window.FEATURE_NO_TITLE); //But if you want to display full screen (without action bar) write too getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.your_activity); 
+17
May 28 '13 at 11:14
source share



All Articles