我是否需要使用Android的支持库 [英] Do I need to use Android support library
问题描述
更新: 现在,与Android体验个月后,我的理解是支持库回来,从更高层次的API新功能的端口。例如,支持LIB V4实现了一些使用API和其中的新功能。= 4只
感谢您的帮助。
它包含什么是什么呢?正在使用API级别4仿效从较新的层次的API?
是的,没有。它包含了更新的API两个回油口的版本(如片段
),以及其他功能不可用之外的支持库。
从href="http://developer.android.com/tools/support-library/index.html">支持库文档(重点煤矿)的
Android的支持库包是一套提供了Android框架API的和功能,这些功能只能通过库API向后兼容的版本code库。每个支持库是向后兼容到一个特定的Android API级别。这样的设计意味着你的应用程序可以使用图书馆的功能,并且仍然有运行Android 1.6(API等级4)及以上设备兼容。 有多个版本的支持库,每一个都支持不同的最低API级别: 我的最小API级别为15。我是否需要使用(或更在乎)支持V4? 也许吧。检查href="http://developer.android.com/tools/support-library/features.html">支持库特征文档
Updated: Now after months of experience with Android, I understand that support libraries are back ports of new features from higher API levels. For example, support lib v4 implements some of the new features using API <= 4 only.
Thanks for the help.
What does it contain exactly? APIs from newer levels that are emulated using API level 4?
Yes and no. It contains both back-ported versions of newer APIs (such as Fragment
), as well as other features that are not available outside of the support library.
From the support library documentation (emphasis mine):
The Android Support Library package is a set of code libraries that provide backward-compatible versions of Android framework APIs as well as features that are only available through the library APIs. Each Support Library is backward-compatible to a specific Android API level. This design means that your applications can use the libraries' features and still be compatible with devices running Android 1.6 (API level 4) and up.
There are multiple versions of the support library, each supporting a different minimum API level:
- v4 supports back to 1.6 (API level 4)
- v7 supports back to 2.1 (API level 7)
- v8 supports back to 2.2 (API level 8)
My min API level is 15. Do I need to use (or even care about) support v4?
Maybe. Check the Support Library Features documentation. Do you need any of those things? Some, such as DrawerLayout
are not available outside the support library.
这篇关于我是否需要使用Android的支持库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!