简体   繁体   中英

Is it possible that First and Second activity will not show again when clicked the button in third activity?

Is it possible that First and Second activity will not show again when clicked the button in third activity?

Before I clicked the button in third activity, first and scond activity still can see and go back to previous.

Please can someone share code with me.? Thanks.

When you going to next activity add this in intent.

intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);

also add finish();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM