1

A similar question has been posted before but no satisfying answers yet.. The question is simple. I am using a custom Title Bar in my application (in the form on an image having text). However, When I use a title for the Launcher (the text beneath the launcher icon), it automatically sets the text for activity title and displays it under my customized title bar. If I use setTitle(""); at the start of the application to remove the title text, even then it shows it for a second ; enough to be noticed and if I completely remove the title bar text then it also removes the launcher title as well.. The application_label in Manifest file has nothing to do with the launcher title. The launcher title is obtained from Activity title which is quite annoying for me.. Any useful suggestions??

2 Answers2

0

Did you use setTitle("") BEFORE calling setContentView(R.layout.your_activity) ? If so, it shouldn't show the text defined in your manifest at all because the setTitle() method call should have finished before the view is displayed. I use the same method to change the Title Bar text (and still maintain the Launcher text as defined in the manifest).

I will agree that it's strange the Launcher text isn't based on the android:label tag of <application>. The workaround of calling setTitle() in onCreate (before setContentView()) should do the trick though.

robguinness
  • 16,266
  • 14
  • 55
  • 65
0

I understand you have two title bars? One 'from Android' and the other is your custom bar?

You can hide the Android-bar by using android:theme="@android:style/Theme.NoTitleBar" in the relevant activity in the manifest.

nhaarman
  • 98,571
  • 55
  • 246
  • 278