manage task comments

  1. concepts
    1.1 Overview Screen : The overview screen (also referred to as the recents screen, recent task list, or recent apps) is a system-level UI that lists recently accessed activities and tasks. The user can navigate through the list and select a task to resume, or the user can remove a task from the list by swiping it away.
    1.2 Activity: An activity represents a single screen with a user interface.
    1.3 Task: A task is a collection of activities that users interact with when performing a certain job. The activities are arranged in a stack (the back stack), in the order in which each activity is opened.
    1.4 Affinity :
    1.4.1 Activities with the same affinity conceptually belong to the same task (to the same “application” from the user’s perspective).
    1.4.2 The affinity of a task is determined by the affinity of its root activity.

    Some points when the normal task

    1. When new activity need to be started
      1) create a new one
      1.1 ) one this task
      1.2 ) in new task
      2) bring an old one
    2. When user leave the task
      1.1 ) leave as it is
      1.2 ) delete all except root activity
    3. When user continue the task

在调用activity同被调用的activity的launch冲突时,调用的activity的指定值优先。

a. 影响创建activity的标志
a.1) launchMode == standard
a.2)launchMode == singleTop, 等同于intent.flag == FLAG_ACTIVITY_SINGLE_TOP
a.3) launchMode == singleTask ,等同与intent.flag == FLAG_ACTIVITY_NEW_TASK,在找task时寻找目标task的affinity必须等同于此activity的affinity
a.4) launchMode == singleInstance,还影响此activity启动的其他activity

b) FLAG_ACTIVITY_CLEAR_TOP。当 launchMode == singleTask时,找到了目标task,但activity可能不位于stacktop,不能显示,使用此标记清除在目标activity上的activity

c)与创建无关 allowTaskReparenting In this case, the activity can move from the task it starts to the task it has an affinity for, when that task comes to the foreground.

d)activity 删除。
alwaysRetainTaskState
If this attribute is set to “true” in the root activity of a task, the default behavior just described does not happen. The task retains all activities in its stack even after a long period.
clearTaskOnLaunch
If this attribute is set to “true” in the root activity of a task, the stack is cleared down to the root activity whenever the user leaves the task and returns to it. In other words, it’s the opposite of alwaysRetainTaskState. The user always returns to the task in its initial state, even after a leaving the task for only a moment.
finishOnTaskLaunch
This attribute is like clearTaskOnLaunch, but it operates on a single activity, not an entire task. It can also cause any activity to go away, including the root activity. When it’s set to “true”, the activity remains part of the task only for the current session. If the user leaves and then returns to the task, it is no longer present.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值