registerContainerFragment

fun registerContainerFragment(fragment: Fragment, vararg tagToContainerId: Pair<ComponentTag, Int>)

Registers the given fragment as a container for the NavApp components, allowing NavApp to retrieve containers based on the tagToContainerId mapping.

Once all ComponentTags expected through expectContainerFor are made available, NavApp will be initialized.

This method must be called beforefragment's super Fragment.onCreate is called. Calling it later will be too late when fragments are being restored because the fragment factory registered as a result of this call is needed within Fragment.onCreate.


fun registerContainerFragment(    fragment: Fragment,     containerResolver: FragmentManagerReceiver.ContainerResolver,     componentTags: Set<ComponentTag>)

Registers the given fragment as a container for the NavApp components matching componentTags, allowing NavApp to retrieve containers using containerResolver.

Once all ComponentTags expected through expectContainerFor are made available, NavApp will be initialized.

This method must be called beforefragment's super Fragment.onCreate is called. Calling it later will be too late when fragments are being restored because the fragment factory registered as a result of this call is needed within Fragment.onCreate.