The detail container is a FrameLayout
because the Fragment
that is displayed will be replaced using FragmentTransaction
‘s replace()
method.
The first argument to replace()
is the ID of container whose Fragments will be replaced. If the FrameLayout in this example were replaced with a Fragment, then both the WorkStationListFragment
and whatever detail Fragment is currently shown would be replaced by the new Fragment. By encapsulating the Fragment within a FrameLayout, you can replace just the details.