Developers have a lot to look forward to with the latest release of Android, but not everything requires Lollipop to run. With the official release of the SDK for API Level 21, Google also included an updated version of the AppCompat Support Library, which contains back-ported versions of UI controls and other features for use on older versions of the OS. Some of the new libraries were first available with the L Preview SDK, but just about everything has received an update, and there are some additions for the official release. While the AppCompat Library came out last week, Google just posted a detailed list of what's new and how to make use of it.


Google I/O 2014 – What's new in Android

The main focus of Google's post is on the updated ActionBar API, which now supports several of Android 5.0's new theme and layout properties. A new control called Toolbar has also been added to provide a similar, but more extensible variant of the ActionBar. Developers should only have to make some minor adjustments to their themes to migrate existing implementations to the new version. There is also a brand new SearchView based on the one found in Lollipop. It greatly expands on the options available in the older SearchView control, originally added in Honeycomb.

This release also brings the RecyclerView, CardView, and Palette libraries we heard so much about at Google I/O. These libraries were already available for testing in the L Preview SDK, but couldn't be used on older versions of Android without a workaround. No additional details were given in Google's post, but most of the information was published back in June and July, so it's not too hard to find. For a refresher on these classes, check out the Google I/O sessions "Material Science" and "Material Witness" below. (They're already queued up to the right spots.)

RecyclerView and CardView Libraries

Palette Library

There's a lot of great stuff to check out in this version of AppCompat, and everything included in this release should work all the way back to Android 2.1 Eclair. For a full list of what's available, take a look at the Support Library page on the Android Developers site. Also, check out the open source Google I/O app – it has been updated with the latest AppCompat Library and serves as a great example of how to migrate and use some of the new and updated features.

Source: Android Developer Blog