Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #clear #stack #android
ADD COMMENT
Topic
Name
8+6 =