Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android strange behavior while changing application name and activity label

I am facing very strange issue with android manifest file.

I have manifest something like this.....

<application android:icon="@drawable/icon" android:label="TestApplication">
    <activity android:name=".Test"  android:label="Test"  >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

</application>

Then in that case the name of my application is "TestApplication" which should be appear on the device menu with icon. The name of launcher activity is "Test" which should be appear on the Title Bar when application launches.

But the problem is the application is showing the name "Test" as application name with icon on menu.....but it must show "TestApplication" as i have set the application name.

I am so stuck that why it is showing the launcher activity name as application name however i have specified the application name explicitly.....

Please resolve the issue

Thanks

Nikhil

like image 388
user990876 Avatar asked Oct 16 '11 06:10

user990876


1 Answers

This is how it is supposed to work. If you specify a label for your launch activity, that label will be displayed under the icon. If you do not specify a label, then the Application name will be used.

If you want the name next to the icon to be TestApplication then you must remove the label from the Activity. If you then want the title to be Test, you'll need to create a custom title bar.

like image 146
goto10 Avatar answered Sep 28 '22 08:09

goto10