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

编程入门 行业动态 更新时间:2024-10-28 20:29:21
本文介绍了Android应用程序actvities安装为多个图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的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.

更多推荐

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

本文发布于:2023-11-06 22:05:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1564798.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   应用程序   图标   Android   actvities

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!