Coordinating activities---activity实例间协调
When one activity starts another, they both experience lifecycle transitions. One pauses and may stop, while the other starts up. On occasion, you may need to coordinate these activities, one with the other.【翻译:当一个activity实例发出intent请求去启动另外一个activity实例的时候,这两个实例当前生命周期状态都将发生变化,一个进入暂停状态继而可能被stop,另一个被启动。有时候开发者可能需要两个实例相互协调。】
The order of lifecycle callbacks is well defined, particularly when the two activities are in the same process:---翻译:生命周期回调顺序是预定好的,尤其是当两个实例属于同一个进程的时候。
1. The current activity's onPause() method is called.---翻译:当前实例的onPause()方法被系统调用。
2. Next, the starting activity's onCreate(), onStart(), and onResume() methods are called in sequence.---翻译:之后,被启动的实例的onCreate(), onStart(), 和 onResume()方法被系统依次调用。
3. Then, if the starting activity is no longer visible on screen, its onStop() method is called.---翻译:然后,如果被启动的实例如果不在屏幕上显示的话,该实例的 onStop()方法被系统调用执行。
When one activity starts another, they both experience lifecycle transitions. One pauses and may stop, while the other starts up. On occasion, you may need to coordinate these activities, one with the other.【翻译:当一个activity实例发出intent请求去启动另外一个activity实例的时候,这两个实例当前生命周期状态都将发生变化,一个进入暂停状态继而可能被stop,另一个被启动。有时候开发者可能需要两个实例相互协调。】
The order of lifecycle callbacks is well defined, particularly when the two activities are in the same process:---翻译:生命周期回调顺序是预定好的,尤其是当两个实例属于同一个进程的时候。
1. The current activity's onPause() method is called.---翻译:当前实例的onPause()方法被系统调用。
2. Next, the starting activity's onCreate(), onStart(), and onResume() methods are called in sequence.---翻译:之后,被启动的实例的onCreate(), onStart(), 和 onResume()方法被系统依次调用。
3. Then, if the starting activity is no longer visible on screen, its onStop() method is called.---翻译:然后,如果被启动的实例如果不在屏幕上显示的话,该实例的 onStop()方法被系统调用执行。
发表评论
-
Intents and Intent Filters--Intent filters
2010-09-03 10:21 1364Intent filters To inform ... -
Intents and Intent Filters---Intent Resolution
2010-09-03 09:45 1197Intent Resolution Intents 可以分成 ... -
Intents and Intent Filters---Intent Objects
2010-09-02 11:15 818Intent Objects An Intent ... -
Intents and Intent Filters---序言
2010-09-01 16:06 874Intents and Intent Filters Key ... -
Application Fundamentals--Processes and lifecycles(进程生命周期)
2010-08-30 09:23 754Processes and lifecycles---进 ... -
Application Fundamentals--Broadcast receiver lifecycle(广播接收组件生命周期)
2010-08-30 09:20 4243Broadcast receiver lifecycle--- ... -
Application Fundamentals--Service lifecycle(服务组件的生命周期)
2010-08-30 09:18 1051Service lifecycle--服务组件的生命周期 A ... -
Application Fundamentals--Saving activity state(保存activity实例的状态信息)
2010-08-27 10:06 1258Saving activity state--保存activi ... -
Application Fundamentals--Component Lifecycles(组件生命周期)
2010-08-27 09:56 961Component Lifecycles--组件生命周期 A ... -
Application Fundamentals--Thread-safe methods(线程安全方法)
2010-08-27 09:51 1254Thread-safe methods--线程安 ... -
Application Fundamentals--Remote procedure calls(远程过程调用)
2010-08-27 09:41 1292Remote procedure calls--远程过程调用 ... -
Application Fundamentals--Processes and Threads(进程与线程)
2010-08-27 09:36 990Processes and Threads--进程 ... -
Application Fundamentals--Starting tasks
2010-08-27 09:34 701Starting tasks An activity is ... -
Application Fundamentals--Clearing the stack(堆栈清理)
2010-08-27 09:28 1345Clearing the stack--堆栈清理 If th ... -
Application Fundamentals--Launch modes-启动模式
2010-08-27 09:27 1118Launch modes-启动模式 There are fo ... -
Application Fundamentals--Affinities and new tasks
2010-08-27 08:45 979Affinities and new tasks By de ... -
Application Fundamentals--Activities and Tasks
2010-08-27 08:42 789Activities and Tasks As noted ... -
Application Fundamentals--Intent 过滤器
2010-08-27 08:41 922Intent 过滤器 Intent 对象可以显式指定目标组件 ... -
Application Fundamentals--The manifest file
2010-08-27 08:40 788The manifest file Android启动应用程 ... -
Application Fundamentals--Activating components: intents(组件的激活)
2010-08-27 08:38 934Activating components: intents- ...
相关推荐
DB2 9 Database and Application Fundamentals - Academic Initiative 000-302 2011年12月版本 V8.02 Q188道。
fundamentals-of-power-electronics_2nd_erickson_full
Fundamentals-of-HVAC-Control-Systems-Malestrom.part02.rar
Fundamentals-of-heat-and-mass-transfer 7ed.pdf ;INSTRUCTOR'S SOLUTIONS MANUAL
linux-shell-scripting-fundamentals-bash.epub
fundamentals-of-radar-signal
ios-12-programming-fundamentals-swift epub. very good
fundamentals-of-statistical-signal-processing-volume-i-estimation-theory_1
此存储库包含
2016-fuel cell fundamentals-3rd edition.pdf
Az-900-Microsoft-Azure-Fundamentals-Version-16.0-It-Exam-Practice-Test.pdf
Az-900-Microsoft-Azure-Fundamentals-Version-19.1-It-Exam-Practice-Test.pdf
Data Warehousing Fundamentals-2001
Electric Machinery Fundamentals - 5th Ed
ruby-oo-fundamentals-attribute-accessors-lab-wdc01-seng-ft-060120-源码.rar
ruby-oo-fundamentals-attribute-accessors-lab-sea01-seng-ft-071320-master.rar
安卓应用开发教程配套实验教程!课程网址:https://developer.android.com/courses/fundamentals-training/toc-v2
Kubernetes 基础课程个人笔记整理包含内容:01.课程介绍 02. KUBERNETES的基础 03.安装与配置 04. KUBERNETES 架构 05. API和访问(ACCESS) 06. API对象(API Objects) 07.通过部署管理状态(managing state with ...
vuejs-components-fundamentals-源码.rar