You should use the activity on the screen, as this makes the best use of the framework and allows the OS to selectively kill screens if the situation becomes dense.
If you have one activity and the resources become hard, the OS has two options; kill everything or kill nothing, and if the user does not use your application, then most likely he will kill everything.
If you use Activity behind the screen, the OS can kill some screens that the user has not visited for a while, while allowing others to remain active, allowing the user to quickly return to them.
Regarding the exchange of variables and values, you can use SQLite databases or SharedPreferences repositories to transfer them, if they are widespread, or use the putExtra methods in Intent if they are used only from one screen to another.
Al sutton
source share