FLAG_ACTIVITY_NO_HISTORY :If set, the new activity is not kept in the history stack. As soon as the user navigates away from it, the activity is finished. This may also be set with the noHistory
attribute.
A 啟動(dòng)B 的時(shí)候 設(shè)置 intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); 然后 B 啟動(dòng) C ,
然后 按返回鍵,這個(gè)時(shí)候界面顯示不是B,而是 A 。注意B 是在這個(gè)時(shí)候執(zhí)行的 finish 。
聯(lián)系客服