1''
1''

Reputation: 27125

Android: change app name in home screen

My app displays the name of its starting activity on the Home screen. I've tried to change the name by setting the android:label attribute in the manifest, under <application> to no avail. What is the correct way to accomplish this?

Upvotes: 11

Views: 8114

Answers (4)

user2664280
user2664280

Reputation: 41

FYI, The above works for fresh copies being installed on your phone. If the old copy is copied over sometimes the change in name doesn't work. Uninstall previous version, with previous name if the name isn't updated.

Upvotes: 2

Tonithy
Tonithy

Reputation: 2290

Any activity with an intent filter for android.intent.category.Launcher will show up in the app drawer. You have to set a label for the activity as well as the application, the label for the activity (android:label="@string/title_activity_main") is what will show up in the app drawer.

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:configChanges="orientation|keyboardHidden"
        android:label="@string/title_activity_main"
        android:screenOrientation="portrait" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

Upvotes: 9

Booger
Booger

Reputation: 18725

Why don't you change the name in your manifest, so it represents what you would like it to read.

In your manifest, use the element where you define your Activity, to have the following:

<activity android:name=".YourActivity" android:label="whatever you want"/>

Upvotes: 5

AndroidPenguin
AndroidPenguin

Reputation: 3453

Change the name of the launcher activity using android:label. Seems to do the trick for me.

Upvotes: 11

Related Questions