Android的 - 启动多个活动 [英] Android - start multiple activities

查看:87
本文介绍了Android的 - 启动多个活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是有可能同时启动多个活动?我的意思是,从主创建3个活动离子的一些秩序和公正的最后将是可见的?到现在为止,我能只创建一个活动。

is it possible to start multiple activities at once? I mean, from main create 3 activities ion some order and just the last will be visible? Up to now, I was able to create only one activity.

感谢

推荐答案

您可能需要像这样以深启动到应用程序后,用户点击的通知,以显示一些新添加的内容,例如。

You might need something like this in order to launch deep into the app after the user has clicked a notification in order to display some newly added content, for example.

Intent i = new Intent(this, A.class);
i.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(i);

Intent j = new Intent(this, B.class);
j.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(j);

Intent k = new Intent(this, C.class);
startActivity(k);

在此,您就可以开始活动A,B和C在同一时间和SUP preSS转换到活动A和B.您从当前的活动到活动C.一个过渡,我强烈建议你登录活动的生命周期方法调用(的onCreate等)LogCat中,例如。它有很大帮助理解事件的顺序

In this way you can start activities A, B and C at the same time and suppress transitions to activities A and B. You get a single transition from your current activity to activity C. I strongly suggest that you log the Activity lifecycle method calls (onCreate etc.) to LogCat, for example. It helps a lot in understanding the order of events.

这篇关于Android的 - 启动多个活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆