public class ActivityController<T extends android.app.Activity> extends ComponentController<ActivityController<T>,T>
attached, component, intent, myself, shadowMainLooper
Modifier and Type | Method and Description |
---|---|
ActivityController<T> |
configurationChange()
Applies the current system configuration to the Activity.
|
ActivityController<T> |
configurationChange(android.content.res.Configuration newConfiguration)
Performs a configuration change on the Activity.
|
ActivityController<T> |
create() |
ActivityController<T> |
create(android.os.Bundle bundle) |
ActivityController<T> |
destroy() |
ActivityController<T> |
newIntent(android.content.Intent intent) |
static <T extends android.app.Activity> |
of(T activity) |
static <T extends android.app.Activity> |
of(T activity,
android.content.Intent intent) |
ActivityController<T> |
pause() |
ActivityController<T> |
postCreate(android.os.Bundle bundle) |
ActivityController<T> |
postResume() |
ActivityController<T> |
restart() |
ActivityController<T> |
restoreInstanceState(android.os.Bundle bundle) |
ActivityController<T> |
resume() |
ActivityController<T> |
saveInstanceState(android.os.Bundle outState) |
ActivityController<T> |
setup()
Calls the same lifecycle methods on the Activity called by Android the first time the Activity is created.
|
ActivityController<T> |
setup(android.os.Bundle savedInstanceState)
Calls the same lifecycle methods on the Activity called by Android when an Activity is restored from previously saved state.
|
ActivityController<T> |
start() |
ActivityController<T> |
stop() |
ActivityController<T> |
userLeaving() |
ActivityController<T> |
visible() |
ActivityController<T> |
windowFocusChanged(boolean hasFocus) |
get, getIntent, invokeWhilePaused
public static <T extends android.app.Activity> ActivityController<T> of(T activity, android.content.Intent intent)
public static <T extends android.app.Activity> ActivityController<T> of(T activity)
public ActivityController<T> create(android.os.Bundle bundle)
public ActivityController<T> create()
create
in class ComponentController<ActivityController<T extends android.app.Activity>,T extends android.app.Activity>
public ActivityController<T> restart()
public ActivityController<T> start()
public ActivityController<T> restoreInstanceState(android.os.Bundle bundle)
public ActivityController<T> postCreate(android.os.Bundle bundle)
public ActivityController<T> resume()
public ActivityController<T> postResume()
public ActivityController<T> visible()
public ActivityController<T> windowFocusChanged(boolean hasFocus)
public ActivityController<T> userLeaving()
public ActivityController<T> pause()
public ActivityController<T> saveInstanceState(android.os.Bundle outState)
public ActivityController<T> stop()
public ActivityController<T> destroy()
destroy
in class ComponentController<ActivityController<T extends android.app.Activity>,T extends android.app.Activity>
public ActivityController<T> setup()
Calls the same lifecycle methods on the Activity called by Android the first time the Activity is created.
public ActivityController<T> setup(android.os.Bundle savedInstanceState)
Calls the same lifecycle methods on the Activity called by Android when an Activity is restored from previously saved state.
savedInstanceState
- Saved instance state.public ActivityController<T> newIntent(android.content.Intent intent)
public ActivityController<T> configurationChange()
Applies the current system configuration to the Activity.
This can be used in conjunction with RuntimeEnvironment.setQualifiers(String)
to simulate configuration changes.
If the activity is configured to handle changes without being recreated, Activity.onConfigurationChanged(Configuration)
will be called. Otherwise, the activity is recreated as described here.
public ActivityController<T> configurationChange(android.content.res.Configuration newConfiguration)
Performs a configuration change on the Activity.
If the activity is configured to handle changes without being recreated, Activity.onConfigurationChanged(Configuration)
will be called. Otherwise, the activity is recreated as described here.
newConfiguration
- The new configuration to be set.