Android Title Bar Example

By | April 9, 2013

In this tutorial you will see the about how to remove title and also how to make an activity to occupy fullscreen .

Normally in android the activity (screen) composed of three portions they are

 1)System Tool Bar
 2)Application Title Bar
 3)Application Content


Android Activity Detail




Lets See An Example

Create XML file
File:-activity_main.xml








Create Class 
File :- MainActivity.xml

package com.pavan.removetitlebar;

import android.app.Activity;
import android.os.Bundle;

public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

}
}
Android Activity With Title Bar



Removing Title Bar

To remove the title bar for an activity ,just go to the manifest.xml file and there under actvity tag add the following property

  android:theme=”@android:style/Theme.NoTitleBar”

File:-Manifest.xml



<uses-sdk android:minsdkversion="8" android:targetsdkversion="17">
















Android Remove Title Bar

Full Screen 

To make an activity to occupy device fullscreen , just go to manifest.xml file and there under activity tag add the following property

  android:theme=”@android:style/Theme.NoTitleBar.Fullscreen”

File:-Manifest.xml


<uses-sdk android:minsdkversion="8" android:targetsdkversion="17">












Android Activity Full Screen

RemoveTitleBar (No title bar).Zip
RemoveTitleBar(No title bar and full screen).Zip