重用主要活动
我有一项主要活动,我将从一项活动切换到 另一个..所以我不想每次都重新初始化..第一次之后 创建时,应该调用相同的活动而不必创建它 一遍又一遍..我该怎么做? #android新手
I have a main activity from where I will be switching from one activity to
another..So i don't want to re initialize every time..After the first time
of creation , the same activity should be called without having to create it
over and over again..how do I do this? #newbie-android
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您想要做的只是开始您的活动并通过将它们带到前台来在它们之间进行切换。您应该参考此问题以获取可能的解决方案。此文档可能也会有所帮助。
What you want to do is simply start both your activities and switch between them by bringing them to the foreground. You should refer to this question for a possible solution. This documentation might also help.