Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save martinomburajr/479a674a88563f57e043aa3d7c769b2a to your computer and use it in GitHub Desktop.

Select an option

Save martinomburajr/479a674a88563f57e043aa3d7c769b2a to your computer and use it in GitHub Desktop.
Instrumentation class, calling the Activity's onCreate
/**
* @Retrieved from AOSP
* Instrumentation class
*/
public void callActivityOnCreate(Activity activity, Bundle icicle) {
//Note that the activity has already been initialized thanks to the prepareLaunchActivity().
//all that remains is just calling onCreate()
prePerformCreate(activity); //prepares the activity
activity.performCreate(icicle); //calls the oncreate
postPerformCreate(activity);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment