public class FragmentController<F extends android.app.Fragment> extends Object
ActivityController
. Only
necessary if more complex lifecycle management is needed, otherwise FragmentTestUtil
should be sufficient.Modifier and Type | Field and Description |
---|---|
protected android.app.Application |
application |
protected boolean |
attached |
protected android.content.Context |
baseContext |
protected T |
component |
protected android.content.Intent |
intent |
protected C |
myself |
protected ShadowsAdapter.ShadowLooperAdapter |
shadowMainLooper |
Modifier and Type | Method and Description |
---|---|
FragmentController<F> |
attach() |
FragmentController<F> |
create() |
FragmentController<F> |
create(android.os.Bundle bundle) |
FragmentController<F> |
destroy() |
T |
get() |
android.content.Intent |
getIntent() |
protected C |
invokeWhilePaused(String methodName) |
protected C |
invokeWhilePaused(String methodName,
android.os.Bundle arg) |
protected C |
invokeWhilePaused(String methodName,
android.content.Intent arg) |
protected C |
invokeWhilePaused(String methodName,
android.content.Intent arg,
int param1,
int param2) |
static <F extends android.app.Fragment> |
of(F fragment) |
static <F extends android.app.Fragment> |
of(F fragment,
Class<? extends android.app.Activity> activityClass) |
FragmentController<F> |
pause() |
FragmentController<F> |
resume() |
FragmentController<F> |
start() |
FragmentController<F> |
stop() |
C |
withApplication(android.app.Application application) |
C |
withBaseContext(android.content.Context baseContext) |
C |
withIntent(android.content.Intent intent) |
protected final C extends org.robolectric.util.ComponentController<C,T> myself
protected final T component
protected final ShadowsAdapter.ShadowLooperAdapter shadowMainLooper
protected android.app.Application application
protected android.content.Context baseContext
protected android.content.Intent intent
protected boolean attached
public static <F extends android.app.Fragment> FragmentController<F> of(F fragment)
public static <F extends android.app.Fragment> FragmentController<F> of(F fragment, Class<? extends android.app.Activity> activityClass)
public FragmentController<F> attach()
public FragmentController<F> create(android.os.Bundle bundle)
public FragmentController<F> create()
public FragmentController<F> destroy()
public FragmentController<F> start()
public FragmentController<F> resume()
public FragmentController<F> pause()
public FragmentController<F> stop()
public T get()
public C withApplication(android.app.Application application)
public C withBaseContext(android.content.Context baseContext)
public C withIntent(android.content.Intent intent)
public android.content.Intent getIntent()
protected C invokeWhilePaused(String methodName)
protected C invokeWhilePaused(String methodName, android.os.Bundle arg)
protected C invokeWhilePaused(String methodName, android.content.Intent arg)
protected C invokeWhilePaused(String methodName, android.content.Intent arg, int param1, int param2)
Copyright © 2015. All rights reserved.