如何回来的第三个活动的第一项活动?第三个、第一项

由网友(人心难测ヽゝ)分享简介:我有三个活动A,B和; C.Now的任务,我有这种形式的A,B和C,在默认的Andr​​oid标准模式下的活动导航发生这样的A-> B-> C-> B-> A.Now我想在这里是当我去到活动C来自B,当我回到pressed在活动我去previous活动即,B,但我想回来到A从C.How实现这个任何人都可以告诉这个?...

我有三个活动A,B和; C.Now的任务,我有这种形式的A,B和C,在默认的Andr​​oid标准模式下的活动导航发生这样的A-> B-> C-> B-> A.Now我想在这里是当我去到活动C来自B,当我回到pressed在活动我去previous活动即,B,但我想回来到A从C.How实现这个任何人都可以告诉这个?

I have three activities A,B & C.Now the Task i have this form A,B and C,in default android "standard"mode The activities navigation takes place like this A->B->C->B->A.Now What I want here is when I went to Activity C from B,when i backPressed In activity I went to previous Activity i.e.,B But i want to come back to A from C.How to achieve this could anyone tell about this??

,我想通过做标志的意图或者如果可能的话想申请launchmodes的活动,但我很困惑,它发射方式,我应该用它来实现这一目标?-could任何一个,请帮我在这

,I want to do through intent flags or if possible want to apply launchmodes for the activities,But i am confused which launch mode should i use to achieve this ?-could any one please help me in this

在此先感谢

推荐答案

刚刚推出一个新的意图并清除活动的堆栈中。

Just launch a new intent and clear the activities on the stack.

 Intent intent = new Intent(this, A.class);
 intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
 startActivity(intent);
阅读全文

相关推荐

最新文章