Class FragmentController<F extends Fragment>
java.lang.Object
org.robolectric.android.controller.ComponentController<FragmentController<F>,F>
org.robolectric.android.controller.FragmentController<F>
- Type Parameters:
F
- a class of the fragment which is under control by this class.
@Deprecated public class FragmentController<F extends Fragment> extends ComponentController<FragmentController<F>,F>
Deprecated.
Native Fragments have been deprecated in Android P. Android encourages developers to
use androidx fragments, to test these use FragmentScenario.
FragmentController provides low-level APIs to control fragment's lifecycle.
-
Field Summary
Fields inherited from class org.robolectric.android.controller.ComponentController
attached, component, intent, myself, shadowMainLooper
-
Method Summary
Modifier and Type Method Description FragmentController<F>
create()
Deprecated.FragmentController<F>
create(int contentViewId, Bundle bundle)
Deprecated.Creates the activity withBundle
and adds the fragment to the view with IDcontentViewId
.FragmentController<F>
create(Bundle bundle)
Deprecated.Creates the activity withBundle
and adds the fragment to it.FragmentController<F>
destroy()
Deprecated.static <F extends Fragment>
FragmentController<F>of(F fragment)
Deprecated.static <F extends Fragment>
FragmentController<F>of(F fragment, Intent intent)
Deprecated.static <F extends Fragment>
FragmentController<F>of(F fragment, Intent intent, Bundle arguments)
Deprecated.static <F extends Fragment>
FragmentController<F>of(F fragment, Bundle arguments)
Deprecated.static <F extends Fragment>
FragmentController<F>of(F fragment, Class<? extends Activity> activityClass)
Deprecated.static <F extends Fragment>
FragmentController<F>of(F fragment, Class<? extends Activity> activityClass, Intent intent)
Deprecated.static <F extends Fragment>
FragmentController<F>of(F fragment, Class<? extends Activity> activityClass, Intent intent, Bundle arguments)
Deprecated.static <F extends Fragment>
FragmentController<F>of(F fragment, Class<? extends Activity> activityClass, Bundle arguments)
Deprecated.FragmentController<F>
pause()
Deprecated.FragmentController<F>
recreate()
Deprecated.FragmentController<F>
recreate(F recreatedFragment, int contentViewId)
Deprecated.FragmentController<F>
resume()
Deprecated.FragmentController<F>
saveInstanceState(Bundle outState)
Deprecated.FragmentController<F>
start()
Deprecated.FragmentController<F>
stop()
Deprecated.FragmentController<F>
visible()
Deprecated.Methods inherited from class org.robolectric.android.controller.ComponentController
get, getIntent, invokeWhilePaused, invokeWhilePaused
-
Method Details
-
of
Deprecated. -
of
public static <F extends Fragment> FragmentController<F> of(F fragment, Class<? extends Activity> activityClass)Deprecated. -
of
Deprecated. -
of
Deprecated. -
of
public static <F extends Fragment> FragmentController<F> of(F fragment, Intent intent, Bundle arguments)Deprecated. -
of
public static <F extends Fragment> FragmentController<F> of(F fragment, Class<? extends Activity> activityClass, Intent intent)Deprecated. -
of
public static <F extends Fragment> FragmentController<F> of(F fragment, Class<? extends Activity> activityClass, Bundle arguments)Deprecated. -
of
public static <F extends Fragment> FragmentController<F> of(F fragment, Class<? extends Activity> activityClass, Intent intent, Bundle arguments)Deprecated. -
create
Deprecated.Creates the activity withBundle
and adds the fragment to the view with IDcontentViewId
. -
create
Deprecated.Creates the activity withBundle
and adds the fragment to it. Note that the fragment will be added to the view with ID 1. -
create
Deprecated.- Specified by:
create
in classComponentController<FragmentController<F extends Fragment>,F extends Fragment>
-
destroy
Deprecated.- Specified by:
destroy
in classComponentController<FragmentController<F extends Fragment>,F extends Fragment>
-
start
Deprecated. -
resume
Deprecated. -
pause
Deprecated. -
visible
Deprecated. -
stop
Deprecated. -
saveInstanceState
Deprecated. -
recreate
Deprecated. -
recreate
Deprecated.
-