List of usage examples for android.app TaskStackBuilder addParentStack
public TaskStackBuilder addParentStack(ComponentName sourceActivityName)
From source file:android.app.Activity.java
/** * Define the synthetic task stack that will be generated during Up navigation from * a different task.//from ww w . ja v a2s. c o m * * <p>The default implementation of this method adds the parent chain of this activity * as specified in the manifest to the supplied {@link TaskStackBuilder}. Applications * may choose to override this method to construct the desired task stack in a different * way.</p> * * <p>This method will be invoked by the default implementation of {@link #onNavigateUp()} * if {@link #shouldUpRecreateTask(Intent)} returns true when supplied with the intent * returned by {@link #getParentActivityIntent()}.</p> * * <p>Applications that wish to supply extra Intent parameters to the parent stack defined * by the manifest should override {@link #onPrepareNavigateUpTaskStack(TaskStackBuilder)}.</p> * * @param builder An empty TaskStackBuilder - the application should add intents representing * the desired task stack */ public void onCreateNavigateUpTaskStack(TaskStackBuilder builder) { builder.addParentStack(this); }