FragmentScenarioKt

public final class FragmentScenarioKt


Summary

Public methods

static final @NonNull FragmentScenario<@NonNull F>
<F extends Fragment> launchFragment(
    Bundle fragmentArgs,
    @StyleRes int themeResId,
    FragmentFactory factory
)

This method is deprecated. Superseded by launchFragment that takes an initialState

static final @NonNull FragmentScenario<@NonNull F>
<F extends Fragment> launchFragment(
    Bundle fragmentArgs,
    @StyleRes int themeResId,
    Function0<F> instantiate
)

This method is deprecated. Superseded by launchFragment that takes an initialState

static final @NonNull FragmentScenario<@NonNull F>
<F extends Fragment> launchFragment(
    Bundle fragmentArgs,
    @StyleRes int themeResId,
    Lifecycle.State initialState,
    FragmentFactory factory
)

Launches a Fragment with given arguments hosted by an empty FragmentActivity using given FragmentFactory and waits for it to reach initialState.

static final @NonNull FragmentScenario<@NonNull F>
<F extends Fragment> launchFragment(
    Bundle fragmentArgs,
    @StyleRes int themeResId,
    Lifecycle.State initialState,
    Function0<F> instantiate
)

Launches a Fragment with given arguments hosted by an empty FragmentActivity using instantiate to create the Fragment and waits for it to reach initialState.

static final @NonNull FragmentScenario<@NonNull F>
<F extends Fragment> launchFragmentInContainer(
    Bundle fragmentArgs,
    @StyleRes int themeResId,
    FragmentFactory factory
)

This method is deprecated. Superseded by launchFragmentInContainer that takes an initialState

static final @NonNull FragmentScenario<@NonNull F>
<F extends Fragment> launchFragmentInContainer(
    Bundle fragmentArgs,
    @StyleRes int themeResId,
    Function0<F> instantiate
)

This method is deprecated. Superseded by launchFragmentInContainer that takes an initialState

static final @NonNull FragmentScenario<@NonNull F>
<F extends Fragment<