I have a scenario. Clicking the button creates a new view and deletes the existing view.
In addition, the clicked button changes to a new button that turns the page over, and a new view is created for each page and the view is deleted.
When you press the Back button on the device, a view corresponding to the previous page is created and the previous view is deleted.
If this is the scenario, would it be right to add customView in activity? Or is it right to create and add each fragment?
Tell me the best way.