views:

571

answers:

2

Hi,

I think i'm getting senile because I was convinced that to give a name to your application, you had to fill this part of the manifest :

<application android:icon="@drawable/icon"  android:label="MyApplicationName">

However for a reason I don't understand, my application gets the name of my first activity, in which I load data, henceforce, It is called "Loading"...(defined as follows in the manifest)

<activity android:name="AccueilSplash" android:label="Loading">

Any idea why that is?

+1  A: 

Are you referring to the title at the top of the screen when you run the application? If so, that title bar shows the label of the current activity I believe.

Matt Swanson
Yeah I know that, this title at the top of each activity can be named by the label as defined hereabove in my manifest. But I'm speaking of the name of the application. Actually, it's the name displayed just below the icon of the application, on the desktop of the phone...
Sephy
After doing some testing, I could only get it to work by using an externalized string for the application label. <application android:icon="@drawable/icon" android:label="AnyStringHere">Would yield no change. However <application android:icon="@drawable/icon" android:label="@string/app_name">Would show whatever I set "app_name" to in the strings.xml
Matt Swanson
+2  A: 

The launcher actually shows android:label and android:icon for activity(ies) that declare

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

so application label is of no use.

alex
Actually the application label is used if your activity doesn't itself have a label. My suggestion is to always set a label and icon on your applications (this will show up in places like manage apps), and only set the label or icon on activities that need to be different than the overall application.
hackbod
Right, so if I want a proper name for my app, I need to set my first activity label...That's what I thought.Thx
Sephy