Answers for "clear back stack android"

0

clear back stack android

Intent intent = new Intent(this, A.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); 
startActivity(intent);
CurrentActivity.this.finish(); // if the activity running has it's own context


// view.getContext().finish() for fragments etc.
Posted by: Guest on February-26-2021
0

how to clear activity stack in android

intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
Posted by: Guest on June-20-2020

Code answers related to "clear back stack android"

Browse Popular Code Answers by Language