android launcher page on the menu

后端 未结 1 813
陌清茗
陌清茗 2021-01-26 16:26

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 prob

相关标签:
1条回答
  • 2021-01-26 17:06

    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>
    
    0 讨论(0)
提交回复
热议问题