public interface

FragmentScenario.FragmentAction<F extends Fragment>

 androidx.fragment.app.testing.FragmentScenario.FragmentAction<F>

Overview

FragmentAction interface should be implemented by any class whose instances are intended to be executed by the main thread. A Fragment that is instrumented by the FragmentScenario is passed to FragmentScenario.FragmentAction.perform(F) method.

You should never keep the Fragment reference as it will lead to unpredictable behaviour. It should only be accessed in FragmentScenario.FragmentAction.perform(F) scope.

Summary

Methods
public voidperform(Fragment fragment)

This method is invoked on the main thread with the reference to the Fragment.

Methods

public void perform(Fragment fragment)

This method is invoked on the main thread with the reference to the Fragment.

Parameters:

fragment: a Fragment instrumented by the FragmentScenario.