Java Code Examples for android.support.v4.content.ContextCompat.startActivities()

The following are Jave code examples for showing how to use startActivities() of the android.support.v4.content.ContextCompat class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: letv   File: TaskStackBuilder.java   Source Code and License Vote up 5 votes
public void startActivities(Bundle options) {
    if (this.mIntents.isEmpty()) {
        throw new IllegalStateException("No intents added to TaskStackBuilder; cannot startActivities");
    }
    Intent[] intents = (Intent[]) this.mIntents.toArray(new Intent[this.mIntents.size()]);
    intents[0] = new Intent(intents[0]).addFlags(268484608);
    if (!ContextCompat.startActivities(this.mSourceContext, intents, options)) {
        Intent topIntent = new Intent(intents[intents.length - 1]);
        topIntent.addFlags(268435456);
        this.mSourceContext.startActivity(topIntent);
    }
}
 
Example 2
Project: boohee_v5.6   File: TaskStackBuilder.java   Source Code and License Vote up 5 votes
public void startActivities(Bundle options) {
    if (this.mIntents.isEmpty()) {
        throw new IllegalStateException("No intents added to TaskStackBuilder; cannot startActivities");
    }
    Intent[] intents = (Intent[]) this.mIntents.toArray(new Intent[this.mIntents.size()]);
    intents[0] = new Intent(intents[0]).addFlags(268484608);
    if (!ContextCompat.startActivities(this.mSourceContext, intents, options)) {
        Intent topIntent = new Intent(intents[intents.length - 1]);
        topIntent.addFlags(268435456);
        this.mSourceContext.startActivity(topIntent);
    }
}