launchHiltFragment

inline fun <F : Fragment> launchHiltFragment(fragmentArgs: Bundle? = null, @StyleRes themeResId: Int = EmptyHiltActivity.DEFAULT_THEME, initialState: Lifecycle.State = Lifecycle.State.RESUMED): HiltFragmentScenario<F>
inline fun <F : Fragment, A : EmptyHiltActivity> launchHiltFragment(fragmentArgs: Bundle? = null, activityClass: Class<A>, @StyleRes themeResId: Int = EmptyHiltActivity.DEFAULT_THEME, initialState: Lifecycle.State = Lifecycle.State.RESUMED): HiltFragmentScenario<F>

Launches a Fragment in the Activity's root view container android.R.id.content, with given arguments hosted by an empty FragmentActivity and waits for it to reach initialState.

This method cannot be called from the main thread.

Parameters

fragmentArgs

a bundle to passed into fragment

themeResId

a style resource id to be set to the host activity's theme

initialState

the initial Lifecycle.State. Passing in DESTROYED will result in an IllegalArgumentException.