Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to name Android Application

Tags:

android

I have an Android App with 2 activities. I have the following in the AndroidManifest:

<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">
    <activity android:name=".MyCellTracker" android:label="@string/activity1_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
 <activity android:name=".DisplaySuccess" android:label="@string/activity2_name"></activity>

The activities are properly named, yet the application is using the project name rather than the android:label (@string/app_name) I have given it. If I go to delete the application, then I see that it is named using the android:label. Why is the name that is displayed under the icon on the program launcher not using android:label in the application node?

like image 541
nickfox Avatar asked Aug 11 '10 20:08

nickfox


People also ask

Can we change app name in Android?

Yes you can. By changing the android:label field in your application node in AndroidManifest. xml . to your Splash Screen, then the Launcher Icon name will be changed to the name of your Splash Screen Class name.

How do I rename an app on Android home screen?

Tap on the app name. Information about the app shortcut displays in the right pane. Tap the area that says “Tap to change label”. The “Rename shortcut” dialog box displays.


1 Answers

This may not be the answer you're looking for, but you can set the activity title using setTitle(string title).

Set the title programmatically, and set the app title in the manifest.xml using the main activity's label.

like image 50
Michael Pardo Avatar answered Oct 07 '22 04:10

Michael Pardo