01——Introduction to Android介绍

Introduction to Android

Android provides a rich application framework that allows you to build innovative apps and games for mobile devices in a Java language environment. The documents listed in the left navigation provide details about how to build apps using Android‘s various APIs.

Android提供了丰富的应用框架,可以在手机上使用Java语言创建应用程序和游戏。左侧导航中列出了关于如何创建应用程序的API。

 

If you‘re new to Android development, it‘s important that you understand the following fundamental concepts about the Android app framework:

如果你是Android开发新手,了解以下Android应用框架有基本的概念很重要:

 

Apps provide multiple entry points(APP提供多个入口)

Android apps are built as a combination of distinct components that can be invoked individually. For instance, an individual activity provides a single screen for a user interface, and a service independently performs work in the background.

 Android应用程序由不同组件构成,这些组件可以单独使用。比如,提供用户界面的Activity,后台执行的Service。

 

From one component you can start another component using an intent. You can even start a component in a different app, such an activity in a maps app to show an address. This model provides multiple entry points for a single app and allows any app to behave as a user‘s "default" for an action that other apps may invoke.

在一个组件中可以通过Intent启动另外的组件。你甚至可以启动另外一个APP的组件,比如打开地图APP显示地址的Activity。这种模式为一个APP提供了多个入口,用户默认行动,其它任何APP都可以调用。

 

Apps adapt to different devices(兼容不同设备)

Android provides an adaptive app framework that allows you to provide unique resources for different device configurations. For example, you can create different XML layout files for different screen sizes and the system determines which layout to apply based on the current device‘s screen size.

Android提供了一个自适应framework,它允许你可以为不同设备配置,提供了得天独厚的优势。例如,你可以为不同屏幕尺寸创建多套对应的XML布局,系统会基于当前设备的屏幕尺寸确定应使用哪套布局。

 

You can query the availability of device features at runtime if any app features require specific hardware such as a camera. If necessary, you can also declare features your app requires so app markets such as Google Play Store do not allow installation on devices that do not support that feature.

您可以在运行时查询设备功能的可用性,如果APP必须要特定的硬件,如照相机。如果需要,您还可以声明该硬件在你的APP中是必须的,在Google Play中,不支持这些硬件的设备将不能安装APP。

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。