android studio delete activity code example
Example: how to destroy activity in android
Intent intent = new Intent(this, NextActivity.class);
startActivity(intent);
finish();
Intent intent = new Intent(this, NextActivity.class);
startActivity(intent);
finish();