FragmentScenario.FragmentAction


public fun interface FragmentScenario.FragmentAction<F extends Fragment>


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 FragmentAction.perform method.

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

Summary

Public methods

abstract void
perform(@NonNull F fragment)

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

Public methods

perform

Added in 1.1.0
abstract void perform(@NonNull F fragment)

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

Parameters
@NonNull F fragment

a Fragment instrumented by the FragmentScenario.