Why is my Android app name same as the launcher activity name?

Sibbs Gambling picture Sibbs Gambling · Jun 20, 2013 · Viewed 13.1k times · Source

I understand that android:label= decides the name of the app.

I have done it properly as follows:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.drsystem"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="16" />

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" >
    </uses-permission>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
    </uses-permission>

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.drsystem.LoginActivity"
            android:label="@string/title_activity_login" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.example.drsystem.CalibrationActivity"
            android:label="@string/title_activity_calibration" >
        </activity>
        <activity
            android:name="com.example.drsystem.DeadReckoningActivity"
            android:label="@string/title_activity_dead_reckoning" >
        </activity>
    </application>

</manifest>

But my app name appears beneath the icon on the screen is still "@string/title_activity_login"

I want it to be "@string/app_name"

Anyone can help?

Thanks in advance

Answer

Patrice GILBERT picture Patrice GILBERT · Jun 3, 2016

It's not really weird, but just good to know : the Android's launcher use the Intent Launcher Label or if not set, the activity's label and finally application's label

 <intent-filter android:label="@string/app_name">
     <action android:name="android.intent.action.MAIN" />
     <category android:name="android.intent.category.LAUNCHER" />
 </intent-filter>