1page.title=Support Library 2 3@jd:body 4 5<div id="qv-wrapper"> 6 <div id="qv"> 7 8 <h2>In this document</h2> 9 <ol> 10 <li><a href="#overview">Overview</a></li> 11 <li><a href="#revisions">Revisions</a></li> 12 </ol> 13 14 <h2>See also</h2> 15 <ol> 16 <li><a href="{@docRoot}tools/support-library/features.html"> 17 Support Library Features</a></li> 18 <li><a href="{@docRoot}tools/support-library/setup.html"> 19 Support Library Setup </a></li> 20 </ol> 21 22 </div> 23</div> 24 25<p>The Android Support Library package is a set of code libraries that provide 26 backward-compatible versions of Android framework APIs as well as features that are only available 27 through the library APIs. Each Support Library is backward-compatible to a specific Android API 28 level. This design means that your applications can use the libraries' features and still be 29 compatible with devices running Android 1.6 (API level 4) and up.</p> 30 31<p>This guide provides information about what features are enabled by the Support Libraries, 32 how to use them in your development environment and information about library releases.</p> 33 34 35<h2 id="overview">Overview</h2> 36 37<p>Including the Support Libraries in your Android project is considered a best practice for 38 application developers, depending on the range of platform versions your app is targeting 39 and the APIs that it uses. Using the features the libraries provide can help you improve the look of your 40 application, increase performance and broaden the reach of your application to more users. 41 If you use the Android 42 <a href="{@docRoot}tools/projects/templates.html">code template</a> tools, you will notice that 43 all the Android application templates include one or more of the Support Libraries by default.</p> 44 45<p>The Support Libraries each target a base Android API level and each provides a different set 46 of features. In order to effectively use the libraries, it is important to consider what features 47 you want to support and understand what features are supported by each library at what Android 48 API level. To get started, review the 49 <a href="{@docRoot}tools/support-library/features.html">Support Library Features</a> guide. 50 After that, go to the 51 <a href="{@docRoot}tools/support-library/setup.html">Support Library Setup</a> topic to 52 learn how to incorporate the Support Libraries into your application. For more details 53 about Support Library APIs, see the {@link android.support.v4.app android.support} 54 packages in the API reference.</p> 55 56 57<h2 id="revisions">Revisions</h2> 58 59<p>This section provides details about the Support Library package releases.</p> 60 61 62<div class="toggle-content opened"> 63 <p id="rev21"><a href="#" onclick="return toggleContent(this)"> 64 <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img" alt="" 65/>Android Support Library, revision 21.0.3</a> <em>(December 2014)</em> 66 </p> 67 <div class="toggle-content-toggleme"> 68 <dl> 69 <dt>Changes for <a href="features.html#v4">v4 support library:</a></dt> 70 <dd> 71 <ul> 72 <li>Added several {@link android.support.v4.app.NotificationCompat.WearableExtender} 73 methods to improve the display of barcodes in notifications on wearable devices. 74 <ul> 75 <li>{@link android.support.v4.app.NotificationCompat.WearableExtender#getHintScreenTimeout getHintScreenTimeout()}</li> 76 <li>{@link android.support.v4.app.NotificationCompat.WearableExtender#setHintScreenTimeout setHintScreenTimeout()}</li> 77 <li>{@link android.support.v4.app.NotificationCompat.WearableExtender#getHintAvoidBackgroundClipping getHintAvoidBackgroundClipping()}</li> 78 <li>{@link android.support.v4.app.NotificationCompat.WearableExtender#setHintAvoidBackgroundClipping setHintAvoidBackgroundClipping()}</li> 79 </ul> 80 </li> 81 </ul> 82 </dd> 83 84 </div> 85</div> 86 87 88 89<div class="toggle-content closed"> 90 <p id="rev21"><a href="#" onclick="return toggleContent(this)"> 91 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 92/>Android Support Library, revision 21.0.2</a> <em>(November 2014)</em> 93 </p> 94 <div class="toggle-content-toggleme"> 95 <dl> 96 <dt>Changes for <a href="features.html#v4">v4 support library:</a></dt> 97 <dd> 98 <ul> 99 <li>Added {@link android.support.v4.app.NotificationCompat.CarExtender} 100 class to support Android Auto extensions to notifications.</li> 101 </ul> 102 </dd> 103 <dt>Changes for <a href="features.html#v7-appcompat">v7 appcompat library</a>:</dt> 104 <dd> 105 <ul> 106 <li>Added the {@link android.support.v7.widget.PopupMenu} constructor to support new popup 107 menus.</li> 108 <li>Added support for a Collapse icon description in the {@link android.support.v7.widget.Toolbar} 109 class.</li> 110 <li>Updated the {@link android.support.v7.widget.SearchView} widget to support displaying 111 the {@link android.support.v7.mediarouter.R.attr#commitIcon}. </li> 112 <li>Removed the <code>buttonGravity</code> attribute from the 113 {@link android.support.v7.widget.Toolbar} class. </li> 114 </ul> 115 </dd> 116 <dt>Changes for <a href="features.html#v7-cardview">v7 cardview library</a>:</dt> 117 <dd> 118 <ul> 119 <li>Added {@link android.support.v7.widget.CardView#setCardBackgroundColor} API to 120 support changing the background color of the {@link android.support.v7.widget.CardView}.</li> 121 <li>Changed the {@link android.support.v7.widget.CardView} to more accurately report its 122 opacity value as {@link android.graphics.PixelFormat#TRANSLUCENT}.</li> 123 </ul> 124 </dd> 125 <dt>Changes for <a href="features.html#v7-recyclerview">v7 recyclerview 126 library</a>:</dt> 127 <dd> 128 <ul> 129 <li>Added {@link android.support.v7.widget.RecyclerView#TOUCH_SLOP_DEFAULT} and 130 {@link android.support.v7.widget.RecyclerView#TOUCH_SLOP_PAGING} constants 131 to the {@link android.support.v7.widget.RecyclerView} class 132 to support touch slop configurations for paging.</li> 133 </ul> 134 </dd> 135 <dt>Changes for <a href="features.html#v17-leanback">v17 leanback library</a>:</dt> 136 <dd> 137 <ul> 138 <li>Added support to generate v4 code fragments. </li> 139 <li>Changed the secondary text color on {@link android.support.v7.widget.CardView}. </li> 140 </ul> 141 </dd> 142 </dl> 143 </div> 144</div> 145 146 147 148<div class="toggle-content closed"> 149 <p id="rev21"><a href="#" onclick="return toggleContent(this)"> 150 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 151/>Android Support Library, revision 21.0.1</a> <em>(November 2014)</em> 152 </p> 153 <div class="toggle-content-toggleme"> 154 <dl> 155 <dt>Added <a href="{@docRoot}tools/support-library/features.html#multidex"> 156 multidex support library</a> to support multiple 157 <a href="https://source.android.com/devices/tech/dalvik/">Dalvik</a> Executable (DEX) files 158 for multi-dex file support prior to Android 5.0. </li> 159 </dt> 160 </dl> 161 </div> 162</div> 163 164 165 166 167<div class="toggle-content closed"> 168 <p id="rev21"><a href="#" onclick="return toggleContent(this)"> 169 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 170/>Android Support Library, revision 21</a> <em>(October 2014)</em> 171 </p> 172 <div class="toggle-content-toggleme"> 173 <dl> 174 <dt>Changes for <a href="features.html#v4">v4 support library:</a></dt> 175 <dd> 176 <ul> 177 <li>Added support for {@link android.support.v4.app.Fragment} 178 transitions for devices running Android 5.0 (API level 21). 179 Be aware that transitions have no effect on devices running 180 Android 4.4 and lower. 181 </li> 182 <li>Added {@link android.support.v4.provider.DocumentFile} to ease 183 the transition from {@link java.io.File} 184 while working with document trees. However, this class demands 185 more processing overhead compared to the platform's 186 {@link android.provider.DocumentsContract} API added in 187 Android 4.4 (API level 19). So you should switch to using {@link 188 android.provider.DocumentsContract} when running on Android 4.4 189 and higher.</li> 190 </ul> 191 </dd> 192 <dt>Changes for <a href="features.html#v7-appcompat">v7 appcompat 193 library</a>:</dt> 194 <dd> 195 <ul> 196 <li>Added support for <a href="{@docRoot}design/material/">material 197 design</a> user interfaces.</li> 198 <li>Added {@link android.support.v7.widget.Toolbar}, which generalizes 199 the functionality of {@link android.support.v7.app.ActionBar} for 200 use within app layouts.</li> 201 <li>Updated {@link android.support.v7.app.ActionBarDrawerToggle}, 202 which contains the menu-to-arrow animation</li> 203 <li>Updated common user interface widgets to allow tinting via theme 204 attributes when running on pre-Android 5.0 devices</li> 205 <li>Added {@link android.support.v7.widget.SwitchCompat}, a backport 206 of the {@link android.widget.Switch} widget that was added in 207 Android 4.0 (API level 14).</li> 208 </ul> 209 </dd> 210 <dt>New <a href="features.html#v7-cardview">v7 cardview library</a>:</dt> 211 <dd> 212 <ul> 213 <li>Added the {@link android.support.v7.widget.CardView} widget, which 214 provides a material design-compatible implementation for displaying 215 data items.</li> 216 </ul> 217 </dd> 218 <dt>New <a href="features.html#v7-recyclerview">v7 recyclerview 219 library</a>:</dt> 220 <dd> 221 <ul> 222 <li>Added the {@link android.support.v7.widget.RecyclerView} widget, 223 which provides a flexible list view for providing a limited window 224 into a large data set.</li> 225 </ul> 226 </dd> 227 <dt>New <a href="features.html#v7-palette">v7 palette library</a>:</dt> 228 <dd> 229 <ul> 230 <li>Added {@link android.support.v7.graphics.Palette} class, 231 which lets you extract prominent colors from an image.</li> 232 </ul> 233 </dd> 234 <dt>New <a href="features.html#v17-leanback">v17 leanback library</a>:</dt> 235 <dd> 236 <ul> 237 <li>Added support for building TV user interfaces, including 238 {@link android.support.v17.leanback.app.BrowseFragment}, 239 {@link android.support.v17.leanback.app.DetailsFragment}, and 240 {@link android.support.v17.leanback.app.PlaybackOverlayFragment}. 241 For more information about using these user interface widgets, 242 see <a href="{@docRoot}training/tv/playback/index.html">Building TV 243 Playback Apps</a>.</li> 244 </ul> 245 </dd> 246 </dl> 247 </div> 248</div> 249 250<div class="toggle-content closed"> 251 <p><a href="#" onclick="return toggleContent(this)"> 252 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 253/>Android Support Library, revision 20</a> <em>(July 2014)</em> 254 </p> 255 <div class="toggle-content-toggleme"> 256 <dl> 257 <dt>Changes for v4 support library:</dt> 258 <dd> 259 <ul> 260 <li>Added extended notification support for Android Wear in 261 {@link android.support.v4.app.NotificationCompat.WearableExtender}, which allows you 262 to specify wearable-specific features in your notifications.</li> 263 <li>Added {@link android.support.v4.app.NotificationCompat.Action.WearableExtender}, 264 which allows actions to be added on wearable notifications.</li> 265 <li>Added {@link android.support.v4.app.NotificationManagerCompat}, which allows you 266 to issue notifications that properly support wearable features.</li> 267 <li>Added {@link android.support.v4.app.RemoteInput}, which allows a handheld device 268 to receive voice input from a notification that appears on a wearable device.</li> 269 <li>Improved the handling of touch feedback in 270 {@link android.support.v4.widget.SwipeRefreshLayout}.</li> 271 </ul> 272 </dd> 273 </dl> 274 </div> 275</div> 276 277<div class="toggle-content closed"> 278 <p><a href="#" onclick="return toggleContent(this)"> 279 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 280/>Android Support Library, revision 19.1.0</a> <em>(March 2014)</em> 281 </p> 282 <div class="toggle-content-toggleme"> 283 <dl> 284 <dt>Changes for v4 support library:</dt> 285 <dd> 286 <ul> 287 <li>Added the {@link android.support.v4.widget.SwipeRefreshLayout} class, 288 which enables users to refresh the contents of a view with a vertical 289 swipe gesture.</li> 290 <li>Fixed accessibility issues with navigation drawers.</li> 291 </ul> 292 </dd> 293 294 <dt>Changes for v7 appcompat library:</dt> 295 <dd> 296 <ul> 297 <li>Fixed background issues with the action bar.</li> 298 </ul> 299 </dd> 300 </dl> 301 </div> 302</div> 303 304<div class="toggle-content closed"> 305 <p><a href="#" onclick="return toggleContent(this)"> 306 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 307/>Android Support Library, revision 19.0.1</a> <em>(December 2013)</em> 308 </p> 309 <div class="toggle-content-toggleme"> 310 <dl> 311 <dt>Changes for v4 support library:</dt> 312 <dd> 313 <ul> 314 <li>Improved {@link android.support.v4.print.PrintHelper} by adding asynchronous 315 handling of printing.</li> 316 <li>Fixed the {@link android.support.v4.widget.DrawerLayout} class approximation of 317 the {@link android.view.View#addChildrenForAccessibility addChildrenForAccessibility()} 318 method.</li> 319 <li>Fixed slide drawable mirroring in {@link 320 android.support.v4.app.ActionBarDrawerToggle}.</li> 321 <li>Fixed off-by-one issue when removing an item from a collection iterator.</li> 322 </ul> 323 </dd> 324 325 <dt>Changes for v7 mediarouter library:</dt> 326 <dd> 327 <ul> 328 <li>Improved route identification by using full component name in the {@link 329 android.support.v7.media.MediaRouteProvider.ProviderMetadata}.</li> 330 <li>Updated {@link android.support.v7.app.MediaRouteChooserDialog} to hide disabled 331 routes.</li> 332 </ul> 333 </dd> 334 335 <dt>Changes for v8 renderscript library:</dt> 336 <dd> 337 <ul> 338 <li>Added error propagation for the RenderScript thunking layer.</li> 339 </ul> 340 </dd> 341 342 </dl> 343 </div> 344</div> 345 346 347<div class="toggle-content closed"> 348 <p><a href="#" onclick="return toggleContent(this)"> 349 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 350/>Android Support Library, revision 19</a> <em>(October 2013)</em> 351 </p> 352 <div class="toggle-content-toggleme"> 353 <dl> 354 <dt>Changes for v4 support library:</dt> 355 <dd> 356 <ul> 357 <li>Added support for external Storage APIs with the 358 {@link android.support.v4.content.ContextCompat#getObbDirs getObbDirs()}, 359 {@link android.support.v4.content.ContextCompat#getExternalFilesDirs getExternalFilesDirs()}, 360 {@link android.support.v4.content.ContextCompat#getExternalCacheDirs getExternalCacheDirs()}, 361 and {@link android.support.v4.os.EnvironmentCompat#getStorageState getStorageState()}. 362 These helper methods always return a single file object on devices running Android 363 4.3 (API level 18) and earlier. When running on Android 4.4 (API level 19) and higher, 364 these methods may return more than one file object.</li> 365 <li>Added {@link android.support.v4.print.PrintHelper} class that works with the 366 Print APIs to print images with a minimum of code.</li> 367 <li>Added drag-to-open user interface support for pop-up menus. For more information, see 368 {@link android.support.v4.widget.PopupMenuCompat} and 369 {@link android.support.v4.widget.ListPopupWindowCompat}.</li> 370 <li>Improved accessibility support with the addition of a 371 {@link android.support.v4.view.accessibility.AccessibilityNodeProviderCompat#findFocus 372 findFocus()} method in 373 {@link android.support.v4.view.accessibility.AccessibilityNodeProviderCompat} and the 374 {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat#getLiveRegion 375 getLiveRegion()} method in 376 {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat}.</li> 377 <li>Added helper class {@link android.support.v4.view.ScaleGestureDetectorCompat} for 378 accessing new scaling gesture methods.</li> 379 <li>Fixed problem with {@link android.support.v4.app.ActionBarDrawerToggle} in 380 right-to-left language displays.</li> 381 <li>Modified {@link android.support.v4.widget.AutoScrollHelper} option to consume 382 touch events or allow them to be passed through to other views.</li> 383 </ul> 384 </dd> 385 386 <dt>Changes for v7 mediarouter library:</dt> 387 <dd> 388 <ul> 389 <li>Added support for media playback queuing, setting HTTP header values and media 390 playback duration.</li> 391 <li>Added explicit start, get, and end session actions for explicitly managing media 392 playback sessions with media router.</li> 393 </ul> 394 </dd> 395 </dl> 396 </div> 397</div> 398 399<div class="toggle-content closed"> 400 <p><a href="#" onclick="return toggleContent(this)"> 401 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 402/>Android Support Library, revision 18</a> <em>(July 2013)</em> 403 </p> 404 <div class="toggle-content-toggleme"> 405 <dl> 406 <dt>Changes for v4 support library:</dt> 407 <dd> 408 <ul> 409 <li>User interface 410 <ul> 411 <li>Added {@link android.support.v4.text.BidiFormatter} for handling 412 text strings that combine right to left and left to right-formatted text.</li> 413 <li>Modified {@link android.support.v4.view.ViewPager} to better handle cases where the 414 pager has a measured width of zero in the initial layout processing.</li> 415 <li>Modified {@link android.support.v4.widget.DrawerLayout} and 416 {@link android.support.v4.widget.SlidingPaneLayout} to not throw exceptions for 417 measurement while the project code is being edited.</li> 418 </ul> 419 </li> 420 421 <li>Accessibility 422 <ul> 423 <li>Added {@link android.support.v4.widget.ExploreByTouchHelper} to simplify the 424 implementation of accessibility for custom views.</li> 425 <li>Fixed a problem with {@link android.support.v4.view.ViewPager} incorrectly 426 populating {@link 427 android.support.v4.view.accessibility.AccessibilityEventCompat#TYPE_VIEW_SCROLLED 428 TYPE_VIEW_SCROLLED} accessibility events.</li> 429 <li>Fixed a null pointer exception in {@link android.support.v4.view.ViewPager} when 430 populating an accessibility event.</li> 431 <li>Simplified {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat} 432 by changing {@link java.lang.CharSequence} inputs to {@link java.lang.String} objects. 433 </li> 434 <li>Deprecated an {@link android.support.v4.view.accessibility.AccessibilityRecordCompat} 435 constructor that used an {@link java.lang.Object} as input.</li> 436 </ul> 437 </li> 438 439 <li>Media 440 <ul> 441 <li>Added {@link android.support.v4.media.TransportMediator} helper class to manage 442 media transport control, such as play, pause, skip and other media actions.</li> 443 <li>Added {@link android.support.v4.hardware.display.DisplayManagerCompat} for managing 444 display output to one or more device displays.</li> 445 </ul> 446 </li> 447 448 <li>Other changes 449 <ul> 450 <li>Added {@link android.support.v4.content.WakefulBroadcastReceiver} helper class for 451 implementing a common pattern of detecting a device wakeup event and passing work off 452 to a {@link android.app.Service} while ensuring that the device does not go back to 453 sleep before the handoff is complete.</li> 454 <li>Added two new APIs, 455 {@link android.support.v4.content.AsyncTaskLoader#commitContentChanged 456 commitContentChanged()} and 457 {@link android.support.v4.content.AsyncTaskLoader#rollbackContentChanged 458 rollbackContentChanged()}, to {@link android.support.v4.content.AsyncTaskLoader} to 459 help deal with background updates for data changes that are subsequently canceled. 460 </li> 461 </ul> 462 </li> 463 </ul> 464 </dd> 465 466 <dt>New v7 appcompat library:</dt> 467 <dd> 468 <ul> 469 <li>Added {@link android.support.v7.app.ActionBar} to allow implementation of the 470 action bar user interface <a href="{@docRoot}design/patterns/actionbar.html">design 471 pattern</a> back to Android 2.1 (API level 7) and higher. Use of this class requires 472 that you implement your activity by extending the new 473 {@link android.support.v7.app.ActionBarActivity} class.</li> 474 </ul> 475 </dd> 476 477 <dt>New v7 mediarouter library:</dt> 478 <dd> 479 <p>Added a new mediarouter library that provides support for the <a 480 href="https://developers.google.com/cast/">Google Cast developer preview</a>. 481 The v7 mediarouter library APIs provide a means of controlling the routing of 482 media channels and streams from the current device to external screens, 483 speakers, and other destination devices, with compatibility back to Android 2.1 484 (API level 7). See <a 485 href="{@docRoot}tools/support-library/features.html#v7-mediarouter">V7 486 mediarouter library</a> for more information. </p> 487 488 <p class="caution">The v7 mediarouter library APIs introduced in Support 489 Library r18 are subject to change in later revisions of the Support 490 Library. At this time, we recommend using the library only in connection 491 with the <a href="https://developers.google.com/cast/">Google Cast 492 developer preview</a>.</p> 493 </dd> 494 495 </dl> 496 </div> 497</div> 498 499 500<div class="toggle-content closed"> 501 <p><a href="#" onclick="return toggleContent(this)"> 502 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 503/>Android Support Library, revision 13</a> <em>(May 2013)</em> 504 </p> 505 <div class="toggle-content-toggleme"> 506 <dl> 507 <dt>Changes for v4 support library:</dt> 508 <dd> 509 <ul> 510 <li>Added {@link android.support.v4.widget.DrawerLayout} for creating a 511 <a href="{@docRoot}training/implementing-navigation/nav-drawer.html">Navigation 512 Drawer</a> that can be pulled in from the edge of a window.</li> 513 <li>Added {@link android.support.v4.widget.SlidingPaneLayout} widget for creating linked 514 summary and detail views that appropriately adapt to various screen sizes.</li> 515 <li>Added {@link android.support.v4.app.ActionBarDrawerToggle} as a way to tie 516 together the functions of {@link android.support.v4.widget.DrawerLayout} and {@link 517 android.app.ActionBar}.</li> 518 <li>Added {@link android.support.v4.widget.ViewDragHelper} as a new common component 519 for dragging views within a parent view.</li> 520 <li>Added {@link android.support.v4.widget.ScrollerCompat} to provide {@link 521 android.widget.Scroller} and {@link android.widget.OverScroller} compatibility support. 522 </li> 523 <li>Added {@link android.support.v4.content.FileProvider} to allow sharing of private 524 files between applications.</li> 525 <li>Updated {@link android.support.v4.view.ViewPager} to throw an exception if the 526 associated {@link android.support.v4.view.PagerAdapter} class is modified without a 527 call to {@link android.support.v4.view.PagerAdapter#notifyDataSetChanged 528 notifyDataSetChanged()}. 529 </li> 530 <li>Fixed an issue with {@link android.support.v4.view.ViewPager} children drawing sort 531 order.</li> 532 <li>Fixed {@link android.support.v4.view.GestureDetectorCompat} to dispatch missing 533 {@link android.view.GestureDetector.SimpleOnGestureListener#onSingleTapConfirmed} calls 534 between tap timeout and long press events.</li> 535 </ul> 536 </dd> 537 538 <dt>New v7 gridlayout library:</dt> 539 <dd> 540 <ul> 541 <li>Added {@link android.support.v7.widget.GridLayout} to provide support for the 542 {@link android.widget.GridLayout} layout object.</li> 543 <li>Added {@link android.support.v7.widget.Space} which can be used to create blank areas 544 within a {@link android.support.v7.widget.GridLayout} layout object.</li> 545 </ul> 546 </dl> 547 </div> 548</div> 549 550 551<div class="toggle-content closed"> 552 <p><a href="#" onclick="return toggleContent(this)"> 553 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 554/>Android Support Library, revision 12</a> <em>(February 2013)</em> 555 </p> 556 <div class="toggle-content-toggleme"> 557 <dl> 558 <dt>Changes for v4 support library:</dt> 559 <dd> 560 <ul> 561 <li>Improved interaction behavior for {@link android.support.v4.view.ViewPager}.</li> 562 <li>Fixed a bug that could cause {@link android.support.v4.view.ViewPager} to select the 563 wrong page.</li> 564 <li>Fixed use of {@link android.support.v4.view.ViewPager#removeView removeView()} method 565 during layout for {@link android.support.v4.view.ViewPager}.</li> 566 <li>Fixed issue with {@link android.support.v4.widget.SearchViewCompat} where using the 567 back button to dismiss does not clear the search text. This fix only applies to 568 host API levels 14 and higher.</li> 569 </ul> 570 </dd> 571 </dl> 572 </div> 573</div> 574 575 576<div class="toggle-content closed"> 577 <p><a href="#" onclick="return toggleContent(this)"> 578 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 579/>Android Support Library, revision 11</a> <em>(November 2012)</em> 580 </p> 581 <div class="toggle-content-toggleme"> 582 <dl> 583 <dt>Changes for v4 support library:</dt> 584 <dd> 585 <ul> 586 <li>User Interface 587 <ul> 588 <li>Added support for nested {@link android.support.v4.app.Fragment} classes.</li> 589 <li>Added improvements to {@link android.support.v4.app.FragmentManager} debugging. 590 </li> 591 <li>Fixed problem in {@link android.support.v4.app.FragmentTabHost} where fragment 592 and tab interaction could result in a {@link android.widget.ListView} state loss. 593 </li> 594 <li>Fixed issue with user-visible hint in 595 {@link android.support.v4.app.FragmentStatePagerAdapter}.</li> 596 <li>Added {@link android.support.v4.view.ViewPager.PageTransformer PageTransformer} 597 interface to {@link android.support.v4.view.ViewPager} to allow applications to 598 supply a custom transition behavior for scrolling.</li> 599 <li>Added new features and fixes to {@link android.support.v4.app.TaskStackBuilder} 600 from current release.</li> 601 <li>Fixed {@link android.support.v4.view.PagerTitleStrip} to correctly track the 602 {@link android.support.v4.view.PagerAdapter} currently in use.</li> 603 <li>Fixed display flickering, positioning, and text clipping problems with 604 {@link android.support.v4.view.PagerTitleStrip}.</li> 605 <li>Fixed {@link android.support.v4.view.PagerTabStrip} to properly respect padding 606 when drawing an underline.</li> 607 </ul> 608 </li> 609 <li>Accessibility 610 <ul> 611 <li>Added support for new accessibility gesture and touch event types in 612 {@link android.support.v4.view.accessibility.AccessibilityEventCompat}.</li> 613 <li>Added support for new accessibility APIs in 614 {@link android.support.v4.view.ViewCompat}.</li> 615 <li>Added support for {@link android.support.v4.view.ViewCompat#performAccessibilityAction 616 performAccessibilityAction()} method to {@link android.support.v4.view.ViewCompat}. 617 </li> 618 </ul> 619 </li> 620 <li>Added support for gestures with {@link android.support.v4.view.GestureDetectorCompat}. 621 </li> 622 <li>Added support for performing atomic operations on files using a new 623 {@link android.support.v4.util.AtomicFile} class.</li> 624 <li>Added support for the full set of {@code make} methods in 625 {@link android.support.v4.content.IntentCompat}.</li> 626 <li>Added {@link android.support.v4.util.LruCache#trimToSize trimToSize()} method in 627 {@link android.support.v4.util.LruCache} utility class.</li> 628 <li>Updated {@link android.support.v4.net.ConnectivityManagerCompat} to get NetworkInfo 629 from a {@link android.net.ConnectivityManager#CONNECTIVITY_ACTION} 630 broadcast.</li> 631 </ul> 632 </dd> 633 </dl> 634 </div> 635</div> 636 637 638<div class="toggle-content closed"> 639 <p><a href="#" onclick="return toggleContent(this)"> 640 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 641/>Android Support Library, revision 10</a> <em>(August 2012)</em> 642 </p> 643 <div class="toggle-content-toggleme"> 644 <dl> 645 <dt>Changes for v4 support library:</dt> 646 <dd> 647 <ul> 648 <li>Added support for notification features introduced in Android 4.1 (API level 16) with 649 additions to {@link android.support.v4.app.NotificationCompat}.</li> 650 </ul> 651 </dd> 652 </dl> 653 </div> 654</div> 655 656 657<div class="toggle-content closed"> 658 <p><a href="#" onclick="return toggleContent(this)"> 659 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 660/>Android Support Library, revision 9</a> <em>(June 2012)</em> 661 </p> 662 <div class="toggle-content-toggleme"> 663 <dl> 664 <dt>Changes for v4 support library:</dt> 665 <dd> 666 <ul> 667 668 <li>User Interface Support 669 <ul> 670 <li>Added {@link android.support.v4.view.PagerTabStrip} support, providing enhanced 671functionality beyond {@link android.support.v4.view.PagerTitleStrip}.</li> 672 <li>Fixed various bugs for {@link android.support.v4.view.PagerTitleStrip} and 673{@link android.support.v4.view.PagerTabStrip}, including {@link 674android.widget.TextView#setAllCaps setAllCaps} option, title alignment, 675appearance improvements, minimum width constraints and touch navigation issues.</li> 676 <li>Added support for {@link android.support.v4.view.ViewPager} page gutters, which 677helps the {@link android.support.v4.view.ViewPager} class provide paging support for content with 678a large horizontal scroll range, such as a map.</li> 679 <li>Fixed numerous bugs for {@link android.support.v4.view.ViewPager}, including size 680and data set change problems, page positioning, user interaction, scroll tracking and keyboard 681navigation problems.</li> 682 <li>Fixed many bugs for {@link android.support.v4.app.Fragment}, including proper 683handling of {@link android.support.v4.app.Fragment#onActivityResult onActivityResult()} when 684the target fragment no longer exists, dispatching selection events to invisible fragments, improved 685{@link android.support.v4.app.FragmentTransaction#replace FragmentTransaction.replace()} behavior 686and added better state handling for fragments being moved out of view.</li> 687 <li>Added support for the {@link 688android.support.v4.view.ViewCompat postOnAnimation()} method in {@link 689android.support.v4.view.ViewCompat}.</li> 690 <li>Updated {@link android.support.v4.app.NavUtils} to use Android 4.1 (API level 16) 691<em>Up</em> navigation functionality when available.</li> 692 </ul> 693 </li> 694 695 <li>Accessibility 696 <ul> 697 <li>Updated accessibility support classes, including {@link 698android.support.v4.view.accessibility.AccessibilityNodeInfoCompat}, to follow fixes made in Android 6994.1 (API level 16).</li> 700 <li>Added support for accessibility scroll actions in {@link 701android.support.v4.view.ViewPager}.</li> 702 </ul> 703 </li> 704 705 <li>General improvements 706 <ul> 707 <li>Updated {@link android.support.v4.app.TaskStackBuilder} to reflect API changes in 708Android 4.1 (API level 16).</li> 709 <li>Enhanced {@link android.support.v4.app.TaskStackBuilder} to allow it to be used 710from a Service.</li> 711 <li>Added support for {@link android.support.v4.content.IntentCompat EXTRA_HTML_TEXT} 712to {@link android.support.v4.app.ShareCompat}.</li> 713 <li>Updated {@link android.support.v4.app.NotificationCompat.Builder} to support the 714{@link android.support.v4.app.NotificationCompat.Builder#setNumber setNumber()} method.</li> 715 <li>Added support in {@link android.support.v4.net.ConnectivityManagerCompat} for the 716{@link android.support.v4.net.ConnectivityManagerCompat#isActiveNetworkMetered 717isActiveNetworkMetered()} method.</li> 718 </ul> 719 </li> 720 </ul> 721 </dd> 722 </dl> 723 </div> 724</div> 725 726 727<div class="toggle-content closed"> 728 <p><a href="#" onclick="return toggleContent(this)"> 729 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 730/>Android Support Library, revision 8</a> <em>(April 2012)</em> 731 </p> 732 <div class="toggle-content-toggleme"> 733 <dl> 734 <dt>Changes for v4 support library:</dt> 735 <dd> 736 <ul> 737 <li>Fixed intent flags for {@link android.app.PendingIntent} objects generated 738 by {@link android.support.v4.app.TaskStackBuilder}.</li> 739 <li>Removed unused attributes from the gridlayout library projects to make sure 740 the library can be built with API level 7 and higher.</li> 741 <li>Added {@code .classpath} and {@code .project} files for the gridlayout 742 library project.</li> 743 </ul> 744 </dd> 745 </dl> 746 </div> 747</div> 748 749 750<div class="toggle-content closed"> 751 <p><a href="#" onclick="return toggleContent(this)"> 752 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 753/>Android Support Library, revision 7</a> <em>(March 2012)</em> 754 </p> 755 <div class="toggle-content-toggleme"> 756 <dl> 757 <dt>Changes for v4 support library:</dt> 758 <dd> 759 <ul> 760 <li>Added {@link android.support.v4.app.ShareCompat}, which provides helper classes 761for sending and receiving content for social sharing applications, including new metadata for 762attributing shared data to the source app. This class also provides compatible integration with the 763new {@link android.widget.ShareActionProvider} in Android 4.0.</li> 764 <li>Added {@link android.support.v4.app.NavUtils} and {@link 765android.support.v4.app.TaskStackBuilder} to provide support for implementing the 766<a href="{@docRoot}design/index.html">Android Design</a> guidelines for navigation. These 767additions include a way to implement the action bar's <em>Up</em> button across versions. 768For an example implementation of this pattern, see the AppNavigation sample in 769({@code <em><sdk></em>/samples/<em><platform></em>/AppNavigation}).</li> 770 <li>Added {@link android.support.v4.app.NotificationCompat.Builder} to provide a 771compatibility implementation of Android 3.0's {@link android.app.Notification.Builder} helper class 772for creating standardized system notifications.</li> 773 </ul> 774 </dd> 775 </dl> 776 </div> 777</div> 778 779 780<div class="toggle-content closed"> 781 <p><a href="#" onclick="return toggleContent(this)"> 782 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 783/>Android Support Library, revision 6</a> <em>(December 2011)</em> 784 </p> 785 <div class="toggle-content-toggleme"> 786 787 <p class="note"><strong>Note:</strong> Reference for support library APIs are now available with 788 the framework references, for example: {@link android.support.v4.app}.</p> 789<dl> 790 <dt>Changes for v4 support library:</dt> 791 <dd> 792 <ul> 793 <li>Changes to ViewPager: 794 <ul> 795 <li>Added extra decorative view support for {@link android.support.v4.view.ViewPager}. 796 Decorative views may be supplied as child views of a pager in XML layout.</li> 797 <li>Added {@link android.support.v4.view.PagerAdapter#getPageTitle 798 PagerAdapter.getPageTitle()} to supply title strings for pages, which defaults to no 799 title for each page.</li> 800 <li>Added {@link android.support.v4.view.PagerTitleStrip}, a non-interactive title 801 strip, that can be added as a child of ViewPager. Developers can supply text 802 appearance and color, as well as layout sizing and gravity information.</li> 803 <li>Updated {@link android.support.v4.view.PagerAdapter} methods to take ViewGroup 804 objects, rather than View to avoid class casting in adapter implementations.</li> 805 <li>Updated {@link android.support.v4.view.ViewPager} to use Launcher-style 806 fling behavior.</li> 807 <li>Bug fixes for user interface interaction and test automation.</li> 808 </ul> 809 </li> 810 811 <li>Support for Fragments: 812 <ul> 813 <li>Changed {@code setStartDeferred()} method to {@link 814 android.support.v4.app.Fragment#setUserVisibleHint}.</li> 815 <li>Added deferred start for off-screen pages to improve performance.</li> 816 </ul> 817 </li> 818 819 <li>Support for Accessiblity APIs: 820 <ul> 821 <li>Updated {@link android.support.v4.view.AccessibilityDelegateCompat} methods 822 to return empty lists instead of null.</li> 823 <li>Added new APIs needed by the v4 samples.</li> 824 </ul> 825 </li> 826 827 </ul> 828 </dd> 829 </dl> 830 </div> 831</div> 832 833<div class="toggle-content closed"> 834 <p><a href="#" onclick="return toggleContent(this)"> 835 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 836/>Android Support Library, revision 5</a> <em>(December 2011)</em> 837 </p> 838 <div class="toggle-content-toggleme"> 839 <dl> 840 <dt>Changes for v4 support library:</dt> 841 <dd> 842 <ul> 843 <li>Support for Accessiblity APIs: 844 <ul> 845 <li>Added {@link android.support.v4.view.AccessibilityDelegateCompat} 846 to support {@link android.view.View.AccessibilityDelegate}.</li> 847 848 <li>Added {@link android.support.v4.view.accessibility.AccessibilityEventCompat} 849 to support {@link android.view.accessibility.AccessibilityEvent}.</li> 850 851 <li>Added {@link android.support.v4.view.accessibility.AccessibilityManagerCompat} 852 to support {@link android.view.accessibility.AccessibilityManager}.</li> 853 854 <li>Added {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat} 855 to support {@link android.view.accessibility.AccessibilityNodeInfo}.</li> 856 857 <li>Added {@link android.support.v4.view.accessibility.AccessibilityRecordCompat} 858 to support {@link android.view.accessibility.AccessibilityRecord}.</li> 859 860 <li>Added {@link 861 android.support.v4.accessibilityservice.AccessibilityServiceInfoCompat} 862 to support {@link android.accessibilityservice.AccessibilityServiceInfo}.</li> 863 864 <li>Added {@link android.support.v4.view.ViewGroupCompat} 865 to support accessibility features in {@link android.view.ViewGroup}. 866 </li> 867 868 <li>Modified {@link android.support.v4.view.ViewCompat} 869 to support accessibility features in {@link android.view.View}.</li> 870 </ul> 871 </li> 872 873 <li>Changes to ViewPager: 874 <ul> 875 <li>Added support for margins between pages. 876 An optional {@link android.graphics.drawable.Drawable} can be provided 877 to fill the margins.</li> 878 <li>Added support for {@link android.widget.EdgeEffect}.</li> 879 <li>Added support for keyboard navigation</li> 880 <li>Added support to control how many pages are kept to either side 881 of the current page.</li> 882 <li>Improved touch physics.</li> 883 <li>Bug fixes for user interface behavior.</li> 884 </ul> 885 </li> 886 </ul> 887 </dd> 888 </dl> 889 </div> 890</div> 891 892<div class="toggle-content closed"> 893 <p><a href="#" onclick="return toggleContent(this)"> 894 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 895/>Android Support Library, revision 4</a> <em>(October 2011)</em> 896 </p> 897 <div class="toggle-content-toggleme"> 898 <dl> 899 <dt>Changes for v4 support library:</dt> 900 <dd> 901 <ul> 902 <li>Added <code>EdgeEffectCompat</code> to 903 support {@link android.widget.EdgeEffect}.</li> 904 905 <li>Added <code>LocalBroadcastManager</code> to allow applications to easily 906 register for and receive intents within a single application without 907 broadcasting them globally.</li> 908 909 <li>Added support in <code>ViewCompat</code> to check for and set overscroll 910 modes for {@link android.view.View}s on Android 2.3 and later.</li> 911 <li>Changes to Fragment APIs: 912 <ul> 913 <li>Added new APIs to control the visibility of new menus.</li> 914 <li>Added custom animation APIs.</li> 915 <li>Added APIs in <code>FragmentActivity</code> to retain custom, 916 non-configuration instance data.</li> 917 <li>Various bug fixes.</li> 918 </ul> 919 </li> 920 921 <li>Fixed a {@link android.content.Loader} bug that caused issues in 922 canceling {@link android.os.AsyncTask}s when running on Froyo and older 923 versions of the platform. The support 924 code now uses its own version of {@link android.os.AsyncTask} to keep the same 925 behavior on all platform versions.</li> 926 927 </ul> 928 </dd> 929 </dl> 930 </div> 931</div> 932 933 934<div class="toggle-content closed"> 935 <p><a href="#" onclick="return toggleContent(this)"> 936 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 937/>Android Support Library, revision 3</a> <em>(July 2011)</em> 938 </p> 939 <div class="toggle-content-toggleme"> 940 <dl> 941 <dt>Changes for v4 support library:</dt> 942 <dd> 943 <ul> 944 <li>Adds support for {@link android.app.Fragment.SavedState}</li> 945 <li>Adds {@code MotionEventCompat} to support newer {@link 946android.view.MotionEvent} APIs</li> 947 <li>Adds {@code VelocityTrackerCompat} to support a newer {@link 948android.view.VelocityTracker} APIs</li> 949 <li>Adds {@code ViewConfigurationCompat} to support a newer {@link 950android.view.ViewConfiguration} APIs</li> 951 <li>All new APIs (available only in the support library) that allow you to create UIs 952with horizontal paging, allowing users to swipe left and right between content views. Classes to 953support this include: 954 <ul> 955 <li>{@code ViewPager}: A {@link android.view.ViewGroup} that manages the 956layout for the child views, which the user can swipe between.</li> 957 <li>{@code PagerAdapter}: An adapter that populates the {@code ViewPager} with the 958views that represent each page.</li> 959 <li>{@code FragmentPagerAdapter}: An extension of {@code PagerAdapter} for flipping 960between fragments.</li> 961 <li>{@code FragmentStatePagerAdapter}: An extension of {@code PagerAdapter} for 962flipping between fragments that uses the library's support for {@link 963android.app.Fragment.SavedState}.</li> 964 </ul> 965 </li> 966 </ul> 967 </dd> 968 <dt>New v13 support library:</dt> 969 <dd> 970 <ul> 971 <li>Includes the {@code FragmentPagerAdapter} and {@code FragmentStatePagerAdapter} 972to support the horizontal paging. 973 <p>These are exactly the same as the APIs added to the v4 support library, but rely on 974other platform components in Android 3.2. Use this library instead of v4 if you're developing for 975Android 3.2 and higher (all other APIs in the v4 library are already available with API level 97613).</p> 977 </li> 978 </ul> 979 </dd> 980 </dl> 981 </div> 982</div> 983 984 985<div class="toggle-content closed"> 986 <p><a href="#" onclick="return toggleContent(this)"> 987 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 988/>Android Support Library, revision 2</a> <em>(May 2011)</em> 989 </p> 990 <div class="toggle-content-toggleme"> 991 <dl> 992 <dt>Changes for v4 library:</dt> 993 <dd> 994 <ul> 995 <li>Support for fragment animations</li> 996 <li>Fix {@link android.support.v4.app.Fragment#onActivityResult Fragment.onActivityResult()} 997 bug</li> 998 </ul> 999 </dd> 1000 </dl> 1001 </div> 1002</div> 1003 1004 1005<div class="toggle-content closed"> 1006 <p><a href="#" onclick="return toggleContent(this)"> 1007 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 1008/>Android Support Library, revision 1</a> <em>(March 2011)</em> 1009 </p> 1010 <div class="toggle-content-toggleme"> 1011 <p>Initial release with the v4 library.</p> 1012 </div> 1013</div> 1014 1015