Android应用程序actvities安装为多个图标多个、应用程序、图标、Android

2023-09-14 23:01:38 作者:哥依旧颓废

我的Andr​​oid应用程序有2个活动。登录屏幕和搜索屏幕。当我部署在仿真器或设备上的应用程序,我看到2个图标相同的应用程序。当我点击图标1它会打开屏幕1(登录屏幕),当我点击图标2它打开屏幕2(搜索画面)。通过逻辑当我登录它应该显示在搜索屏幕。不知道当我做了错误,会有所帮助,如果有一个人能在正确的方向指向我。

My Android App has 2 activities. A login screen and a search screen. When i deploy the app on emulator or on my device, i see 2 icons for same app. When i click on icon 1 it opens screen 1 (login screen) and When i click on icon 2 it opens screen 2 (search screen). By logic when i login it should show the search screen. Not sure when i'm making the mistake, would be of help if some one can point me in right direction.

问候, 亚拉文。 ç

推荐答案

您manifest文件应该只有这条线在你想有一个图标的活动:

Your manifest file should only have this line in the activity you want to have an icon:

<category android:name="android.intent.category.MAIN" />

根据您的描述,这听起来像两个活动这一行。

Based on your description, it sounds like both activities have this line.

 
精彩推荐
图片推荐