Dev Guide_Android Basics_Application Fundamentals

(2)app

That covers the basics regarding how an Android application exists within the system. The rest of this document introduces you to:框架

  • The core framework components that define your application.
  • The manifest file in which you declare components and required device features for your application.
  • Resources that are separate from the application code and allow your application to gracefully optimize its behavior for a variety of device configurations.

关于一个应用程序如何存在于系统的基础知识部分,如下文档将向你介绍:ide

用来定义你的应用程序的核心框架组件。ui

用来描述组件和应用程序设备属性的manifest文件。this

能够被方便的用来配置而且与与应用程序代码独立开来的资源。rest

 

Application Componentscode

Application components are the essential building blocks of an Android application. Each component is a different point through which the system can enter your application. Not all components are actual entry points for the user and some depend on each other, but each one exists as its own entity and plays a specific role—each one is a unique building block that helps define your application's overall behavior.component

应用程序组件orm

应用程序组件是应用程序的必要基础。每一个组件都是系统进入你的应用程序的不一样的点。并不是全部的组件都是用户实际的进入点,有些是相互关联的。可是每个组件都是做为一个实体的存在而且扮演了一个特殊的角色--每个都是帮助定义你应用程序总体的惟一基石。生命周期

There are four different types of application components. Each type serves a distinct purpose and has a distinct lifecycle that defines how the component is created and destroyed.

Here are the four types of application components:

有四个不一样类型的应用程序组件。每个类型服务于不一样的目的而且由于组件建立和销毁的不一样而有不一样的生命周期。

 

Activities
An activity represents a single screen with a user interface. For example, an email application might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails. Although the activities work together to form a cohesive user experience in the email application, each one is independent of the others. As such, a different application can start any one of these activities (if the email application allows it). For example, a camera application can start the activity in the email application that composes new mail, in order for the user to share a picture.

An activity is implemented as a subclass of Activity and you can learn more about it in the Activities developer guide.

活动

一个活动呈现一个用户交互的界面。例如,邮件应用程序能够有一个用来显示新邮件列表的活动,其余撰写邮件的活动,读邮件的活动。 由于这些一块儿工做的活动是为了在一个邮件应用程序中造成一个用户体验的集合,每一个都相互独立。所以,一个不一样的应用程序能够启动这些活动中的任意一个(如邮件应用程序容许的话)。

相关文章
相关标签/搜索