This app has a simple fragment that takes up the entire activity screen. The fragment is added statically to the XML layout file so it is displayed for the entire duration of the activity.
- Fragments can retain an instance of its data after a configuration change (such as changing orientation). While an Activity is destroyed and recreated when a device's configuration changes, a Fragment is not destroyed.