Intent. addflags (intent. flag_activity_no_animation );
Flag_activity_brought_to_front
This flag is not set by the program code. For example, the system helps you set the singletask mode in launchmode.
Flag_activity_clear_top
If it is set and the activity is already running in the current task, it is no longer to restart an instance of the activity, but all the activities on the activity will be closed, the intent is then delivered to the old activity (currently at the top) as a new intent. For example, assume that a task contains the activity A, B, C, and D. If startactivity () is used in the call, and contains an intent pointing to Activity B, both c and d end, and B receives the intent. Therefore, the current stack status is a and B. In the preceding example, the running Activity B can receive the new intent in onnewintent (), disable it, and restart it to receive the intent. If its startup mode is declared as "multiple" (default), and you have not set the flag_activity_single_top flag in this intent, it will be disabled and re-created; for other startup modes, or set the flag_activity_single_top flag in the intent to ship the intent to the onnewintent () of the current instance. This startup mode can also be used in combination with flag_activity_new_task: used to start the root activity in a task. It will bring any running instance in that task to the foreground, and then clear it until the root activity. This is very useful, for example, when an activity is started from notification manager.
Flag_activity_clear_when_task_reset
If this parameter is set, a restore point is set in the activity stack of the task. When the task is restored, the activity needs to be cleared. That is to say, when the next task is marked to enter the foreground with flag_activity_reset_task_if_needed (the typical operation is that the user restarts the activity on the main screen), the activity and its operations will be closed, so that users can no longer return to them, but can return to the previous activity. This is useful when your program has a split point. For example, an e-mail application may have an operation to view an attachment. You need to start the image browsing activity to display the attachment. This activity should be part of the E-mail application task because it is an operation triggered by the user in this task. However, when the user leaves this task and selects the email app from the main screen, we may want to go back to the viewing session, but not view the Image Attachment, because this is confusing. By setting this flag when starting Image Browsing, browsing and other started activities will be cleared when the next user returns to the mail program.
Flag_activity_exclude_from_recents
If set, the new activity will not be saved in the list of recently started activities.
Flag_activity_forward_result
If you set and use the intent to start a new activity from an existing activity, the activity that replies to the target will be uploaded to the new activity. In this way, the new activity can call setresult (INT), and the result value will be sent to the activity that is used as the reply target.
Flag_activity_launched_from_history
This flag is generally not set by the application code. if the activity is started from the history (usually press the Home Key), the system will help you set it.
Flag_activity_multiple_task
Do not use this flag unless you have implemented the application launcher yourself. It can be used with flag_activity_new_task to disable sending existing tasks to the foreground. When set, the new task will always start to process intent, regardless of whether a task can process the same thing. Because the default system does not contain the graphical task management function, you should not use this flag unless you provide users with a way to return started tasks. If the flag_activity_new_task flag is not set, this flag is ignored.
Flag_activity_new_task
If this parameter is set, the activity becomes the start of a new task in the history stack. A task (from the activity that starts it to the activity in the next task) defines the activity atomic group that users can migrate. Tasks can be moved to the foreground and background. All activities in a specific task are always in the same order. This flag is generally used to present the "Start" type of behavior: they provide a series of things that can be done independently, and have nothing to do with starting their activity. With this flag, if the task of the activity being started is already running, the new activity will not be started; instead, the current task will be simply moved to the foreground. Refer to the flag_activity_multiple_task flag to disable this line. This flag cannot be used by the caller for the results of the activity request that has been started.
Flag_activity_no_animation
If it is set in intent and passed to context. startactivity (), this flag will prevent the system from applying the acitivity migration animation when entering the next activity. This does not mean that the animation will never run-if this flag is not specified before another activity is started, the animation will be applied. This logo can be well used to execute a series of operations, and animation is seen as the driver of a higher level of events.
Flag_activity_no_history
If this parameter is set, the new activity will not be retained in the history stack. The activity is closed as soon as the user leaves it. You can also set the nohistory feature.
Flag_activity_no_user_action
If this parameter is set, when a newly started activity enters the foreground, this flag will block onuserleavehint () from the previous activity callback before the activity is paused (). Typically, an activity can depend on this callback to indicate that the activity caused by an explicit user action is removed from the background. This callback marks an appropriate vertex in the lifecycle of the activity and closes some notifications. If an activity is started through a non-user-driven event, such as a power-on or alarm clock, this flag should also be passed to context. startactivity to ensure that the paused activity does not think that the user knows its notification.
Flag_activity_previus_is_top
If set and this intent is being used to launch a new activity from an existing one, the current activity will not be counted as the top activity for deciding whether the new intent shoshould be delivered to the top instead of starting a new one. the previous activity will be used as the top, with the assumption being that the current activity will finish itself immediately.
Flag_activity_reorder_to_front
If it is set in intent and passed to context. startactivity (), this flag will cause the running activity to move to the top of the historical stack. For example, assume that a task is composed of four activities: A, B, C, and D. If startactivity () is used to start Activity B by calling "D", B will move to the top of the history stack, and the current order will be a, c, d, and B. If the flag_activity_clear_top flag is also set, this flag will be ignored.
Flag_activity_reset_task_if_needed
If set, and this activity is either being started in a new task or bringing to the top an existing task, then it will be launched as the front door of the task. this will result in the application of any affinities needed to have that task in the proper state (either moving activities to or from it), or simply resetting that task to its initial state if needed.
Flag_activity_single_top
If it is set, when this activity is running at the top of the history stack, a new one is no longer started.
Intent flag introduction intent. addflags ()