Mediha
Mediha

Reputation: 760

Set android application's name

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?

Upvotes: 0

Views: 107

Answers (2)

André Diermann
André Diermann

Reputation: 2783

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...

Upvotes: 0

JesusS
JesusS

Reputation: 1665

On your onCreate()

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

Being (R) the copyright symbol :)

Upvotes: 1

Related Questions