简体   繁体   English

如何在我启动应用程序时显示 Intent 而不是主 Activity

[英]how to make an Intent show up instead of the main Activity when i start the application

Long story short i made a notes app and everything works fine now i had tried to make a page where it works as a "login page"where you put your username and id and then you can login长话短说,我做了一个笔记应用程序,一切正常,现在我试图创建一个页面,它作为“登录页面”,你输入你的用户名和 ID,然后你可以登录

now that i made as an intent after i finished the app how can i make the login page show up instead of my main activity when i open the app?既然我在完成应用程序后做了一个意图,当我打开应用程序时,如何让登录页面而不是我的主要活动显示? like is there a function that can show an intent instead of the main activity when i open the app help and suggestions are welcome and thanks in advance <3像有没有一个function当我打开应用程序时可以显示意图而不是main activity帮助和建议是受欢迎的,并提前感谢 <3

The application will always open the activity defined with the <category android:name="android.intent.category.LAUNCHER" /> intent-filter in the Manifest upon launch.应用程序将始终在启动时打开 Manifest 中使用<category android:name="android.intent.category.LAUNCHER" />意图过滤器定义的活动。 You'll likely want to swap your launch activity to be this new login page and implement some sort of navigation from the login to the main activity instead of vice versa.您可能希望将您的启动活动交换为这个新的登录页面,并实现从登录到主要活动的某种导航,而不是反之亦然。 While it is called the "MainActivity", the name itself doesn't carry any special privileges or functionality in the Android SDK.虽然它被称为“MainActivity”,但名称本身在 Android SDK 中没有任何特殊权限或功能。 It's just commonly associated with the launch intent filter.它通常与启动意图过滤器相关联。 Here I am assuming your login page is also an activity.在这里,我假设您的登录页面也是一项活动。 If this is not the case or you are unsure of how to navigate, I'm happy to help.如果不是这种情况,或者您不确定如何导航,我很乐意为您提供帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 意图服务停止时如何在主要活动中启动功能? - How i start a function in main activity when intent service stop? Android Intent启动应用程序的主要活动 - Android Intent to start Main activity of application 如何在<intent-filter>的帮助下启动MAIN活动? - How can I start MAIN activity with the help of <intent-filter>? 如何(即,什么意图动作)启动电子邮件应用程序的设置电子邮件帐户活动(添加新的电子邮件帐户活动) - How (i.e., what intent action) to start the set up email account activity (add new email account activity) of the email application 收到新短信时如何启动新活动(我使用了Intent但显示错误)? - How to start new activity when recieve new sms (I used Intent but is show error)? 如何在活动中播放动画要从意图开始,到完成时要用finish() - How to make an animation play on activity start with intent, and when finished with finish() 如果我按住一个按钮,如何开始一个新的活动(有意图的),如果我松开手指又回到主要活动? - How to start a new activity (with intent) if i hold a button and get back to main activity if i release my finger? android当我在另一个活动时如何启动主要活动 - android how to start the main activity when I am on another activity 如何使应用程序从其中断处继续运行,而不是在单击图标时打开Main活动? - How do I make an app continue where it left off instead of opening the Main activity when the icon is clicked? 当调用共享意图时,调用主活动开始 - Calling main Activity to start when a Share Intent is called
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM