- 浏览: 1820407 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (665)
- 闲话 (17)
- ruby (1)
- javascript (40)
- linux (7)
- android (22)
- 开发过程 (11)
- 哥也读读源代码 (13)
- JVM (1)
- ant (2)
- Hibernate (3)
- jboss (3)
- web service (17)
- https (4)
- java基础 (17)
- spring (7)
- servlet (3)
- 杂记 (39)
- struts2 (10)
- logback (4)
- 多线程 (2)
- 系统诊断 (9)
- UI (4)
- json (2)
- Java EE (7)
- eclipse相关 (4)
- JMS (1)
- maven (19)
- 版本管理 (7)
- sso (1)
- ci (1)
- 设计 (18)
- 戒烟 (4)
- http (9)
- 计划 (4)
- HTML5 (3)
- chrome extensions (5)
- tomcat源码阅读 (4)
- httpd (5)
- MongoDB (3)
- node (2)
最新评论
-
levin_china:
勾选了,还是找不到
用spring annotation声明的bean,当打包在jar中时,无法被扫描到 -
GGGGeek:
我用的maven-3.5.0,还没有遇到这种情况,使用jar ...
用spring annotation声明的bean,当打包在jar中时,无法被扫描到 -
GGGGeek:
受益匪浅,从组织项目结构,到技术细节,讲的很到位,只是博主不再 ...
一个多maven项目聚合的实例 -
Aaron-Joe-William:
<?xml version="1.0" ...
hibernate逆向工程 -
li272355201:
http://archive.apache.org/dist/ ...
tomcat源码阅读(一)——环境搭建
Even though the activities may be from different applications, Android maintains this seamless user experience by keeping both activities in the same 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.
The device Home screen is the starting place for most tasks. When the user touches an icon in the application launcher (or a shortcut on the Home screen), that application's task comes to the foreground. If no task exists for the application (the application has not been used recently), then a new task is created and the "main" activity for that application opens as the root activity in the stack.
When the current activity starts another, the new activity is pushed on the top of the stack and takes focus. The previous activity remains in the stack, but is stopped. When an activity stops, the system retains the current state of its user interface. When the user presses the BACK key, the current activity is popped from the top of the stack (the activity is destroyed) and the previous activity resumes (the previous state of its UI is restored).
Activities in the stack are never rearranged, only pushed and popped from the stack—pushed onto the stack when started by the current activity and popped off when the user leaves it using the BACK key. As such, the back stack operates as a "last in, first out" object structure.
If the user continues to press BACK, then each activity in the stack is popped off to reveal the previous one, until the user returns to the Home screen (or to whichever activity was running when the task began). When all activities are removed from the stack, the task no longer exists.
A task is a cohesive unit that can move to the "background" when users begin a new task or go to the Home screen, via the HOME key.
Because the activities in the back stack are never rearranged, if your application allows users to start a particular activity from more than one activity, a new instance of that activity is created and popped onto the stack (rather than bringing any previous instance of the activity to the top). As such, one activity in your application might be instantiated multiple times (even from different tasks).
•When Activity A starts Activity B, Activity A is stopped, but the system retains its state (such as scroll position and text entered into forms). If the user presses the BACK key while in Activity B, Activity A resumes with its state restored.
•When the user leaves a task by pressing the HOME key, the current activity is stopped and its task goes into the background. The system retains the state of every activity in the task. If the user later resumes the task by selecting the launcher icon that began the task, the task comes to the foreground and resumes the activity at the top of the stack.
•If the user presses the BACK key, the current activity is popped from the stack and destroyed. The previous activity in the stack is resumed. When an activity is destroyed, the system does not retain the activity's state.
•Activities can be instantiated multiple times, even from other tasks.
you can use these manifest attributes and intent flags to define how activities are associated with tasks and how the behave in the back stack.
Launch modes allow you to define how a new instance of an activity is associated with the current task.
As such, if Activity A starts Activity B, Activity B can define in its manifest how it should associate with the current task (if at all) and Activity A can also request how Activity B should associate with current task. If both activities define how Activity B should associate with a task, then Activity A's request (as defined in the intent) is honored over Activity B's request (as defined in its manifest).
Some the launch modes available in the manifest are not available as flags for an intent and, likewise, some launch modes available as flags for an intent cannot be defined in the manifest.
The affinity indicates which task an activity prefers to belong to. By default, all the activities from the same application have an affinity for each other. So, by default, all activities in the same application prefer to be in the same task.
If the user leaves a task for a long time, the system clears the task of all activities except the root activity. When the user returns to the task again, only the root activity is restored. The system behaves this way, because, after an extended amount of time, users likely have abandoned what they were doing before and are returning to the task to begin something new.
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.
The device Home screen is the starting place for most tasks. When the user touches an icon in the application launcher (or a shortcut on the Home screen), that application's task comes to the foreground. If no task exists for the application (the application has not been used recently), then a new task is created and the "main" activity for that application opens as the root activity in the stack.
When the current activity starts another, the new activity is pushed on the top of the stack and takes focus. The previous activity remains in the stack, but is stopped. When an activity stops, the system retains the current state of its user interface. When the user presses the BACK key, the current activity is popped from the top of the stack (the activity is destroyed) and the previous activity resumes (the previous state of its UI is restored).
Activities in the stack are never rearranged, only pushed and popped from the stack—pushed onto the stack when started by the current activity and popped off when the user leaves it using the BACK key. As such, the back stack operates as a "last in, first out" object structure.
If the user continues to press BACK, then each activity in the stack is popped off to reveal the previous one, until the user returns to the Home screen (or to whichever activity was running when the task began). When all activities are removed from the stack, the task no longer exists.
A task is a cohesive unit that can move to the "background" when users begin a new task or go to the Home screen, via the HOME key.
Because the activities in the back stack are never rearranged, if your application allows users to start a particular activity from more than one activity, a new instance of that activity is created and popped onto the stack (rather than bringing any previous instance of the activity to the top). As such, one activity in your application might be instantiated multiple times (even from different tasks).
•When Activity A starts Activity B, Activity A is stopped, but the system retains its state (such as scroll position and text entered into forms). If the user presses the BACK key while in Activity B, Activity A resumes with its state restored.
•When the user leaves a task by pressing the HOME key, the current activity is stopped and its task goes into the background. The system retains the state of every activity in the task. If the user later resumes the task by selecting the launcher icon that began the task, the task comes to the foreground and resumes the activity at the top of the stack.
•If the user presses the BACK key, the current activity is popped from the stack and destroyed. The previous activity in the stack is resumed. When an activity is destroyed, the system does not retain the activity's state.
•Activities can be instantiated multiple times, even from other tasks.
you can use these manifest attributes and intent flags to define how activities are associated with tasks and how the behave in the back stack.
Launch modes allow you to define how a new instance of an activity is associated with the current task.
As such, if Activity A starts Activity B, Activity B can define in its manifest how it should associate with the current task (if at all) and Activity A can also request how Activity B should associate with current task. If both activities define how Activity B should associate with a task, then Activity A's request (as defined in the intent) is honored over Activity B's request (as defined in its manifest).
Some the launch modes available in the manifest are not available as flags for an intent and, likewise, some launch modes available as flags for an intent cannot be defined in the manifest.
The affinity indicates which task an activity prefers to belong to. By default, all the activities from the same application have an affinity for each other. So, by default, all activities in the same application prefer to be in the same task.
If the user leaves a task for a long time, the system clears the task of all activities except the root activity. When the user returns to the task again, only the root activity is restored. The system behaves this way, because, after an extended amount of time, users likely have abandoned what they were doing before and are returning to the task to begin something new.
发表评论
-
最近半个月开发小结
2011-12-05 22:16 12761、有一个方法,有一段 ... -
android培训文档提纲(四)
2011-11-27 23:28 12111、生命周期方法onSaveInstanceState()是在 ... -
上周开发过程中几个简单问题的总结
2011-11-21 13:18 1323上周开发中组员遇到几个问题,都不是大问题,但都耽搁了一些时间。 ... -
android培训文档提纲(三)
2011-11-12 23:47 17341、Activity和Service组件是Context的子类 ... -
android的Log组件和logcat命令
2011-11-12 23:03 6279项目进入开发阶段了, ... -
android培训文档提纲(二)
2011-11-07 21:10 1631一、Each Activity can make an ... -
android培训文档提纲(一)
2011-10-23 14:05 1566最近项目快要进入开发 ... -
顶部有一排按钮,最底下还有FooterView的ListView页面
2011-08-13 15:46 3262先上效果图: 下面详细说说这个页面是怎么做出来的: 1、 ... -
实现屏幕下方展示的TAB分页
2011-08-09 23:22 2140这篇博客是参考helloandroid兄的腾讯微博应用,我整理 ... -
PendingIntent
2011-08-08 16:02 1524在开发SMS等应用时,有时调用相关的API会要求提供一个类型为 ... -
android数据持久化总结
2011-08-06 12:23 18981、 通过Context.getSharedPreferenc ... -
intent and service
2011-08-04 00:07 1395明天才开始讨论包需求 ... -
最近两周android总结
2011-08-01 23:42 1577最近2周预研做得差不多 ... -
没有单元测试,怎能写代码
2011-07-25 17:56 1541项目前期的技术点预研完成了,最近开始做原型开发。 之前没有在 ... -
android process and thread
2011-07-18 16:31 1652前三周android预研中,把可能用到的技术点都识别了,并完成 ... -
android第三周小结
2011-07-18 10:16 13311. 系统自带的通讯录应用,联系人名单保存在data/data ... -
onPause()方法的特殊性
2011-07-15 17:11 2901onPause(), onStop(), onDestroy( ... -
activity存在的三种状态
2011-07-15 16:44 1735An activity can exist in essent ... -
android第二周小结
2011-07-14 10:50 11351. 做了短信侦听的Broadca ... -
android一周小结
2011-07-04 21:26 1199做了一周android预研,总结以下几条: 1. 用DDMS ...
相关推荐
Android学习笔记-Activity篇 Contents Android学习笔记-Activity篇 1 ...Tasks and Back Stack 4 一、管理Task 4 1.1 定义launch模式 4 1.2 设置affinities 5 1.3 清空the back stack 5 1.4 开始task 5
The new updates can actively streamline your workflow, with major changes including reimagined C# refactoring support, a new .NET Web app stack, and the .NET compiler platform that makes C# and Visual...
(IP) and TCP/IP stack layering concepts. Except for the above, most of the other IP-related concepts are explained in the text. Thus, the book is suitable for managers, engineers, researchers and ...
We then look at how to provision databases in self-service mode, and how to perform administration tasks such as backup and recovery, and fine-tuning databases. At the end of the book, we will ...
Back up and restore your databases with the help of Trove In Detail OpenStack has become an extremely popular solution to build public and private clouds with. Database as a Service (DBaaS) enables ...
chapter explains how to record and play back messages using rosbag and rqt_bag. Chapter 4, 3D Modeling and Simulation, constitutes one of the first steps in order to implement your own robot in ROS. ...
Stack segment and stack pointer. Data segment DS and addressing. Addressing types and instruction coding. Programming at processor level: mnemonics and the assembler. Addressing types. ...
=) Programmers can finally focus on their tasks instead of waiting for (and sometimes fighting with) the external IDE’s to run, load the correct script, or jump to the correct line. Main features: ...
Way Back When 11 “The Brick” 13 Wireless Application Protocol (WAP) 15 Proprietary Mobile Platforms 17 The Open Handset Alliance 18 Google Goes Wireless 18 Forming the Open Handset Alliance 19 ...
9.6 Interrupt Tasks and Interrupt Procedures 9.7 Error Code 9.8 Exception Conditions 9.9 Exception Summary 9.10 Error Code Summary Chapter 10 Initialization 10.1 Processor State After Reset 10.2 ...
23. The five layers in the Internet protocol stack are – from top to bottom – the application layer, the transport layer, the network layer, the link layer, and the physical layer. The principal ...
If the task fails, the first move to a place, over time retry the put back, and so on ... There are many possible places to use it ... so, still retained 2. How many tasks can be complicated to ...
Your hands-on guide to Visual C# fundamentals Expand your expertise—and teach yourself the fundamentals of Microsoft Visual C# 2013. If you have previous ...Using the stack and the heap 197 vu Contents
After providing definitions of terms used, this document will outline the organisational structure (including role descriptions and communication lines), discuss the methodology model and after ...
Creates a cookie, a small amount of information sent by a servlet to a Web browser, saved by the browser, and later sent back to the server. Cookie(String, String) - Constructor for class javax....