page.title=Support Library Features @jd:body

In this document

  1. v4 Support Library
  2. Multidex Support Library
  3. v7 Support Libraries
    1. v7 appcompat library
    2. v7 cardview library
    3. v7 gridlayout library
    4. v7 mediarouter library
    5. v7 palette library
    6. v7 recyclerview library
    7. v7 preference library
  4. v8 Support Library
  5. v13 Support Library
  6. v14 Preference Support Library
  7. v17 Leanback Library
  8. v17 Preference Library for TV
  9. Annotations Support Library
  10. Design Support Library
  11. Custom Tabs Support Library
  12. Percent Support Library
  13. Recommendation Support Library for TV

See also

  1. Support Library Revisions
  2. Support Library Setup
  3. Testing Support Library

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.

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.

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

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:

There are many other APIs included in this library. For complete, detailed information about the v4 Support Library APIs, see the {@link android.support.v4.app android.support.v4} package in the API reference.

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/v4/} directory. The library does not contain user interface resources. To include it in your application project, follow the instructions for Adding libraries without resources.

Caution: Using dynamic dependencies, especially for higher version numbers, can cause unexpected version updates and regression incompatibilities.

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

com.android.support:support-v4:23.3.0

Multidex Support Library

This library provides support for building apps with multiple Dalvik Executable (DEX) files. Apps that reference more than 65536 methods are required to use multidex configurations. For more information about using multidex, see Building Apps with Over 64K Methods.

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/multidex/} directory. The library does not contain user interface resources. To include it in your application project, follow the instructions for Adding libraries without resources.

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

com.android.support:multidex:1.0.0

v7 Support Libraries

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

This library adds support for the Action Bar user interface design pattern. This library includes support for material design user interface implementations.

Note: This library depends on the v4 Support Library.

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

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/v7/appcompat/} directory. The library contains user interface resources. To include it in your application project, follow the instructions for Adding libraries with resources.

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

com.android.support:appcompat-v7:23.3.0

v7 cardview library

This library adds support for the {@link android.support.v7.widget.CardView} widget, which lets you show information inside cards that have a consistent look on any app. These cards are useful for material design implementations, and are used extensively in layouts for TV apps.

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/v7/cardview/} directory. The library contains user interface resources. To include it in your application project, follow the instructions for Adding libraries with resources.

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

com.android.support:cardview-v7:23.3.0

v7 gridlayout library

After you download the Android Support Libraries, this library adds support for the {@link android.support.v7.widget.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 {@link android.support.v7.widget android.support.v7.widget} package in the API reference.

This library is located in the {@code <sdk>/extras/android/support/v7/gridlayout/} directory . The library contains user interface resources. To include it in your application project, follow the instructions for Adding libraries with resources.

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

com.android.support:gridlayout-v7:23.3.0

v7 mediarouter library

This library provides {@link android.support.v7.media.MediaRouter}, {@link android.support.v7.media.MediaRouteProvider}, and related media classes that support Google Cast.

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 {@link android.support.v7.media android.support.v7.media} package in the API reference.

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.

The Gradle builder script dependency identifier is as follows: com.android.support:support-v7-mediarouter:<revision>, where "<revision>" is the minimum revision at which the library is available. For example:

com.android.support:mediarouter-v7:23.3.0

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 Google Cast.

v7 palette library

The v7 palette support library includes the {@link android.support.v7.graphics.Palette} class, which lets you extract prominent colors from an image. For example, a music app could use a {@link android.support.v7.graphics.Palette} object to extract the major colors from an album cover, and use those colors to build a color-coordinated song title card.

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/v7/palette/} directory. The library does not contain user interface resources. To include it in your application project, follow the instructions for Adding libraries without resources.

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

com.android.support:palette-v7:23.3.0

v7 recyclerview library

The recyclerview library adds the {@link android.support.v7.widget.RecyclerView} class. This class provides support for the RecyclerView widget, a view for efficiently displaying large data sets by providing a limited window of data items.

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/v7/recyclerview/} directory. The library contains user interface resources. To include it in your application project, follow the instructions for Adding libraries with resources.

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

com.android.support:recyclerview-v7:23.3.0

v7 Preference Support Library

The preference package provides APIs to support adding preference objects, such as {@link android.support.v7.preference.CheckBoxPreference} and {@link android.support.v7.preference.ListPreference}, for users to modify UI settings.

The v7 Preference library adds support for interfaces, such as {@link android.support.v7.preference.Preference.OnPreferenceChangeListener} and {@link android.support.v7.preference.Preference.OnPreferenceClickListener}, and classes, such as {@link android.support.v7.preference.CheckBoxPreference} and {@link android.support.v7.preference.ListPreference}.

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/v7/preference} directory. For more information on how to set up your project, follow the instructions in Adding libraries with resources.

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

com.android.support:preference-v7:23.3.0

v8 Support Library

This library is designed to be used with Android 2.2 (API level 8) and higher. This library provides specific feature sets and can be included in your application independently from other libraries.

v8 renderscript library

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 {@link 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.

Note: Use of RenderScript with the support library is supported with Android Studio and Gradle-based builds. The renderscript library is located in the build-tools/$VERSION/renderscript/ folder.

The following example shows the Gradle build script properties for this library:

defaultConfig {
    renderscriptTargetApi 18
    renderscriptSupportModeEnabled true
}

v13 Support Library

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 ({@link android.support.v13.app.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 {@link android.support.v13.app android.support.v13} package in the API reference.

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/v13/} directory. The library does not contain user interface resources. To include it in your application project, follow the instructions for Adding libraries without resources.

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

com.android.support:support-v13:23.3.0

v14 Preference Support Library

The {@link android.support.v14.preference} package provides APIs to add support for preference interfaces such as {@link android.support.v14.preference.PreferenceFragment.OnPreferenceStartFragmentCallback} and {@link android.support.v14.preference.PreferenceFragment.OnPreferenceStartScreenCallback}, along with classes, such as {@link android.support.v14.preference.MultiSelectListPreference} and {@link android.support.v14.preference.PreferenceFragment}. For detailed information about the v14 Preference Support Library APIs, see the preference package in the API reference.

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/v14/} directory. The library does not contain user interface resources. To include it in your application project, follow the instructions for Adding libraries without resources.

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

com.android.support:preference-v14:23.3.0

v17 Preference Support Library for TV

The {@link android.support.v17.preference} package provides APIs for providing preference interfaces on TV devices, including support for the {@link android.support.v17.preference.LeanbackListPreferenceDialogFragment.ViewHolder.OnItemClickListener} interface and classes, such as {@link android.support.v17.preference.BaseLeanbackPreferenceFragment} and {@link android.support.v17.preference.LeanbackPreferenceFragment}. For detailed information about the v17 Preference Support Library APIs, see the preference package in the API reference.

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/v17/} directory. The library does not contain user interface resources. To include it in your application project, follow the instructions for Adding libraries without resources.

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

com.android.support:preference-leanback-v17:23.3.0

v17 Leanback Library

The {@link android.support.v17.leanback} package provides APIs to support building user interfaces on TV devices. It provides a number of important widgets for TV apps. Some of the notable classes include:

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/v17/leanback} directory. For more information on how to set up your project, follow the instructions in Adding libraries with resources.

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

com.android.support:leanback-v17:23.3.0

Annotations Support Library

The Annotation package provides APIs to support adding annotation metadata to your apps.

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/annotations} directory. For more information on how to set up your project, follow the instructions in Adding libraries with resources.

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

com.android.support:support-annotations:23.3.0

Design Support Library

The Design package provides APIs to support adding material design components and patterns to your apps.

The Design Support library adds support for various material design components and patterns for app developers to build upon, such as navigation drawers, floating action buttons (FAB), snackbars, and tabs.

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/design} directory. For more information on how to set up your project, follow the instructions in Adding libraries with resources.

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

com.android.support:design:23.3.0

Custom Tabs Support Library

The Custom Tabs package provides APIs to support adding and managing custom tabs in your apps.

The Custom Tabs Support library adds support for various classes, such as Custom Tabs Service and Custom Tabs Callback.

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/customtabs} directory. For more information on how to set up your project, follow the instructions in Adding libraries with resources.

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

com.android.support:customtabs:23.3.0

Percent Support Library

The Percent package provides APIs to support adding and managing percentage based dimensions in your app.

The Percent Support library adds support for the PercentLayoutHelper.PercentLayoutParams interface and various classes, such as PercentFrameLayout and PercentRelativeLayout.

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/percent} directory. For more information on how to set up your project, follow the instructions in Adding libraries with resources.

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

com.android.support:percent:23.3.0

App Recommendation Support Library for TV

The App Recommendation package provides APIs to support adding content recommendations in your app running on TV devices.

The App library adds support for annotations, such as ContentRecommendation.ContentMaturity and various classes, such as ContentRecommendation and RecommendationExtender.

After you download the Android Support Libraries, this library is located in the {@code <sdk>/extras/android/support/recommendation} directory. For more information on how to set up your project, follow the instructions in Adding libraries with resources.

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

com.android.support:recommendation:23.3.0