We can remove the default title bar provided in the system. 

There are two ways like the following examples.


The first way,

==== MainActivity.java ====

package com.example.samplebitmapwidget;


import android.os.Bundle;

import android.app.Activity;

import android.view.Menu;

import android.view.Window;


public class MainActivity extends Activity {


@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

requestWindowFeature(Window.FEATURE_NO_TITLE);

setContentView(R.layout.activity_main);

}

}


: we can remove the title bar by calling requestWindowFeature() method like the above. This method should be called before being called setContentView() method.




The second way,

==== AndroidManifest.xml ====

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"

    package="com.example.samplebitmapwidget"

    android:versionCode="1"

    android:versionName="1.0" >


    <uses-sdk

        android:minSdkVersion="8"

        android:targetSdkVersion="18" />


    <application

        android:allowBackup="true"

        android:icon="@drawable/ic_launcher"

        android:label="@string/app_name"

        android:theme="@android:style/Theme.Light.NoTitleBar" >

        <activity

            android:name="com.example.samplebitmapwidget.MainActivity"

            android:label="@string/app_name" >

            <intent-filter>

                <action android:name="android.intent.action.MAIN" />


                <category android:name="android.intent.category.LAUNCHER" />

            </intent-filter>

        </activity>

    </application>


</manifest>


: We can remove the title bar by specifying "@android:style/Theme.Light.NoTitleBar" as a value of the "android:theme" attribute.



the following is the feature removed the default title.



+ Recent posts

출처: http://large.tistory.com/23 [Large]