(2)

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.

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

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

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

可以被方便的用来配置并且与与应用程序代码独立开来的资源。

Application Components

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.

应用程序组件

应用程序组件是应用程序的必要基础。每个组件都是系统进入你的应用程序的不同的点。并非所有的组件都是用户实际的进入点,有些是相互关联的。但是每一个组件都是作为一个实体的存在并且扮演了一个特殊的角色--每一个都是帮助定义你应用程序整体的唯一基石。

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.

活动

一个活动呈现一个用户交互的界面。例如,邮件应用程序可以有一个用来显示新邮件列表的活动,其他撰写邮件的活动,读邮件的活动。因为这些一起工作的活动是为了在一个邮件应用程序中形成一个用户体验的集合,每个都相互独立。因此,一个不同的应用程序可以启动这些活动中的任意一个(如邮件应用程序允许的话)。

更多相关文章

  1. Google VR SDK for Android(1)-introduction(介绍)
  2. Android(安卓)组件化开发ButterKnife配置和相关问题
  3. Android(安卓)开发入门-活动的基本用法
  4. Lifecycle-Aware Components生命周期组件 Lifecycle、LiveData
  5. Android中获取应用程序(包)的信息(launcher获取系统应用)
  6. Android开发者指南(16) ―― Activity and Task Design
  7. 再也不信网上流传的方法了!!android创建组件的真正写法!
  8. android之File,Saving State,Preferences(二)
  9. 【转】android 有关listview的adapter的相关用法

随机推荐

  1. Android菜鸟进阶之路 TextView的使用
  2. Android代码混淆防反编译解决方案研究
  3. Android(安卓)Button控件的使用
  4. Android开发人员应避免的10个误区
  5. 一个简单的demo学习Android远程Service(AI
  6. Android应用程序的Life Cycle
  7. Android(安卓)开发中常用到的adb,aapt,gi
  8. Android(安卓)使用 SharedPreferences 保
  9. Python+Android进行TensorFlow开发
  10. Android第三课 联调华为手机