[英]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.