The following is a list of the flag properties that explain intent today:
- Flag_activity_brought_to_front
- Flag_activity_clear_top
- Flag_activity_new_task
- Flag_activity_no_animation
- Flag_activity_no_history
- Flag_activity_reorder_to_front
- Flag_activity_single_top
Then we start the activityb in the Activitya in Flag_activity_brought_to_front mode, when the ACTIVITY stack is as follows:
Summary: If you start Activityb in Flag_activity_brought_to_front mode, if the ACTIVITYB exists in the ACTIVITY stack, the next time you start the activityb again, The ACTIVITYB will be taken to the top of the stack.
Then we start the ACTIVITYC in the Activitya in Flag_activity_clear_top mode, when the ACTIVITY stack is as follows:
Summary: If you start Activityc with Flag_activity_clear_top, the ACTIVITY (Activitya, activityb) above the activityc pops up.
Then we start the ACTIVITYC in the Activitya in Flag_activity_new_task mode, when the ACTIVITY stack is as follows:
Summary: If you start Activityc with Flag_activity_new_task, the ACTIVITYC is recreated and placed on top of the stack, again, if you start the activity again in the same activity (b), At this point there will be two activity (B) in the stack.
- Start ACTIVITY in flag_activity_no_animation mode
We then start the ACTIVITYC in flag_activity_no_animation mode in Activitya, which disables the transition animation when the ACTIVITYC is started.
- Start ACTIVITY in flag_activity_no_history mode
If the current activity stack is as follows:
Then we start the Activitye in flag_activity_no_history mode in Activitya, and then start Activityf in Activitye, when the ACTIVITY stack is as follows:
Summary: If you start Activitye with Flag_activity_no_history and then start Activityf in Activitye, Activitye is not saved in the ACTIVITY stack.
- Start ACTIVITY in Flag_activity_reorder_to_front mode
If the current activity stack is as follows:
If you start Activityb in Flag_activity_reorder_to_front mode, the ACTIVITY stack is as follows:
Summary: If you start activityb in a flag_activity_reorder_to_front manner, you will take activityb directly to the top of the stack.
Then we start Activitya again in Activitya, when the activity stack is:
Summary: If you start Activitya in flag_activity_single_top mode in Activitya, the ACTIVITY stack remains unchanged and Activitya is not recreated.
Reprint Please specify source: http://blog.csdn.net/hai_qing_xu_kong/article/details/45539333 Emotional Control _
Learn about the flag properties of intent with Android (36)