views:

52

answers:

2

I have a custom title bar that I would like to apply to all my activities. I have searched online and found a few ways of doing that however I have ran into a problem.

It seems that despite the fact I have a TextView in my titlebar with id @android:/title, Android will not use the value defined in the manifest in android:label for each activity.

I tried also calling setTitle(R.string.myTitle) but it still will not render it! If I manually put some text in my TextView in the xml it shows up fine.

How can I have a custom title bar that is linked and makes Android use my manifest values for labels? I do not want to lose the setTitle() or the XML attributes functionality.

Thanks.

+1  A: 

Try using @android:id/title instead of @android:/title.

CommonsWare
Sorry that was a typo in the original topic. I actually have @android:id/title. Does not work.
dnkoutso
A: 

Maybe this sites can help you..

http: //www.londatiga.net/it/how-to-create-custom-window-title-in-android/

or

http: //www.helloandroid.com/tutorials/how-create-custom-titlebar

anddevelop
Nope, they don't I've seen them before but from the looks of it none of those help me fix my problem which is to be able to use android:label from the manifest in xml for each activity that specifies the title so that it LINKS to the custom title bar that I Have.
dnkoutso