如何更改android中的启动活动[关闭](How to change the startup activity in android [closed])

编程入门 行业动态 更新时间:2024-10-25 06:22:52
如何更改android中的启动活动[关闭](How to change the startup activity in android [closed])

第一次使用该应用程序时,我将向用户显示一个登录屏幕,我将在清单文件中将其定义为“android.intent.action.MAIN”。 成功登录后,每次应用程序启动时,我都希望用户看到主屏幕。 请让我知道如何实现这一目标。

另请告诉我有什么办法可以在成功登录后以编程方式更改MAIN活动,这样我就可以重定向到主屏幕了。

谢谢,

维杰

For the first time use of the application I will show the user with a login screen which i will defined in manifest file as "android.intent.action.MAIN". After a successful login, each time application starts I want the user to see the home screen. Please let me know how i can achieve this.

Also please let me know is there any way I can change the MAIN activity programmatically after a successful login, So that I can redirect to the home screen.

Thanks,

Vijay

最满意答案

如果您继承Application类并从Application的onCreate()调用所需的活动,该怎么办? 在清单中你删除了那个intent.MAIN 。

What if you subclass Application class and call the activity you need from your Application's onCreate() ? And in the manifest you remove that intent.MAIN.

更多推荐

本文发布于:2023-07-28 08:32:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1303031.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何更改   android   change   closed   activity

发布评论

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

>www.elefans.com

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