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?
Change the name of the launcher activity using android:label. Seems to do the trick for me.
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"/>
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>
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With