Is the root activity the current first action on the stack, or the activity specified as the launch activity in the manifest?

Is the root activity the current first activity on the stack, or the activity indicated as launch activity in the manifest?

The P support application launches activity A at startup. Then A starts B and finishes itself, and then B starts C. Now the stack contains B and C, and B is the first on the stack.

Can I say that B is the root activity, or is still the root activity.

I want to clarify this because I'm trying to understand the definition of clearTaskOnLaunch:

Android: clearTaskOnLaunch Regardless of whether all actions from the task are deleted, except for the root activity, whenever it is restarted from the main screen - “true” if the task is always divided into its root activity, and “false” if not ,.

+3
source share
1 answer

I have little doubt about how you start Activity B from A. If A is removed from the stack and Activity C starts from B - and if clearTaskOnLaunchset to true- if the user presses HOME from action C and then returns to your application - the activity will be displayed B, since C will be removed from the stack.

0
source

Source: https://habr.com/ru/post/1755809/


All Articles