Ideally, your application should have two different activities. You can add or remove a view component in a view, but if you are looking for two completely different screens, I would suggest you switch to a new activity.
I understand what you mean by "and also when the user presses the Bakc button, the first screen loads, but does not exit the application"
If you do not want to show the first screen, just complete the () action.
Manish khot
source share