android launcher page on the menu

强颜欢笑 提交于 2019-12-20 06:47:49

问题


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,

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

It works fine on the simulator, I'm gussing this is something that needs to be set up on the device.

I need to know if some has seen this menu before and if so what it is and when it shows up?


回答1:


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>


来源:https://stackoverflow.com/questions/8317873/android-launcher-page-on-the-menu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!