In this section, we are going to review briefly the key concepts of fragments to explain advanced features and components, such as Fragment Manager and the fragments back stack.
In our example, we will create an activity called
MainActivity and four fragments:
DetailsFragment. For this, you can create a
fragments package and double-click on the package to go to New | Fragment | Blank Fragment. Take a look at the following dialog box:
For now, you can create them without the fragment factory methods and the interface callbacks. We will cover these later in the chapter.
Our project so far ...