剖析Android程序结构-----Android新手入门
2010-03-22 13:56
513 查看
剖析Android程序(Anatomy of an Android Application)
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. )
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. )
相关文章推荐
- Android--入门---6---(Android 开发的目录结构剖析)
- MC新手入门(二十八)------ 顺序结构程序
- Android新手入门2016(5)--HelloWorld工程结构分析
- MC新手入门(二十八)------ 顺序结构程序
- 新手入门——Ophone(Android)开发项目文件结构
- 【Android游戏开发之十】(优化处理)详细剖析Android Traceview效率检视工具,分析程序运行速度!并讲解两种创建SDcard方式!
- 开发宝典:程序开发新手入门之Jave ME
- Android开发:程序目录结构详解:activity主要方法等
- 30天自制操作系统(一)从计算机结构到汇编程序入门
- J2ME程序开发新手入门九大要点
- 2D高德Android地图SDK 新手入门的com.amap.api.maps.MapView的坑
- 一张思维导图,告诉你Android新手如何快速入门
- Android程序架构目录结构介绍
- C++入门进阶之4: C++程序结构
- android新手入门内部培训教程目录一览
- Android新手入门 FAQ
- J2ME程序开发新手入门要领
- 一个程序android bind入门
- Android游戏开发19:SurfaceView运行机制剖析--处理切换到后台再重新进入程序时的异常
- J2ME程序开发新手入门要领