1

In my project when application is get installed it naming the app name as {@string/welcome_msg} not {@string/app_name}. Is there any way to make the application name not same as Main Activity label?

Below is my manifest code:-

<application android:theme="@style/AppTheme" android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".StartActivity" android:label="@string/welcome_msg">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".LoginActivity" android:label="@string/login">
            <intent-filter>
                <action android:name="com.gymup.project.LOGINACTIVITY" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
</application>
AvMishra
  • 1,365
  • 3
  • 14
  • 25
  • pardon my ignorance, but why does it matter? – Ian Nov 12 '11 at 22:05
  • Hi Ian, actually when my app starts I need to show a splash screen ,which is working great but before showing a splash screen application is showing title bar (Main activity label {@string/welcome_msg}) for a while. I just want to stop this title bar. If you have seen yahoo mail then when we click on icon it shows splash screen without any title and notification bar. I have written removal code of title bar and notification bar in onCreate method of activity. – AvMishra Nov 12 '11 at 22:23

2 Answers2

2

Change the label in your manifest to the app's name, then in your code use

this.setTitle( R.string.lable );

on onCreate(..)

Joe Simpson
  • 2,546
  • 4
  • 30
  • 46
  • Actually my Main activity is splash screen(in code i removed title and notification). when I am removing android:label(android:label="@string/welcome_msg") from Main activity it solved my problem but application is stilling showing title (application's label android:label="@string/app_name") for a while. – AvMishra Nov 12 '11 at 20:39
0

You're avoiding the real question here:

How to get ride of title bar?

Answer:

In activity entry of manifest: android:theme="@android:style/Theme.NoTitleBar"

Ian
  • 3,500
  • 1
  • 24
  • 25