Search code examples
androidandroid-optionsmenu

Creating5 icons when installing the apk in the device


In my app I have create 4 option menu using

public boolean onCreateOptionsMenu(Menu menu) 

Now when I am installing the apk on the device, it shows 5 icon of the apk in the device. 4 of the icons will direct it in to the particular menu click, while one icon will direct to the app. why it is happening?


Solution

  • You might have used the following code in every activity tag in maifest file

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

    use this intent filter only in launcher activity