launchInContainer
Launches a Fragment in the Activity's root view container android.R.id.content, with given arguments hosted by an empty FragmentActivity themed by themeResId, and waits for it to reach initialState.
This method cannot be called from the main thread.
Parameters
a fragment class to instantiate
a bundle to passed into fragment
a style resource id to be set to the host activity's theme
The initial Lifecycle.State. Passing in DESTROYED will result in an IllegalArgumentException.
Launches a Fragment in the Activity's root view container android.R.id.content, with given arguments hosted by an empty EmptyHiltActivity themed by themeResId, and waits for it to reach initialState.
This method cannot be called from the main thread.
Parameters
a fragment class to instantiate
the activity that will host this fragment
a bundle to passed into fragment
a style resource id to be set to the host activity's theme
The initial Lifecycle.State. Passing in DESTROYED will result in an IllegalArgumentException.