My Android app is not displaying the application name \"app_name\", instead its displaying the activity name \"title\". This is from my manifest file;
<
You can just set your launcher activitys label as the app name and then set the actionBar title manually in code for that activity
getSupportActionBar().setTitle(R.string.title_user_login);
This is of course if you are using an action bar. Normal activity title headings are ugly anyway!
EDIT: saying that you can see the text change on start up!
If you or somebody is still facing the problem then here is the solution which worked for me.
Keep the Application label and Main activity label same in manifest as shown below
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Main"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
in main.java file set the label of your activity as shown below (I guess you are using action bar)
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle(getResources().getString(R.string.title));
before installing this changed app, uninstall the previous version reboot your phone and now install the changed app.
I hope this helps.
Use
this.setTitle("");
in your onCreate() method of your activity and use your prefered application name in the @string/app_name for
<application> android:lable = "@string/app_name" </application>
If you are using Android studio, also you are using MapsActivity then you should extend ActionBarActivity, also put app name at String.xml. It's works for me. thanks
<resources>
<string name="app_name">App Name</string>
<string name="title_activity_maps">Map</string>
You can only display one label at a time. Application label or Activity label.
If you set a label and run an activity, you will see the Activity label.
To see Application label, doesn't set android:label="@string/title"
on Main activity.
In all activities you should change the value of
android:label
to
"@string/app_name"
UPDATED:
well the answer is that The First Activity with the label @string/title is your main activity which comes on the Launcher menu . So you have to set the label to that activity. Other Solution is that You create a Temp Activity and Call you Main Activity from there and set Your Main Activity the title Label and your Temp activity the App_name label and make your Temp Activity the Main Launcher.
Hope this Helps
Thanks