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.

活動

一個活動呈現一個用戶交互的界面。例如,郵件應用程序能夠有一個用來顯示新郵件列表的活動,其餘撰寫郵件的活動,讀郵件的活動。 由於這些一塊兒工做的活動是爲了在一個郵件應用程序中造成一個用戶體驗的集合,每一個都相互獨立。所以,一個不一樣的應用程序能夠啓動這些活動中的任意一個(如郵件應用程序容許的話)。

相關文章
相關標籤/搜索