andreluizreis
3/30/2017 - 1:12 AM

Kill the current activity, clear back stack, finish ----- Link: http://stackoverflow.com/questions/8631095/android-preventing-going-back-to-

// Kill current activity when press back button
@Override
public void onBackPressed() {
    finish();
}

// Close current activity after load the one called.
Intent intent = new Intent(CharacterActivity.this, nextActivity.getClass());
startActivity(intent);
// Kill the current activity
finish();

// After Android 16 / Jellybean
// This command kill all activities 
finishAffinity();