public class FragmentController<F extends android.app.Fragment> extends ComponentController<FragmentController<F>,F>
Controller class for driving fragment lifecycles, similar to ActivityController
.
attached, component, intent, myself, shadowMainLooper
Modifier and Type | Method and Description |
---|---|
FragmentController<F> |
create() |
FragmentController<F> |
create(android.os.Bundle bundle)
Creates the activity with
Bundle and adds the fragment to it. |
FragmentController<F> |
create(int contentViewId,
android.os.Bundle bundle)
Creates the activity with
Bundle and adds the fragment to the view with ID contentViewId . |
FragmentController<F> |
destroy() |
static <F extends android.app.Fragment> |
of(F fragment) |
static <F extends android.app.Fragment> |
of(F fragment,
android.os.Bundle arguments) |
static <F extends android.app.Fragment> |
of(F fragment,
java.lang.Class<? extends android.app.Activity> activityClass) |
static <F extends android.app.Fragment> |
of(F fragment,
java.lang.Class<? extends android.app.Activity> activityClass,
android.os.Bundle arguments) |
static <F extends android.app.Fragment> |
of(F fragment,
java.lang.Class<? extends android.app.Activity> activityClass,
android.content.Intent intent) |
static <F extends android.app.Fragment> |
of(F fragment,
java.lang.Class<? extends android.app.Activity> activityClass,
android.content.Intent intent,
android.os.Bundle arguments) |
static <F extends android.app.Fragment> |
of(F fragment,
android.content.Intent intent) |
static <F extends android.app.Fragment> |
of(F fragment,
android.content.Intent intent,
android.os.Bundle arguments) |
FragmentController<F> |
pause() |
FragmentController<F> |
resume() |
FragmentController<F> |
saveInstanceState(android.os.Bundle outState) |
FragmentController<F> |
start() |
FragmentController<F> |
stop() |
FragmentController<F> |
visible() |
get, getIntent, invokeWhilePaused
public static <F extends android.app.Fragment> FragmentController<F> of(F fragment)
public static <F extends android.app.Fragment> FragmentController<F> of(F fragment, java.lang.Class<? extends android.app.Activity> activityClass)
public static <F extends android.app.Fragment> FragmentController<F> of(F fragment, android.content.Intent intent)
public static <F extends android.app.Fragment> FragmentController<F> of(F fragment, android.os.Bundle arguments)
public static <F extends android.app.Fragment> FragmentController<F> of(F fragment, android.content.Intent intent, android.os.Bundle arguments)
public static <F extends android.app.Fragment> FragmentController<F> of(F fragment, java.lang.Class<? extends android.app.Activity> activityClass, android.content.Intent intent)
public static <F extends android.app.Fragment> FragmentController<F> of(F fragment, java.lang.Class<? extends android.app.Activity> activityClass, android.os.Bundle arguments)
public static <F extends android.app.Fragment> FragmentController<F> of(F fragment, java.lang.Class<? extends android.app.Activity> activityClass, android.content.Intent intent, android.os.Bundle arguments)
public FragmentController<F> create(int contentViewId, android.os.Bundle bundle)
Creates the activity with Bundle
and adds the fragment to the view with ID contentViewId
.
public FragmentController<F> create(android.os.Bundle bundle)
Creates the activity with Bundle
and adds the fragment to it. Note that the fragment will be added to the view with ID 1.
public FragmentController<F> create()
create
in class ComponentController<FragmentController<F extends android.app.Fragment>,F extends android.app.Fragment>
public FragmentController<F> destroy()
destroy
in class ComponentController<FragmentController<F extends android.app.Fragment>,F extends android.app.Fragment>
public FragmentController<F> start()
public FragmentController<F> resume()
public FragmentController<F> pause()
public FragmentController<F> visible()
public FragmentController<F> stop()
public FragmentController<F> saveInstanceState(android.os.Bundle outState)