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 63<div class="toggle-content opened"> 64 <p id="rev21"><a href="#" onclick="return toggleContent(this)"> 65 <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img" alt="" 66/>Android Support Library, revision 23</a> <em>(August 2015)</em> 67 </p> 68 <div class="toggle-content-toggleme"> 69 <dl> 70 <dt>Added new support libraries:</a></dt> 71 <dd> 72 <ul> 73 <li><a href="features.html#custom-tabs">Custom Tabs Support library</a></li> 74 <li><a href="features.html#percent">Percent Support library</a></li> 75 <li><a href="features.html#recommendation">App Recommendation Support library for TV</a></li> 76 <li><a href="features.html#v7-preference">v7 Preference Support library</a></li> 77 <li><a href="features.html#v14-preference">v14 Preference Support library</a></li> 78 <li><a href="features.html#v17-preference">v17 Preference Support library for TV</a></li> 79 </ul> 80 </dd> 81 82 </dl> 83 84 <p>For a complete list of the Support Library changes, see the 85 <a href="{@docRoot}sdk/support_api_diff/23/changes.html">Support 86 Library API Differences Report</a>. </p> 87 88 </div> 89</div> <!-- end of collapsible section --> 90 91 92 93<div class="toggle-content closed"> 94 <p id="rev21"><a href="#" onclick="return toggleContent(this)"> 95 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 96/>Android Support Library, revision 22.2.1</a> <em>(July 2015)</em> 97 </p> 98 <div class="toggle-content-toggleme"> 99 <dl> 100 <dt>Changes for <a href="features.html#design">Design Support library:</a></dt> 101 <dd> 102 <ul> 103 <li>Added the {@code hide()} and {@code show()} methods to the 104 {@link android.support.design.widget.FloatingActionButton} class for programmatic 105 triggering of animations. </li> 106 <li>Added the {@code LENGTH_INDEFINITE} constant to the 107 {@link android.support.design.widget.Snackbar} class for showing a snackbar 108 until it is dismissed or another snackbar is shown. Also, added the 109 {@link android.support.design.widget.Snackbar#setActionTextColor(int)} and 110 {@link android.support.design.widget.Snackbar#setActionTextColor(ColorStateList)} 111 methods. </li> 112 <li>Added the {@code getSelectedTabPosition()} method to the 113 {@link android.support.design.widget.TabLayout} class for retrieving the currently 114 selected tab. </li> 115 <li>Provided a fully fluent API for the 116 {@link android.support.v7.app.NotificationCompat.MediaStyle} class for method 117 chaining. </li> 118 <li>Added convenience methods to the 119 {@link android.support.v7.widget.RecyclerView} for batch insertion of items. </li> 120 </ul> 121 </dd> 122 </dl> 123 124 <p>For a complete list of the Support Library changes, see the 125 <a href="{@docRoot}sdk/support_api_diff/22.2.0/changes.html">Support 126 Library API Differences Report</a>. </p> 127 128 </div> 129</div> <!-- end of collapsible section --> 130 131 132 133<div class="toggle-content closed"> 134 <p id="rev21"><a href="#" onclick="return toggleContent(this)"> 135 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 136/>Android Support Library, revision 22.2.0</a> <em>(May 2015)</em> 137 </p> 138 <div class="toggle-content-toggleme"> 139 <dl> 140 <dt>Added <a href="features.html#design">Design Support library:</a></dt> 141 <dd> 142 <ul> 143 <li>Added {@link android.support.design.widget.TextInputLayout} for showing 144 {@link android.widget.EditText} hint and error text as floating labels. 145 </li> 146 <li>Added {@link android.support.design.widget.FloatingActionButton} for implementing a 147 primary action on your interface as a 148 floating action button, supporting either default or mini sizes. 149 </li> 150 <li>Added {@link android.support.design.widget.Snackbar} for providing lightweight 151 feedback with an optional action in an animated snackbar. 152 </li> 153 <li>Added {@link android.support.design.widget.TabLayout} for implementing fixed and 154 scrollable 155 <a href="{@docRoot}design/building-blocks/tabs.html">tabs</a> as well as easy 156 integration with 157 {@link android.support.v4.view.ViewPager}. 158 </li> 159 <li>Added {@link android.support.design.widget.NavigationView} for implementing 160 <a href="{@docRoot}design/patterns/navigation-drawer.html">navigation drawer</a> 161 contents, including the ability to inflate menu items via a 162 <a href="{@docRoot}guide/topics/resources/menu-resource.html">Menu Resource</a>. 163 </li> 164 <li>Added {@link android.support.design.widget.CoordinatorLayout}, a general purpose 165 layout, used for building dependencies between 166 sibling views and allowing easy scrolling reactions between components via 167 {@link android.support.design.widget.CoordinatorLayout.Behavior}. Many of the Design 168 Library components rely on being a child of a 169 {@link android.support.design.widget.CoordinatorLayout}. 170 </li> 171 <li>Added {@link android.support.design.widget.AppBarLayout}, a container for a 172 {@link android.widget.Toolbar} 173 and other views (such as {@link android.support.design.widget.TabLayout}) for 174 reacting to scrolling events by scrolling off the screen, becoming visible in reaction 175 to a downward scroll, or collapsing/uncollapsing before scrolling off/onto the screen. 176 </li> 177 <li>Added {@link android.support.design.widget.CollapsingToolbarLayout} for controlling 178 how a {@link android.widget.Toolbar} collapses. A toolbar may collapse by: 179 pinning components to the top of the screen while it collapses, introducing 180 parallax scrolling of components such as an {@link android.widget.ImageView}, 181 or adding a content scrim color when the view is partially collapsed. 182 </li> 183 </ul> 184 </dt> 185 186 187 188 <dt>Changes for <a href="features.html#v4">v4 support library:</a></dt> 189 <dd> 190 <ul> 191 192 <li>Added the 193{@link android.support.v4.view.accessibility.AccessibilityEventCompat#getContentChangeTypes getContentChangeTypes()} 194 and 195{@link android.support.v4.view.accessibility.AccessibilityEventCompat#setContentChangeTypes setContentChangeTypes()} 196 methods and related change type 197 fields to the 198 {@link android.support.v4.view.accessibility.AccessibilityEventCompat} 199 class for accessibility event handling. 200 </li> 201 <li>Added the 202{@link android.support.v4.media.session.PlaybackStateCompat#getActiveQueueItemId getActiveQueueItemId()}, 203{@link android.support.v4.media.session.PlaybackStateCompat#getCustomActions getCustomActions()}, 204 and 205 {@link android.support.v4.media.session.PlaybackStateCompat#getExtras getExtras()} 206 methods with related state fields to the 207 {@link android.support.v4.media.session.PlaybackStateCompat} class for 208 getting custom actions from the queue. 209 </li> 210 <li>Added the 211{@link android.support.v4.media.session.PlaybackStateCompat.Builder#addCustomAction addCustomAction()}, 212{@link android.support.v4.media.session.PlaybackStateCompat.Builder#setActiveQueueItemId setActiveQueueItemId()}, 213 and 214 {@link android.support.v4.media.session.PlaybackStateCompat.Builder#setExtras setExtras()} 215 methods to the 216 {@link android.support.v4.media.session.PlaybackStateCompat.Builder} class for adding 217 custom actions to a playback state. 218 </li> 219 <li>Added the 220{@link android.support.v4.media.session.PlaybackStateCompat.CustomAction#fromCustomAction fromCustomAction()} and 221{@link android.support.v4.media.session.PlaybackStateCompat.CustomAction#getCustomAction getCustomAction()} methods 222 to the 223 {@link android.support.v4.media.session.PlaybackStateCompat.CustomAction} class 224 for getting custom actions from the queue. 225 </li> 226 <li>Added the {@link android.support.v4.view.ViewCompat#isAttachedToWindow isAttachedToWindow()}, 227 {@link android.support.v4.view.ViewCompat#offsetLeftAndRight offsetLeftAndRight()}, and 228 {@link android.support.v4.view.ViewCompat#offsetTopAndBottom offsetTopAndBottom()} 229 methods to the {@link android.support.v4.view.ViewCompat} class for working with views. 230 </li> 231 <li>Added the {@link android.support.v4.view.ViewPager#addOnPageChangeListener addOnPageChangeListener()}, 232 {@link android.support.v4.view.ViewPager#clearOnPageChangeListeners clearOnPageChangeListeners()}, and 233 {@link android.support.v4.view.ViewPager#removeOnPageChangeListener removeOnPageChangeListener()} 234 methods to the {@link android.support.v4.view.ViewPager} class for responding to page 235 changes. 236 <p>Deprecated the 237 {@link android.support.v4.view.ViewPager#setOnPageChangeListener setOnPageChangeListener()} method.</p> 238 </li> 239 <li>Added the 240{@link android.support.v4.view.ViewParentCompat#notifySubtreeAccessibilityStateChanged notifySubtreeAccessibilityStateChanged()} method to 241 the {@link android.support.v4.view.ViewParentCompat} class for notifying a view parent 242 that the accessibility state of one of its descendants has changed. 243 </li> 244 <li>Added the {@link android.support.v4.view.ViewPropertyAnimatorCompat#translationZ translationZ()}, 245 {@link android.support.v4.view.ViewPropertyAnimatorCompat#translationZBy translationZBy()}, 246 {@link android.support.v4.view.ViewPropertyAnimatorCompat#z z()}, and 247 {@link android.support.v4.view.ViewPropertyAnimatorCompat#zBy zBy()} 248 methods to the {@link android.support.v4.view.ViewPropertyAnimatorCompat} class for 249 adding animation. 250 </li> 251 </ul> 252 </dd> 253 254 255 256<dt>Changes for <a href="features.html#v7-appcompat">v7 appcompat library</a>:</dt> 257 <dd> 258<ul> 259 <li>Added the 260 {@link android.support.v7.app.AppCompatActivity#onWindowStartingSupportActionMode onWindowStartingSupportActionMode()} 261 method to the 262 {@link android.support.v7.app.AppCompatActivity}, 263 {@link android.support.v7.app.AppCompatCallback}, and 264 {@link android.support.v7.app.AppCompatDialog} classes for handling action modes 265 started from the current window. 266 </li> 267 268 <li>Added the 269{@link android.support.v7.app.AppCompatDelegate#isHandleNativeActionModesEnabled isHandleNativeActionModesEnabled()} and 270{@link android.support.v7.app.AppCompatDelegate#setHandleNativeActionModesEnabled setHandleNativeActionModesEnabled()} 271 methods to the 272 {@link android.support.v7.app.AppCompatDelegate} class for handling native action modes. 273 </li> 274 </ul> 275 </dd> 276 277 <p>For a complete list of the Support Library changes, see the 278 <a href="{@docRoot}sdk/support_api_diff/22.2.0/changes.html">Support 279 Library API Differences Report</a>. </p> 280 281 </dl> 282 283 </div> 284</div> <!-- end of collapsible section --> 285 286 287 288 289<div class="toggle-content closed"> 290 <p id="rev21"><a href="#" onclick="return toggleContent(this)"> 291 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 292/>Android Support Library, revision 22.1.0</a> <em>(April 2015)</em> 293 </p> 294 295 296 297 <div class="toggle-content-toggleme"> 298 <dl> 299 300 301 <div class="toggle-content-toggleme"> 302 <dl> 303 <dt>Changes for <a href="features.html#annotations">annotations library:</a></dt> 304 <dd> 305 <ul> 306 <li>Added the Annotations library to provide support for enhanced code inspections. 307 Annotations are added as metadata tags that you attach to variables, parameters, 308 and return values to inspect method return values, passed parameters, and local 309 variables and fields. 310 </li> 311 </ul> 312 </dd> 313 314 315 <dt>Changes for <a href="features.html#v4">v4 support library:</a></dt> 316 <dd> 317 <ul> 318 319 <li>Added the {@link android.support.v4.graphics.ColorUtils ColorUtils} class 320 to provide a set of color-related utility methods. 321 </li> 322 <li>Added the {@link android.support.v4.graphics.drawable.DrawableCompat#unwrap unwrap()} and 323 {@link android.support.v4.graphics.drawable.DrawableCompat#wrap wrap()} methods to the 324 {@link android.support.v4.graphics.drawable.DrawableCompat} class , allowing you to use 325 {@link android.support.v4.graphics.drawable.DrawableCompat#setTint setTint()}, 326 {@link android.support.v4.graphics.drawable.DrawableCompat#setTintList setTintList()}, 327 and {@link android.support.v4.graphics.drawable.DrawableCompat#setTintMode setTintMode()} 328 on all API level 4 or higher devices. 329 </li> 330 <li>Added the {@link android.support.v4.os.TraceCompat} class to 331 write trace events to the system trace buffer, which can then be collected and 332 visualized using the <a href="{@docRoot}tools/help/systrace.html">Systrace</a> tool. 333 </li> 334 <li>Added the {@link android.support.v4.util.CircularIntArray} class 335 to create circular integer array data structures. 336 </li> 337 <li>Added the {@link android.support.v4.util.CircularArray#clear clear()}, 338 {@link android.support.v4.util.CircularArray#removeFromStart removeFromStart()}, 339 and {@link android.support.v4.util.CircularArray#removeFromEnd removeFromEnd()} 340 methods to the {@link android.support.v4.util.CircularArray} class. Also, changed the 341 existing methods in this class to be non-final. 342 </li> 343 <li>Added the {@link android.support.v4.view.InputDeviceCompat} 344 as a helper class to access data in the 345 {@link android.support.v4.view.InputDeviceCompat} class. 346 </li> 347 <li>Added the {@link android.support.v4.view.LayoutInflaterCompat} 348 class as a helper class to access data in the 349 {@link android.support.v4.view.LayoutInflaterCompat} class 350 and added the {@link android.support.v4.view.LayoutInflaterFactory} interface. 351 </li> 352 <li>Added classes, methods, and interfaces to support nested scrolling. 353 <ul> 354 <li>Added the {@link android.support.v4.view.NestedScrollingChildHelper} 355 and {@link android.support.v4.view.NestedScrollingParentHelper} 356 helper classes for implementing nested scrolling parent and child views.</li> 357 <li>Added the {@link android.support.v4.view.NestedScrollingChild} 358 interface to be implemented by {@link android.view.View} subclasses.</li> 359 <li>Added the {@link android.support.v4.view.NestedScrollingParent} 360 and {@link android.support.v4.view.ScrollingView} interfaces to support 361 scrolling operations and provide scroll related APIs.</li> 362 <li>Added the 363 {@link android.support.v4.view.ViewGroupCompat#getNestedScrollAxes 364 getNestedScrollAxes()} method to the {@link android.support.v4.view.ViewGroupCompat} 365 class.</li> 366 <li>Added methods to the {@link android.support.v4.view.ViewParentCompat} class to 367 support nested scrolling. 368 </li> 369 <li>Added the {@link android.support.v4.widget.NestedScrollView} 370 class to support nested scrolling parent and child on both new and old versions of 371 Android. 372 </li> 373 </ul> 374 </li> 375 <li>Added methods and constants to the {@link android.support.v4.view.MotionEventCompat} 376 class for getting axis values and event source. 377 </li> 378 <li>Updated the {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat} 379 class to add methods for errors, content invalidation and labels. 380 </li> 381 <li>Added the following interpolation classes for animation: 382 {@link android.support.v4.view.animation.FastOutLinearInInterpolator}, 383 {@link android.support.v4.view.animation.FastOutSlowInInterpolator}, 384 {@link android.support.v4.view.animation.LinearOutSlowInInterpolator}, 385 {@link android.support.v4.view.animation.LinearOutSlowInInterpolator}, and 386 {@link android.support.v4.view.animation.PathInterpolatorCompat}. 387 </li> 388 <li>Added the {@link android.support.v4.widget.Space} class to create gaps between 389 components in general purpose layouts. This class is deprecated in the gridlayout library. 390 </li> 391 <li>Added the {@link android.support.v4.widget.TextViewCompat} class for accessing 392 features in a {@link android.widget.TextView}. 393 </li> 394 <li>Added a displacement parameter to the 395 {@link android.support.v4.widget.EdgeEffectCompat#onPull onPull()} method in the 396 {@link android.support.v4.widget.EdgeEffectCompat} class. 397 </li> 398 399 </ul> 400 </dd> 401 402 403 <dt>Changes for <a href="features.html#v7-appcompat">v7 appcompat library</a>:</dt> 404 <dd> 405 <ul> 406 <li>Added tint support to appcompat widgets, including 407 {@link android.support.v7.widget.AppCompatAutoCompleteTextView}, 408 {@link android.support.v7.widget.AppCompatButton}, 409 {@link android.support.v7.widget.AppCompatCheckBox}, 410 {@link android.support.v7.widget.AppCompatCheckedTextView}, 411 {@link android.support.v7.widget.AppCompatEditText}, 412 {@link android.support.v7.widget.AppCompatMultiAutoCompleteTextView}, 413 {@link android.support.v7.widget.AppCompatRadioButton}, 414 {@link android.support.v7.widget.AppCompatRatingBar}, 415 {@link android.support.v7.widget.AppCompatSpinner}, and 416 {@link android.support.v7.widget.AppCompatTextView}. 417 </li> 418 <li>Updated the {@link android.support.v7.app.AppCompatActivity} as the base 419 class for activities that use the support library action bar features. This class 420 replaces the deprecated {@link android.support.v7.app.ActionBarActivity}. 421 </li> 422 <li>Added the 423 {@link android.support.v7.app.AppCompatCallback} interface 424 to be implemented for AppCompat to be able to perform callbacks. 425 </li> 426 <li>Added the 427 {@link android.support.v7.app.AppCompatDelegate} abstract class 428 as a delegate you can use to extend AppCompat's support to any activity. 429 </li> 430 <li>Added the 431 {@link android.support.v7.app.AppCompatDialog} class 432 as the base class for AppCompat themed dialogs. 433 </li> 434 <li>Added the spinner style 435 {@link android.support.v7.app.AlertDialog} and 436 {@link android.support.v7.app.AlertDialog.Builder} classes to provide an AppCompat 437 themed {@link android.app.AlertDialog}. 438 </li> 439 <li>Added the {@link android.support.v7.graphics.Palette.Builder} class 440 for generating {@link android.support.v7.graphics.Palette} instances. 441 <ul> 442 <li>Added the 443 {@link android.support.v7.graphics.Palette#from} 444 method to the {@link android.support.v7.graphics.Palette} class to 445 start generating a Palette with the returned 446 {@link android.support.v7.graphics.Palette.Builder} instance. 447 </li> 448 <li>Deprecated the {@link android.support.v7.graphics.Palette#generate generate()} and 449 {@link android.support.v7.graphics.Palette#generateAsync generateAsync()} methods. 450 </li> 451 </ul> 452 </li> 453 454 <li>Added the 455 {@link android.support.v7.widget.GridLayout.Spec#getAbsoluteAlignment 456 getAbsoluteAlignment()} method to the {@link android.support.v7.widget.GridLayout.Spec} 457 class. 458 </li> 459 <li>Deprecated use of <code>app:theme</code> for styling 460 {@link android.support.v7.widget.Toolbar}. You can now use 461 <code>android:theme</code> for toolbars on all API level 7 and higher devices and 462 <code>android:theme</code> support for all widgets on API level 11 and higher devices. 463 </li> 464 </ul> 465 </dd> 466 467 468 <dt>Changes for <a href="features.html#v17-leanback">v17 leanback library</a>:</dt> 469 <dd> 470 <ul> 471 <li> Added {@link android.support.v17.leanback.app.GuidedStepFragment}, 472 {@link android.support.v17.leanback.widget.GuidanceStylist} and 473 {@link android.support.v17.leanback.widget.GuidedActionsStylist} to support 474 creating multi-step decision flows. 475 </li> 476 </ul> 477 </dd> 478 479 480 <dt>Changes for <a href="features.html#v7-recyclerview">v7 recyclerview library</a>:</dt> 481 <dd> 482 <ul> 483 <li>Added {@link android.support.v7.util.SortedList} classes to display items in 484 a list order and provide notification of changes to the list. 485 </li> 486 <li>Added the {@link android.support.v7.widget.util.SortedListAdapterCallback} class 487 that can bind a sorted list to a 488 {@link android.support.v7.widget.RecyclerView.Adapter} class. 489 </li> 490 </ul> 491 </dd> 492 493 494 <dt>Changes for <a href="features.html#v8-renderscript">v8 renderscript library</a>:</dt> 495 <dd> 496 <ul> 497 <li>Added the {@link android.support.v8.renderscript.ScriptIntrinsicHistogram} class for 498 use as a histogram filter.</li> 499 <li>Added the {@link android.support.v8.renderscript.ScriptIntrinsicResize} class for 500 performing a resize of a 2D allocation. 501 </li> 502 </ul> 503 </dd> 504 505 </dl> 506 507 508 </div> 509</div> <!-- end of collapsible section --> 510 511 512 513<div class="toggle-content closed"> 514 <p id="rev21"><a href="#" onclick="return toggleContent(this)"> 515 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 516/>Android Support Library, revision 22</a> <em>(March 2015)</em> 517 </p> 518 <div class="toggle-content-toggleme"> 519 <dl> 520 <dt>Changes for <a href="features.html#v4">v4 support library:</a></dt> 521 <dd> 522 <ul> 523 <li>Updated the {@link android.support.v4.content.res.ResourcesCompat#getDrawable 524 getDrawable()} method to return a drawable object for a specified specific resource ID, 525 screen density, and theme. 526 </li> 527 <li>Added the {@link android.support.v4.view.ViewCompat#setImportantForAccessibility 528 setImportantForAccessibility()} method so you can indicate if a view should trigger 529 accessibility events. 530 </li> 531 <li>Added the {@link android.support.v4.widget.DrawerLayout#getStatusBarBackgroundDrawable 532 getStatusBarBackgroundDrawable()} method so you can get the status bar background 533 drawable. 534 </li> 535 <li>Added methods to the 536 {@link android.support.v4.app.NotificationCompat.CarExtender.UnreadConversation} 537 class so Android Auto messaging apps can retrieve additional notification data. 538 </li> 539 <li>Added the {@link android.support.v4.widget.SwipeRefreshLayout#getProgressCircleDiameter 540 getProgressCircleDiameter()} method to return the diameter of a circle layout. 541 </li> 542 <li>Changed the default {@link android.support.v4.widget.DrawerLayout DrawerLayout} 543 status bar color to {@link android.R.attr#colorPrimaryDark}. 544 </li> 545 </ul> 546 </dd> 547 548 <dt>Changes for <a href="features.html#v7-appcompat">v7 appcompat library</a>:</dt> 549 <dd> 550 <ul> 551 <li>Added the spinner style 552 {@link android.support.v7.appcompat.R.style#Base_Widget_AppCompat_Spinner_Underlined}.</li> 553 <li>Added tinted widgets styles with 554 {@link android.support.v7.appcompat.R.style#Widget_AppCompat_AutoCompleteTextView}, 555 {@link android.widget.MultiAutoCompleteTextView}, 556 {@link android.support.v7.appcompat.R.style#TextAppearance_AppCompat_Button}, and 557 {@link android.support.v7.appcompat.R.style#Base_Widget_AppCompat_RatingBar}.</li> 558 </ul> 559 </dd> 560 561 <dt>Changes for <a href="features.html#v17-leanback">v17 leanback library</a>:</dt> 562 <dd> 563 <ul> 564 <li>Added the {@link android.support.v17.leanback.widget.ListRowPresenter#getRecycledPoolSize 565 getRecycledPoolSize()} and 566 {@link android.support.v17.leanback.widget.ListRowPresenter#setRecycledPoolSize 567 setRecycledPoolSize()} methods to allow customized recycled pool sizes.</li> 568 <li>Added the {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT} attribute to the 569 layout width setting to support wrapped content for title icons.</li> 570 <li>Defined {@link android.support.v17.leanback.R.transition} in XML to 571 improve transition updates. </li> 572 <li>Enabled support for right to left layouts.</li> 573 <li>Added the play and pause media key events support to the 574 {@link android.support.v17.leanback.app.PlaybackOverlayFragment} class.</li> 575 <li>Added enter and return transitions to the 576 {@link android.support.v17.leanback.app.BrowseFragment} class and the 577 {@link android.support.v17.leanback.app.DetailsFragment} class.</li> 578 <li>Added the {@link android.support.v17.leanback.widget.ArrayObjectAdapter#replace 579 replace()} method to replace items in an object’s adapter array. </li> 580 </ul> 581 </dd> 582 583 584 <dt>Changes for <a href="features.html#v7-mediarouter">v7 mediarouter library</a>:</dt> 585 <dd> 586 <ul> 587 <li>Updated Google Cast icons to use the 588 <a href="{@docRoot}training/material/index.html">material design</a> style.</li> 589 <li>Updated all the icons used in the {@link android.media.MediaRouter} dialogs to use the 590 <a href="{@docRoot}training/material/index.html">material design</a> style.</li> 591 </ul> 592 </dd> 593 594 595 <dt>Changes for <a href="features.html#v7-recyclerview">v7 recyclerview library</a>:</dt> 596 <dd> 597 <ul> 598 <li>Added the {@link android.support.v7.widget.RecyclerView.ViewHolder#getLayoutPosition 599 getlayoutPosition()} 600 and {@link android.support.v7.widget.RecyclerView.ViewHolder#getAdapterPosition 601 getadapterPosition()} methods to the {@link android.support.v7.widget.RecyclerView} 602 class.</li> 603 <li>Deprecated the <code>classgetChildPosition()</code> and 604 <code>findViewHolderForPosition()</code> methods in the 605 {@link android.support.v7.widget.RecyclerView} class. </li> 606 <li>Deprecated the <code>getPosition()</code> method in the 607 {@link android.support.v7.widget.RecyclerView.ViewHolder} class. </li> 608 <li>Deprecated the <code>getViewPosition()</code> method in the 609 {@link android.support.v7.widget.RecyclerView.LayoutParams} class. </li> 610 </ul> 611 </dd> 612 613 </div> 614</div> 615 616 617 618 619<div class="toggle-content closed"> 620 <p id="rev21"><a href="#" onclick="return toggleContent(this)"> 621 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 622/>Android Support Library, revision 21.0.3</a> <em>(December 2014)</em> 623 </p> 624 <div class="toggle-content-toggleme"> 625 <dl> 626 <dt>Changes for <a href="features.html#v4">v4 support library:</a></dt> 627 <dd> 628 <ul> 629 <li>Added several {@link android.support.v4.app.NotificationCompat.WearableExtender} 630 methods to improve the display of barcodes in notifications on wearable devices. 631 <ul> 632 <li>{@link android.support.v4.app.NotificationCompat.WearableExtender#getHintScreenTimeout getHintScreenTimeout()}</li> 633 <li>{@link android.support.v4.app.NotificationCompat.WearableExtender#setHintScreenTimeout setHintScreenTimeout()}</li> 634 <li>{@link android.support.v4.app.NotificationCompat.WearableExtender#getHintAvoidBackgroundClipping getHintAvoidBackgroundClipping()}</li> 635 <li>{@link android.support.v4.app.NotificationCompat.WearableExtender#setHintAvoidBackgroundClipping setHintAvoidBackgroundClipping()}</li> 636 </ul> 637 </li> 638 </ul> 639 </dd> 640 641 </div> 642</div> 643 644 645 646<div class="toggle-content closed"> 647 <p id="rev21"><a href="#" onclick="return toggleContent(this)"> 648 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 649/>Android Support Library, revision 21.0.2</a> <em>(November 2014)</em> 650 </p> 651 <div class="toggle-content-toggleme"> 652 <dl> 653 <dt>Changes for <a href="features.html#v4">v4 support library:</a></dt> 654 <dd> 655 <ul> 656 <li>Added {@link android.support.v4.app.NotificationCompat.CarExtender} 657 class to support Android Auto extensions to notifications.</li> 658 </ul> 659 </dd> 660 <dt>Changes for <a href="features.html#v7-appcompat">v7 appcompat library</a>:</dt> 661 <dd> 662 <ul> 663 <li>Added the {@link android.support.v7.widget.PopupMenu} constructor to support new popup 664 menus.</li> 665 <li>Added support for a Collapse icon description in the {@link android.support.v7.widget.Toolbar} 666 class.</li> 667 <li>Updated the {@link android.support.v7.widget.SearchView} widget to support displaying 668 the {@link android.support.v7.mediarouter.R.attr#commitIcon}. </li> 669 <li>Removed the <code>buttonGravity</code> attribute from the 670 {@link android.support.v7.widget.Toolbar} class. </li> 671 </ul> 672 </dd> 673 <dt>Changes for <a href="features.html#v7-cardview">v7 cardview library</a>:</dt> 674 <dd> 675 <ul> 676 <li>Added {@link android.support.v7.widget.CardView#setCardBackgroundColor} API to 677 support changing the background color of the {@link android.support.v7.widget.CardView}.</li> 678 <li>Changed the {@link android.support.v7.widget.CardView} to more accurately report its 679 opacity value as {@link android.graphics.PixelFormat#TRANSLUCENT}.</li> 680 </ul> 681 </dd> 682 <dt>Changes for <a href="features.html#v7-recyclerview">v7 recyclerview 683 library</a>:</dt> 684 <dd> 685 <ul> 686 <li>Added {@link android.support.v7.widget.RecyclerView#TOUCH_SLOP_DEFAULT} and 687 {@link android.support.v7.widget.RecyclerView#TOUCH_SLOP_PAGING} constants 688 to the {@link android.support.v7.widget.RecyclerView} class 689 to support touch slop configurations for paging.</li> 690 </ul> 691 </dd> 692 <dt>Changes for <a href="features.html#v17-leanback">v17 leanback library</a>:</dt> 693 <dd> 694 <ul> 695 <li>Added support to generate v4 code fragments. </li> 696 <li>Changed the secondary text color on {@link android.support.v7.widget.CardView}. </li> 697 </ul> 698 </dd> 699 </dl> 700 </div> 701</div> 702 703 704 705<div class="toggle-content closed"> 706 <p id="rev21"><a href="#" onclick="return toggleContent(this)"> 707 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 708/>Android Support Library, revision 21.0.1</a> <em>(November 2014)</em> 709 </p> 710 <div class="toggle-content-toggleme"> 711 <dl> 712 <dt>Added <a href="{@docRoot}tools/support-library/features.html#multidex"> 713 multidex support library</a> to support multiple 714 <a href="https://source.android.com/devices/tech/dalvik/">Dalvik</a> Executable (DEX) files 715 for multi-dex file support prior to Android 5.0. 716 </dt> 717 </dl> 718 </div> 719</div> 720 721 722 723 724<div class="toggle-content closed"> 725 <p id="rev21"><a href="#" onclick="return toggleContent(this)"> 726 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 727/>Android Support Library, revision 21</a> <em>(October 2014)</em> 728 </p> 729 <div class="toggle-content-toggleme"> 730 <dl> 731 <dt>Changes for <a href="features.html#v4">v4 support library:</a></dt> 732 <dd> 733 <ul> 734 <li>Added support for {@link android.support.v4.app.Fragment} 735 transitions for devices running Android 5.0 (API level 21). 736 Be aware that transitions have no effect on devices running 737 Android 4.4 and lower. 738 </li> 739 <li>Added {@link android.support.v4.provider.DocumentFile} to ease 740 the transition from {@link java.io.File} 741 while working with document trees. However, this class demands 742 more processing overhead compared to the platform's 743 {@link android.provider.DocumentsContract} API added in 744 Android 4.4 (API level 19). So you should switch to using {@link 745 android.provider.DocumentsContract} when running on Android 4.4 746 and higher.</li> 747 </ul> 748 </dd> 749 <dt>Changes for <a href="features.html#v7-appcompat">v7 appcompat 750 library</a>:</dt> 751 <dd> 752 <ul> 753 <li>Added support for <a href="{@docRoot}design/material/">material 754 design</a> user interfaces.</li> 755 <li>Added {@link android.support.v7.widget.Toolbar}, which generalizes 756 the functionality of {@link android.support.v7.app.ActionBar} for 757 use within app layouts.</li> 758 <li>Updated {@link android.support.v7.app.ActionBarDrawerToggle}, 759 which contains the menu-to-arrow animation</li> 760 <li>Updated common user interface widgets to allow tinting via theme 761 attributes when running on pre-Android 5.0 devices</li> 762 <li>Added {@link android.support.v7.widget.SwitchCompat}, a backport 763 of the {@link android.widget.Switch} widget that was added in 764 Android 4.0 (API level 14).</li> 765 </ul> 766 </dd> 767 <dt>New <a href="features.html#v7-cardview">v7 cardview library</a>:</dt> 768 <dd> 769 <ul> 770 <li>Added the {@link android.support.v7.widget.CardView} widget, which 771 provides a material design-compatible implementation for displaying 772 data items.</li> 773 </ul> 774 </dd> 775 <dt>New <a href="features.html#v7-recyclerview">v7 recyclerview 776 library</a>:</dt> 777 <dd> 778 <ul> 779 <li>Added the {@link android.support.v7.widget.RecyclerView} widget, 780 which provides a flexible list view for providing a limited window 781 into a large data set.</li> 782 </ul> 783 </dd> 784 <dt>New <a href="features.html#v7-palette">v7 palette library</a>:</dt> 785 <dd> 786 <ul> 787 <li>Added {@link android.support.v7.graphics.Palette} class, 788 which lets you extract prominent colors from an image.</li> 789 </ul> 790 </dd> 791 <dt>New <a href="features.html#v17-leanback">v17 leanback library</a>:</dt> 792 <dd> 793 <ul> 794 <li>Added support for building TV user interfaces, including 795 {@link android.support.v17.leanback.app.BrowseFragment}, 796 {@link android.support.v17.leanback.app.DetailsFragment}, and 797 {@link android.support.v17.leanback.app.PlaybackOverlayFragment}. 798 For more information about using these user interface widgets, 799 see <a href="{@docRoot}training/tv/playback/index.html">Building TV 800 Playback Apps</a>.</li> 801 </ul> 802 </dd> 803 </dl> 804 </div> 805</div> 806 807<div class="toggle-content closed"> 808 <p><a href="#" onclick="return toggleContent(this)"> 809 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 810/>Android Support Library, revision 20</a> <em>(July 2014)</em> 811 </p> 812 <div class="toggle-content-toggleme"> 813 <dl> 814 <dt>Changes for v4 support library:</dt> 815 <dd> 816 <ul> 817 <li>Added extended notification support for Android Wear in 818 {@link android.support.v4.app.NotificationCompat.WearableExtender}, which allows you 819 to specify wearable-specific features in your notifications.</li> 820 <li>Added {@link android.support.v4.app.NotificationCompat.Action.WearableExtender}, 821 which allows actions to be added on wearable notifications.</li> 822 <li>Added {@link android.support.v4.app.NotificationManagerCompat}, which allows you 823 to issue notifications that properly support wearable features.</li> 824 <li>Added {@link android.support.v4.app.RemoteInput}, which allows a handheld device 825 to receive voice input from a notification that appears on a wearable device.</li> 826 <li>Improved the handling of touch feedback in 827 {@link android.support.v4.widget.SwipeRefreshLayout}.</li> 828 </ul> 829 </dd> 830 </dl> 831 </div> 832</div> 833 834<div class="toggle-content closed"> 835 <p><a href="#" onclick="return toggleContent(this)"> 836 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 837/>Android Support Library, revision 19.1.0</a> <em>(March 2014)</em> 838 </p> 839 <div class="toggle-content-toggleme"> 840 <dl> 841 <dt>Changes for v4 support library:</dt> 842 <dd> 843 <ul> 844 <li>Added the {@link android.support.v4.widget.SwipeRefreshLayout} class, 845 which enables users to refresh the contents of a view with a vertical 846 swipe gesture.</li> 847 <li>Fixed accessibility issues with navigation drawers.</li> 848 </ul> 849 </dd> 850 851 <dt>Changes for v7 appcompat library:</dt> 852 <dd> 853 <ul> 854 <li>Fixed background issues with the action bar.</li> 855 </ul> 856 </dd> 857 </dl> 858 </div> 859</div> 860 861<div class="toggle-content closed"> 862 <p><a href="#" onclick="return toggleContent(this)"> 863 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 864/>Android Support Library, revision 19.0.1</a> <em>(December 2013)</em> 865 </p> 866 <div class="toggle-content-toggleme"> 867 <dl> 868 <dt>Changes for v4 support library:</dt> 869 <dd> 870 <ul> 871 <li>Improved {@link android.support.v4.print.PrintHelper} by adding asynchronous 872 handling of printing.</li> 873 <li>Fixed the {@link android.support.v4.widget.DrawerLayout} class approximation of 874 the {@link android.view.View#addChildrenForAccessibility addChildrenForAccessibility()} 875 method.</li> 876 <li>Fixed slide drawable mirroring in {@link 877 android.support.v4.app.ActionBarDrawerToggle}.</li> 878 <li>Fixed off-by-one issue when removing an item from a collection iterator.</li> 879 </ul> 880 </dd> 881 882 <dt>Changes for v7 mediarouter library:</dt> 883 <dd> 884 <ul> 885 <li>Improved route identification by using full component name in the {@link 886 android.support.v7.media.MediaRouteProvider.ProviderMetadata}.</li> 887 <li>Updated {@link android.support.v7.app.MediaRouteChooserDialog} to hide disabled 888 routes.</li> 889 </ul> 890 </dd> 891 892 <dt>Changes for <a href="features.html#v8-renderscript">v8 renderscript library</a></dt> 893 <dd> 894 <ul> 895 <li>Added error propagation for the RenderScript thunking layer.</li> 896 </ul> 897 </dd> 898 899 </dl> 900 </div> 901</div> 902 903 904<div class="toggle-content closed"> 905 <p><a href="#" onclick="return toggleContent(this)"> 906 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 907/>Android Support Library, revision 19</a> <em>(October 2013)</em> 908 </p> 909 <div class="toggle-content-toggleme"> 910 <dl> 911 <dt>Changes for v4 support library:</dt> 912 <dd> 913 <ul> 914 <li>Added support for external Storage APIs with the 915 {@link android.support.v4.content.ContextCompat#getObbDirs getObbDirs()}, 916 {@link android.support.v4.content.ContextCompat#getExternalFilesDirs getExternalFilesDirs()}, 917 {@link android.support.v4.content.ContextCompat#getExternalCacheDirs getExternalCacheDirs()}, 918 and {@link android.support.v4.os.EnvironmentCompat#getStorageState getStorageState()}. 919 These helper methods always return a single file object on devices running Android 920 4.3 (API level 18) and earlier. When running on Android 4.4 (API level 19) and higher, 921 these methods may return more than one file object.</li> 922 <li>Added {@link android.support.v4.print.PrintHelper} class that works with the 923 Print APIs to print images with a minimum of code.</li> 924 <li>Added drag-to-open user interface support for pop-up menus. For more information, see 925 {@link android.support.v4.widget.PopupMenuCompat} and 926 {@link android.support.v4.widget.ListPopupWindowCompat}.</li> 927 <li>Improved accessibility support with the addition of a 928 {@link android.support.v4.view.accessibility.AccessibilityNodeProviderCompat#findFocus 929 findFocus()} method in 930 {@link android.support.v4.view.accessibility.AccessibilityNodeProviderCompat} and the 931 {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat#getLiveRegion 932 getLiveRegion()} method in 933 {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat}.</li> 934 <li>Added helper class {@link android.support.v4.view.ScaleGestureDetectorCompat} for 935 accessing new scaling gesture methods.</li> 936 <li>Fixed problem with {@link android.support.v4.app.ActionBarDrawerToggle} in 937 right-to-left language displays.</li> 938 <li>Modified {@link android.support.v4.widget.AutoScrollHelper} option to consume 939 touch events or allow them to be passed through to other views.</li> 940 </ul> 941 </dd> 942 943 <dt>Changes for v7 mediarouter library:</dt> 944 <dd> 945 <ul> 946 <li>Added support for media playback queuing, setting HTTP header values and media 947 playback duration.</li> 948 <li>Added explicit start, get, and end session actions for explicitly managing media 949 playback sessions with media router.</li> 950 </ul> 951 </dd> 952 </dl> 953 </div> 954</div> 955 956<div class="toggle-content closed"> 957 <p><a href="#" onclick="return toggleContent(this)"> 958 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 959/>Android Support Library, revision 18</a> <em>(July 2013)</em> 960 </p> 961 <div class="toggle-content-toggleme"> 962 <dl> 963 <dt>Changes for v4 support library:</dt> 964 <dd> 965 <ul> 966 <li>User interface 967 <ul> 968 <li>Added {@link android.support.v4.text.BidiFormatter} for handling 969 text strings that combine right to left and left to right-formatted text.</li> 970 <li>Modified {@link android.support.v4.view.ViewPager} to better handle cases where the 971 pager has a measured width of zero in the initial layout processing.</li> 972 <li>Modified {@link android.support.v4.widget.DrawerLayout} and 973 {@link android.support.v4.widget.SlidingPaneLayout} to not throw exceptions for 974 measurement while the project code is being edited.</li> 975 </ul> 976 </li> 977 978 <li>Accessibility 979 <ul> 980 <li>Added {@link android.support.v4.widget.ExploreByTouchHelper} to simplify the 981 implementation of accessibility for custom views.</li> 982 <li>Fixed a problem with {@link android.support.v4.view.ViewPager} incorrectly 983 populating {@link 984 android.support.v4.view.accessibility.AccessibilityEventCompat#TYPE_VIEW_SCROLLED 985 TYPE_VIEW_SCROLLED} accessibility events.</li> 986 <li>Fixed a null pointer exception in {@link android.support.v4.view.ViewPager} when 987 populating an accessibility event.</li> 988 <li>Simplified {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat} 989 by changing {@link java.lang.CharSequence} inputs to {@link java.lang.String} objects. 990 </li> 991 <li>Deprecated an {@link android.support.v4.view.accessibility.AccessibilityRecordCompat} 992 constructor that used an {@link java.lang.Object} as input.</li> 993 </ul> 994 </li> 995 996 <li>Media 997 <ul> 998 <li>Added {@link android.support.v4.media.TransportMediator} helper class to manage 999 media transport control, such as play, pause, skip and other media actions.</li> 1000 <li>Added {@link android.support.v4.hardware.display.DisplayManagerCompat} for managing 1001 display output to one or more device displays.</li> 1002 </ul> 1003 </li> 1004 1005 <li>Other changes 1006 <ul> 1007 <li>Added {@link android.support.v4.content.WakefulBroadcastReceiver} helper class for 1008 implementing a common pattern of detecting a device wakeup event and passing work off 1009 to a {@link android.app.Service} while ensuring that the device does not go back to 1010 sleep before the handoff is complete.</li> 1011 <li>Added two new APIs, 1012 {@link android.support.v4.content.AsyncTaskLoader#commitContentChanged 1013 commitContentChanged()} and 1014 {@link android.support.v4.content.AsyncTaskLoader#rollbackContentChanged 1015 rollbackContentChanged()}, to {@link android.support.v4.content.AsyncTaskLoader} to 1016 help deal with background updates for data changes that are subsequently canceled. 1017 </li> 1018 </ul> 1019 </li> 1020 </ul> 1021 </dd> 1022 1023 <dt>New v7 appcompat library:</dt> 1024 <dd> 1025 <ul> 1026 <li>Added {@link android.support.v7.app.ActionBar} to allow implementation of the 1027 action bar user interface <a href="{@docRoot}design/patterns/actionbar.html">design 1028 pattern</a> back to Android 2.1 (API level 7) and higher. Use of this class requires 1029 that you implement your activity by extending the new 1030 {@link android.support.v7.app.ActionBarActivity} class.</li> 1031 </ul> 1032 </dd> 1033 1034 <dt>New v7 mediarouter library:</dt> 1035 <dd> 1036 <p>Added a new mediarouter library that provides support for the <a 1037 href="https://developers.google.com/cast/">Google Cast developer preview</a>. 1038 The v7 mediarouter library APIs provide a means of controlling the routing of 1039 media channels and streams from the current device to external screens, 1040 speakers, and other destination devices, with compatibility back to Android 2.1 1041 (API level 7). See <a 1042 href="{@docRoot}tools/support-library/features.html#v7-mediarouter">V7 1043 mediarouter library</a> for more information. </p> 1044 1045 <p class="caution">The v7 mediarouter library APIs introduced in Support 1046 Library r18 are subject to change in later revisions of the Support 1047 Library. At this time, we recommend using the library only in connection 1048 with the <a href="https://developers.google.com/cast/">Google Cast 1049 developer preview</a>.</p> 1050 </dd> 1051 1052 </dl> 1053 </div> 1054</div> 1055 1056 1057<div class="toggle-content closed"> 1058 <p><a href="#" onclick="return toggleContent(this)"> 1059 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 1060/>Android Support Library, revision 13</a> <em>(May 2013)</em> 1061 </p> 1062 <div class="toggle-content-toggleme"> 1063 <dl> 1064 <dt>Changes for v4 support library:</dt> 1065 <dd> 1066 <ul> 1067 <li>Added {@link android.support.v4.widget.DrawerLayout} for creating a 1068 <a href="{@docRoot}training/implementing-navigation/nav-drawer.html">Navigation 1069 Drawer</a> that can be pulled in from the edge of a window.</li> 1070 <li>Added {@link android.support.v4.widget.SlidingPaneLayout} widget for creating linked 1071 summary and detail views that appropriately adapt to various screen sizes.</li> 1072 <li>Added {@link android.support.v4.app.ActionBarDrawerToggle} as a way to tie 1073 together the functions of {@link android.support.v4.widget.DrawerLayout} and {@link 1074 android.app.ActionBar}.</li> 1075 <li>Added {@link android.support.v4.widget.ViewDragHelper} as a new common component 1076 for dragging views within a parent view.</li> 1077 <li>Added {@link android.support.v4.widget.ScrollerCompat} to provide {@link 1078 android.widget.Scroller} and {@link android.widget.OverScroller} compatibility support. 1079 </li> 1080 <li>Added {@link android.support.v4.content.FileProvider} to allow sharing of private 1081 files between applications.</li> 1082 <li>Updated {@link android.support.v4.view.ViewPager} to throw an exception if the 1083 associated {@link android.support.v4.view.PagerAdapter} class is modified without a 1084 call to {@link android.support.v4.view.PagerAdapter#notifyDataSetChanged 1085 notifyDataSetChanged()}. 1086 </li> 1087 <li>Fixed an issue with {@link android.support.v4.view.ViewPager} children drawing sort 1088 order.</li> 1089 <li>Fixed {@link android.support.v4.view.GestureDetectorCompat} to dispatch missing 1090 {@link android.view.GestureDetector.SimpleOnGestureListener#onSingleTapConfirmed} calls 1091 between tap timeout and long press events.</li> 1092 </ul> 1093 </dd> 1094 1095 <dt>New v7 gridlayout library:</dt> 1096 <dd> 1097 <ul> 1098 <li>Added {@link android.support.v7.widget.GridLayout} to provide support for the 1099 {@link android.widget.GridLayout} layout object.</li> 1100 <li>Added {@link android.support.v7.widget.Space} which can be used to create blank areas 1101 within a {@link android.support.v7.widget.GridLayout} layout object.</li> 1102 </ul> 1103 </dl> 1104 </div> 1105</div> 1106 1107 1108<div class="toggle-content closed"> 1109 <p><a href="#" onclick="return toggleContent(this)"> 1110 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 1111/>Android Support Library, revision 12</a> <em>(February 2013)</em> 1112 </p> 1113 <div class="toggle-content-toggleme"> 1114 <dl> 1115 <dt>Changes for v4 support library:</dt> 1116 <dd> 1117 <ul> 1118 <li>Improved interaction behavior for {@link android.support.v4.view.ViewPager}.</li> 1119 <li>Fixed a bug that could cause {@link android.support.v4.view.ViewPager} to select the 1120 wrong page.</li> 1121 <li>Fixed use of {@link android.support.v4.view.ViewPager#removeView removeView()} method 1122 during layout for {@link android.support.v4.view.ViewPager}.</li> 1123 <li>Fixed issue with {@link android.support.v4.widget.SearchViewCompat} where using the 1124 back button to dismiss does not clear the search text. This fix only applies to 1125 host API levels 14 and higher.</li> 1126 </ul> 1127 </dd> 1128 </dl> 1129 </div> 1130</div> 1131 1132 1133<div class="toggle-content closed"> 1134 <p><a href="#" onclick="return toggleContent(this)"> 1135 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 1136/>Android Support Library, revision 11</a> <em>(November 2012)</em> 1137 </p> 1138 <div class="toggle-content-toggleme"> 1139 <dl> 1140 <dt>Changes for v4 support library:</dt> 1141 <dd> 1142 <ul> 1143 <li>User Interface 1144 <ul> 1145 <li>Added support for nested {@link android.support.v4.app.Fragment} classes.</li> 1146 <li>Added improvements to {@link android.support.v4.app.FragmentManager} debugging. 1147 </li> 1148 <li>Fixed problem in {@link android.support.v4.app.FragmentTabHost} where fragment 1149 and tab interaction could result in a {@link android.widget.ListView} state loss. 1150 </li> 1151 <li>Fixed issue with user-visible hint in 1152 {@link android.support.v4.app.FragmentStatePagerAdapter}.</li> 1153 <li>Added {@link android.support.v4.view.ViewPager.PageTransformer PageTransformer} 1154 interface to {@link android.support.v4.view.ViewPager} to allow applications to 1155 supply a custom transition behavior for scrolling.</li> 1156 <li>Added new features and fixes to {@link android.support.v4.app.TaskStackBuilder} 1157 from current release.</li> 1158 <li>Fixed {@link android.support.v4.view.PagerTitleStrip} to correctly track the 1159 {@link android.support.v4.view.PagerAdapter} currently in use.</li> 1160 <li>Fixed display flickering, positioning, and text clipping problems with 1161 {@link android.support.v4.view.PagerTitleStrip}.</li> 1162 <li>Fixed {@link android.support.v4.view.PagerTabStrip} to properly respect padding 1163 when drawing an underline.</li> 1164 </ul> 1165 </li> 1166 <li>Accessibility 1167 <ul> 1168 <li>Added support for new accessibility gesture and touch event types in 1169 {@link android.support.v4.view.accessibility.AccessibilityEventCompat}.</li> 1170 <li>Added support for new accessibility APIs in 1171 {@link android.support.v4.view.ViewCompat}.</li> 1172 <li>Added support for {@link android.support.v4.view.ViewCompat#performAccessibilityAction 1173 performAccessibilityAction()} method to {@link android.support.v4.view.ViewCompat}. 1174 </li> 1175 </ul> 1176 </li> 1177 <li>Added support for gestures with {@link android.support.v4.view.GestureDetectorCompat}. 1178 </li> 1179 <li>Added support for performing atomic operations on files using a new 1180 {@link android.support.v4.util.AtomicFile} class.</li> 1181 <li>Added support for the full set of {@code make} methods in 1182 {@link android.support.v4.content.IntentCompat}.</li> 1183 <li>Added {@link android.support.v4.util.LruCache#trimToSize trimToSize()} method in 1184 {@link android.support.v4.util.LruCache} utility class.</li> 1185 <li>Updated {@link android.support.v4.net.ConnectivityManagerCompat} to get NetworkInfo 1186 from a {@link android.net.ConnectivityManager#CONNECTIVITY_ACTION} 1187 broadcast.</li> 1188 </ul> 1189 </dd> 1190 </dl> 1191 </div> 1192</div> 1193 1194 1195<div class="toggle-content closed"> 1196 <p><a href="#" onclick="return toggleContent(this)"> 1197 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 1198/>Android Support Library, revision 10</a> <em>(August 2012)</em> 1199 </p> 1200 <div class="toggle-content-toggleme"> 1201 <dl> 1202 <dt>Changes for v4 support library:</dt> 1203 <dd> 1204 <ul> 1205 <li>Added support for notification features introduced in Android 4.1 (API level 16) with 1206 additions to {@link android.support.v4.app.NotificationCompat}.</li> 1207 </ul> 1208 </dd> 1209 </dl> 1210 </div> 1211</div> 1212 1213 1214<div class="toggle-content closed"> 1215 <p><a href="#" onclick="return toggleContent(this)"> 1216 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 1217/>Android Support Library, revision 9</a> <em>(June 2012)</em> 1218 </p> 1219 <div class="toggle-content-toggleme"> 1220 <dl> 1221 <dt>Changes for v4 support library:</dt> 1222 <dd> 1223 <ul> 1224 1225 <li>User Interface Support 1226 <ul> 1227 <li>Added {@link android.support.v4.view.PagerTabStrip} support, providing enhanced 1228functionality beyond {@link android.support.v4.view.PagerTitleStrip}.</li> 1229 <li>Fixed various bugs for {@link android.support.v4.view.PagerTitleStrip} and 1230{@link android.support.v4.view.PagerTabStrip}, including {@link 1231android.widget.TextView#setAllCaps setAllCaps} option, title alignment, 1232appearance improvements, minimum width constraints and touch navigation issues.</li> 1233 <li>Added support for {@link android.support.v4.view.ViewPager} page gutters, which 1234helps the {@link android.support.v4.view.ViewPager} class provide paging support for content with 1235a large horizontal scroll range, such as a map.</li> 1236 <li>Fixed numerous bugs for {@link android.support.v4.view.ViewPager}, including size 1237and data set change problems, page positioning, user interaction, scroll tracking and keyboard 1238navigation problems.</li> 1239 <li>Fixed many bugs for {@link android.support.v4.app.Fragment}, including proper 1240handling of {@link android.support.v4.app.Fragment#onActivityResult onActivityResult()} when 1241the target fragment no longer exists, dispatching selection events to invisible fragments, improved 1242{@link android.support.v4.app.FragmentTransaction#replace FragmentTransaction.replace()} behavior 1243and added better state handling for fragments being moved out of view.</li> 1244 <li>Added support for the {@link 1245android.support.v4.view.ViewCompat postOnAnimation()} method in {@link 1246android.support.v4.view.ViewCompat}.</li> 1247 <li>Updated {@link android.support.v4.app.NavUtils} to use Android 4.1 (API level 16) 1248<em>Up</em> navigation functionality when available.</li> 1249 </ul> 1250 </li> 1251 1252 <li>Accessibility 1253 <ul> 1254 <li>Updated accessibility support classes, including {@link 1255android.support.v4.view.accessibility.AccessibilityNodeInfoCompat}, to follow fixes made in Android 12564.1 (API level 16).</li> 1257 <li>Added support for accessibility scroll actions in {@link 1258android.support.v4.view.ViewPager}.</li> 1259 </ul> 1260 </li> 1261 1262 <li>General improvements 1263 <ul> 1264 <li>Updated {@link android.support.v4.app.TaskStackBuilder} to reflect API changes in 1265Android 4.1 (API level 16).</li> 1266 <li>Enhanced {@link android.support.v4.app.TaskStackBuilder} to allow it to be used 1267from a Service.</li> 1268 <li>Added support for {@link android.support.v4.content.IntentCompat EXTRA_HTML_TEXT} 1269to {@link android.support.v4.app.ShareCompat}.</li> 1270 <li>Updated {@link android.support.v4.app.NotificationCompat.Builder} to support the 1271{@link android.support.v4.app.NotificationCompat.Builder#setNumber setNumber()} method.</li> 1272 <li>Added support in {@link android.support.v4.net.ConnectivityManagerCompat} for the 1273{@link android.support.v4.net.ConnectivityManagerCompat#isActiveNetworkMetered 1274isActiveNetworkMetered()} method.</li> 1275 </ul> 1276 </li> 1277 </ul> 1278 </dd> 1279 </dl> 1280 </div> 1281</div> 1282 1283 1284<div class="toggle-content closed"> 1285 <p><a href="#" onclick="return toggleContent(this)"> 1286 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 1287/>Android Support Library, revision 8</a> <em>(April 2012)</em> 1288 </p> 1289 <div class="toggle-content-toggleme"> 1290 <dl> 1291 <dt>Changes for v4 support library:</dt> 1292 <dd> 1293 <ul> 1294 <li>Fixed intent flags for {@link android.app.PendingIntent} objects generated 1295 by {@link android.support.v4.app.TaskStackBuilder}.</li> 1296 <li>Removed unused attributes from the gridlayout library projects to make sure 1297 the library can be built with API level 7 and higher.</li> 1298 <li>Added {@code .classpath} and {@code .project} files for the gridlayout 1299 library project.</li> 1300 </ul> 1301 </dd> 1302 </dl> 1303 </div> 1304</div> 1305 1306 1307<div class="toggle-content closed"> 1308 <p><a href="#" onclick="return toggleContent(this)"> 1309 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 1310/>Android Support Library, revision 7</a> <em>(March 2012)</em> 1311 </p> 1312 <div class="toggle-content-toggleme"> 1313 <dl> 1314 <dt>Changes for v4 support library:</dt> 1315 <dd> 1316 <ul> 1317 <li>Added {@link android.support.v4.app.ShareCompat}, which provides helper classes 1318for sending and receiving content for social sharing applications, including new metadata for 1319attributing shared data to the source app. This class also provides compatible integration with the 1320new {@link android.widget.ShareActionProvider} in Android 4.0.</li> 1321 <li>Added {@link android.support.v4.app.NavUtils} and {@link 1322android.support.v4.app.TaskStackBuilder} to provide support for implementing the 1323<a href="{@docRoot}design/index.html">Android Design</a> guidelines for navigation. These 1324additions include a way to implement the action bar's <em>Up</em> button across versions. 1325For an example implementation of this pattern, see the AppNavigation sample in 1326({@code <em><sdk></em>/samples/<em><platform></em>/AppNavigation}).</li> 1327 <li>Added {@link android.support.v4.app.NotificationCompat.Builder} to provide a 1328compatibility implementation of Android 3.0's {@link android.app.Notification.Builder} helper class 1329for creating standardized system notifications.</li> 1330 </ul> 1331 </dd> 1332 </dl> 1333 </div> 1334</div> 1335 1336 1337<div class="toggle-content closed"> 1338 <p><a href="#" onclick="return toggleContent(this)"> 1339 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 1340/>Android Support Library, revision 6</a> <em>(December 2011)</em> 1341 </p> 1342 <div class="toggle-content-toggleme"> 1343 1344 <p class="note"><strong>Note:</strong> Reference for support library APIs are now available with 1345 the framework references, for example: {@link android.support.v4.app}.</p> 1346<dl> 1347 <dt>Changes for v4 support library:</dt> 1348 <dd> 1349 <ul> 1350 <li>Changes to ViewPager: 1351 <ul> 1352 <li>Added extra decorative view support for {@link android.support.v4.view.ViewPager}. 1353 Decorative views may be supplied as child views of a pager in XML layout.</li> 1354 <li>Added {@link android.support.v4.view.PagerAdapter#getPageTitle 1355 PagerAdapter.getPageTitle()} to supply title strings for pages, which defaults to no 1356 title for each page.</li> 1357 <li>Added {@link android.support.v4.view.PagerTitleStrip}, a non-interactive title 1358 strip, that can be added as a child of ViewPager. Developers can supply text 1359 appearance and color, as well as layout sizing and gravity information.</li> 1360 <li>Updated {@link android.support.v4.view.PagerAdapter} methods to take ViewGroup 1361 objects, rather than View to avoid class casting in adapter implementations.</li> 1362 <li>Updated {@link android.support.v4.view.ViewPager} to use Launcher-style 1363 fling behavior.</li> 1364 <li>Bug fixes for user interface interaction and test automation.</li> 1365 </ul> 1366 </li> 1367 1368 <li>Support for Fragments: 1369 <ul> 1370 <li>Changed {@code setStartDeferred()} method to {@link 1371 android.support.v4.app.Fragment#setUserVisibleHint}.</li> 1372 <li>Added deferred start for off-screen pages to improve performance.</li> 1373 </ul> 1374 </li> 1375 1376 <li>Support for Accessiblity APIs: 1377 <ul> 1378 <li>Updated {@link android.support.v4.view.AccessibilityDelegateCompat} methods 1379 to return empty lists instead of null.</li> 1380 <li>Added new APIs needed by the v4 samples.</li> 1381 </ul> 1382 </li> 1383 1384 </ul> 1385 </dd> 1386 </dl> 1387 </div> 1388</div> 1389 1390<div class="toggle-content closed"> 1391 <p><a href="#" onclick="return toggleContent(this)"> 1392 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 1393/>Android Support Library, revision 5</a> <em>(December 2011)</em> 1394 </p> 1395 <div class="toggle-content-toggleme"> 1396 <dl> 1397 <dt>Changes for v4 support library:</dt> 1398 <dd> 1399 <ul> 1400 <li>Support for Accessiblity APIs: 1401 <ul> 1402 <li>Added {@link android.support.v4.view.AccessibilityDelegateCompat} 1403 to support {@link android.view.View.AccessibilityDelegate}.</li> 1404 1405 <li>Added {@link android.support.v4.view.accessibility.AccessibilityEventCompat} 1406 to support {@link android.view.accessibility.AccessibilityEvent}.</li> 1407 1408 <li>Added {@link android.support.v4.view.accessibility.AccessibilityManagerCompat} 1409 to support {@link android.view.accessibility.AccessibilityManager}.</li> 1410 1411 <li>Added {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat} 1412 to support {@link android.view.accessibility.AccessibilityNodeInfo}.</li> 1413 1414 <li>Added {@link android.support.v4.view.accessibility.AccessibilityRecordCompat} 1415 to support {@link android.view.accessibility.AccessibilityRecord}.</li> 1416 1417 <li>Added {@link 1418 android.support.v4.accessibilityservice.AccessibilityServiceInfoCompat} 1419 to support {@link android.accessibilityservice.AccessibilityServiceInfo}.</li> 1420 1421 <li>Added {@link android.support.v4.view.ViewGroupCompat} 1422 to support accessibility features in {@link android.view.ViewGroup}. 1423 </li> 1424 1425 <li>Modified {@link android.support.v4.view.ViewCompat} 1426 to support accessibility features in {@link android.view.View}.</li> 1427 </ul> 1428 </li> 1429 1430 <li>Changes to ViewPager: 1431 <ul> 1432 <li>Added support for margins between pages. 1433 An optional {@link android.graphics.drawable.Drawable} can be provided 1434 to fill the margins.</li> 1435 <li>Added support for {@link android.widget.EdgeEffect}.</li> 1436 <li>Added support for keyboard navigation</li> 1437 <li>Added support to control how many pages are kept to either side 1438 of the current page.</li> 1439 <li>Improved touch physics.</li> 1440 <li>Bug fixes for user interface behavior.</li> 1441 </ul> 1442 </li> 1443 </ul> 1444 </dd> 1445 </dl> 1446 </div> 1447</div> 1448 1449<div class="toggle-content closed"> 1450 <p><a href="#" onclick="return toggleContent(this)"> 1451 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 1452/>Android Support Library, revision 4</a> <em>(October 2011)</em> 1453 </p> 1454 <div class="toggle-content-toggleme"> 1455 <dl> 1456 <dt>Changes for v4 support library:</dt> 1457 <dd> 1458 <ul> 1459 <li>Added <code>EdgeEffectCompat</code> to 1460 support {@link android.widget.EdgeEffect}.</li> 1461 1462 <li>Added <code>LocalBroadcastManager</code> to allow applications to easily 1463 register for and receive intents within a single application without 1464 broadcasting them globally.</li> 1465 1466 <li>Added support in <code>ViewCompat</code> to check for and set overscroll 1467 modes for {@link android.view.View}s on Android 2.3 and later.</li> 1468 <li>Changes to Fragment APIs: 1469 <ul> 1470 <li>Added new APIs to control the visibility of new menus.</li> 1471 <li>Added custom animation APIs.</li> 1472 <li>Added APIs in <code>FragmentActivity</code> to retain custom, 1473 non-configuration instance data.</li> 1474 <li>Various bug fixes.</li> 1475 </ul> 1476 </li> 1477 1478 <li>Fixed a {@link android.content.Loader} bug that caused issues in 1479 canceling {@link android.os.AsyncTask}s when running on Froyo and older 1480 versions of the platform. The support 1481 code now uses its own version of {@link android.os.AsyncTask} to keep the same 1482 behavior on all platform versions.</li> 1483 1484 </ul> 1485 </dd> 1486 </dl> 1487 </div> 1488</div> 1489 1490 1491<div class="toggle-content closed"> 1492 <p><a href="#" onclick="return toggleContent(this)"> 1493 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 1494/>Android Support Library, revision 3</a> <em>(July 2011)</em> 1495 </p> 1496 <div class="toggle-content-toggleme"> 1497 <dl> 1498 <dt>Changes for v4 support library:</dt> 1499 <dd> 1500 <ul> 1501 <li>Adds support for {@link android.app.Fragment.SavedState}</li> 1502 <li>Adds {@code MotionEventCompat} to support newer {@link 1503android.view.MotionEvent} APIs</li> 1504 <li>Adds {@code VelocityTrackerCompat} to support a newer {@link 1505android.view.VelocityTracker} APIs</li> 1506 <li>Adds {@code ViewConfigurationCompat} to support a newer {@link 1507android.view.ViewConfiguration} APIs</li> 1508 <li>All new APIs (available only in the support library) that allow you to create UIs 1509with horizontal paging, allowing users to swipe left and right between content views. Classes to 1510support this include: 1511 <ul> 1512 <li>{@code ViewPager}: A {@link android.view.ViewGroup} that manages the 1513layout for the child views, which the user can swipe between.</li> 1514 <li>{@code PagerAdapter}: An adapter that populates the {@code ViewPager} with the 1515views that represent each page.</li> 1516 <li>{@code FragmentPagerAdapter}: An extension of {@code PagerAdapter} for flipping 1517between fragments.</li> 1518 <li>{@code FragmentStatePagerAdapter}: An extension of {@code PagerAdapter} for 1519flipping between fragments that uses the library's support for {@link 1520android.app.Fragment.SavedState}.</li> 1521 </ul> 1522 </li> 1523 </ul> 1524 </dd> 1525 <dt>New v13 support library:</dt> 1526 <dd> 1527 <ul> 1528 <li>Includes the {@code FragmentPagerAdapter} and {@code FragmentStatePagerAdapter} 1529to support the horizontal paging. 1530 <p>These are exactly the same as the APIs added to the v4 support library, but rely on 1531other platform components in Android 3.2. Use this library instead of v4 if you're developing for 1532Android 3.2 and higher (all other APIs in the v4 library are already available with API level 153313).</p> 1534 </li> 1535 </ul> 1536 </dd> 1537 </dl> 1538 </div> 1539</div> 1540 1541 1542<div class="toggle-content closed"> 1543 <p><a href="#" onclick="return toggleContent(this)"> 1544 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 1545/>Android Support Library, revision 2</a> <em>(May 2011)</em> 1546 </p> 1547 <div class="toggle-content-toggleme"> 1548 <dl> 1549 <dt>Changes for v4 library:</dt> 1550 <dd> 1551 <ul> 1552 <li>Support for fragment animations</li> 1553 <li>Fix {@link android.support.v4.app.Fragment#onActivityResult Fragment.onActivityResult()} 1554 bug</li> 1555 </ul> 1556 </dd> 1557 </dl> 1558 </div> 1559</div> 1560 1561 1562<div class="toggle-content closed"> 1563 <p><a href="#" onclick="return toggleContent(this)"> 1564 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" 1565/>Android Support Library, revision 1</a> <em>(March 2011)</em> 1566 </p> 1567 <div class="toggle-content-toggleme"> 1568 <p>Initial release with the v4 library.</p> 1569 </div> 1570</div> 1571 1572