0

I am trying to set the name of my application and the name of my first activity to different values (I need trademark sign in my activity label, but not in the app name). I found this Naming my application in android and in the last comment the said if I set the app name using @string it will have affect, but it doesn't have. Is ther any way to do this?

Community
  • 1
  • 1
Mediha
  • 580
  • 2
  • 8
  • 22
  • You mean have a different name between your launcher activity and the name in the action bar (the application name, which can be seen in application informations, is not the same as the launcher activity)? – Kyriog Jul 10 '13 at 10:44
  • The application name (it is visible on the phone home screen with others applications) and the launcher activity name visible in activity ActionBar. – Mediha Jul 10 '13 at 11:02
  • Sorry, but that's wrong. The application name is NOT the name visible on home screen with other applications. It's the launcher activity name. The application name is visible in Settings -> Applications. – Kyriog Jul 10 '13 at 12:20

2 Answers2

1

On your onCreate()

String title = getTitle().toString();
setTitle(title + "(R)");

Being (R) the copyright symbol :)

JesusS
  • 1,575
  • 1
  • 17
  • 31
  • This also sets different values to app name (visible on phones home page) and launcher activity name, but this (R) is not trademark sign. It is better to use EchoSign® – Mediha Jul 10 '13 at 11:01
0

AFAIK there is no way to achieve this in the manifest since the name attribute is used in the launcher automatically (I suggest that's what you mean with 'application name'). But you can do this in your code by simply using:

setTitle(R.string.yourActivityTitle)

-> The string in your manifest is used as "application name" and the string in your code is used for activity name.

Hope that helps...

André Diermann
  • 2,515
  • 18
  • 27