偷得浮生半桶水(半日闲), 好记性不如抄下来(烂笔头). 信息爆炸的时代, 学习是一项持续的工作.
全部博文(1748)
分类: LINUX
2009-06-08 17:54:57
安装SDK和插件 (Installing the SDK and Plugin)
如何安装SDK和Eclipse插件以及如何使用其他工具构建Android应用程序,同时根据向导运行示例程序。(How to install the SDK and Eclipse plugin, or how to use other tools to build Android applications. Also a guide to running the sample applications.)
你好Android (Hello Android)
编写你首个Android程序,经典流行的Hello World,Android风格。(Writing your first Android Application, the ever popular Hello World, Android style)
剖析Android程序 (Anatomy of an Android Application )
结构和Android程序构架说明介绍,通过向导将会帮助你理解编写Android程序。(A guide to the structure and architecture of an Android Application. This guide will help you understand the pieces that make up an Android app)
入门指导:构建一个完整的Android程序 (Tutorial: Building a Full Android Application)
入门指导文档将带领你通过构建一个真实的Android应用程序,一个记事本的创建、编辑、删除内容.Android开发网提示涵盖一些基本的概念通过
实例。(Android开发网提示涵盖一些基本的概念通过实例。(This tutorial document will lead you
through constructing a real Android Application: A notepad which can
create, edit and delete notes, and covers many of the basic concepts
with practical examples)
开发工具 (Development Tools)
一个命令行工具包含SDK,你想要做的和如何使用(The command line tools included with the SDK, what they do, and how to use them)
Android程序生命周期 (Life Cycle of an Android Application)
程序和Activites内部运行的生命周期(The important life-cycle details for Applications and Activities running inside of them.)
其他介绍材料 (Other Introductory Material)
在阅读了上面的章节后,下面是入门信息,非常实用。(After reading the sections above, the following Getting Started information is also very useful)
核心包 (Core Packages)
这些是基本包在通过Android SDK来编写应用程序,这些包作为原始层,列出的是从最底层到最高层。(These are the basic packages that make up the Android SDK for writing applications. The packages are organized as layers, listed here from lowest-level to highest)
android.util
包含一些列底层辅助类,例如特定的容器类,XML辅助工具类等等 (contains various low-level utility classes, such as specialized container classes, XML utilities, etc)
android.os
提供基本的操作服务,消息传递和进程进程间通讯IPC(provides basic operating system services, message passing, and inter-process communication)
android.graphics
作为核心渲染包(is the core rendering package)
android.text android.text.method android.text.style android.text.util
提供一套丰富的文本处理工具,支持富文本、输入模式等等(supply a rich set of text processing tools, supporting rich text, input methods, etc)
android.database
包含底层API处理数据库(contains low-level APIs for working with databases)
android.content
提供各种服务访问数据在设备上,程序安装到设备和其他的相关资源,以及内容提供展示动态数据。(provides various services for accessing data on the device: applications installed on the device and their associated resources, and content providers for persistent dynamic data.)
android.view
核心用户界面框架(is the core user-interface framework)
android.widget
提供标准用户界面元素,lists列表 buttons按钮,layout managers布局管理器等等,构建从View包中(supplies standard user interface elements (lists, buttons, layout managers, etc) built from the view package)
android.app
提供高层应用程序模型,实现使用Activities(provides the high-level application model, implemented using Activities)
其他值得注意的包 (Other Notable Packages)
这些包提供附加指定域也行在Android平台,这些必须在基本的应用程序开发(These packages provide additional domain-specific features of the Android platform. They are not necessary for basic application development.)
android.provider
包含定义变量标准内容提供包含在平台中(contains definitions for various standard content providers included with the platform)
android.telephony
提供API交互和设备的通话栈(provides APIs for interacting with the device's phone stack.)
android.webikit
包含一系列API工作在基于web的内容(includes various APIs for working with web-based content)
Android程序由4个板块构成(There are four building blocks to an Android application: )
Acitvity用户界面管理器 (Acitvity)
消息收发器 (Intent Receiver)
服务对象(Service)
内容提供(Content Provider)
不是每个程序都需要有着全部4个部分,但是你的程序将被包含这些部分(Not every application needs to have all four, but your application will be written with some combination of these.)
你决定使用这些组件就需要在程序中例举出来在AndroidManifest.xml文件中,这是一个XML文件声明组 件和其他能力请求(Once you have decided what components you need for your application, you should list them in a file called AndroidManifest.xml. This is an XML file where you declare the components of your application and what their capabilities and requirements are)
Acitvity用户界面管理器 (Acitvity)
Activities大多数由4个Android板块构成,一个Activity通常由一个屏幕在你的程序中,每个Activity实现一个单独的类扩 展Activity积累。你的类将显示用户界面包含Views和相应时间,大多数程序由多个屏幕构成。举个例子,一个文本消息程序可以由第一个屏幕显示一 个列表连接着发送消息,第二个屏幕写入信息给选择的联系人,其他屏幕处理老的消息或改变设置。每个屏幕将由一个Avtivity实现。移动到其他屏幕显示 一个新的Activity。在大多数情况下一个Activity可以返回上一个Activity的值,举个例子一个Activity能让用户选择一个照片 将返回选择照片给调用者。(Activities are the most common of the four Android building blocks. An activity is usually a single screen in your application. Each activity is implemented as a single class that extends the Activity base class. Your class will display a user interface composed of Views and respond to events. Most applications consist of multiple screens. For example, a text messaging application might have one screen that shows a list of contacts to send messages to, a second screen to write the message to the chosen contact, and other screens to review old messages or change settings. Each of these screens would be implemented as an activity. Moving to another screen is accomplished by a starting a new activity. In some cases an activity may return a value to the previous activity -- for example an activity that lets the user pick a photo would return the chosen photo to the caller. )
当一个新屏幕打开时,上一个屏幕将暂停并放入到历史栈中,用户可以浏览通过以前打开的屏幕在历史栈中,屏幕也可以选 择被一处从历史栈当它不再保留时。Android保留每一个从主屏幕启动的程序到历史栈。(When a new screen opens, the previous screen is paused and put onto a history stack. The user can navigate backward through previously opened screens in the history. Screens can also choose to be removed from the history stack when it would be inappropriate for them to remain. Android retains history stacks for each application launched from the home screen. )