1 page.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><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 19</a> <em>(October 2013)</em> 66 </p> 67 <div class="toggle-content-toggleme"> 68 <dl> 69 <dt>Changes for v4 support library:</dt> 70 <dd> 71 <ul> 72 <li>Added support for external Storage APIs with the 73 {@link android.support.v4.content.ContextCompat#getObbDirs getObbDirs()}, 74 {@link android.support.v4.content.ContextCompat#getExternalFilesDirs getExternalFilesDirs()}, 75 {@link android.support.v4.content.ContextCompat#getExternalCacheDirs getExternalCacheDirs()}, 76 and {@link android.support.v4.os.EnvironmentCompat#getStorageState getStorageState()}. 77 These helper methods always return a single file object on devices running Android 78 4.3 (API level 18) and earlier. When running on Android 4.4 (API level 19) and higher, 79 these methods may return more than one file object.</li> 80 <li>Added {@link android.support.v4.print.PrintHelper} class that works with the 81 Print APIs to print images with a minimum of code.</li> 82 <li>Added drag-to-open user interface support for pop-up menus. For more information, see 83 {@link android.support.v4.widget.PopupMenuCompat} and 84 {@link android.support.v4.widget.ListPopupWindowCompat}.</li> 85 <li>Improved accessibility support with the addition of a 86 {@link android.support.v4.view.accessibility.AccessibilityNodeProviderCompat#findFocus 87 findFocus()} method in 88 {@link android.support.v4.view.accessibility.AccessibilityNodeProviderCompat} and the 89 {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat#getLiveRegion 90 getLiveRegion()} method in 91 {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat}.</li> 92 <li>Added helper class {@link android.support.v4.view.ScaleGestureDetectorCompat} for 93 accessing new scaling gesture methods.</li> 94 <li>Fixed problem with {@link android.support.v4.app.ActionBarDrawerToggle} in 95 right-to-left language displays.</li> 96 <li>Modified {@link android.support.v4.widget.AutoScrollHelper} option to consume 97 touch events or allow them to be passed through to other views.</li> 98 </ul> 99 </dd> 100 101 <dt>Changes for v7 mediarouter library:</dt> 102 <dd> 103 <ul> 104 <li>Added support for media playback queuing, setting HTTP header values and media 105 playback duration.</li> 106 <li>Added explicit start, get, and end session actions for explicitly managing media 107 playback sessions with media router.</li> 108 </ul> 109 </dd> 110 </dl> 111 </div> 112 </div> 113 114 <div class="toggle-content closed"> 115 <p><a href="#" onclick="return toggleContent(this)"> 116 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 117 />Android Support Library, revision 18</a> <em>(July 2013)</em> 118 </p> 119 <div class="toggle-content-toggleme"> 120 <dl> 121 <dt>Changes for v4 support library:</dt> 122 <dd> 123 <ul> 124 <li>User interface 125 <ul> 126 <li>Added {@link android.support.v4.text.BidiFormatter} for handling 127 text strings that combine right to left and left to right-formatted text.</li> 128 <li>Modified {@link android.support.v4.view.ViewPager} to better handle cases where the 129 pager has a measured width of zero in the initial layout processing.</li> 130 <li>Modified {@link android.support.v4.widget.DrawerLayout} and 131 {@link android.support.v4.widget.SlidingPaneLayout} to not throw exceptions for 132 measurement while the project code is being edited.</li> 133 </ul> 134 </li> 135 136 <li>Accessibility 137 <ul> 138 <li>Added {@link android.support.v4.widget.ExploreByTouchHelper} to simplify the 139 implementation of accessibility for custom views.</li> 140 <li>Fixed a problem with {@link android.support.v4.view.ViewPager} incorrectly 141 populating {@link 142 android.support.v4.view.accessibility.AccessibilityEventCompat#TYPE_VIEW_SCROLLED 143 TYPE_VIEW_SCROLLED} accessibility events.</li> 144 <li>Fixed a null pointer exception in {@link android.support.v4.view.ViewPager} when 145 populating an accessibility event.</li> 146 <li>Simplified {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat} 147 by changing {@link java.lang.CharSequence} inputs to {@link java.lang.String} objects. 148 </li> 149 <li>Deprecated an {@link android.support.v4.view.accessibility.AccessibilityRecordCompat} 150 constructor that used an {@link java.lang.Object} as input.</li> 151 </ul> 152 </li> 153 154 <li>Media 155 <ul> 156 <li>Added {@link android.support.v4.media.TransportMediator} helper class to manage 157 media transport control, such as play, pause, skip and other media actions.</li> 158 <li>Added {@link android.support.v4.hardware.display.DisplayManagerCompat} for managing 159 display output to one or more device displays.</li> 160 </ul> 161 </li> 162 163 <li>Other changes 164 <ul> 165 <li>Added {@link android.support.v4.content.WakefulBroadcastReceiver} helper class for 166 implementing a common pattern of detecting a device wakeup event and passing work off 167 to a {@link android.app.Service} while ensuring that the device does not go back to 168 sleep before the handoff is complete.</li> 169 <li>Added two new APIs, 170 {@link android.support.v4.content.AsyncTaskLoader#commitContentChanged 171 commitContentChanged()} and 172 {@link android.support.v4.content.AsyncTaskLoader#rollbackContentChanged 173 rollbackContentChanged()}, to {@link android.support.v4.content.AsyncTaskLoader} to 174 help deal with background updates for data changes that are subsequently canceled. 175 </li> 176 </ul> 177 </li> 178 </ul> 179 </dd> 180 181 <dt>New v7 appcompat library:</dt> 182 <dd> 183 <ul> 184 <li>Added {@link android.support.v7.app.ActionBar} to allow implementation of the 185 action bar user interface <a href="{@docRoot}design/patterns/actionbar.html">design 186 pattern</a> back to Android 2.1 (API level 7) and higher. Use of this class requires 187 that you implement your activity by extending the new 188 {@link android.support.v7.app.ActionBarActivity} class.</li> 189 </ul> 190 </dd> 191 192 <dt>New v7 mediarouter library:</dt> 193 <dd> 194 <p>Added a new mediarouter library that provides support for the <a 195 href="https://developers.google.com/cast/">Google Cast developer preview</a>. 196 The v7 mediarouter library APIs provide a means of controlling the routing of 197 media channels and streams from the current device to external screens, 198 speakers, and other destination devices, with compatibility back to Android 2.1 199 (API level 7). See <a 200 href="{@docRoot}tools/support-library/features.html#v7-mediarouter">V7 201 mediarouter library</a> for more information. </p> 202 203 <p class="caution">The v7 mediarouter library APIs introduced in Support 204 Library r18 are subject to change in later revisions of the Support 205 Library. At this time, we recommend using the library only in connection 206 with the <a href="https://developers.google.com/cast/">Google Cast 207 developer preview</a>.</p> 208 </dd> 209 210 </dl> 211 </div> 212 </div> 213 214 215 <div class="toggle-content closed"> 216 <p><a href="#" onclick="return toggleContent(this)"> 217 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 218 />Android Support Library, revision 13</a> <em>(May 2013)</em> 219 </p> 220 <div class="toggle-content-toggleme"> 221 <dl> 222 <dt>Changes for v4 support library:</dt> 223 <dd> 224 <ul> 225 <li>Added {@link android.support.v4.widget.DrawerLayout} for creating a 226 <a href="{@docRoot}training/implementing-navigation/nav-drawer.html">Navigation 227 Drawer</a> that can be pulled in from the edge of a window.</li> 228 <li>Added {@link android.support.v4.widget.SlidingPaneLayout} widget for creating linked 229 summary and detail views that appropriately adapt to various screen sizes.</li> 230 <li>Added {@link android.support.v4.app.ActionBarDrawerToggle} as a way to tie 231 together the functions of {@link android.support.v4.widget.DrawerLayout} and {@link 232 android.app.ActionBar}.</li> 233 <li>Added {@link android.support.v4.widget.ViewDragHelper} as a new common component 234 for dragging views within a parent view.</li> 235 <li>Added {@link android.support.v4.widget.ScrollerCompat} to provide {@link 236 android.widget.Scroller} and {@link android.widget.OverScroller} compatibility support. 237 </li> 238 <li>Added {@link android.support.v4.content.FileProvider} to allow sharing of private 239 files between applications.</li> 240 <li>Updated {@link android.support.v4.view.ViewPager} to throw an exception if the 241 associated {@link android.support.v4.view.PagerAdapter} class is modified without a 242 call to {@link android.support.v4.view.PagerAdapter#notifyDataSetChanged 243 notifyDataSetChanged()}. 244 </li> 245 <li>Fixed an issue with {@link android.support.v4.view.ViewPager} children drawing sort 246 order.</li> 247 <li>Fixed {@link android.support.v4.view.GestureDetectorCompat} to dispatch missing 248 {@link android.view.GestureDetector.SimpleOnGestureListener#onSingleTapConfirmed} calls 249 between tap timeout and long press events.</li> 250 </ul> 251 </dd> 252 253 <dt>New v7 gridlayout library:</dt> 254 <dd> 255 <ul> 256 <li>Added {@link android.support.v7.widget.GridLayout} to provide support for the 257 {@link android.widget.GridLayout} layout object.</li> 258 <li>Added {@link android.support.v7.widget.Space} which can be used to create blank areas 259 within a {@link android.support.v7.widget.GridLayout} layout object.</li> 260 </ul> 261 </dl> 262 </div> 263 </div> 264 265 266 <div class="toggle-content closed"> 267 <p><a href="#" onclick="return toggleContent(this)"> 268 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 269 />Android Support Library, revision 12</a> <em>(February 2013)</em> 270 </p> 271 <div class="toggle-content-toggleme"> 272 <dl> 273 <dt>Changes for v4 support library:</dt> 274 <dd> 275 <ul> 276 <li>Improved interaction behavior for {@link android.support.v4.view.ViewPager}.</li> 277 <li>Fixed a bug that could cause {@link android.support.v4.view.ViewPager} to select the 278 wrong page.</li> 279 <li>Fixed use of {@link android.support.v4.view.ViewPager#removeView removeView()} method 280 during layout for {@link android.support.v4.view.ViewPager}.</li> 281 <li>Fixed issue with {@link android.support.v4.widget.SearchViewCompat} where using the 282 back button to dismiss does not clear the search text. This fix only applies to 283 host API levels 14 and higher.</li> 284 </ul> 285 </dd> 286 </dl> 287 </div> 288 </div> 289 290 291 <div class="toggle-content closed"> 292 <p><a href="#" onclick="return toggleContent(this)"> 293 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 294 />Android Support Library, revision 11</a> <em>(November 2012)</em> 295 </p> 296 <div class="toggle-content-toggleme"> 297 <dl> 298 <dt>Changes for v4 support library:</dt> 299 <dd> 300 <ul> 301 <li>User Interface 302 <ul> 303 <li>Added support for nested {@link android.support.v4.app.Fragment} classes.</li> 304 <li>Added improvements to {@link android.support.v4.app.FragmentManager} debugging. 305 </li> 306 <li>Fixed problem in {@link android.support.v4.app.FragmentTabHost} where fragment 307 and tab interaction could result in a {@link android.widget.ListView} state loss. 308 </li> 309 <li>Fixed issue with user-visible hint in 310 {@link android.support.v4.app.FragmentStatePagerAdapter}.</li> 311 <li>Added {@link android.support.v4.view.ViewPager.PageTransformer PageTransformer} 312 interface to {@link android.support.v4.view.ViewPager} to allow applications to 313 supply a custom transition behavior for scrolling.</li> 314 <li>Added new features and fixes to {@link android.support.v4.app.TaskStackBuilder} 315 from current release.</li> 316 <li>Fixed {@link android.support.v4.view.PagerTitleStrip} to correctly track the 317 {@link android.support.v4.view.PagerAdapter} currently in use.</li> 318 <li>Fixed display flickering, positioning, and text clipping problems with 319 {@link android.support.v4.view.PagerTitleStrip}.</li> 320 <li>Fixed {@link android.support.v4.view.PagerTabStrip} to properly respect padding 321 when drawing an underline.</li> 322 </ul> 323 </li> 324 <li>Accessibility 325 <ul> 326 <li>Added support for new accessibility gesture and touch event types in 327 {@link android.support.v4.view.accessibility.AccessibilityEventCompat}.</li> 328 <li>Added support for new accessibility APIs in 329 {@link android.support.v4.view.ViewCompat}.</li> 330 <li>Added support for {@link android.support.v4.view.ViewCompat#performAccessibilityAction 331 performAccessibilityAction()} method to {@link android.support.v4.view.ViewCompat}. 332 </li> 333 </ul> 334 </li> 335 <li>Added support for gestures with {@link android.support.v4.view.GestureDetectorCompat}. 336 </li> 337 <li>Added support for performing atomic operations on files using a new 338 {@link android.support.v4.util.AtomicFile} class.</li> 339 <li>Added support for the full set of {@code make} methods in 340 {@link android.support.v4.content.IntentCompat}.</li> 341 <li>Added {@link android.support.v4.util.LruCache#trimToSize trimToSize()} method in 342 {@link android.support.v4.util.LruCache} utility class.</li> 343 <li>Updated {@link android.support.v4.net.ConnectivityManagerCompat} to get NetworkInfo 344 from a {@link android.net.ConnectivityManager#CONNECTIVITY_ACTION} 345 broadcast.</li> 346 </ul> 347 </dd> 348 </dl> 349 </div> 350 </div> 351 352 353 <div class="toggle-content closed"> 354 <p><a href="#" onclick="return toggleContent(this)"> 355 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 356 />Android Support Library, revision 10</a> <em>(August 2012)</em> 357 </p> 358 <div class="toggle-content-toggleme"> 359 <dl> 360 <dt>Changes for v4 support library:</dt> 361 <dd> 362 <ul> 363 <li>Added support for notification features introduced in Android 4.1 (API level 16) with 364 additions to {@link android.support.v4.app.NotificationCompat}.</li> 365 </ul> 366 </dd> 367 </dl> 368 </div> 369 </div> 370 371 372 <div class="toggle-content closed"> 373 <p><a href="#" onclick="return toggleContent(this)"> 374 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 375 />Android Support Library, revision 9</a> <em>(June 2012)</em> 376 </p> 377 <div class="toggle-content-toggleme"> 378 <dl> 379 <dt>Changes for v4 support library:</dt> 380 <dd> 381 <ul> 382 383 <li>User Interface Support 384 <ul> 385 <li>Added {@link android.support.v4.view.PagerTabStrip} support, providing enhanced 386 functionality beyond {@link android.support.v4.view.PagerTitleStrip}.</li> 387 <li>Fixed various bugs for {@link android.support.v4.view.PagerTitleStrip} and 388 {@link android.support.v4.view.PagerTabStrip}, including {@link 389 android.widget.TextView#setAllCaps setAllCaps} option, title alignment, 390 appearance improvements, minimum width constraints and touch navigation issues.</li> 391 <li>Added support for {@link android.support.v4.view.ViewPager} page gutters, which 392 helps the {@link android.support.v4.view.ViewPager} class provide paging support for content with 393 a large horizontal scroll range, such as a map.</li> 394 <li>Fixed numerous bugs for {@link android.support.v4.view.ViewPager}, including size 395 and data set change problems, page positioning, user interaction, scroll tracking and keyboard 396 navigation problems.</li> 397 <li>Fixed many bugs for {@link android.support.v4.app.Fragment}, including proper 398 handling of {@link android.support.v4.app.Fragment#onActivityResult onActivityResult()} when 399 the target fragment no longer exists, dispatching selection events to invisible fragments, improved 400 {@link android.support.v4.app.FragmentTransaction#replace FragmentTransaction.replace()} behavior 401 and added better state handling for fragments being moved out of view.</li> 402 <li>Added support for the {@link 403 android.support.v4.view.ViewCompat postOnAnimation()} method in {@link 404 android.support.v4.view.ViewCompat}.</li> 405 <li>Updated {@link android.support.v4.app.NavUtils} to use Android 4.1 (API level 16) 406 <em>Up</em> navigation functionality when available.</li> 407 </ul> 408 </li> 409 410 <li>Accessibility 411 <ul> 412 <li>Updated accessibility support classes, including {@link 413 android.support.v4.view.accessibility.AccessibilityNodeInfoCompat}, to follow fixes made in Android 414 4.1 (API level 16).</li> 415 <li>Added support for accessibility scroll actions in {@link 416 android.support.v4.view.ViewPager}.</li> 417 </ul> 418 </li> 419 420 <li>General improvements 421 <ul> 422 <li>Updated {@link android.support.v4.app.TaskStackBuilder} to reflect API changes in 423 Android 4.1 (API level 16).</li> 424 <li>Enhanced {@link android.support.v4.app.TaskStackBuilder} to allow it to be used 425 from a Service.</li> 426 <li>Added support for {@link android.support.v4.content.IntentCompat EXTRA_HTML_TEXT} 427 to {@link android.support.v4.app.ShareCompat}.</li> 428 <li>Updated {@link android.support.v4.app.NotificationCompat.Builder} to support the 429 {@link android.support.v4.app.NotificationCompat.Builder#setNumber setNumber()} method.</li> 430 <li>Added support in {@link android.support.v4.net.ConnectivityManagerCompat} for the 431 {@link android.support.v4.net.ConnectivityManagerCompat#isActiveNetworkMetered 432 isActiveNetworkMetered()} method.</li> 433 </ul> 434 </li> 435 </ul> 436 </dd> 437 </dl> 438 </div> 439 </div> 440 441 442 <div class="toggle-content closed"> 443 <p><a href="#" onclick="return toggleContent(this)"> 444 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 445 />Android Support Library, revision 8</a> <em>(April 2012)</em> 446 </p> 447 <div class="toggle-content-toggleme"> 448 <dl> 449 <dt>Changes for v4 support library:</dt> 450 <dd> 451 <ul> 452 <li>Fixed intent flags for {@link android.app.PendingIntent} objects generated 453 by {@link android.support.v4.app.TaskStackBuilder}.</li> 454 <li>Removed unused attributes from the gridlayout library projects to make sure 455 the library can be built with API level 7 and higher.</li> 456 <li>Added {@code .classpath} and {@code .project} files for the gridlayout 457 library project.</li> 458 </ul> 459 </dd> 460 </dl> 461 </div> 462 </div> 463 464 465 <div class="toggle-content closed"> 466 <p><a href="#" onclick="return toggleContent(this)"> 467 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 468 />Android Support Library, revision 7</a> <em>(March 2012)</em> 469 </p> 470 <div class="toggle-content-toggleme"> 471 <dl> 472 <dt>Changes for v4 support library:</dt> 473 <dd> 474 <ul> 475 <li>Added {@link android.support.v4.app.ShareCompat}, which provides helper classes 476 for sending and receiving content for social sharing applications, including new metadata for 477 attributing shared data to the source app. This class also provides compatible integration with the 478 new {@link android.widget.ShareActionProvider} in Android 4.0.</li> 479 <li>Added {@link android.support.v4.app.NavUtils} and {@link 480 android.support.v4.app.TaskStackBuilder} to provide support for implementing the 481 <a href="{@docRoot}design/index.html">Android Design</a> guidelines for navigation. These 482 additions include a way to implement the action bar's <em>Up</em> button across versions. 483 For an example implementation of this pattern, see the AppNavigation sample in 484 ({@code <em><sdk></em>/samples/<em><platform></em>/AppNavigation}).</li> 485 <li>Added {@link android.support.v4.app.NotificationCompat.Builder} to provide a 486 compatibility implementation of Android 3.0's {@link android.app.Notification.Builder} helper class 487 for creating standardized system notifications.</li> 488 </ul> 489 </dd> 490 </dl> 491 </div> 492 </div> 493 494 495 <div class="toggle-content closed"> 496 <p><a href="#" onclick="return toggleContent(this)"> 497 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 498 />Android Support Library, revision 6</a> <em>(December 2011)</em> 499 </p> 500 <div class="toggle-content-toggleme"> 501 502 <p class="note"><strong>Note:</strong> Reference for support library APIs are now available with 503 the framework references, for example: {@link android.support.v4.app}.</p> 504 <dl> 505 <dt>Changes for v4 support library:</dt> 506 <dd> 507 <ul> 508 <li>Changes to ViewPager: 509 <ul> 510 <li>Added extra decorative view support for {@link android.support.v4.view.ViewPager}. 511 Decorative views may be supplied as child views of a pager in XML layout.</li> 512 <li>Added {@link android.support.v4.view.PagerAdapter#getPageTitle 513 PagerAdapter.getPageTitle()} to supply title strings for pages, which defaults to no 514 title for each page.</li> 515 <li>Added {@link android.support.v4.view.PagerTitleStrip}, a non-interactive title 516 strip, that can be added as a child of ViewPager. Developers can supply text 517 appearance and color, as well as layout sizing and gravity information.</li> 518 <li>Updated {@link android.support.v4.view.PagerAdapter} methods to take ViewGroup 519 objects, rather than View to avoid class casting in adapter implementations.</li> 520 <li>Updated {@link android.support.v4.view.ViewPager} to use Launcher-style 521 fling behavior.</li> 522 <li>Bug fixes for user interface interaction and test automation.</li> 523 </ul> 524 </li> 525 526 <li>Support for Fragments: 527 <ul> 528 <li>Changed {@code setStartDeferred()} method to {@link 529 android.support.v4.app.Fragment#setUserVisibleHint}.</li> 530 <li>Added deferred start for off-screen pages to improve performance.</li> 531 </ul> 532 </li> 533 534 <li>Support for Accessiblity APIs: 535 <ul> 536 <li>Updated {@link android.support.v4.view.AccessibilityDelegateCompat} methods 537 to return empty lists instead of null.</li> 538 <li>Added new APIs needed by the v4 samples.</li> 539 </ul> 540 </li> 541 542 </ul> 543 </dd> 544 </dl> 545 </div> 546 </div> 547 548 <div class="toggle-content closed"> 549 <p><a href="#" onclick="return toggleContent(this)"> 550 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 551 />Android Support Library, revision 5</a> <em>(December 2011)</em> 552 </p> 553 <div class="toggle-content-toggleme"> 554 <dl> 555 <dt>Changes for v4 support library:</dt> 556 <dd> 557 <ul> 558 <li>Support for Accessiblity APIs: 559 <ul> 560 <li>Added {@link android.support.v4.view.AccessibilityDelegateCompat} 561 to support {@link android.view.View.AccessibilityDelegate}.</li> 562 563 <li>Added {@link android.support.v4.view.accessibility.AccessibilityEventCompat} 564 to support {@link android.view.accessibility.AccessibilityEvent}.</li> 565 566 <li>Added {@link android.support.v4.view.accessibility.AccessibilityManagerCompat} 567 to support {@link android.view.accessibility.AccessibilityManager}.</li> 568 569 <li>Added {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat} 570 to support {@link android.view.accessibility.AccessibilityNodeInfo}.</li> 571 572 <li>Added {@link android.support.v4.view.accessibility.AccessibilityRecordCompat} 573 to support {@link android.view.accessibility.AccessibilityRecord}.</li> 574 575 <li>Added {@link 576 android.support.v4.accessibilityservice.AccessibilityServiceInfoCompat} 577 to support {@link android.accessibilityservice.AccessibilityServiceInfo}.</li> 578 579 <li>Added {@link android.support.v4.view.ViewGroupCompat} 580 to support accessibility features in {@link android.view.ViewGroup}. 581 </li> 582 583 <li>Modified {@link android.support.v4.view.ViewCompat} 584 to support accessibility features in {@link android.view.View}.</li> 585 </ul> 586 </li> 587 588 <li>Changes to ViewPager: 589 <ul> 590 <li>Added support for margins between pages. 591 An optional {@link android.graphics.drawable.Drawable} can be provided 592 to fill the margins.</li> 593 <li>Added support for {@link android.widget.EdgeEffect}.</li> 594 <li>Added support for keyboard navigation</li> 595 <li>Added support to control how many pages are kept to either side 596 of the current page.</li> 597 <li>Improved touch physics.</li> 598 <li>Bug fixes for user interface behavior.</li> 599 </ul> 600 </li> 601 </ul> 602 </dd> 603 </dl> 604 </div> 605 </div> 606 607 <div class="toggle-content closed"> 608 <p><a href="#" onclick="return toggleContent(this)"> 609 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 610 />Android Support Library, revision 4</a> <em>(October 2011)</em> 611 </p> 612 <div class="toggle-content-toggleme"> 613 <dl> 614 <dt>Changes for v4 support library:</dt> 615 <dd> 616 <ul> 617 <li>Added <code>EdgeEffectCompat</code> to 618 support {@link android.widget.EdgeEffect}.</li> 619 620 <li>Added <code>LocalBroadcastManager</code> to allow applications to easily 621 register for and receive intents within a single application without 622 broadcasting them globally.</li> 623 624 <li>Added support in <code>ViewCompat</code> to check for and set overscroll 625 modes for {@link android.view.View}s on Android 2.3 and later.</li> 626 <li>Changes to Fragment APIs: 627 <ul> 628 <li>Added new APIs to control the visibility of new menus.</li> 629 <li>Added custom animation APIs.</li> 630 <li>Added APIs in <code>FragmentActivity</code> to retain custom, 631 non-configuration instance data.</li> 632 <li>Various bug fixes.</li> 633 </ul> 634 </li> 635 636 <li>Fixed a {@link android.content.Loader} bug that caused issues in 637 canceling {@link android.os.AsyncTask}s when running on Froyo and older 638 versions of the platform. The support 639 code now uses its own version of {@link android.os.AsyncTask} to keep the same 640 behavior on all platform versions.</li> 641 642 </ul> 643 </dd> 644 </dl> 645 </div> 646 </div> 647 648 649 <div class="toggle-content closed"> 650 <p><a href="#" onclick="return toggleContent(this)"> 651 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 652 />Android Support Library, revision 3</a> <em>(July 2011)</em> 653 </p> 654 <div class="toggle-content-toggleme"> 655 <dl> 656 <dt>Changes for v4 support library:</dt> 657 <dd> 658 <ul> 659 <li>Adds support for {@link android.app.Fragment.SavedState}</li> 660 <li>Adds {@code MotionEventCompat} to support newer {@link 661 android.view.MotionEvent} APIs</li> 662 <li>Adds {@code VelocityTrackerCompat} to support a newer {@link 663 android.view.VelocityTracker} APIs</li> 664 <li>Adds {@code ViewConfigurationCompat} to support a newer {@link 665 android.view.ViewConfiguration} APIs</li> 666 <li>All new APIs (available only in the support library) that allow you to create UIs 667 with horizontal paging, allowing users to swipe left and right between content views. Classes to 668 support this include: 669 <ul> 670 <li>{@code ViewPager}: A {@link android.view.ViewGroup} that manages the 671 layout for the child views, which the user can swipe between.</li> 672 <li>{@code PagerAdapter}: An adapter that populates the {@code ViewPager} with the 673 views that represent each page.</li> 674 <li>{@code FragmentPagerAdapter}: An extension of {@code PagerAdapter} for flipping 675 between fragments.</li> 676 <li>{@code FragmentStatePagerAdapter}: An extension of {@code PagerAdapter} for 677 flipping between fragments that uses the library's support for {@link 678 android.app.Fragment.SavedState}.</li> 679 </ul> 680 </li> 681 </ul> 682 </dd> 683 <dt>New v13 support library:</dt> 684 <dd> 685 <ul> 686 <li>Includes the {@code FragmentPagerAdapter} and {@code FragmentStatePagerAdapter} 687 to support the horizontal paging. 688 <p>These are exactly the same as the APIs added to the v4 support library, but rely on 689 other platform components in Android 3.2. Use this library instead of v4 if you're developing for 690 Android 3.2 and higher (all other APIs in the v4 library are already available with API level 691 13).</p> 692 </li> 693 </ul> 694 </dd> 695 </dl> 696 </div> 697 </div> 698 699 700 <div class="toggle-content closed"> 701 <p><a href="#" onclick="return toggleContent(this)"> 702 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 703 />Android Support Library, revision 2</a> <em>(May 2011)</em> 704 </p> 705 <div class="toggle-content-toggleme"> 706 <dl> 707 <dt>Changes for v4 library:</dt> 708 <dd> 709 <ul> 710 <li>Support for fragment animations</li> 711 <li>Fix {@link android.support.v4.app.Fragment#onActivityResult Fragment.onActivityResult()} 712 bug</li> 713 </ul> 714 </dd> 715 </dl> 716 </div> 717 </div> 718 719 720 <div class="toggle-content closed"> 721 <p><a href="#" onclick="return toggleContent(this)"> 722 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 723 />Android Support Library, revision 1</a> <em>(March 2011)</em> 724 </p> 725 <div class="toggle-content-toggleme"> 726 <p>Initial release with the v4 library.</p> 727 </div> 728 </div> 729 730