Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need to use Android support library [closed]

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.


1 Answers

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.

like image 183
Bryan Herbst Avatar answered Sep 15 '25 04:09

Bryan Herbst