A parent Activity
manages its Fragment
s with a FragmentManager (package android.app
) that’s returned by the Activity
’s getFragmentManager method. If the Activity
needs to interact with a Fragment
that’s declared in the Activity
’s layout and has an Id, the Activity
can call FragmentManager
method findFragmentById to obtain a reference to the specified Fragment
. As you’ll see in Chapter 8, a FragmentManager
can use FragmentTransactions (package android.app
) to dynamically add, remove and transition between Fragment
s.