Search code examples
androidmenuandroid-homebutton

android menu Home item


I'm running my android app on my droid x2 device. this app has a menu with some items, one of which is the Home (the screen that launches when the app starts).

the problem is that when I tap on the Home item it brings up this menu,

enter image description here

I don't know why it does that and how i can fix it.


Solution

  • I actually fix this issue by adding a new activity to my manifest file. so what I had for the launcher activity was

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

    and I also added the following activity which would act just as a normal activity and in my menu selection I used the action name of this new activity.

        <activity
            android:label="@string/app_name"
            android:name=".Home" >
            <intent-filter >
                <action android:name="com.mywebsite.app.HOME" />
    
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>