activity跳转到新的activity后清除之前的activity

Intent intent = new Intent(A.this, B.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);

 

posted @ 2016-09-08 20:34  Red_Code  阅读(2914)  评论(0编辑  收藏  举报