1
I have an app with several Activitys, whenever I change Activity I run the following commands:
Intent intent = new Intent(gerenciar2.this, excluir.class);
intent.putExtra("tabbanco", tabbanco);
intent.putExtra("pagina", page2);
startActivity(intent);
gerenciar2.this.finish();
Problem is that when I run the undo of the android hardware it closes the last open Activity thus closing the application.
So I stopped executing the command MainActivity.this.finish();
only in my main activity, so when the user uses undo it returns to the main activity.
Blz, so far so good.
Problem is that I step several times to my main activity and opens one on top of the other every time I change Activity.
I need to execute the startActivity(intent);
to pass the updated parameters, so wanted before I do the startActivity(intent);
I run a method that closes the main activity before I create it again.
I did some research and I couldn’t find anything about it, so I’d like someone to give me an alternative to that.
thanks!
What I wish I could do was press the button and come back from hers and ask if I want to leave!
This answer complements my.
– Jorge B.