Android API Guides - Introduction

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 语言环境下为移动设备构建的新颖的应用程序和游戏。在左侧导航栏中(原版网页左边有个列表,这边就木有咯~)罗列的一系列文章详细介绍了如果使用 Android 多种多样的 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 拥有多个入口的应用程序

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 as 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 来启动另一个组件。甚至,你可以启动一个其他应用程序的组件,比如启动一个地图应用的 activity 来显示一个地理位置。这一模式为单个应用程序设置了多个入口,并且...@#翻译不过来¥%...(allows any app to behave as a user's "default" for an action that other apps may invoke)。

Learn more 更多内容:

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 提供一个自适应的应用程序框架来允许你为不同的设备配置提供相应的独立的资源。比如,你可以为不同的屏幕尺寸创建不同的 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.

当你的应用程序的某个功能需要特殊的硬件(比如摄像头)时,你可以在程序运行过程中检测当前设备的该硬件特性是否可用。如果有必要的话,你也可以声明你的应用程序必须要有哪些设备特性,以便 Google Play Store (Google 官方的应用商城,类似豌豆荚)拒绝没有该特性的设备来安装你的应用。

Learn more 更多内容:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值