Android application name wont show in app drawer

android, android-layout

Solution

Android by default takes the name of the first first activity (android.intent.action.MAIN) as the display name of the app. To set the title for your activity you should make a setTitle() call from within your activity. E.g.

Your manifest looks like this:

<activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

Your activity looks like this:

public class EntryPoint extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    setTitle(R.string.title_activity_main);

}

Hope that helped.

Problem

I followed this tutorial on changing the name of my Android Application by changing the field `android:label`in the application node of the manifest(AndroidManifest.xml). application node: ``` <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/Theme.pps" > <activity android:name=".MainActivity" android:label="@string/title_activity_main" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> ``` strings.xml - XML file containing the names of the different strings. ``` <resources> <string name="app_name">PPS</string> <string name="menu_settings">Settings</string> <string name="title_activity_main"></string> </resources> ``` After completed this task the name still wont show. This is what I see when I run the application and its installed on my testing device. A weird thing happened when I changed the value of the `android:label` present in the activity node by adding text to `<string name="title_activity_main"></string>` , the application seemed to inherit that as its name.Why is this happening? Did I declare something incorrectly? Are some values clashing? Update: When I select "Manage Apps" I actually see the name of the application.

Original source

Related problems