launchStockFragmentInContainer

inline fun <F : Fragment> launchStockFragmentInContainer(    context: Context,     fragmentArgs: Bundle? = null,     crossinline instantiate: () -> F): FragmentScenario<F>

Applies all the Stock themes and then launches a Fragment in the Activity's root view container android.R.id.content, with given arguments hosted by an empty FragmentActivity using instantiate to create the Fragment and waits for it to reach a resumed state.

This method cannot be called from the main thread.

Parameters

context

the application context

fragmentArgs

a bundle to passed into fragment

instantiate

method which will be used to instantiate the Fragment. This is a simplification of the FragmentFactory interface for cases where only a single class needs a custom constructor called.