The method "sendSave" closes the application, but when I go to andorid to reopen the application the code of the onRestart () method does not execute in the terminal. Code:
protected void onStart() {
exitButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
exitNotSave(view);
finish();
}
});
}
public void exitNotSave(View a){
....
}
@Override
protected void onRestart() {
super.onRestart();
setContentView(R.layout.activity_simplenotes);
System.out.println("onRestart\n");
}
The question is. How do I make the button send the application to onStop ()?