Intro To Android (Workbook 2)

Support Library

Fragment's were introduced after API level 11 (aka. Honeycomb). Android created this library to prevent further fragmentation of the developer base since there would have been two different ways to write Android applications and it was unlikely that developers would move to Fragment's without this library.

A year after Honeycomb was released, only 3% of devices were Honeycomb or higher. Ice Cream Sandwich (API level 14) brought Fragment's to phones and things finally started to shift. As of the writing of this book, only 14% of the active devices are running OS versions younger than Honeycomb. Depending on your target market, it might make sense to cut support for these devices.

As new platform features come out that a broad base of developers are interested introduced after Honeycomb are There are several versions and are named by the version that they support. Support library

v4

This library supports the furthest back. Use this library if you are planning to support all the way back to API level 4 (aka Donut).

Highlights

  • Fragment's, as you've seen, allows you to break up your UI into self contained pieces. This allows you to segment your user into reusable pieces.
  • We've used ViewPager in our application that were attached as action bar tabs and allowed us to view information about the city with it's delicacies.
  • We've used DrawerLayout to provide overall app navigation.
  • Loader's allow asynchronous loading of data. We've used the platform integrated version in our application.

v7

API version 7 is Froyo. Some of the libraries require you to also integrate v4 of the support library.

  • ActionBar adds persistent navigation in your application. We've used the platform integration version.
  • GridLayout allows you to layout a UI on a grid.
  • MediaRouter and related classes allow you to cast your content to Android TV and Chromecast.

v8

API version 8 is Gingerbread. It adds support for RenderScript.

v13

This is designed for Honeycomb, Android 3.2 (API 13) and includes support for Fragment's. I personally don't see a point to this library since you could cut off one API version and use platform Fragment's instead. The percentage of Honeycomb tablets isn't even shown on the Android dashboard since it's such a small percentage.