【翻译】Android Support Library Features(二)

原文地址:http://developer.android.com/tools/support-library/features.html

Android Support Library包中,包含了几个可以被引入到你应用的库。每一个库支持一个特定的Android平台版本范围和功能集合。

原文:The Android Support Library package contains several libraries that can be included in your application.
Each of these libraries supports a specific range of Android platform versions and set of features.

这个指南解释了Support Library提供的重要功能和版本,这将帮助你决定你的应用选择哪一个功能和版本。总的来说,我们推荐引入v4
support
和 v7
appcompat
的库,因为它们支持的Android版本很广泛,并为推荐的用户界面样式提供API。

原文:This guide explains the important features and version support provided by the Support Libraries to help you decide which of them you
should include in your application. In general, we recommend including the v4
support
 and  v7
appcompat
 libraries, because they support a wide range of Android versions and provide APIs for recommended user interface patterns.

想要使用任何下面的库,你必须将库文件下载到你安装的Android SDK中。在Support
Library Setup
中根据指引下载Support Library,来完成这一步骤。你必须采取额外的措施来引入一个特殊的Support Library到你的应用中。查看下面每一个库章节的末尾来获取重要信息,这些信息阐述了如何将库引入你的应用中。

原文:In order to use any of the following libraries, you must download the library
files to your Android SDK installation. Follow the directions for downloading the Support Libraries in Support
Library Setup
 to complete this step. You must take additional steps to include a specific Support Library in your application. See the end of each library
section below for important information on how to include the library in your application.

v4 Support Library

这个库是为Android 1.6(API level 4)和更高版本设计的。相对于其他库,他包含的API集合最大,包括对应用组件、用户界面功能、辅助功能、数据处理、网络连接和编程工具的支持。这里有一些包含在v4库中的关键类:(此处偷个懒,省去关键类的翻译500字^_^)

原文:This library is designed to be used with Android 1.6 (API level 4) and higher. It includes the largest
set of APIs compared to the other libraries, including support for application components, user interface features, accessibility, data handling, network connectivity, and programming utilities. Here are a few of the key classes included in the v4 library:

还有很多其他API包含在这个库中。在API引用中查看 android.support.v4包,以获取关于v4
Support Library API的全部和详细的信息。

原文:There are many other APIs included in this library. For complete, detailed information about the v4 Support Library APIs, see the  android.support.v4 package
in the API reference.

在你下载了Android Support Library以后,这个库放在<sdk>/extras/android/support/v4/目录下。这个库不包含用户界面资源。按照adding
libraries without resources
的说明来将这个库引入你的应用项目。

原文:This library is located in the <sdk>/extras/android/support/v4/ directory
after you download the Android Support Libraries. This library does not contain user interface resources. To include it in your application project, follow the instructions for adding
libraries without resources
.

这个库的Gradle建造脚本依赖标识符如下:

原文:The Gradle build script dependency identifier for this library is as follows:

[plain] view
plain
 copy

  1. com.android.support:support-v4:18.0.+

这个依赖符号指定了发布版本为18.0.0或更高。

原文:This dependency notation specifies the release version 18.0.0 or higher.

v7 Libraries

有几个库是为Android 2.1(API level 7)和更高版本设计的。这些库提供指定的功能集合,并且可以相互独立地引入你的应用。

原文:There are several libraries designed to be used with Android 2.1 (API level 7) and higher. These libraries
provide specific feature sets and can be included in your application independently from each other.

v7 appcompat library

这个库添加了对Action
Bar
用户界面 design
pattern
(设计样式)的支持。

原文:This library adds support for the Action
Bar
 user interface design
pattern
.

注意:这个库依赖于v4 Support Library。如果你在使用Ant或者Eclipse,确保要将v4 Support Library作为这个库classpath的一部分引入。

原文:Note: This library depends on the v4 Support Library. If you are using Ant or Eclipse,
make sure you include the v4 Support Library as part of this library‘s classpath.

这里有一些包含在v7 appcompat库中的关键类:(此处偷个懒,省去关键类的翻译200字^_^)

原文:Here are a few of the key classes included in the v7 appcompat library:

  • ActionBar -
    Provides an implementation of the action bar user interface pattern. For more information on using
    the Action Bar, see the Action Bar developer guide.
  • ActionBarActivity -
    Adds an application activity class that must be used as a base class for activities that uses the Support Library action bar implementation.
  • ShareActionProvider -
    Adds support for a standardized sharing action (such as email or posting to social applications) that can be included in an action bar.

在你下载了Android Support Library以后,这个库放在<sdk>/extras/android/support/v7/appcompat/ 目录下。这个库包含用户界面资源。按照 adding
libraries with resources
 的说明来将这个库引入你的应用项目。

原文:This library is located in the <sdk>/extras/android/support/v7/appcompat/ directory
after you download the Android Support Libraries. This library contains user interface resources. To include it in your application project, follow the instructions for  adding
libraries with resources
.

这个库的Gradle建造脚本依赖标识符如下:

原文:The Gradle build script dependency identifier for this library is as follows:

[plain] view
plain
 copy

  1. com.android.support:appcompat-v7:18.0.+

这个依赖符号指定了发布版本为18.0.0或更高。

原文:This dependency notation specifies the release version 18.0.0 or higher.

v7 gridlayout library

这个库添加了对 GridLayout类的支持,这个类允许你使用矩形单元的网格来排列用户界面元素。在API引用中查看android.support.v7.widget 包,以获取关于v7
gridlayout Support Library API的详细信息。

原文:This library adds support for the GridLayout class,
which allows you to arrange user interface elements using a grid of rectangular cells. For detailed information about the v7 gridlayout library APIs, see the android.support.v7.widget package
in the API reference.

在你下载了Android Support Library以后,这个库放在<sdk>/extras/android/support/v7/gridlayout/ 目录下。这个库包含用户界面资源。按照adding
libraries with resources
 的说明来将这个库引入你的应用项目。

原文:This library is located in the <sdk>/extras/android/support/v7/gridlayout/ directory
after you download the Android Support Libraries. This library contains user interface resources. To include it in your application project, follow the instructions for adding
libraries with resources
.

这个库的Gradle建造脚本依赖标识符如下:

原文:The Gradle build script dependency identifier for this library is as follows:

[plain] view
plain
 copy

  1. com.android.support:gridlayout-v7:18.0.+

这个依赖符号指定了发布版本为18.0.0或更高。

原文:This dependency notation specifies the release version 18.0.0 or higher.

v7 mediarouter library

这个库提供了MediaRouterMediaRouteProvider和相关的支持Google
Cast developer preview
(谷歌投影)(译者注:谷歌投影是一种屏幕分享技术,可以将小屏幕的智能设备分享到大的屏幕上,如智能手机到电视,但是详情请看这里,或这里1,或这里2)开发者预览的媒体类。

原文:This library provides MediaRouterMediaRouteProvider,
and related media classes that support the Google
Cast developer preview
.

总的来说,在v7 mediarouter库中的API提供了一种控制手段,它可以控制从当前设备到扩展屏幕、扬声器和其他目的设备的媒体通道和数据流的路径选择。这个库包含了一些API,这些API包含发行具有应用特性的媒体路径provider,发现和选择目的设备,检查媒体状态和其他一些功能。在API引用中查看 android.support.v7.media 包,以获取关于v7
mediarouter Support Library API的详细信息。

原文:In general, the APIs in the v7 mediarouter library provide a means of controlling
the routing of media channels and streams from the current device to external screens, speakers, and other destination devices. The library includes APIs for publishing app-specific media route providers, for discovering and selecting destination devices,
for checking media status, and more. For detailed information about the v7 mediarouter library APIs, see the  android.support.v7.media package
in the API reference.

在你下载了Android Support Library以后,这个库放在<sdk>/extras/android/support/v7/mediarouter/ 目录下。这个库包含用户界面资源。它是以一个从属于v7
appcompat库的库项目的方式提供给开发者使用的,所以当你在创建项目的时候,你需要在build path中同时引入这两个库。按照 adding
libraries with resources
 的说明以获取更多如何创建项目的信息。  如果你使用Eclipse/ADT开发,要确保同时引入android-support-v7-mediarouter.jar和android-support-v7-appcompat.jar文件。

原文:The v7 mediarouter library is located in the <sdk>/extras/android/support/v7/mediarouter/ directory
after you download the Android Support Library. It‘s provided as a library project with a dependency on the v7 appcompat library, so you‘ll need to include both libraries in your build path when setting up your project. For more information on how to set up
your project, follow the instructions in adding
libraries with resources
. If you are developing in Eclipse/ADT, make sure to include both the android-support-v7-mediarouter.jar and android-support-v7-appcompat.jar files.

如果你使用的是Android Studio,你只需要指定Gradle建造脚本依赖标识符com.android.support:support-v7-mediarouter:<revision>,这个标识符的可用库的修正版本最低是18.0.0。例如:

[plain] view
plain
 copy

  1. com.android.support:mediarouter-v7:18.0.+

原文:If you are using Android Studio, all you need to do is specify the Gradle build
script dependency identifier com.android.support:support-v7-mediarouter:<revision>,
where "18.0.0" is the minimum revision at which the library is available. For example:

Tip:在Support Library r18中介绍的v7 mediarouter库API受制于Support Library的后续修正变化。当前,我们推荐你只在关于Google
Cast developer preview
时使用这个库。

原文:Tip:The v7 mediarouter library APIs introduced in Support Library r18 are subject
to change in later revisions of the Support Library. At this time, we recommend using the library only in connection with the Google
Cast developer preview
.

v8 Support Library

这个库是为Android(API level 8)或更高版本的使用设计的。它加入了对  RenderScript 计算架构的支持。这些API包含在 android.support.v8.renderscript包中。你应该能意识到介绍包含这些API的应用程序的步骤与其他支持库的API有很大不同。查看  RenderScript开发者指南,以获取更多关于这些API的信息。

原文:This library is designed to be used with Android (API level 8) and higher.
It adds support for the  RenderScript computation
framework. These APIs are included in the android.support.v8.renderscript package.
You should be aware that the steps for including these APIs in your application is very different from other support library APIs. For more information about using these APIs in your application, see the RenderScript developer
guide.

注意:利用Support Library使用RenderScript,这是被Android Eclipse插件和Ant build工具支持的。目前它不支持使用Android Studio或者基于Gradle构建。

原文:Note: Use of RenderScript with the support library is supported with the Android Eclipse
plugin and Ant build tools. It isnot currently supported with Android Studio or Gradle-based builds.

v13 Support Library

这个库是为Android 3.2(API level 13)或更高版本的使用设计的。它添加了对  Fragment用户界面样式(利用FragmentCompat类)和额外的fragment支持类的支持。查看  Fragment开发者指南查阅更多关于fragment的信息。在API引用中查看android.support.v13包,以获取关于v13
Support Library API的详细信息。

原文:This library is designed to be used for Android 3.2 (API level 13) and higher.
It adds support for the  Fragment user
interface pattern with the (FragmentCompat)
class and additional fragment support classes. For more information about fragments, see the Fragments developer
guide. For detailed information about the v13 Support Library APIs, see the android.support.v13 package
in the API reference.

在你下载了Android Support Library以后,这个库放在 <sdk>/extras/android/support/v13/  目录下。这个库不包含用户界面资源。按照 adding
libraries without resources
的说明来将这个库引入你的应用项目。

原文:This library is located in the <sdk>/extras/android/support/v13/ directory
after you download the Android Support Libraries. This library does not contain user interface resources. To include it in your application project, follow the instructions for adding
libraries without resources
.

这个库的Gradle建造脚本依赖标识符如下:

原文:The Gradle build script dependency identifier for this library is as follows:

[plain] view
plain
 copy

  1. com.android.support:support-v13:18.0.+

这个依赖符号指定了发布版本为18.0.0或更高。

原文:This dependency notation specifies the release version 18.0.0 or higher.

欢迎转载,转载请注明出处:http://blog.csdn.net/crazybigfish/article/details/18552305

时间: 2024-07-30 08:34:31

【翻译】Android Support Library Features(二)的相关文章

Android support library支持包常用控件介绍(二)

谷歌官方推出Material Design 设计理念已经有段时间了,为支持更方便的实现 Material Design设计效果,官方给出了Android support design library 支持库,让开发者更容易的实现材料设计的效果.顺便推荐官方的一个图标库:Material Icons 控件名称 NavigationView FloatingActionButton TextInputLayout Snackbar TabLayout AppBarLayout Coordinator

Android Support Library 学习入门

0. 文前闲话 作为一个由原生桌面应用程序开发者(VC.Delphi)转行的Android菜鸟,虐心的事真是数不胜数:安装个开发工具下载个SDK需要整整一夜:早晨一上班点开Android Studio(简称AS),去倒个水回来了还不见它开始工作:开发工具一忙起来就会忘记你这个开发者,不知过了多久后才给你一句:"去TMD的GFW,我啥也没干成,你自己看着办吧!". 对于我们这些已经被微软.Borland.Sybase洗脑多年的开发者,除了开发工具的不适应,最大的壁垒其实是大脑中已经固有的

理解安卓支持库(Android Support Library)

安卓平台其中一个很牛逼的地方在于它支持各种不同的设备.从你的平板电脑,到你的手机,电视等,安卓无处不在.安卓想成为一个全领域的移动计算平台.光从它的数量上来说,已经算是很成功了. 支持所有这些设备是有一些挑战的.不管硬件还是软件上的不同,用户希望应用程序可以在每一台设备上用样的运行:同样,对于开发者来说,你不能总指望用户已经升级到最近的安卓版本.事实上,开发者遇到的用户大多使用18个月前或者更老的版本. 如果没有安卓团队的帮助,开发者会不得不做些“丑陋的代码”去兼容那些使用老版本的用户.幸运的是

Android Support Library介绍

v4 Support Library 这个库是为Android 1.6(API版本为4)及以上的版本设计的,它包含大部分高版本中有而低版本中没有的API,包括application components.user interface features.accessibility.data handling.network connectivity.and programming utilities,下面是对V4中的一些关键API的介绍: App Components Fragment:通过它可以

Android Support Library 23.2

Android Support Library 23.2 When talking about the Android Support Library, it is important to realize this isn't one monolithic library, but a whole collection of libraries that seek to provide backward-compatible versions of APIs, as well as offer

Android Support library

1, Android Support V4, V7, V13是什么? 本质上就是三个java library. 2, 为什么要有support库? 如果在低版本Android平台上开发一个应用程序,而应用程序又想使用高版本才拥有的功能,就需要使用Support库. 3, 三个Support 库的区别和作用是什么? Android Support v4 是最早(2011年4月份)实现的库.用在Android1.6 (API lever 4)或者更高版本之上.它包含了相对V4, V13大的多的功能.

Support v4 v7 v13: Android Support Library

Android Support v4:  这个包是为了照顾1.6及更高版本而设计的,这个包是使用最广泛的,eclipse新建工程时,都默认带有了. Android Support v7:  这个包是为了考虑照顾2.1及以上版本而设计的,但不包含更低,故如果不考虑1.6,我们可以采用再加上这个包,另外 注意,v7是要依赖v4这个包的,即,两个得同时被包含. Android Support v13:这个包的设计是为了android 3.2及更高版本的,一般我们都不常用,平板开发中能用到. Andro

Android Support Library package简介

转自http://my.oschina.net/chengliqun/blog/148451 N久未做android了,以前做的时候,2.2才刚出来,现在android都更新到了4.3了,而从前一段时间android各个sdk版本市场占有率 来看,1.6.2.1还是占有一定的市场,故在有些时候,我们还是得要考虑兼容这些版本. google提供了Android Support Library package 系列的包来保证来高版本sdk开发的向下兼容性,即我们用4.x开发时,在1.6等版本上,可以

[Xamarin.Android] Support Library Tips

[Xamarin.Android] Support Library Tips Support Library支持内容 Xamarin Support Library每个版本支持.那些组件,可以参考这份简报的第8张. Backwards Compatibility in Xamarin.Android Made Easy