Выйти / Завершить приложение / деятельность - Android
У меня есть 4 действия, скажемAct1
, Act2
, Act3
а такжеAct4
.
A button in Act1 opens Act2, a button in Act2 opens Act3, a button in Act3 opens Act4.
Я хочу сделать две вещи:
I've a button in Act4 which directs the user to Act1, the prob is when the user clicks back in Act1, i want to close the app instead of opening the Act4..
I've option in menu 'exit' in all activities when the user choose it, i want to close the app instead of going back to previous activity.
Пробовал с помощьюfinish();
но это не соответствовало моим требованиям.