- 博客(19)
- 收藏
- 关注
原创 Application Fundamentals--Processes and lifecycles(进程生命周期)
[b]Processes and lifecycles---进程生命周期[/b] The Android system tries to maintain an application process for as long as possible, but eventually it will need to remove old processes when memory runs...
2010-08-30 09:23:18 111
原创 Application Fundamentals--Broadcast receiver lifecycle(广播接收组件生命周期)
[b]Broadcast receiver lifecycle---广播接收组件生命周期[/b]A broadcast receiver has single callback method:--翻译:广播接收组件只有唯一一个回调方法:[code="java"]void onReceive(Context curContext, Intent broadcastMsg)[/code...
2010-08-30 09:20:05 197
原创 Application Fundamentals--Service lifecycle(服务组件的生命周期)
[b]Service lifecycle--服务组件的生命周期[/b]A service can be used in two ways--翻译:服务组件有两种使用方式: * It can be started and allowed to run until someone stops it or it stops itself. In this mode, it's st...
2010-08-30 09:18:52 133
原创 Application Fundamentals--Coordinating activities(activity实例间协调)
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 t...
2010-08-30 09:15:26 111
原创 Application Fundamentals--Saving activity state(保存activity实例的状态信息)
[b]Saving activity state--保存activity实例的状态信息[/b]When the system, rather than the user, shuts down an activity to conserve memory, the user may expect to return to the activity and find it in its pr...
2010-08-27 10:06:55 87
原创 Application Fundamentals--Component Lifecycles(组件生命周期)
[b]Component Lifecycles--组件生命周期[/b]Application components have a lifecycle — a beginning when Android instantiates them to respond to intents through to an end when the instances are destroyed. In...
2010-08-27 09:56:04 104
原创 Application Fundamentals--Thread-safe methods(线程安全方法)
[b]Thread-safe methods--线程安全方法[/b]In a few contexts, the methods you implement may be called from more than one thread, and therefore must be written to be thread-safe. 翻译:某些场景下,方法的实现需要考虑线程安全。...
2010-08-27 09:51:12 107
原创 Application Fundamentals--Remote procedure calls(远程过程调用)
[b]Remote procedure calls--远程过程调用[/b]Android has a lightweight mechanism for remote procedure calls (RPCs) — where a method is called locally, but executed remotely (in another process), with any ...
2010-08-27 09:41:07 101
原创 Application Fundamentals--Processes and Threads(进程与线程)
[b]Processes and Threads--进程与线程[/b]When the first of an application's components needs to be run, Android starts a Linux process for it with a single thread of execution. By default, all component...
2010-08-27 09:36:29 97
原创 Application Fundamentals--Starting tasks
Starting tasksAn activity is set up as the entry point for a task by giving it an intent filter with "android.intent.action.MAIN" as the specified action and "android.intent.category.LAUNCHER" as ...
2010-08-27 09:34:33 88
原创 Application Fundamentals--Clearing the stack(堆栈清理)
Clearing the stack--堆栈清理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, it's as the user ...
2010-08-27 09:28:25 129
原创 Application Fundamentals--Launch modes-启动模式
Launch modes-启动模式There are four different launch modes that can be assigned to an element's launchMode attribute:翻译:activity元素的launchMode属性可以设定为以下四种值:"standard" (the default mode)"singleTop...
2010-08-27 09:27:31 111
原创 Application Fundamentals--Affinities and new tasks
Affinities and new tasksBy default, all the activities in an application have an affinity for each other — that is, there's a preference for them all to belong to the same task. However, an indivi...
2010-08-27 08:45:14 82
原创 Application Fundamentals--Activities and Tasks
Activities and TasksAs noted earlier, one activity can start another, including one defined in a different application. Suppose, for example, that you'd like to let users display a street map of s...
2010-08-27 08:42:41 90
原创 Application Fundamentals--Intent 过滤器
Intent 过滤器Intent 对象可以显式指定目标组件.一旦显式指定了目标组件,Android 操作系统直接根据指定的目标组件名在AndroidManifest.xml文件中查找该组件声明,找到之后立即激活该组件。如果Intent 对象没有显式指定目标组件, Android 操作系统必须从AndroidManifest.xml文件中的所有intent过滤器中定位到一个最佳匹配的inte...
2010-08-27 08:41:25 80
原创 Application Fundamentals--The manifest file
The manifest fileAndroid启动应用程序组件之前,首先必须知道被启动的应用中都有哪些组件.所以应用程序需要在manifest文件中声明该应用都绑定了什么组件, 在应用程序对应的.apk文件中同时也包含了应用程序代码、文件以及相关的资源。manifest是一个 XML 文件,总是被命名为AndroidManifest.xml,其中,并非仅仅是声明组件,同时该文件中...
2010-08-27 08:40:27 69
原创 Application Fundamentals--Activating components: intents(组件的激活)
Activating components: intents----组件的激活Content providers are activated when they're targeted by a request from a ContentResolver. The other three components — activities, services, and broadcast r...
2010-08-27 08:38:23 114
原创 Application Fundamentals--Application Components(应用组件)
Application Components-应用组件A central feature of Android is that one application can make use of elements of other applications (provided those applications permit it). For example, if your applica...
2010-08-27 08:32:15 136
原创 Application Fundamentals 前言
Android applications are written in the Java programming language. The compiled Java code — along with any data and resource files required by the application — is bundled by the aapt tool into an ...
2010-08-26 16:59:26 87
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人