18

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

Sibbs Gambling
  • 19,274
  • 42
  • 103
  • 174
  • Problem solved and detailed here -> [Naming my application in android](http://stackoverflow.com/a/23155350/3420447) – Re MiDa Apr 18 '14 at 13:43

3 Answers3

20

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>
Patrice GILBERT
  • 274
  • 3
  • 5
  • I am observing different results for different devices regarding to other answer except this one. This works like charm. – guness Sep 24 '17 at 15:04
10

Naming my application in android

This is a bit weird in android... App name is pretty much determined by first activity label.. or application label if it isn't set.

Community
  • 1
  • 1
bryanph
  • 993
  • 7
  • 18
  • What you see in the launcher is not app name. One app can have multiple entries in the launcher. Or none at all. Your app name **is** determined by what you put in your application tag. But launcher displays the label of the activity it launches. – Marcin Koziński Jun 03 '16 at 21:21
1

Just remove this line android:label="@string/title_activity_login" from the Manifest file

petrrr33
  • 583
  • 9
  • 24