Android 开发文档 程序基础——Activities and Tasks
2010-06-19 04:19:00 来源:WEB开发网The behavior just described is the default behavior for activities and tasks. But there are ways to modify almost all aspects of it. The association of activities with tasks, and the behavior of an activity within a task, is controlled by the interaction between flags set in the Intent object that started the activity and attributes set in the activity’s element in the manifest. Both requester and respondent have a say in what happens.
In this regard, the principal Intent flags are:
FLAG_ACTIVITY_NEW_TASK
FLAG_ACTIVITY_CLEAR_TOP
FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
FLAG_ACTIVITY_SINGLE_TOP
The principal attributes are:
taskAffinity
launchMode
allowTaskReparenting
clearTaskOnLaunch
alwaysRetainTaskState
finishOnTaskLaunch
The following sections describe what some of these flags and attributes do, how they interact, and what considerations should govern their use.
原文:http://buhutuu.cn/google-api/android/android-jichu-activities-tasks/
更多精彩
赞助商链接