Reputation: 27125
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
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
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
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
Reputation: 3453
Change the name of the launcher activity using android:label. Seems to do the trick for me.
Upvotes: 11