1 page.title=Support Library Features
8 <h2>In this document</h2>
10 <li><a href="#v4">v4 Support Library</a></li>
11 <li><a href="#multidex">Multidex Support Library</a></li>
12 <li><a href="#v7">v7 Support Libraries</a>
14 <li><a href="#v7-appcompat">v7 appcompat library</a></li>
15 <li><a href="#v7-cardview">v7 cardview library</a></li>
16 <li><a href="#v7-gridlayout">v7 gridlayout library</a></li>
17 <li><a href="#v7-mediarouter">v7 mediarouter library</a></li>
18 <li><a href="#v7-palette">v7 palette library</a></li>
19 <li><a href="#v7-recyclerview">v7 recyclerview library</a></li>
22 <li><a href="#v8">v8 Support Library</a></li>
23 <li><a href="#v13">v13 Support Library</a></li>
24 <li><a href="#v17-leanback">v17 Leanback Library</a></li>
29 <li><a href="{@docRoot}tools/support-library/index.html#revisions">
30 Support Library Revisions</a></li>
31 <li><a href="{@docRoot}tools/support-library/setup.html">
32 Support Library Setup</a></li>
38 <p>The Android Support Library package contains several libraries that can be included
39 in your application. Each of these libraries supports a specific range of Android platform
40 versions and set of features.</p>
42 <p>This guide explains the important features and version support provided by the Support
43 Libraries to help you decide which of them you should include in your application. In general,
44 we recommend including the <a href="#v4">v4 support</a> and <a href="#v7-appcompat">v7
45 appcompat</a> libraries, because they support a wide range of
46 Android versions and provide APIs for recommended user interface patterns.</p>
48 <p>In order to use any of the following libraries, you must download the library files to your
49 Android SDK installation. Follow the directions for downloading the Support Libraries in
50 <a href="{@docRoot}tools/support-library/setup.html#download">Support Library Setup</a> to
51 complete this step. You must take additional steps to include a specific Support Library in
52 your application. See the end of each library section below for important information on how to
53 include the library in your application.</p>
56 <h2 id="v4">v4 Support Library</h2>
58 <p>This library is designed to be used with Android 1.6 (API level 4) and higher. It includes the
59 largest set of APIs compared to the other libraries, including support for application components,
60 user interface features, accessibility, data handling, network connectivity, and programming
61 utilities. Here are a few of the key classes included in the v4 library:</p>
66 <li>{@link android.support.v4.app.Fragment}
67 - Adds support for encapsulation of user interface and functionality
68 with Fragments, enabling
69 applications to provide layouts that adjust between small and
73 <li>{@link android.support.v4.app.NotificationCompat} - Adds support for rich notification
75 <li>{@link android.support.v4.content.LocalBroadcastManager} - Allows applications to easily
76 register for and receive intents within a single application without broadcasting them
82 <li>{@link android.support.v4.view.ViewPager} - Adds a
83 {@link android.view.ViewGroup} that manages the layout for the
84 child views, which the user can swipe between.</li>
85 <li>{@link android.support.v4.view.PagerTitleStrip}
86 - Adds a non-interactive title strip, that can be added as a child of
87 {@link android.support.v4.view.ViewPager}.</li>
88 <li>{@link android.support.v4.view.PagerTabStrip} - Adds a
89 navigation widget for switching between paged views, that can also be used with
90 {@link android.support.v4.view.ViewPager}.</li>
91 <li>{@link android.support.v4.widget.DrawerLayout} - Adds
92 support for creating a <a href="{@docRoot}training/implementing-navigation/nav-drawer.html"
93 >Navigation Drawer</a> that can be pulled in from the edge of a window.</li>
94 <li>{@link android.support.v4.widget.SlidingPaneLayout}
95 - Adds widget for creating linked summary and detail views that
96 appropriately adapt to various screen sizes.</li>
101 <li>{@link android.support.v4.widget.ExploreByTouchHelper}
102 - Adds a helper class for implementing accessibility support for custom views.</li>
103 <li>{@link android.support.v4.view.accessibility.AccessibilityEventCompat} - Adds support for
104 {@link android.view.accessibility.AccessibilityEvent}. For more information about implementing
105 accessibility, see <a href="{@docRoot}guide/topics/ui/accessibility/index.html"
106 >Accessibility</a>.</li>
108 <li>{@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat} - Adds support
109 for {@link android.view.accessibility.AccessibilityNodeInfo}.</li>
110 <li>{@link android.support.v4.view.accessibility.AccessibilityNodeProviderCompat} - Adds
111 support for {@link android.view.accessibility.AccessibilityNodeProvider}.</li>
112 <li>{@link android.support.v4.view.AccessibilityDelegateCompat} - Adds support for
113 {@link android.view.View.AccessibilityDelegate}.</li>
118 <li>{@link android.support.v4.content.Loader} - Adds support for asynchronous loading of data.
119 The library also provides concrete implementations of this class, including
120 {@link android.support.v4.content.CursorLoader} and
121 {@link android.support.v4.content.AsyncTaskLoader}.</li>
122 <li>{@link android.support.v4.content.FileProvider} - Adds support for sharing of private
123 files between applications.</li>
129 There are many other APIs included in this library. For complete, detailed information about the
130 v4 Support Library APIs, see the {@link android.support.v4.app android.support.v4} package in the
134 <p>This library is located in the {@code <sdk>/extras/android/support/v4/} directory after
135 you download the Android Support Libraries. The library does not contain user interface
136 resources. To include it in your application project, follow the instructions for
137 <a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
140 <p class="caution"><strong>Caution:</strong> Using dynamic dependencies, especially for higher version
141 numbers, can cause unexpected version updates and regression incompatibilities.</p>
143 <p>The Gradle build script dependency identifier for this library is as follows:</p>
146 com.android.support:support-v4:21.0.0
151 <h2 id="multidex">Multidex Support Library</h2>
154 This library provides support for building apps with multiple Dalvik Executable (DEX) files.
155 Apps that reference more than 65536 methods are required to use multidex configurations. For
156 more information about using multidex, see <a href="{@docRoot}tools/building/multidex.html">
157 Building Apps with Over 65K Methods</a>.
161 This library is located in the {@code <sdk>/extras/android/support/multidex/} directory
162 after you download the Android Support Libraries. The library does not contain user interface
163 resources. To include it in your application project, follow the instructions for <a href=
164 "{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
169 The Gradle build script dependency identifier for this library is as follows:
173 com.android.support:multidex:1.0.0
178 <h2 id="v7">v7 Support Libraries</h2>
180 <p>There are several libraries designed to be used with Android 2.1 (API level 7) and higher.
181 These libraries provide specific feature sets and can be included in your application
182 independently from each other.</p>
185 <h3 id="v7-appcompat">v7 appcompat library</h3>
187 <p>This library adds support for the
188 <a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> user
189 interface <a href="{@docRoot}design/patterns/actionbar.html">design
190 pattern</a>. This library includes support for
191 <a href="{@docRoot}design/material/">material design</a> user interface
195 <p class="note"><strong>Note:</strong>
196 This library depends on the v4 Support Library. If you are using Ant or Eclipse, make sure
197 you include the v4 Support Library as part of this library's classpath.
200 <p>Here are a few of the key classes included in the v7 appcompat library:</p>
203 <li>{@link android.support.v7.app.ActionBar} - Provides an implementation of the action bar
204 <a href="{@docRoot}design/patterns/actionbar.html">user interface pattern</a>. For more
205 information on using the Action Bar, see the
206 <a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> developer guide.
208 <li>{@link android.support.v7.app.ActionBarActivity} - Adds an application activity class that
209 must be used as a base class for activities that uses the Support Library action bar
212 <li>{@link android.support.v7.widget.ShareActionProvider} - Adds support for a standardized
213 sharing action (such as email or posting to social applications) that can be included in an
218 <p>This library is located in the {@code <sdk>/extras/android/support/v7/appcompat/}
219 directory after you download the Android Support Libraries. The library contains user
220 interface resources. To include it in your application project, follow the instructions for
221 <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries with
224 <p>The Gradle build script dependency identifier for this library is as follows:</p>
227 com.android.support:appcompat-v7:21.0.0
232 <h3 id="v7-cardview">v7 cardview library</h3>
234 <p>This library adds support for the {@link android.support.v7.widget.CardView}
235 widget, which lets you show information inside cards that have a consistent look
236 on any app. These cards are useful for material design
237 implementations, and are used extensively in layouts for TV apps.</p>
239 <p>This library is located in the
240 {@code <sdk>/extras/android/support/v7/cardview/} directory after you
241 download the Android Support Libraries. The library contains user interface
242 resources. To include it in your application project, follow the instructions
243 for <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding
244 libraries with resources</a>.</p>
246 <p>The Gradle build script dependency identifier for this library is as follows:</p>
249 com.android.support:cardview-v7:21.0.0
254 <h3 id="v7-gridlayout">v7 gridlayout library</h3>
256 <p>This library adds support for the {@link android.support.v7.widget.GridLayout} class, which
257 allows you to arrange user interface elements using a grid of rectangular cells.
258 For detailed information about the v7 gridlayout library APIs, see the
259 {@link android.support.v7.widget android.support.v7.widget} package in the API reference.</p>
261 <p>This library is located in the {@code <sdk>/extras/android/support/v7/gridlayout/}
262 directory after you download the Android Support Libraries. The library contains user
263 interface resources. To include it in your application project, follow the instructions for
264 <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries with
267 <p>The Gradle build script dependency identifier for this library is as follows:</p>
270 com.android.support:gridlayout-v7:21.0.0
275 <h3 id="v7-mediarouter">v7 mediarouter library</h3>
277 <p>This library provides {@link android.support.v7.media.MediaRouter}, {@link
278 android.support.v7.media.MediaRouteProvider}, and related media classes that
279 support <a href="https://developers.google.com/cast/docs/android_sender">Google Cast</a>. </p>
281 <p>In general, the APIs in the v7 mediarouter library provide a means of
282 controlling the routing of media channels and streams from the current device to
283 external screens, speakers, and other destination devices. The library includes
284 APIs for publishing app-specific media route providers, for discovering and
285 selecting destination devices, for checking media status, and more. For detailed
286 information about the v7 mediarouter library APIs, see the
287 {@link android.support.v7.media android.support.v7.media} package in the API
290 <p>The v7 mediarouter library is located in the
291 <code><sdk>/extras/android/support/v7/mediarouter/</code> directory after
292 you download the Android Support Library. It's provided as a library project
293 with a dependency on the v7 appcompat library, so you'll need to include both
294 libraries in your build path when setting up your project. For more information
295 on how to set up your project, follow the instructions in <a
296 href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
297 with resources</a>. If you are developing in Eclipse/ADT, make sure to include
298 both the <code>android-support-v7-mediarouter.jar</code> and
299 <code>android-support-v7-appcompat.jar</code> files.</p>
301 <p>If you are using Android Studio, all you need to do is specify the Gradle build
302 script dependency identifier <code>com.android.support:support-v7-mediarouter:<revision></code>,
303 where "<revision>" is the minimum revision at which the library is available. For example:</p>
306 com.android.support:mediarouter-v7:21.0.0
309 <p class="caution">The v7 mediarouter library APIs introduced in Support Library
310 r18 are subject to change in later revisions of the Support Library. At this
311 time, we recommend using the library only in connection with <a
312 href="https://developers.google.com/cast/docs/android_sender">Google Cast</a>. </p>
314 <h3 id="v7-palette">v7 palette library</h3>
316 <p>The v7 palette support library includes the
317 {@link android.support.v7.graphics.Palette} class, which lets you extract
318 prominent colors from an image. For example, a music app could use a
319 {@link android.support.v7.graphics.Palette} object to extract the major colors
320 from an album cover, and use those colors to build a color-coordinated song
323 <p>This library is located in the
324 {@code <sdk>/extras/android/support/v7/palette/} directory after
325 you download the Android Support Libraries. The library does not contain user interface
326 resources. To include it in your application project, follow the instructions for
327 <a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
330 <p>The Gradle build script dependency identifier for this library is as follows:</p>
333 com.android.support:palette-v7:21.0.0
338 <h3 id="v7-recyclerview">v7 recyclerview library</h3>
340 <p>The recyclerview library adds the {@link android.support.v7.widget.RecyclerView}
341 class. This class provides support for the
342 <a href="{@docRoot}training/material/lists-cards.jd#RecyclerView">RecyclerView
343 widget</a>, a view for efficiently displaying large data sets by providing a
344 limited window of data items.</p>
346 <p>This library is located in the
347 {@code <sdk>/extras/android/support/v7/recyclerview/} directory after you
348 download the Android Support Libraries. The library contains user interface
349 resources. To include it in your application project, follow the instructions
350 for <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding
351 libraries with resources</a>.</p>
353 <p>The Gradle build script dependency identifier for this library is as follows:</p>
356 com.android.support:recyclerview-v7:21.0.0
361 <h2 id="v8">v8 Support Library</h2>
363 <p>This library is designed to be used with Android (API level 8) and higher. It adds support for
364 the <a href="{@docRoot}guide/topics/renderscript/compute.html">RenderScript</a> computation
365 framework. These APIs are included in the {@link android.support.v8.renderscript} package. You
366 should be aware that the steps for including these APIs in your application is <em>very
367 different</em> from other support library APIs. For more information about using these APIs
368 in your application, see the
369 <a href="{@docRoot}guide/topics/renderscript/compute.html#access-rs-apis">RenderScript</a>
373 <strong>Note:</strong> Use of RenderScript with the support library is supported with the Android
374 Eclipse plugin and Ant build tools. It is <em>not currently</em> supported with Android Studio or
379 <h2 id="v13">v13 Support Library</h2>
381 <p>This library is designed to be used for Android 3.2 (API level 13) and higher. It adds support
382 for the <a href="{@docRoot}guide/components/fragments.html">Fragment</a> user interface pattern
383 with the ({@link android.support.v13.app.FragmentCompat}) class and additional fragment support
384 classes. For more information about fragments, see the
385 <a href="{@docRoot}guide/components/fragments.html">Fragments</a> developer guide. For detailed
386 information about the v13 Support Library APIs, see the {@link android.support.v13.app
387 android.support.v13} package in the API reference.
390 <p>This library is located in the {@code <sdk>/extras/android/support/v13/} directory after
391 you download the Android Support Libraries. The library does not contain user interface
392 resources. To include it in your application project, follow the instructions for
393 <a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
396 <p>The Gradle build script dependency identifier for this library is as follows:</p>
399 com.android.support:support-v13:18.0.0
404 <h2 id="v17-leanback">v17 Leanback Library</h2>
406 <p>The {@link android.support.v17.leanback} package provides APIs to support
407 building user interfaces
408 on TV devices. It provides a number of important widgets for TV apps. Some of the notable classes include:</p>
411 <li>{@link android.support.v17.leanback.app.BrowseFragment} - A fragment for
412 creating a primary layout for browsing categories and rows of media
414 <li>{@link android.support.v17.leanback.app.DetailsFragment} - A wrapper
415 fragment for Leanback details screens.</li>
416 <li>{@link android.support.v17.leanback.app.PlaybackOverlayFragment} - A
417 subclass of {@link android.support.v17.leanback.app.DetailsFragment} for
418 displaying playback controls and related content.</li>
419 <li>{@link android.support.v17.leanback.app.SearchFragment} - A fragment to
420 handle searches. The fragment receives the user's search request and passes
421 it to the application-provided {@link
422 android.support.v17.leanback.app.SearchFragment.SearchResultProvider
423 SearchResultProvider}. The {@link
424 android.support.v17.leanback.app.SearchFragment.SearchResultProvider
425 SearchResultProvider} returns the search results to the
426 {@link android.support.v17.leanback.app.SearchFragment}, which renders them
427 into a {@link android.support.v17.leanback.app.RowsFragment}.</li>
430 <p>This library is located in the
431 {@code <sdk>/extras/android/support/v17/leanback} directory after
432 you download the Android Support Libraries. For more information
433 on how to set up your project, follow the instructions in <a
434 href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
435 with resources</a>. </p>
437 <p>The Gradle build script dependency identifier for this library is as follows:</p>
440 com.android.support:leanback-v17:21.0.0