user441316
user441316

Reputation: 493

launchmode and Intent.setFlag

What is the final behavior of starting an already existed Activity?

If I set the activity's launchmode to singletop while does not set the activity's flag,

or I set the activity's launchmode to standard while set the activity's flag to Intent.FLAG_ACTIVITY_REORDER_TO_FRONT.

Thanks.

Upvotes: 2

Views: 1946

Answers (2)

tounaobun
tounaobun

Reputation: 14857

As Android Doc says,

Note: The behaviors that you specify for your activity with the launchMode attribute can be overridden by flags included with the intent that start your activity, as discussed in the next section.

This may helps you.

Related link: https://developer.android.com/guide/components/tasks-and-back-stack.html#ManagingTasks

Upvotes: 0

user441316
user441316

Reputation: 493

Find the answer.

The configuration in the code will be higher priority to that set in AndroidManifest file.

Upvotes: 1

Related Questions