0

Possible Duplicate:
Android: Custom Title Bar

I want to make custom title bar for my application for cahnging the color of my applicatin name.How can i do this?

Community
  • 1
  • 1
Pep
  • 11
  • 1
  • 1
  • [Best example](http://www.edumobile.org/android/android-programming-tutorials/creating-a-custom-title-bar/) – Praveenkumar Apr 20 '12 at 05:42
  • This is the best example for creating a custom title bar... http://www.londatiga.net/it/how-to-create-custom-window-title-in-android/ – wolverine Apr 20 '12 at 05:28

1 Answers1

1

Write this thing in your Activity.

getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle);

And mytitle layout is the xml file which will be shown as title menu. Following is a small example.

<?xml version="1.0" encoding="utf-8"?>
<TextView
 xmlns:android="http://schemas.android.com/apk/res/android"
 android:id="@+id/myTitle"
 android:text="custom title bar"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:textColor="@color/titletextcolor"
 android:gravity ="center"/>

OR IF YOU ONLY WANT TO WRITE THEN

setTitle("Your TITLE");

You can make your OWN. Other References Reference 1, Reference 2.

Bhavin
  • 6,020
  • 4
  • 24
  • 26