个人主页:
http://blog.csdn.net/iefreer
Pdf制作cattong(http://www.80hou.org.cn)
Android
Android
Android
Android开发指南中文版
-
-
-
-应用程序框架
iefreer@hotmail.com
iefreer@hotmail.com
iefreer@hotmail.com
iefreer@hotmail.com
2009/9/10
2009/9/10
2009/9/10
2009/9/10
本文是对AndroidSDK1.5版的英文开发资料AndroidDevelopmentGuide一文应用程序框架部
分的翻译,覆盖了Android应用开发所有主要的概念。部分内容整理自网络。本文仅用于技
1
术学习,请勿用于商业用途。
2
目录
应用程序基础Application
Applic ation
Application
ApplicationFundamentals
Fundam entals
Fundamentals
Fundamentals.................................................................4
关键类................................................................................................................................4
应用程序组件....................................................................................................................5
激活组件:intent.....................................................................................................7
关闭组件....................................................................................................................7
manif est文件..........................................................................................................8
Intent过滤器...........................................................................................................8
Activity和任务..............................................................................................................10
Affinity(吸引力)和新任务................................................................................11
加载模式..................................................................................................................12
清理堆栈..................................................................................................................13
启动任务..................................................................................................................14
进程和线程......................................................................................................................14
进程..........................................................................................................................15
线程..........................................................................................................................15
3
远程过程调用
..........................................................................................................
15
线程安全方法..........................................................................................................16
组件生命周期..................................................................................................................17
Activity生命周期
..................................................................................................
17
调用父类.... ......................................................................................................................18
服务生命周期..........................................................................................................21
广播接收器生命周期
..............................................................................................
22
进程与生命周期......................................................................................................22
用户界面User
User
User
UserInterface
Interf ace
Interface
Interface...............................................................................................24
视图层次View
View
View
ViewHierarchy
Hierar chy
Hierarchy
Hierarchy
.............................................................................................
24
布局Layout
Layout
Layout
Layout....................................................................................................................25
部件Widgets
Widgets
Widgets
Widgets..................................................................................................................26
用户界面事件UI
UI
U I
UIEvents
Events
E vents
Events
...............................................................................................
26
菜单Menus
Menus
Menus
Menus.....................................................................................................................26
高级话题Advanced
Advanc ed
Advanced
AdvancedTopics
Topics
T opics
Topics....................................................................................27
适配器Ada pter
Adapter
Adapter
Adapter
...................................................................................................
27
风格与主题Styles
Styles
S tyles
Stylesand
and
and
andThemes
T hemes
T hemes
Themes.........................................................................27
4
资源和资产Resources
Resour ces
Resources
Resourcesand
and
and
andAssets
A ssets
A ssets
Assets
..........................................................................
28
资源引用Resource
Resource
Resource
ResourceReference
Refere nce
Reference
Reference...........................................................................43
国际化和本地化Internationalization
Internationalization
Internationalization
Internationalizationand
and
and
andLocalization
L ocali zation
Localization
Localization................................43
意图和意图过滤器Intents
Intents
Intents
Intentsand
and
and
andIntent
I ntent
I ntent
IntentFilters
Filter s
Filters
Filters
...........................................................
43
意图过滤器Intent
Intent
Intent
Intentfilters
filters
f ilters
filters................................................................................47
通常情况Common
Common
Common
Commoncases
cases
ca ses
cases................................................................................51
使用意图匹配Usi ng
Using
Using
Usingintent
intent
in tent
intentmatching
matchin g
matching
matching
........................................................
52
数据存储Data
Data
Data
DataStorage
Storag e
Storage
Storage.................................................................................................52
概览Storage
Storage
Storage
Storagequickview
quickv iew
quickview
quickview......................................................................................52
�系统偏好:快速,轻量级存储
........................................................................
52
�文件:存储到设备内部或可移动闪存............................................................52
�数据库:任意的结构化存储.... ........................................................................52
�支持基于网络的存储
........................................................................................
52
系统偏好Preferences
Preferences
Preferences
Preferences..........................................................................................53
文件Files
Files
Files
Files................................................................................................................54
数据库Databases
Databa ses
Databases
Databases
.................................................................................................
54
网络Net work
Network
Network
Network.........................................................................................................55
5