Horse
Horse

Reputation: 3063

Android App has more than one launcher

So I have an app, with 2 activities. For some reason I am getting 2 launcher icons, one for each activity, but I only want one!

The Game activity had an intent-filter which i removed. I also uninstalled the app and reinstalled it from scratch but its still coming up with both launchers :(

Manifest below

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <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>
    <activity
        android:name=".Game"
        android:label="@string/title_activity_game" >
    </activity>
</application>

Upvotes: 0

Views: 201

Answers (1)

nhaarman
nhaarman

Reputation: 100388

You need to remove the label tag from your second Activity.

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <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>
    <activity
        android:name=".Game" >
    </activity>
</application>

Upvotes: 2

Related Questions