This page provides details about older Support Library package releases. For the most recent Support Library releases, see Recent Support Library Revisions.
Revision 26.0.0 Beta 2
(June 2017)
Please note that 26.0.0-beta2 is a pre-release version. Its API surface is subject to change, and it does not necessarily include features or bug fixes from the latest stable versions of Support Library.
Important: The support libraries are now available through Google's Maven repository. You do not need to download the support repository from the SDK Manager. For more information, see Support Library Setup.
New APIs
- New
JobIntentServiceclass, to help developers schedule tasks in a way that complies with the new Android O background execution limits.
API Diffs
Bug fixes
- Android O SDK drop causes loss of italics in TextViews
- Null pointer exception when connecting to MediaBrowserServiceCompat
- TextInputLayout must set hints on onProvideAutofillStructure()
- Stack overflow when using TextView autosize on O
Revision 26.0.0 Beta 1
(May 2017)
Please note that 26.0.0-beta1 is a pre-release version. Its API surface is subject to change, and it does not necessarily include features or bug fixes from the latest stable versions of Support Library.
Important: The support libraries are now available through Google's Maven repository. You do not need to download the support repository from the SDK Manager. For more information, see Support Library Setup.
Important changes
FragmentActivity.setSupportMediaController()andFragmentActivity.getSupportMediaController()have been removed. Please use the new staticMediaControllerCompat.setMediaController()andMediaControllerCompat.getMediaController()methods.BottomNavigationViewnow callsonNavigationItemReselected()when an already-selected item is selected, rather than callingonNavigationItemSelected().- All instances of the
findViewById()method now return<T extends View> Tinstead ofView. This change has the following implications:- This may result in existing code now having ambiguous return type,
for example if there is both
someMethod(View)andsomeMethod(TextView)that takes the result of a call tofindViewById(). - When using Java 8 source language, this requires an explicit cast to
Viewwhen the return type is unconstrained (for example,assertNotNull(findViewById(...)).someViewMethod()). - Overrides of non-final
findViewById()methods (for example,Activity.findViewById()) will need their return type updated.
- This may result in existing code now having ambiguous return type,
for example if there is both
New APIs
-
FragmentManagerandFragmenthave anisStateSaved()method to allow querying whether or not a transaction will be allowed without state loss. This is especially useful to check when handling anonClick()event before executing any transaction. - Path motion is supported in
AnimatedVectorDrawableCompat. Path motion allows one object animator to change two properties at the same time based on one path; the path is specified asandroid:pathDatain the animator’s XML). - Physics-based
animation:
- New
FlingAnimationthat supports animating with an initial velocity and smoothly slows down. - Subclasses of
DynamicAnimationsupport animating custom property for any object. - Both
SpringAnimationandFlingAnimationcan now animate a float value without requiring aViewor anObjectto be associated with it.
For more information, see the Spring animation and Fling animation preview pages.
- New
-
Font
support in XML:
-
ResourcesCompat.getFontallows loading font resources—including font-family XML—that may be used withTextView.setTypeface(). - When using AppCompat, TextView supports specifying a font resource or
font-family XML via the
android:fontFamilyXML attribute. - Use XML font-family to create families of fonts with style and weight
variations. (If you use the support library classes to do this, use the
app:attributes as well as theandroid:attributes.)
-
- Downloadable
fonts:
- New
FontsContractCompatthat allows you to request fonts from a font provider instead of bundling them in your app. - Fonts can also be requested in XML and used in layouts.
- New
-
Emoji compatibility
library:
-
EmojiCompatcan process a givenCharSequenceand addEmojiSpans. -
EmojiTextViewand other widgets to display emoji. -
FontRequestEmojiCompatConfigto request emoji font from a font provider.
-
-
Autosizing
TextView:
- New methods in
TextViewCompatas well as XML attributes to control autosizing inTextView.
- New methods in
- Leanback playback controls with seek support:
-
- New
PlaybackTransportRowPresenterthat renders playback controls with a SeekBar. - New
PlaybackTransportControlGluethat works withPlaybackTransportRowPresenterand supports seek. - New base class
PlaybackSeekDataProviderfor app to provide seek thumbnails toPlaybackTransportControlGlue.
- New
- Preferences Data Store:
-
PreferenceDataStorenow allows you to implement your own preferences storage, set with new methods inPreferenceandPreferenceManager.
-
Known Issues
- Downloadable Fonts and Emoji compatibility integration with Google Play Services only works on Google Play Services v11+, which is currently available through the Google Play Services beta program.
Bug fixes
-
MediaBrowserCompat.search()API does not work (AOSP issue 262170) -
ViewCompat.postInvalidateOnAnimation()throws exception (AOSP issue 80146) -
onActivityCreated()called for fragments in destroyed Activity -
RecyclerView.isComputingLayout()should return true during prefetch -
When a
Fadetransition is interrupted and reversed, theViewstarts the animation from the beginning. (Fix ported from Android Framework.) -
Transition.Fadeignores initial alpha ofView(AOSP issue 221820)
Revision 26.0.0 Alpha 1
(March 2017)
Please note that 26.0.0-alpha1 is a pre-release version. Its API surface is subject to change, and it does not necessarily include features or bug fixes from the latest stable versions of Support Library.
Important changes
Note: The minimum SDK version has been increased to 14. As a result, many APIs that existed only for API < 14 compatibility have been deprecated. Clients of these APIs should migrate to their framework equivalents as noted in the reference page for each deprecated API.
- The support-percent module has been deprecated. Clients of this module should migrate to the new ConstraintLayout widget, which is provided as a separate artifact in SDK Manager.
- The support-fragment module no longer has a dependency on the support-media-compat module.
New APIs
Many new classes, methods, and constants added to provide backwards-compatible support for platform APIs added in O Preview.
IME_FLAG_NO_PERSONALIZED_LEARNING: IMEs can listen for "no learning" flags for apps that have a private mode, such as browsers. This feature helps IMEs understand if an app is in a private mode, so they can disable their learning or adaptive functionality while the app is in that mode.
For a complete list of API changes between 25.2.0 and 26.0.0-alpha1, see the support library API differences report.
Bug fixes
- In some cases simple
AutoTransitionanimation can be interrupted by view "jumps". (AOSP issue 221816)
Revision 25.4.0
(June 2017)
Important: The support libraries are now available through Google's Maven repository. You do not need to download the support repository from the SDK Manager. For more information, see Support Library Setup.
Important changes
-
executePendingTransactions(),commitNow(),popBackStackImmediate(), and similar transaction calls are not allowed duringFragmentManagerstate changes. Reentrant execution of transactions are unsafe andFragmentManagernow enforces this during its state changes. - Concurrent with this support library release, we are also releasing
multidex
version 1.0.2. This version includes the following important changes:
- Allows multidexing of instrumentation APK.
- Deprecates MultiDexTestRunner (AndroidJUnitRunner should be used instead).
- Provides better protection against some bad archive extraction management of the app.
- Fixes a bug that could lead to abandoned temporary files.
- Provides faster installation when done in concurrent process.
- Fixes an installation bug on API 19 and 20.
New and Modified APIs
Path morphing and path interpolation are supported in AnimatedVectorDrawableCompat. Path morphing
allow the shapes changing from one path (specified as
android:valueFrom) to another path (specified as
android:valueTo), in order to provide complex and attractive visual
effects. Path interpolation allows the interpolators for AnimatedVectorDrawableCompat to be specified
as paths (specified as android:pathData in the interpolator’s
XML).
API Diffs
Fixed issues
- Null pointer exception when connecting to MediaBrowserServiceCompat
- MediaBrowserCompat.search() API does not work (AOSP issue 262170)
- BrowseFragment onItemClicked callbacks broken in 25.3.0
- NullPointerException while scrolling up and down in VerticalGridView in 25.3.1
- ClassCastException in SimpleArrayMap.allocArrays()
Revision 25.3.1
(March 2017)
Fixed issues
SwitchCompatrequires minimum SDK version of 14 or higher. (AOSP issue 251302)- Physics-based animation
updateListenerskips the first frame. BottomNavigationViewlabel animation is broken.
Revision 25.3.0
(March 2017)
Important changes
Support Library version metadata will automatically be added to
AndroidManifest.xml when building from Gradle, which simplifies
tracking versions in public builds. For example:
<meta-data android:name="android.support.VERSION" android:value="25.3.0" />
Deprecations
A number of methods and classes have been deprecated in this release. These deprecated APIs will be removed in a future version and developers should migrate away from them. For more information on how to migrate away from a specific API, refer to its documentation.
ExifInterface- The boolean method
getLatLong(float[])is deprecated. Instead, use the new methodgetLatLong(), which takes no arguments and returnsdouble[]. mediacompatPlaybackStateCompat.Builder.setErrorMessage(CharSequence)is deprecated. Instead, use the new methodsetErrorMessage(int, CharSequence), which is passed an error code and an optional description.EXTRA_SUGGESTION_KEYWORDSis deprecated. Instead, use theMediaBrowserCompatsearch functionality.v7.recyclerviewLinearLayoutManager.getInitialItemPrefetchCount()has been renamed toLinearLayoutManager.getInitialPrefetchItemCount(). The old name is still supported but will be removed in a future release.
New and Modified APIs
appcompat-v7- The new method
ActionBarDrawerToggle.setDrawerSlideAnimationEnabled(boolean)simplifies disabling the navigation drawer toggle icon's animation. customtabs- Added support for message channels. See the
CustomTabsService.requestPostMessageChannel()andCustomTabsService.postMessage()reference for details. dynamic-animation- New physics-based animation library that provides a set of APIs for building animations that dynamically react to user input.
leanback-v17- Added support for parallax backgrounds. See the
Parallaxreference for details. - Added
TimePickerwidget for picking times on a TV interface. mediacompat- Added search functionality. See the
MediaBrowserCompat.search()andMediaBrowserServiceCompat.onSearch()reference for details. - Added support for shuffle and repeat modes. See the
MediaSessionCompat.setRepeatMode()andsetShuffleModeEnabled()reference for details.
Fixed issues
StaggeredGridLayoutManagerthrowsIllegalArgumentException(AOSP issue 230295)RecyclerViewprefetch does not properly handle aRecyclerViewthat is attached but not onscreenLinearLayoutnot recognized by Robolectric- When
Activityis destroyed,onActivityCreated()is improperly called for its fragments AppCompatImageViewconstructor causesArrayIndexOutOfBoundsException- Poor UI performance in
Call.Detailsactivity transition
Revision 25.2.0
(February 2017)
Important Changes
Fixed issues
- This release fixes a severe mediarouter issue in which using an A2DP device and media routing APIs could cause the device to become unresponsive, requiring a reboot.
- The
FragmentManager.FragmentLifecycleCallbacksclass is now static.
Fixed issues
- Showing a slide presentation with screen mirroring causes device to disconnect from Wi-Fi
- Media button did not properly handle media apps that did not register
themselves with
setMediaButtonReceiver() -
VectorDrawableerror with string resource (AOSP issue 232407) TextInputLayoutoverlays hint and text if text is set by XML (AOSP issue 230171)- Memory leak in
MediaControllerCompat(AOSP issue 231441) -
RecyclerViewLayoutTest.triggerFocusSearchInOnRecycledCallback()crashing RecyclerViewcrashes when recycling view holders (AOSP issue 225762)getAllowGeneratedReplies()incorrectly returns false for actions inside aWearableExtender
Revision 25.1.1
(January 2017)
Important: There is a known bug in the android.support.v7.media.MediaRouter
class in revision 25.1.1 and 25.1.0 of the Support Library. If your app uses
the v7 MediaRouter,
you should update to Support Library Revision 25.2.0,
which fixes this bug.
Important Changes
-
Fragment transactions can now be optimized within and across transactions. Optimizing fragment transaction operations can eliminate operations that cancel. For example, suppose two transactions are executed together, one that adds a fragment A and a second one that replaces fragment A with fragment B. In this case, the first operation might be canceled, and only fragment B added. That means that fragment A might not go through the creation/destruction lifecycle.
A side effect of this optimization is that fragments might have state changes out of the expected order. For example, suppose one transaction adds fragment A, a second adds fragment B, then a third removes fragment A. Without optimization, fragment B could expect that while it is being created, fragment A will also exist because fragment A will be removed after fragment B is added. With optimization, fragment B cannot be sure that fragment A will exist while B is being created, because fragment A's creation and destruction may be removed by the optimization.
This optimization is disabled by default. To enable the optimization, call
FragmentTransaction.setAllowOptimization(true). - Fragments can now postpone their transitions and animations until they
are ready using
Fragment.postponeEnterTransition()andFragment.startPostponedEnterTransition(). This API is similar toActivity.postponeEnterTransition()andActivity.startPostponedEnterTransition()used with Activity Transitions.
Fixed issues
-
MediaSessionCompatTestfails withIllegalArgumentException -
DetailsFragment.installTitleView()is not called in 25.1.0 - Fragment transaction keeps ghost view on exit (AOSP issue 230679)
-
BottomNavigationViewneeds spacing between item icon and text (AOSP issue 230653) - Selected listeners are missing from the new
PlaybackFragmentandPlaybackSupportFragment -
TextInputLayoutfocus does not change properly in emulator from support library version 25.1.0 (AOSP issue 230461) - Cannot replace the menu of a
BottomNavigationView(AOSP issue 230343) -
RecyclerViewwithStaggeredGridLayoutManagercrashes with full-span items (AOSP issue 230295) - Crash in
MediaSessionCompatwhen usingsetCallback(null) -
PlaybackGlueHostOldandPlaybackSupportGlueHostOlddon't notify callbacks when playback row changes -
PlaybackOverlayFragmentexample/testcan not start playing -
RecyclerViewFocusRecoveryTestis failing on API 15 - "Screenshots" row is focused to the top of the screen
-
RecyclerViewLayoutTest.triggerFocusSearchInOnRecycledCallback()crashes on API 15 -
setActions()inonSubactionClicked()is broken -
RecyclerViewcrashes when recycling some view holders
Revision 25.1.0
(December 2016)
Important: There is a known bug in the android.support.v7.media.MediaRouter
class in revision 25.1.1 and 25.1.0 of the Support Library. If your app uses
the v7 MediaRouter,
you should update to Support Library Revision 25.2.0,
which fixes this bug.
Important Changes
- Clients of nested
RecyclerViewwidgets (for example, vertical scrolling list of horizontal scrolling lists) can get significant performance benefits by hinting the innerRecyclerViewwidgets’ layout managers how many items to prepare before being scrolled on screen. CallLinearLayoutManager.setInitialPrefetchItemCount(N), where N is the number of views visible per inner item. For example, if your inner, horizontal lists show a minimum of three and a half item views at a time, you can improve performance by callingLinearLayoutManager.setInitialPrefetchItemCount(4). Doing so allowsRecyclerViewto create all relevant views early, while the outerRecyclerViewis scrolling, which significantly reduces the amount of stuttering during scrolls. FragmentActivity.setSupportMediaController()andFragmentActivity.getSupportMediaController()have been deprecated. Please use the new staticMediaControllerCompat.setMediaController()andMediaControllerCompat.getMediaController()methods.- When a client specifies a widget tint via appcompat tinting (for example,
appcompat:buttonTint), the client is responsible for providing all necessary states (such as "disabled", "pressed", etc.). This is consistent with how widget tints are specified when using framework tinting.
New and Modified APIs
- Added ExifInterface support library. This library unbundles support for reading Exif information from JPEG and raw formatted files and setting the Exif information on JPEG image files.
Snackbarhas been refactored to allow apps to display custom content.BaseTransientBottomBaris the new base class that exposes the general sliding and animations behavior.- Added a new leanback.media package which contains helper classes to integrate media players into Android TV applications.
- Added
SeekBarPreferencewith customizable layout and attributes to the v7 preference support library. - Added
ArraySetclass to the v4 support library. This class corresponds to the frameworkArraySetclass that was introduced with API level 23. RecyclerViewRecyclerView item prefetching improvements:- Nested
RecyclerViewprefetch enables prefetching of content from aRecyclerViewwithin another scrollingRecyclerView, with API to control how much prefetching is done: - APIs added for custom
LayoutManagerobjects to implement to enable prefetching during scrolls and flings - Improvements to prefetching to do only as much create/bind work as possible in the time between frames
- Nested
Fixed issues
- Password visibility toggle fails accessibility tests.
- Appcompat doesn't respect
state_enabledon pre-L devices. - Added focus recovery mechanism to
RecyclerView. This also fixed support pref fragments broken focus when using DPAD navigation such as on Android TV devices. - Leanback: BrowseFragment crashes with headers disabled and empty adapter.
- Appcompat:
AlertDialogis too wide. InputContentInfoCompatcallsrequestPermission()when it should callreleasePermission().MediaBrowserCompatcrashes.- CoordinatorLayout measures/lays out views when visibility is set to
GONE. - Could not tint
AnimatedVectorDrawableCompaton API level below 24 - Leanback library triggers spurious lint errors
- Palette library caused test failures on every API level
RecyclerViewfailed tests on LeanbackRecyclerViewcrashes when recycling view holders (AOSP issue 225762)Fragment.onDestroy()not called for fragment in backstackCollapsingToolbarLayoutscrim is not drawn when collapsedCoordinatorLayout.offsetChildByInset()throwsIllegalArgumentException- Animating
RecyclerViewitems detach innerRecyclerViews, prevent future prefetches - Attached
RecyclerViewitems can't be nested-prefetched - Prefetch data for nested
RecyclerViewitems is discarded during first layout RecyclerViewprefetch fails if two drag events arrive at same positionRecyclerViewshould speculatively layout while RenderThread is rendering- Night-configured color resources converted to Drawables are not always properly purged from Resources cache
FloatingActionButton: Programmatically setting BackgroundTintList does not work properly (AOSP issue 227428)TextInputLayout: Typeface is not getting set for ErrorView (AOSP issue 227803)TextInputLayoutalways falls back to light error color below API 23 (AOSP issue 221992)FloatingActionButtonshows as pressed when pointer leaves
A complete list of public bug fixes is available on the AOSP Issue Tracker.
Deprecations
A number of methods and classes have been deprecated in this release. These deprecated APIs will be removed in a future version and developers should migrate away from them. For more information on how to migrate away from a specific API, refer to its documentation.
-
android.support.design.widget -
android.support.v17.leanback.appBackgroundManager.getDefaultDimLayer()BackgroundManager.getDimLayer()BackgroundManager.setDimLayer()MediaControllerGlue.MediaControllerGlue(Context,PlaybackOverlayFragment,int[])MediaControllerGlue.MediaControllerGlue(Context,PlaybackOverlayFragment,int[],int[])PlaybackControlGlue.PlaybackControlGlue(Context,PlaybackOverlayFragment,int[])PlaybackControlGlue.PlaybackControlGlue(Context,PlaybackOverlayFragment,int[],int[])PlaybackControlGlue.getFragment()PlaybackControlGlue.getOnItemViewClickedListener()PlaybackControlGlue.onRowChanged()PlaybackControlGlue.pausePlayback()PlaybackControlGlue.skipToNext()PlaybackControlGlue.skipToPrevious()PlaybackControlGlue.startPlayback()PlaybackControlSupportGluePlaybackOverlayFragmentPlaybackOverlaySupportFragment
-
android.support.v17.leanback.widget -
android.support.v4.appFragmentActivity.getSupportMediaController()FragmentActivity.setSupportMediaController()
Revision 25.0.1
(November 2016)
Fixed issues
- The
TextInputLayoutpassword toggle is now disabled by default to avoid unnecessarily overwriting developer-specified end drawables. It may be manually enabled via thepasswordToggleEnabledXML attribute. BottomNavigationViewitems are now single line to match Material spec.RecyclerViewcrashes during prefetch if layout manager is null.BottomNavigationViewelevation is now set properly. (AOSP issue 226182)BottomNavigationViewcrashing when adding menu items programmatically. (AOSP issue 225731)- Fix to
TextInputLayoutleft+right compound drawables. (AOSP issue 225836) RecyclerViewcrashes when recycling view holders. (AOSP issue 225762)- Leanback: TalkBack frequently says the word "null" in split-screen views.
RecyclerView: Rendering problems in Android Studio. (AOSP issue 225753)BottomNavigationViewstill shows menu item as selected afteronNavigationItemSelected()returns false. (AOSP issue 225898)- ForwardingListener throws
NoSuchMethodError. (AOSP issue 225647) TextInputEditTextdoes not show hints in IME extract mode. (AOSP issue 221880)
A complete list of public bug fixes is available on the AOSP Issue Tracker.
Revision 25.0.0
(October 2016)
Important changes
ContextCompatconstructor has been made protected. This class should not be publicly instantiated, but it may be extended by support libraries targeting newer API levels.ActivityCompatconstructor has been made protected. This class should not be publicly instantiated, but it may be extended by support libraries targeting newer API levels.getReferrer(Activity)has been made static.-
android.support.design.widget.CoordinatorLayout.Behavior.isDirty(CoordinatorLayout, V)has been removed. Any client implementations of this method should be removed. -
android.support.v4.media.session.MediaSessionCompat.obtain(Context, Object)has been removed. Usages should be replaced with the more appropriately named methodfromMediaSession(). -
android.support.v4.media.session.MediaSessionCompat.QueueItem.obtain(Object)has been removed. Usages should be replaced with the more appropriately named methodMediaSessionCompat.QueueItem#fromQueueItem. -
android.support.v7.widget.Spacehas been removed. Usages should be replaced withandroid.support.v4.widget.Space.
New APIs
-
android.support.design.widget.BottomNavigationViewclass implements the bottom navigation pattern from the Material Design spec. - New
android.support.v13.view.inputmethodpackage includes classes for accessingandroid.view.inputmethod.InputConnectionfeatures introduced after API level 13. -
android.v7.widget.RecyclerView.DividerItemDecorationclass provides a base implementation for vertical or horizontal dividers between items. - New decorated styles in
android.support.v7.app.NotificationCompat,DecoratedCustomViewStyleandDecoratedMediaCustomViewStyle, mirror classes added in platform API 24.
Fixed issues
A complete list of public bug fixes is available on the AOSP Issue Tracker.
Revision 24.2.1
September 2016
Fixed issues:
FloatingActionButtoncan no longer be anchored to indirect children ofCoordinatorLayout. (AOSP issue 220250)- Image inside
CollapsingToolbarLayoutdoesn’t scale properly withfitsSystemWindows=true. (AOSP issue 220389) CoordinatorLayoutthrowsIndexOutOfBoundsExceptionwhenSnackbaris shown and dismissed. (AOSP issue 220762)TextInputLayoutfails to resolve error text color. (AOSP issue 220305)BatchedCallback.onMoved()callsBatchedCallback.onInserted(). (AOSP issue 220309)TextInputLayoutoverrides right compound drawable. (AOSP issue 220728)
A complete list of public bug fixes is available on the AOSP Issue Tracker.
Revision 24.2.0
August 2016
Release 24.2.0 contains the following changes:
Note: Release 24.2.0 removes support for Android 2.2 (API level 8) and lower. Classes and methods that exist only to serve those system versions are now marked as deprecated and should no longer be used. These deprecated classes and methods may be removed in a future release.
v4 Support Library split
With this release, the v4 Support Library has been split into several smaller modules:
-
support-compat -
Provides compatibility wrappers for new framework APIs, such as
Context.getDrawable()andView.performAccessibilityAction(). -
support-core-utils -
Provides a number of utility classes, such as
AsyncTaskLoaderandPermissionChecker. -
support-core-ui -
Implements a variety of UI-related components, such as
ViewPager,NestedScrollView, andExploreByTouchHelper. -
support-media-compat -
Backports portions of the media framework,
including
MediaBrowserandMediaSession. -
support-fragment -
Backports the fragment
framework. This module has dependencies on
support-compat,support-core-utils,support-core-ui, andsupport-media-compat.
For backwards compatibility, if you list support-v4 in your
Gradle script, your APK will include all of these modules. However, to reduce
APK size, we recommend that you just list the specific modules your app needs.
API updates
- Clients using Custom Tabs can
control whether Instant Apps should open. (Note that Instant Apps are not yet
generally available.) To enable or disable Instant Apps, call
CustomTabsIntent.Builder.setInstantAppsEnabled()or specifyEXTRA_ENABLE_INSTANT_APPS. By default, Custom Tabs will default to enabling Instant Apps, when that feature becomes available. TextInputLayoutadds support for the password visibility toggle from the material design specification.- The new
android.support.transitionpackage backports the Transitions framework to API levels 14 and higher. For more information, see theandroid.support.transitionreference. - The Custom Tabs support library
adds support for using
RemoteViewsin the secondary toolbar. The existingsetToolbarItem()method is now deprecated. AppCompatResourcesadds the ability to load a<vector>(on API level 9 and higher) or<animated-vector>(on API level 11 and higher) from a resource ID, by using the newgetDrawable()method.CoordinatorLayoutnow supports defining inset views, and specifying that other views should dodge the inset views. This allows apps to replicate behavior patterns similar to the wayFloatingActionButtonmoves out of the way of aSnackbar, but for any arbitrary view children. For more information, see theLayoutParams.insetEdgeandLayoutParams.dodgeInsetEdgesreference documentation.- The new
DiffUtilclass can calculate the difference between two collections, and can dispatch a list of update operations that are suitable to be consumed by aRecyclerView.Adapter. -
RecyclerView.OnFlingListenerhas been added to support custom behavior in response to flings. TheSnapHelperclass provides an implementation specifically for snapping child views, and theLinearSnapHelperclass extends this implementation to provide center-aligned snapping behavior similar toViewPager. - The Custom Tabs library now allows clients to request the standard
browser UI, rather than custom tabs UI, by calling
CustomTabsIntent.setAlwaysUseBrowserUI(). This behavior is useful in cases where the browser defaults to custom tabs UI but the user has expressed a preference for the standard browser UI.
Behavior changes
- If you use the appcompat library's day/night functionality, the system
now automatically recreates your activity whenever the day/night mode changes
(either because of the time of day, or because of a call to
AppCompatDelegate.setLocalNightMode()). Snackbarnow draws behind the navigation bar if the status bar is translucent.
MediaRouter library
Bluetooth devices are no longer listed as media routes. Routing audio to Bluetooth devices is now solely controlled at the Android system level.
Deprecations
Deprecated classes and methods are subject to removal in a future release. You should migrate away from these APIs as soon as possible.
- Several methods on the following classes were only required for API 8 and
lower, and should no longer be used. Instead, use the framework
implementations.
android.support.v4.view.KeyEventCompat: Replace withKeyEventandroid.support.v4.view.MotionEventCompat: UseMotionEventandroid.support.v4.view.ViewCompat: UseViewandroid.support.v4.view.ViewConfigurationCompat: UseViewConfiguration
-
AccessibilityServiceInfoCompat.getDescription()has been deprecated in favor ofAccessibilityServiceInfoCompat.loadDescription(), which returns a correctly localized description. - You should not instantiate the
ActivityCompatclass directly. The non-staticgetReferrer(Activity)method will be made static in an upcoming release. CoordinatorLayout.Behavior.isDirty()has been deprecated and is no longer called byCoordinatorLayout. Any implementations, as well as any calls to this method, should be removed.MediaSessionCompat.obtain()has been deprecated and replaced with the more appropriately-named methodfromMediaSession().MediaSessionCompat.QueueItem.obtain()has been deprecated and replaced with the more appropriately-named methodfromQueueItem().- Several abstract classes have been deprecated and replaced with
interfaces that more closely reflect their framework equivalents.
AccessibilityStateChangeListenerCompathas been replaced by theAccessibilityManagerCompat.AccessibilityStateChangeListenerinterface.OnCloseListenerCompathas been replaced by theSearchViewCompat.OnCloseListenerinterface.OnQueryTextListenerCompathas been replaced by theSearchViewCompat.OnQueryTextListenerinterface.
CustomTabsSession.setToolbarItem()has been deprecated and replaced by the RemoteViews-basedsetSecondaryToolbarViews().
Bug fixes
The following known issues have been fixed with release 24.2.0:
- Ensure
SwipeRefreshLayoutindicator is shown whensetRefreshing(true)is called before the first measurement pass (AOSP issue 77712) - Prevent
TabLayoutfrom flickering when changing pages (AOSP issue 180454) - Avoid
ClassNotFoundExceptionwhen unmarshallingSavedStateon API level 11 and lower (AOSP issue 196430)
A complete list of public bug fixes is available on the AOSP Issue Tracker.
Revision 24.1.1
July 2016
Fixed issues:
- Fixes an issue in the 24.1.0 release which affected resource IDs shared between support libraries. This issue caused apps that depended on support libraries with resources (such as design and appcompat) to encounter issues caused by resource ID mismatches.
Revision 24.1.0
July 2016
- Changes for v4 Support Library:
-
NotificationCompat.Action.WearableExtenderhas newgetHintDisplayActionInline()andsetHintDisplayActionInline()methods for compatibility with Android Wear 2.0 Preview. These methods allow an application to specify that an action should be displayed inline with the notification.- Calling
Fragment.setUserVisbileHint()will no longer cause a fragment to become started if the hint has been added to aFragmentTransactionthat is not yet committed. This affects users ofFragmentPagerAdapterthat overridesetUserVisbileHint()and assume a specific lifecycle state of the fragment after callingsuper.setUserVisibleHint(). For more information, see the reference page for docs forFragment.setUserVisbileHint().
Fixed issues:
- TabLayout.setCustomView(null) results in NullPointerException (AOSP issue 214753)
- TabLayout incorrectly highlights custom tabs (AOSP issue 214316)
- AppCompatTextHelper uses incorrectly sorted attribute array (AOSP issue 214366)
- Unable to reference VectorDrawable from drawable container XML when using custom ContextWrapper (AOSP issue 214055)
- ViewDragHelper.saveLastMotion() throws ArrayIndexOutOfBoundsException (AOSP issue 212945)
- BottomSheetBehavior expands to old content height when using setState(STATE_EXPANDED) (AOSP issue 213660)
- CollapsingToolbarLayout doesn’t handle pinnable children with top or bottom margins (AOSP issue 213001)
- Leanback browse title does not support RTL alignment (AOSP issue 213461)
- PagerTabStrip disappears due to missing inherited annotation (AOSP issue 213359)
- Data binding throws NullPointerException when using Boolean to set conditional flags (AOSP issue 191841)
- CoordinatorLayout does not respond to setFitsSystemWindows() (AOSP issue 212720)
- BottomSheetBehavior crashes when setting initial state (AOSP issue 203114)
- ViewPager skips pages if the page index is a large value (AOSP issue 211734)
- BottomSheetBehavior does not work with dynamic layouts (AOSP issue 205226)
Revision 24.0.0
June 2016
- Changes for v4 Support Library:
-
- Added
Fragment.commitNow()for synchronous commit - Added
NotificationCompat.MessagingStylefor multi-party conversations - Added
NotificationManagerCompat.areNotificationsEnabled()andgetImportance() MediaSessionCompatnow mirrors the functionality ofMediaSessionand no longer callssetMediaButtonReceiver()automatically
Note: Only
MediaBrowserServiceCompatin version 24.0.0 is forward-compatible with future versions of Android beyond API 24. If you are using previous versions, update to this version to ensure compatibility. - Added
- Changes for v7 appcompat library:
-
- Added support for referencing themed
ColorStateListobjects from XML
- Added support for referencing themed
- Changes for Design Support Library:
-
- Improvements to
AppBarLayouthandling of elevation usingStateListAnimator
- Improvements to
- Changes for v17 Leanback library:
-
- Added
OnboardingFragmentto provide first-run welcome and setup flow
- Added
- Changes for custom tabs:
-
- Added support for providing a
RemoteViewshierarchy for the secondary toolbar - Added
CustomTabsClient.connectAndInitialize()for one-line warm up
- Added support for providing a
Revision 23.4.0
May 2016
- Changes for v4 Support Library:
-
- Fixed issue where fragments were added in the wrong order. (Issue 206901)
- Fixed issue where app bar wasn't drawn after being scrolled offscreen. (Issue 178037)
- Changes for v7 appcompat library:
-
- Added
AppCompatDelegate.setCompatVectorFromResourcesEnabled()method to re-enable usage of vector drawables inDrawableContainerobjects on devices running Android 4.4 (API level 19) and lower. See AppCompat v23.2 — Age of the vectors for more information. - Fixed an issue in API 23 with
AppCompatDelegate.setDefaultNightMode()not loading correct resources in API level 23. (Issue 206573) - Fixed issue that could cause
NullPointerException. (Issue 207638)
- Added
- Changes for Design Support Library:
-
- Fixed an issue where
TextInputLayoutdoesn't clear error tint aftersetErrorEnabled(false)on API level 21 - 22 (Issue 202829) - Fixed an issue where
FloatingActionButtondoes not return when animations are disabled. (Issue 206416) - Fixed issue in
AppBarLayoutsnap functionality when used withscroll flags. (Issue 207398)scroll|enterAlways|enterAlwaysCollapsed|snap
- Fixed an issue where
- Changes for Vector Drawable library:
-
- Fixed a bug where
VectorDrawableCompatdoes not render correctly inTextViewon API level 23. (Issue 206227)
- Fixed a bug where
Revision 23.3.0
April 2016
- Changes for v4 Support Library:
-
- Added
AppLaunchCheckerto help track how your app has been launched by the user in the past.hasStartedFromLauncher()lets you know if the user has launched your app from the home screen before, or if it has only been started by other means (for example, to view specific web URLs). - Fixed a memory leak in
MediaBrowserServiceCompat.mConnections. (Issue 205220) - Fixed issue where
ViewPagerdoes not account for page margins when flipping page. (Issue 203816) Fragment.onRequestPermissionsResult()is now delivered to child fragments.
- Added
- Changes for v7 appcompat library:
-
- Fixed an issue in
AppCompatSpinnerthat could cause multiple popups to appear. (Issue 205052) - Fixed an issue with how borderless buttons were colored. (Issue 202967)
- Fixed a compatibility issue between
AppCompatDialogFragmentandAlertDialog. (Issue 204805) - Reverted changes to
TintResourcesthat were causing memory and configuration issues. (Issue 205236)
- Fixed an issue in
- Changes for v7 mediarouter library:
-
- Fixed
MediaRouteControllerDialogvolume slider’s behavior. (Issue 202299)
- Fixed
- Changes for v7 Preference library:
-
- Fixed issue where
PreferenceFragmentCompatwould crash ifdividerHeightis specified. (Issue 204778)
- Fixed issue where
- Changes for v7 recyclerview library:
-
- Fixed a bug where
RecyclerViewwould not invoke scroll callbacks if the range of visible items shrank. (Issue 200987) - Fixed a bug where
RecyclerViewwould freeze if it was in linear layout, was weighted, and contained images. (Issue 203276) - Fixed a crash in
OrientationHelper.getStartAfterPadding(). (Issue 180521) - Fixed a crash with usages of
android:nestedScrollingEnabled. (Issue 197932)
- Fixed a bug where
- Changes for Design Support Library:
-
- Fixed a bug where a hidden bottom sheet would handle touch events. (Issue 203654)
- Fixed a layout issue with
BottomSheetBehaviorwhenfitsSystemWindowsis true. (Issue 203057) - Fixed an accessibility issue with
Snackbar. (Issue 182145) - Fixed a crash on
Snackbarswipe. (Issue 203924) - Fixed a bug in
AppBarLayoutwithenterAlways. (Issue 203661) - Fixed a bug where
TextInputLayoutunnecessarily clearsEditTextobject's background color filter. (Issue 203357)
Revision 23.2.1
March 2016
- Changes for v4 Support Library:
-
- Fixed an exception in
DrawableCompat.wrap()andLayerDrawableon API levels 17 to 19. (Issue 201817) - Fixed an
ArrayIndexOutOfBoundsExceptioninViewDragHelper.shouldInterceptTouchEvent(). (Issue 182262) - Fixed a bug in
ViewPagerrelated to scroll calculation for size changes. - Fixed a
NullPointerExceptionwhenDrawerLayout.removeDrawerListener()is called without a setDrawerLayout.DrawerListener. (Issue 202478) - Fixed a bug where
ViewPagerdoes not setAccessibilityEventparameters properly when scrolling. - Fixed an issue that caused lag during device rotation when using
Drawable.wrap(). (Issue 201924)
- Fixed an exception in
- Changes for v7 appcompat library:
-
- Reverted dependency on vector assets so that developers using the
appcompat
library are not forced to use
VectorDrawableand its associated build flags. - Fixed a compatibility issue with Night Mode and API level 23. (Issue 201910)
- Fixed a compatibility issue with
SwitchCompatand API level 7. (Issue 201942) - Fixed an issue with propagating configuration values in Resources objects Issue 201928
- Fixed a compatibility issue where the
android.support.v7.app.NotificationCompat.MediaStylecancel button becomes invisible on API level 21 and below. (Issue 202156) - Fixed a compatibility crash with
AppCompatSpinneron API level 21 and below. (Issue 202246) - Fixed an issue where the
app:textAllCaps = "false"style did not work. (Issue 202117) - Fixed a crash when restoring
SearchView. (Issue 201836) - Fixed a memory leak that occurs when tinting drawable resources using AppCompat. (Issue 202379)
- Fixed an issue with
KeyEventon API level 11 and lower. (Issue 202939)
- Reverted dependency on vector assets so that developers using the
appcompat
library are not forced to use
- Changes for v7 cardview library:
-
- Added Night Mode support for
CardView. (Issue 194497)
- Added Night Mode support for
- Changes for v7 recyclerview library:
-
- Fixed bugs related to various measure-spec methods. (Issue 201856)
- Reduced the lockdown period in which
RecyclerViewdoes not allow adapter changes while calculating a layout or scroll. (Issue 202046) - Fixed a crash when calling
notifyItemChanged()on an item that is out of view. (Issue 202136) - Fixed a crash that occurs when
RecyclerView.LayoutManageradds and removes a view in the same measurement pass. (Issue 193958)
- Changes for v7 mediarouter library:
-
- Fixed a crash that occurs when calling
MediaRouter.getInstance()on API level 17. (Issue 180654)
- Fixed a crash that occurs when calling
- Changes for v17 Leanback Library:
-
- Fixed an issue with
GridLayout.onAddFocusables()that caused the wrong item to be selected. - Fixed issue with
GuidedStepFragmentactions disappearing after an action was collapsed.
- Fixed an issue with
- Changes for Design Support Library:
-
- Fixed a
TabLayoutcrash caused by tab-pooling. (Issue 201827) - Fixed a bug in
NavigationViewthat caused the wrong color to be selected. (Issue 201951) - Fixed a bug where
setBackgroundTintList()was no longer able to change the background color. (Issue 201873) - Fixed an issue where
AppBarLayoutdid not completely scroll out of view when used withandroid:fitsSystemWindows = “true”. (Issue 201822) - Fixed an issue where
BottomSheetDialogdid not display short content views correctly. (Issue 201793) - Fixed an issue where
BottomSheetDialogFragmentmoved sporadically when content inside was changed. (Issue 202125) - Fixed a crash in TextInputLayout counter link
- Fixed a crash that occurred when
TextInputLayout.getCounterMaxLength()restored a saved state. (Issue 202375) - Fixed a
ClassCastExceptionthat occurred when restoring aCoordinatorLayoutusing the saved state of a view that was not aCoordinatorLayout.
- Fixed a
- Changes for VectorDrawableCompat:
-
- Fixed a bug where the wrong variable was read for
android:tintMode. (Issue 201907)
- Fixed a bug where the wrong variable was read for
Revision 23.2.0
February 2016
- Changes for v4 Support library:
-
- Added
MediaBrowserCompatforMediaBrowsersupport, andMediaBrowserServiceCompatforMediaBrowserServicesupport. This is useful when connecting a media app’s background service with UI components, and integrating with Android Auto and Android Wear without requiring API level 21 or higher. - The system now calls
onActivityResult()for a nestedFragmentActivity.
- Added
- Changes for v7 AppCompat library:
-
- Added Night Mode functionality to API level 14 and higher. Switch between Material Light and Material Dark Themes based on the time of day or app-specific setting.
-
- Day and night themes can be found here:
<sdk>/extras/android/support/v7/appcompat/res/values/themes_daynight.xml AppCompatDelegate.setDefaultNightMode(): sets the app’s default mode by passing one of the following constants:-
MODE_NIGHT_AUTOMODE_NIGHT_NOMODE_NIGHT_YESMODE_NIGHT_FOLLOW_SYSTEM
AppCompatDelegate.setLocalNightMode(): overrides the night mode setting for the local app component.AppCompatDelegate.getDefaultNightMode(): returns the default night mode.
- Day and night themes can be found here:
- Changes for v7 mediarouter library:
-
MediaRouteControllerDialognow correctly applies custom app theme colors.
- Changes for Design support library:
-
- Added support for bottom
sheets. An interaction plugin,
BottomSheetBehavior, allows a child view of aCoordinatorLayoutto act as a bottom sheet. The base class,BottomSheetCallback, provides callbacks to monitor bottom sheet events.
- Added support for bottom
sheets. An interaction plugin,
- Changes for the CustomTabs support library:
-
- Chrome Custom Tabs now allows apps to include a bottom bar with action buttons in addition to the existing top action button.
CustomTabsIntent.Builder.addToolBarItem(): adds an action button to a custom tab. You can use this to add multiple buttons.CustomTabsSession.setToolBarItem(): updates the visuals for toolbar items. This method will only succeed if it is given a valid id and the browser session is in the foreground.
- Added VectorDrawable support library:
-
- Added Classes:
-
VectorDrawableCompatAnimatedVectorDrawableCompat
- Adds support for
VectorDrawableassets to apps running on API level 7 or higher.AnimatedVectorDrawableassets are also supported on API level 11 or higher. Vector assets can be considerably smaller than image assets and should help reduce app size by reducing the amount of assets required to support multiple device screens. - This library is now a dependency of the v7 AppCompat library, allowing
developers and AppCompat
to easily use vector drawables. To use
VectorDrawableCompatwithin anImageButtonorImageView, use theapp:srcCompatXML attribute orsetImageResource()method. - To keep referencing attribute IDs on API level 20 or
lower, add the following
apptflag to yourbuild,gradlefile: -
- If you are building with Android Plugin for Gradle 1.5.0 or
lower, add the following to your
build.gradlefile: -
android { defaultConfig { // Stops the Gradle’s automatic rasterization of vectors generatedDensities = [] } // Flag that tells aapt to keep the attribute ids aaptOptions { additionalParameters "--no-version-vectors" } }
- If you are building with Android Plugin for Gradle 2.0.0 or
higher, add the following to your
build.gradlefile: -
android { defaultConfig { vectorDrawables.useSupportLibrary = true } }
- If you are building with Android Plugin for Gradle 1.5.0 or
lower, add the following to your
- Changes for v17 Leanback Library:
-
- Added new capabilities to
GuidedStepFragment, which is a component that guides users through a decision or series of decisions: -
- Added button actions to
GuidedAction: GuidedStepFragment.setButtonActions(): sets a list ofGuidedActionbuttons that the user may select from the Actions view.
- Added button actions to
- Description fields are now editable:
-
GuidedAction.Builder.descriptionEditable(): when passingtrue, sets the action’s description to be editable.GuidedAction.getEditDescription(): returns the editable description as aCharSequence.
- Added drop-down lists of sub-actions:
-
GuidedAction.setSubActions(): sets aGuidedActionlist as a drop-down menu of sub-actions.
- Added the
GuidedDatePickerActionwidget forDatePickerfunctionality:- The date is selected using year, month, and day columns and has a customizable range.
GuidedDatePickerAction.Builder: builder class for theGuidedDatePickerActionobject.GuidedDatePickerAction.Builder.datePickerFormat(String datePickerFormat): set the desired date format by passing the appropriate three-characterString, e.g.“YMD”or“MDY”. Alternatively, use thedatePickerFormatXML attribute.
- Added new capabilities to
- Changes for v7 RecyclerView library:
-
RecyclerViewnow has an opt-in feature called AutoMeasure which allowsRecyclerView.LayoutManagerto easily wrap content or handle various measurement specifications provided by the parent of theRecyclerView. It supports all existing animation capabilities of theRecyclerView.-
- If you have a custom
RecyclerView.LayoutManager, callsetAutoMeasureEnabled(true)to start using the new AutoMeasure API. All built-inRecyclerView.LayoutManagerobjects enable auto-measure by default. RecyclerView.LayoutManagerno longer ignores someRecyclerView.LayoutParamssettings, such asMATCH_PARENTin the scroll direction.Note: These lifted restrictions may cause unexpected behavior in your layouts. Make sure you specify the correct layout parameters.
- If you have a custom
- When updating a
RecyclerView.ViewHolderwith payload information,DefaultItemAnimatornow disables change animations. - You can now modify the
ItemTouchHelperescape velocity to control swipe sensitivity. To make it easier or harder to swipe, overridegetSwipeEscapeVelocity(float defaultValue)and modifydefaultValue.
Revision 23.1.1
November 2015
- Changes for v7 recyclerview library:
-
- Fixed a crash that occurs when you perform a swipe-to-dismiss action that the
ItemTouchHelperutility class provides, and then add an item. (Issue 190500)
- Fixed a crash that occurs when you perform a swipe-to-dismiss action that the
- Changes for v7 preference library:
-
- Fixed an issue with ProGuard usage. (Issue 183261)
- Changes for v17 Leanback Support library:
-
- Fixed a number of internal issues in this library.
- Changes for Design Support library:
-
- Added the
getHeaderViewmethod to theNavigationViewclass. - Fixed a transparent background issue for a
FloatingActionButtonobject on devices running Android 4.0 (API level 15) and lower. (Issue 183315)
- Added the
Revision 23.1.0
October 2015
- Changes for v4 Support library:
-
- Added
OnScrollChangedListenerinterface support to theNestedScrollViewwidget. It allows you to receive callbacks when the scroll X or Y positions change. - Added a
MediaButtonReceiverclass to forward received playback controls to a service that’s managing theMediaSessionCompatclass. TheMediaSessionCompatclass has a constructor that can automatically find a media button receiver in the manifest. A media button receiver is a key part to handling playback controls from hardware or bluetooth controls.
- Added
- Changes for v7 appcompat library:
-
- Added material design
SeekbarandImageButtonwidgets. - Updated the
ImageViewwidget to support the tint feature. - Updated the look-and-feel of the
SwitchCompatwidget.
- Added material design
- Changes for v7 mediarouter library:
-
- Added the following features to the
MediaRouteChooserDialogclass: - Displays a loading page while discovering media route providers.
- Includes a device type icon for easier device identification.
- Sorts the routes according to frequency of use in the current app.
- Supports landscape mode.
- Added the following features to the
MediaRouteControllerDialogclass: - Recognizes screen casting and provides a proper description.
- Supports various album art sizes and aspect ratios, and loads the art asynchronously.
- Automatically selects the content color based on the primary color of the app.
- Adjusts the dialog layout based on available screen space on the device.
- Supports landscape mode.
- Added the following features to the
- Changes for v7 palette library:
-
- Added the
setRegion()method to support extracting color from a specific region of aBitmapobject.
- Added the
- Changes for v7 recyclerview library:
-
- Added an improved animation API to the
ItemAnimatorclass for better customizations: - Change animations no longer enforce two copies of the
ViewHolderobject, which enables item content animations. Also, theItemAnimatorobject decides whether it wants to reuse the sameViewHolderobject or create a new one. - The new information record API gives the
ItemAnimatorclass the flexibility to collect data at the correct point in the layout lifecycle. This information is later passed into the animate callbacks.
- Provided an easy transition plan for this backward-incompatible API change:
- If you’ve previously extended the
ItemAnimatorclass, you can change your base class toSimpleItemAnimatorand your code should work as before. TheSimpleItemAnimatorclass provides the old API by wrapping the new API. - Some methods were removed from the
ItemAnimatorclass. The following code will no longer compile:
Kotlin
recyclerView.itemAnimator.supportsChangeAnimations = false
Java
recyclerView.getItemAnimator().setSupportsChangeAnimations(false)
You can replace it with:
Kotlin
val animator: SimpleItemAnimator? = recyclerView.itemAnimator as? SimpleItemAnimator animator?.supportsChangeAnimations = false
Java
ItemAnimator animator = recyclerView.getItemAnimator(); if (animator instanceof SimpleItemAnimator) { ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false); }
- Added an improved animation API to the
- Changes for v7, v14, and v17 Preference Support library:
-
- Removed APIs for controlling
EditTextdialogs.
- Removed APIs for controlling
- Changes for v17 Leanback Support library:
-
- Added a version of the
GuidedStepFragmentclass for the Support library (extendsandroid.support.v4.app.Fragment), and improved animations and transitions. - Updated the
GuidedStepFragmentclass so it can be placed on top of existing content. - Added the ability to annotate different types of search completions to the
SearchFragmentclass. - Added staggered slide transition support to the
VerticalGridFragmentclass.
- Added a version of the
- Changes for Design Support library:
-
- Added
character counting support to the
TextInputLayoutwidget. - Added edge snapping support to the
AppBarLayoutclass by adding theSCROLL_FLAG_SNAPconstant. When scrolling ends, if the view is only partially visible, the view is snapped and scrolled to its closest edge. - Added support for custom views to the
NavigationViewclass by using theapp:actionLayoutattribute orMenuItemCompat.setActionView()method.
- Added
character counting support to the
- Changes for Custom Tabs Support library:
-
- Added the
enableUrlBarHiding()method to theCustomTabsIntentclass. It lets the client customize whether the URL bar should be hidden automatically on scroll down. - Added the
setActionButton()method to theCustomTabsSessionclass. It lets the client change the icon for a custom action button in an already launched custom tab. - Added the
TAB_SHOWNandTAB_HIDDENconstants as new events for theonNavigationEventmethod of theCustomTabsCallbackclass.
- Added the
Revision 23.0.1
September 2015
- Changes for v7 and v14 Preference Support library:
-
- Added the material design layout and style files. (Issue 183376)
- Changes for v7 appcompat library:
-
- Fixed crash issues for the
Fragmentclass by limiting the use of hardware layers to Android 4.1 (API level 16) and higher. (Issue 183896) - Fixed an issue where hardware buttons did not work when an activity had set the
Toolbarclass to act as theActionBarby using thesetSupportActionBar()method. (Issue 183334) - Updated the
AppCompatDialogFragmentclass so it no longer throws theWindows feature must be requested before adding contenterror. (Issue 183186)
- Fixed crash issues for the
- Changes for Design Support library:
-
- Fixed the
AppBarLayoutclass so it now draws correctly after rotation. (Issue 183109) - Fixed the
TabLayoutclass so it now behaves correctly when a user clicks after a swipe. (Issue 183123)
- Fixed the
- Changes for Custom Tabs Support library:
-
- Lowered the
minSdkVersionvalue from 16 to 15 for version support. - Added a way to generate a
CustomTabsSessionTokenfrom an intent.
- Lowered the
Revision 23
August 2015
- Added new support libraries:
For a complete list of the Support Library changes, see the Support Library API Differences Report.
Revision 22.2.1
July 2015
- Changes for Design Support library:
-
- Added the
hide()andshow()methods to theFloatingActionButtonclass for programmatic triggering of animations. - Added the
LENGTH_INDEFINITEconstant to theSnackbarclass for showing a snackbar until it is dismissed or another snackbar is shown. Also, added thesetActionTextColor(int)andsetActionTextColor(ColorStateList)methods. - Added the
getSelectedTabPosition()method to theTabLayoutclass for retrieving the currently selected tab. - Provided a fully fluent API for the
android.support.v7.app.NotificationCompat.MediaStyleclass for method chaining. - Added convenience methods to the
RecyclerViewfor batch insertion of items.
- Added the
For a complete list of the Support Library changes, see the Support Library API Differences Report.
Revision 22.2.0
May 2015
- Added Design Support library:
-
- Added
TextInputLayoutfor showingEditTexthint and error text as floating labels. - Added
FloatingActionButtonfor implementing a primary action on your interface as a floating action button, supporting either default or mini sizes. - Added
Snackbarfor providing lightweight feedback with an optional action in an animated snackbar. - Added
TabLayoutfor implementing fixed and scrollable tabs as well as easy integration withViewPager. - Added
NavigationViewfor implementing navigation drawer contents, including the ability to inflate menu items via a Menu Resource. - Added
CoordinatorLayout, a general purpose layout, used for building dependencies between sibling views and allowing easy scrolling reactions between components viaCoordinatorLayout.Behavior. Many of the Design Library components rely on being a child of aCoordinatorLayout. - Added
AppBarLayout, a container for aToolbarand other views (such asTabLayout) for reacting to scrolling events by scrolling off the screen, becoming visible in reaction to a downward scroll, or collapsing/uncollapsing before scrolling off/onto the screen. - Added
CollapsingToolbarLayoutfor controlling how aToolbarcollapses. A toolbar may collapse by: pinning components to the top of the screen while it collapses, introducing parallax scrolling of components such as anImageView, or adding a content scrim color when the view is partially collapsed.
- Added
- Changes for v4 support library:
-
- Added the
getContentChangeTypes()andsetContentChangeTypes()methods and related change type fields to theAccessibilityEventCompatclass for accessibility event handling. - Added the
getActiveQueueItemId(),getCustomActions(), andgetExtras()methods with related state fields to thePlaybackStateCompatclass for getting custom actions from the queue. - Added the
addCustomAction(),setActiveQueueItemId(), andsetExtras()methods to thePlaybackStateCompat.Builderclass for adding custom actions to a playback state. - Added the
fromCustomAction()andgetCustomAction()methods to thePlaybackStateCompat.CustomActionclass for getting custom actions from the queue. - Added the
isAttachedToWindow(),offsetLeftAndRight(), andoffsetTopAndBottom()methods to theViewCompatclass for working with views. - Added the
addOnPageChangeListener(),clearOnPageChangeListeners(), andremoveOnPageChangeListener()methods to theViewPagerclass for responding to page changes.Deprecated the
ViewPager.setOnPageChangeListener()method. - Added the
notifySubtreeAccessibilityStateChanged()method to theViewParentCompatclass for notifying a view parent that the accessibility state of one of its descendants has changed. - Added the
translationZ(),translationZBy(),z(), andzBy()methods to theViewPropertyAnimatorCompatclass for adding animation.
- Added the
- Changes for v7 appcompat library:
-
- Added the
onWindowStartingSupportActionMode()method to theAppCompatActivity,AppCompatCallback, andAppCompatDialogclasses for handling action modes started from the current window. - Added the
isHandleNativeActionModesEnabled()andsetHandleNativeActionModesEnabled()methods to theAppCompatDelegateclass for handling native action modes.
- Added the
For a complete list of the Support Library changes, see the Support Library API Differences Report.
Revision 22.1.0
April 2015
- Changes for annotations library:
-
- Added the Annotations library to provide support for enhanced code inspections. Annotations are added as metadata tags that you attach to variables, parameters, and return values to inspect method return values, passed parameters, and local variables and fields.
- Changes for v4 support library:
-
- Added the
ColorUtilsclass to provide a set of color-related utility methods. - Added the
unwrap()andwrap()methods to theDrawableCompatclass , allowing you to usesetTint(),setTintList(), andsetTintMode()on all API level 4 or higher devices. - Added the
TraceCompatclass to write trace events to the system trace buffer, which can then be collected and visualized using the Systrace tool. - Added the
CircularIntArrayclass to create circular integer array data structures. - Added the
clear(),removeFromStart(), andremoveFromEnd()methods to theCircularArrayclass. Also, changed the existing methods in this class to be non-final. - Added the
InputDeviceCompatas a helper class to access data in theInputDeviceCompatclass. - Added the
LayoutInflaterCompatclass as a helper class to access data in theLayoutInflaterCompatclass and added theLayoutInflaterFactoryinterface. - Added classes, methods, and interfaces to support nested scrolling.
- Added the
NestedScrollingChildHelperandNestedScrollingParentHelperhelper classes for implementing nested scrolling parent and child views. - Added the
NestedScrollingChildinterface to be implemented byViewsubclasses. - Added the
NestedScrollingParentandScrollingViewinterfaces to support scrolling operations and provide scroll related APIs. - Added the
getNestedScrollAxes()method to theViewGroupCompatclass. - Added methods to the
ViewParentCompatclass to support nested scrolling. - Added the
NestedScrollViewclass to support nested scrolling parent and child on both new and old versions of Android.
- Added the
- Added methods and constants to the
MotionEventCompatclass for getting axis values and event source. - Updated the
AccessibilityNodeInfoCompatclass to add methods for errors, content invalidation and labels. - Added the following interpolation classes for animation:
FastOutLinearInInterpolator,FastOutSlowInInterpolator,LinearOutSlowInInterpolator,LinearOutSlowInInterpolator, andPathInterpolatorCompat. - Added the
Spaceclass to create gaps between components in general purpose layouts. This class is deprecated in the gridlayout library. - Added the
TextViewCompatclass for accessing features in aTextView. - Added a displacement parameter to the
onPull()method in theEdgeEffectCompatclass.
- Added the
- Changes for v7 appcompat library:
-
- Added tint support to appcompat widgets, including
AppCompatAutoCompleteTextView,AppCompatButton,AppCompatCheckBox,AppCompatCheckedTextView,AppCompatEditText,AppCompatMultiAutoCompleteTextView,AppCompatRadioButton,AppCompatRatingBar,AppCompatSpinner, andAppCompatTextView. - Updated the
AppCompatActivityas the base class for activities that use the support library action bar features. This class replaces the deprecatedActionBarActivity. - Added the
AppCompatCallbackinterface to be implemented for AppCompat to be able to perform callbacks. - Added the
AppCompatDelegateabstract class as a delegate you can use to extend AppCompat's support to any activity. - Added the
AppCompatDialogclass as the base class for AppCompat themed dialogs. - Added the spinner style
AlertDialogandAlertDialog.Builderclasses to provide an AppCompat themedAlertDialog. - Added the
Palette.Builderclass for generatingPaletteinstances.- Added the
from(Bitmap)method to thePaletteclass to start generating a Palette with the returnedPalette.Builderinstance. - Deprecated the
Palette.generate()andPalette.generateAsync()methods.
- Added the
- Added the
getAbsoluteAlignment()method to theGridLayout.Specclass. - Deprecated use of
app:themefor stylingToolbar. You can now useandroid:themefor toolbars on all API level 7 and higher devices andandroid:themesupport for all widgets on API level 11 and higher devices.
- Added tint support to appcompat widgets, including
- Changes for v17 leanback library:
-
- Added
GuidedStepFragment,GuidanceStylistandGuidedActionsStylistto support creating multi-step decision flows.
- Added
- Changes for v7 recyclerview library:
-
- Added
SortedListclasses to display items in a list order and provide notification of changes to the list. - Added the
SortedListAdapterCallbackclass that can bind a sorted list to aRecyclerView.Adapterclass.
- Added
- Changes for v8 renderscript library:
-
- Added the
ScriptIntrinsicHistogramclass for use as a histogram filter. - Added the
ScriptIntrinsicResizeclass for performing a resize of a 2D allocation.
- Added the
- Changes for v4 support library:
-
- Updated the
getDrawable()method to return a drawable object for a specified specific resource ID, screen density, and theme. - Added the
setImportantForAccessibility()method so you can indicate if a view should trigger accessibility events. - Added the
getStatusBarBackgroundDrawable()method so you can get the status bar background drawable. - Added methods to the
NotificationCompat.CarExtender.UnreadConversationclass so Android Auto messaging apps can retrieve additional notification data. - Added the
getProgressCircleDiameter()method to return the diameter of a circle layout. - Changed the default
DrawerLayoutstatus bar color tocolorPrimaryDark.
- Updated the
- Changes for v7 appcompat library:
-
- Added the spinner style
Base_Widget_AppCompat_Spinner_Underlined. - Added tinted widgets styles with
Widget_AppCompat_AutoCompleteTextView,MultiAutoCompleteTextView,TextAppearance_AppCompat_Button, andBase_Widget_AppCompat_RatingBar.
- Added the spinner style
- Changes for v17 leanback library:
-
- Added the
getRecycledPoolSize()andsetRecycledPoolSize()methods to allow customized recycled pool sizes. - Added the
WRAP_CONTENTattribute to the layout width setting to support wrapped content for title icons. - Defined
R.transitionin XML to improve transition updates. - Enabled support for right to left layouts.
- Added the play and pause media key events support to the
PlaybackOverlayFragmentclass. - Added enter and return transitions to the
BrowseFragmentclass and theDetailsFragmentclass. - Added the
replace()method to replace items in an object’s adapter array.
- Added the
- Changes for v7 mediarouter library:
-
- Updated Google Cast icons to use the material design style.
- Updated all the icons used in the
MediaRouterdialogs to use the material design style.
- Changes for v7 recyclerview library:
-
- Added the
getlayoutPosition()andgetadapterPosition()methods to theRecyclerViewclass. - Deprecated the
classgetChildPosition()andfindViewHolderForPosition()methods in theRecyclerViewclass. - Deprecated the
getPosition()method in theRecyclerView.ViewHolderclass. - Deprecated the
getViewPosition()method in theRecyclerView.LayoutParamsclass.
- Added the
- Changes for v4 support library:
-
- Added several
NotificationCompat.WearableExtendermethods to improve the display of barcodes in notifications on wearable devices.
- Added several
- Changes for v4 support library:
-
- Added
NotificationCompat.CarExtenderclass to support Android Auto extensions to notifications.
- Added
- Changes for v7 appcompat library:
-
- Added the
PopupMenuconstructor to support new popup menus. - Added support for a Collapse icon description in the
Toolbarclass. - Updated the
SearchViewwidget to support displaying thecommitIcon. - Removed the
buttonGravityattribute from theToolbarclass.
- Added the
- Changes for v7 cardview library:
-
- Added
setCardBackgroundColor(ColorStateList)API to support changing the background color of theCardView. - Changed the
CardViewto more accurately report its opacity value asTRANSLUCENT.
- Added
- Changes for v7 recyclerview library:
-
- Added
TOUCH_SLOP_DEFAULTandTOUCH_SLOP_PAGINGconstants to theRecyclerViewclass to support touch slop configurations for paging.
- Added
- Changes for v17 leanback library:
-
- Added support to generate v4 code fragments.
- Changed the secondary text color on
CardView.
- Added multidex support library to support multiple Dalvik Executable (DEX) files for multi-dex file support prior to Android 5.0.
- Changes for v4 support library:
-
- Added support for
Fragmenttransitions for devices running Android 5.0 (API level 21). Be aware that transitions have no effect on devices running Android 4.4 and lower. - Added
DocumentFileto ease the transition fromFilewhile working with document trees. However, this class demands more processing overhead compared to the platform'sDocumentsContractAPI added in Android 4.4 (API level 19). So you should switch to usingDocumentsContractwhen running on Android 4.4 and higher.
- Added support for
- Changes for v7 appcompat library:
-
- Added support for material design user interfaces.
- Added
Toolbar, which generalizes the functionality ofActionBarfor use within app layouts. - Updated
ActionBarDrawerToggle, which contains the menu-to-arrow animation - Updated common user interface widgets to allow tinting via theme attributes when running on pre-Android 5.0 devices
- Added
SwitchCompat, a backport of theSwitchwidget that was added in Android 4.0 (API level 14).
- New v7 cardview library:
-
- Added the
CardViewwidget, which provides a material design-compatible implementation for displaying data items.
- Added the
- New v7 recyclerview library:
-
- Added the
RecyclerViewwidget, which provides a flexible list view for providing a limited window into a large data set.
- Added the
- New v7 palette library:
-
- Added
Paletteclass, which lets you extract prominent colors from an image.
- Added
- New v17 leanback library:
-
- Added support for building TV user interfaces, including
BrowseFragment,DetailsFragment, andPlaybackOverlayFragment. For more information about using these user interface widgets, see Building TV Playback Apps.
- Added support for building TV user interfaces, including
- Changes for v4 support library:
-
- Added extended notification support for Android Wear in
NotificationCompat.WearableExtender, which allows you to specify wearable-specific features in your notifications. - Added
NotificationCompat.Action.WearableExtender, which allows actions to be added on wearable notifications. - Added
NotificationManagerCompat, which allows you to issue notifications that properly support wearable features. - Added
RemoteInput, which allows a handheld device to receive voice input from a notification that appears on a wearable device. - Improved the handling of touch feedback in
SwipeRefreshLayout.
- Added extended notification support for Android Wear in
- Changes for v4 support library:
-
- Added the
SwipeRefreshLayoutclass, which enables users to refresh the contents of a view with a vertical swipe gesture. - Fixed accessibility issues with navigation drawers.
- Added the
- Changes for v7 appcompat library:
-
- Fixed background issues with the action bar.
- Changes for v4 support library:
-
- Improved
PrintHelperby adding asynchronous handling of printing. - Fixed the
DrawerLayoutclass approximation of theaddChildrenForAccessibility()method. - Fixed slide drawable mirroring in
ActionBarDrawerToggle. - Fixed off-by-one issue when removing an item from a collection iterator.
- Improved
- Changes for v7 mediarouter library:
-
- Improved route identification by using full component name in the
MediaRouteProvider.ProviderMetadata. - Updated
MediaRouteChooserDialogto hide disabled routes.
- Improved route identification by using full component name in the
- Changes for v8 renderscript library
-
- Added error propagation for the RenderScript thunking layer.
- Changes for v4 support library:
-
- Added support for external Storage APIs with the
getObbDirs(),getExternalFilesDirs(),getExternalCacheDirs(), andgetStorageState(). These helper methods always return a single file object on devices running Android 4.3 (API level 18) and earlier. When running on Android 4.4 (API level 19) and higher, these methods may return more than one file object. - Added
PrintHelperclass that works with the Print APIs to print images with a minimum of code. - Added drag-to-open user interface support for pop-up menus. For more information, see
PopupMenuCompatandListPopupWindowCompat. - Improved accessibility support with the addition of a
findFocus()method inAccessibilityNodeProviderCompatand thegetLiveRegion()method inAccessibilityNodeInfoCompat. - Added helper class
ScaleGestureDetectorCompatfor accessing new scaling gesture methods. - Fixed problem with
ActionBarDrawerTogglein right-to-left language displays. - Modified
AutoScrollHelperoption to consume touch events or allow them to be passed through to other views.
- Added support for external Storage APIs with the
- Changes for v7 mediarouter library:
-
- Added support for media playback queuing, setting HTTP header values and media playback duration.
- Added explicit start, get, and end session actions for explicitly managing media playback sessions with media router.
- Changes for v4 support library:
-
- User interface
- Added
BidiFormatterfor handling text strings that combine right to left and left to right-formatted text. - Modified
ViewPagerto better handle cases where the pager has a measured width of zero in the initial layout processing. - Modified
DrawerLayoutandSlidingPaneLayoutto not throw exceptions for measurement while the project code is being edited.
- Added
- Accessibility
- Added
ExploreByTouchHelperto simplify the implementation of accessibility for custom views. - Fixed a problem with
ViewPagerincorrectly populatingTYPE_VIEW_SCROLLEDaccessibility events. - Fixed a null pointer exception in
ViewPagerwhen populating an accessibility event. - Simplified
AccessibilityNodeInfoCompatby changingCharSequenceinputs toStringobjects. - Deprecated an
AccessibilityRecordCompatconstructor that used anObjectas input.
- Added
- Media
- Added
TransportMediatorhelper class to manage media transport control, such as play, pause, skip and other media actions. - Added
DisplayManagerCompatfor managing display output to one or more device displays.
- Added
- Other changes
- Added
WakefulBroadcastReceiverhelper class for implementing a common pattern of detecting a device wakeup event and passing work off to aServicewhile ensuring that the device does not go back to sleep before the handoff is complete. - Added two new APIs,
commitContentChanged()androllbackContentChanged(), toAsyncTaskLoaderto help deal with background updates for data changes that are subsequently canceled.
- Added
- User interface
- New v7 appcompat library:
-
- Added
ActionBarto allow implementation of the action bar user interface design pattern back to Android 2.1 (API level 7) and higher. Use of this class requires that you implement your activity by extending the newActionBarActivityclass.
- Added
- New v7 mediarouter library:
-
Added a new mediarouter library that provides support for the Google Cast developer preview. The v7 mediarouter library APIs provide a means of controlling the routing of media channels and streams from the current device to external screens, speakers, and other destination devices, with compatibility back to Android 2.1 (API level 7). See V7 mediarouter library for more information.
The v7 mediarouter library APIs introduced in Support Library r18 are subject to change in later revisions of the Support Library. At this time, we recommend using the library only in connection with the Google Cast developer preview.
- Changes for v4 support library:
-
- Added
DrawerLayoutfor creating a Navigation Drawer that can be pulled in from the edge of a window. - Added
SlidingPaneLayoutwidget for creating linked summary and detail views that appropriately adapt to various screen sizes. - Added
ActionBarDrawerToggleas a way to tie together the functions ofDrawerLayoutandActionBar. - Added
ViewDragHelperas a new common component for dragging views within a parent view. - Added
ScrollerCompatto provideScrollerandOverScrollercompatibility support. - Added
FileProviderto allow sharing of private files between applications. - Updated
ViewPagerto throw an exception if the associatedPagerAdapterclass is modified without a call tonotifyDataSetChanged(). - Fixed an issue with
ViewPagerchildren drawing sort order. - Fixed
GestureDetectorCompatto dispatch missingonSingleTapConfirmed(MotionEvent)calls between tap timeout and long press events.
- Added
- New v7 gridlayout library:
-
- Added
GridLayoutto provide support for theGridLayoutlayout object. - Added
android.support.v7.widget.Spacewhich can be used to create blank areas within aGridLayoutlayout object.
- Added
- Changes for v4 support library:
-
- Improved interaction behavior for
ViewPager. - Fixed a bug that could cause
ViewPagerto select the wrong page. - Fixed use of
removeView()method during layout forViewPager. - Fixed issue with
SearchViewCompatwhere using the back button to dismiss does not clear the search text. This fix only applies to host API levels 14 and higher.
- Improved interaction behavior for
- Changes for v4 support library:
-
- User Interface
- Added support for nested
Fragmentclasses. - Added improvements to
FragmentManagerdebugging. - Fixed problem in
FragmentTabHostwhere fragment and tab interaction could result in aListViewstate loss. - Fixed issue with user-visible hint in
FragmentStatePagerAdapter. - Added
PageTransformerinterface toViewPagerto allow applications to supply a custom transition behavior for scrolling. - Added new features and fixes to
TaskStackBuilderfrom current release. - Fixed
PagerTitleStripto correctly track thePagerAdaptercurrently in use. - Fixed display flickering, positioning, and text clipping problems with
PagerTitleStrip. - Fixed
PagerTabStripto properly respect padding when drawing an underline.
- Added support for nested
- Accessibility
- Added support for new accessibility gesture and touch event types in
AccessibilityEventCompat. - Added support for new accessibility APIs in
ViewCompat. - Added support for
performAccessibilityAction()method toViewCompat.
- Added support for new accessibility gesture and touch event types in
- Added support for gestures with
GestureDetectorCompat. - Added support for performing atomic operations on files using a new
AtomicFileclass. - Added support for the full set of
makemethods inIntentCompat. - Added
trimToSize()method inLruCacheutility class. - Updated
ConnectivityManagerCompatto get NetworkInfo from aCONNECTIVITY_ACTIONbroadcast.
- User Interface
- Changes for v4 support library:
-
- Added support for notification features introduced in Android 4.1 (API level 16) with
additions to
NotificationCompat.
- Added support for notification features introduced in Android 4.1 (API level 16) with
additions to
- Changes for v4 support library:
-
- User Interface Support
- Added
PagerTabStripsupport, providing enhanced functionality beyondPagerTitleStrip. - Fixed various bugs for
PagerTitleStripandPagerTabStrip, includingsetAllCapsoption, title alignment, appearance improvements, minimum width constraints and touch navigation issues. - Added support for
ViewPagerpage gutters, which helps theViewPagerclass provide paging support for content with a large horizontal scroll range, such as a map. - Fixed numerous bugs for
ViewPager, including size and data set change problems, page positioning, user interaction, scroll tracking and keyboard navigation problems. - Fixed many bugs for
Fragment, including proper handling ofonActivityResult()when the target fragment no longer exists, dispatching selection events to invisible fragments, improvedFragmentTransaction.replace()behavior and added better state handling for fragments being moved out of view. - Added support for the
postOnAnimation()method inViewCompat. - Updated
NavUtilsto use Android 4.1 (API level 16) Up navigation functionality when available.
- Added
- Accessibility
- Updated accessibility support classes, including
AccessibilityNodeInfoCompat, to follow fixes made in Android 4.1 (API level 16). - Added support for accessibility scroll actions in
ViewPager.
- Updated accessibility support classes, including
- General improvements
- Updated
TaskStackBuilderto reflect API changes in Android 4.1 (API level 16). - Enhanced
TaskStackBuilderto allow it to be used from a Service. - Added support for
EXTRA_HTML_TEXTtoShareCompat. - Updated
NotificationCompat.Builderto support thesetNumber()method. - Added support in
ConnectivityManagerCompatfor theisActiveNetworkMetered()method.
- Updated
- User Interface Support
- Changes for v4 support library:
-
- Fixed intent flags for
PendingIntentobjects generated byTaskStackBuilder. - Removed unused attributes from the gridlayout library projects to make sure the library can be built with API level 7 and higher.
- Added
.classpathand.projectfiles for the gridlayout library project.
- Fixed intent flags for
- Changes for v4 support library:
-
- Added
ShareCompat, which provides helper classes for sending and receiving content for social sharing applications, including new metadata for attributing shared data to the source app. This class also provides compatible integration with the newShareActionProviderin Android 4.0. - Added
NavUtilsandTaskStackBuilderto provide support for implementing the Android Design guidelines for navigation. These additions include a way to implement the action bar's Up button across versions. For an example implementation of this pattern, see the AppNavigation sample in (<em><sdk></em>/samples/<em><platform></em>/AppNavigation). - Added
NotificationCompat.Builderto provide a compatibility implementation of Android 3.0'sNotification.Builderhelper class for creating standardized system notifications.
- Added
- Changes for v4 support library:
-
- Changes to ViewPager:
- Added extra decorative view support for
ViewPager. Decorative views may be supplied as child views of a pager in XML layout. - Added
PagerAdapter.getPageTitle()to supply title strings for pages, which defaults to no title for each page. - Added
PagerTitleStrip, a non-interactive title strip, that can be added as a child of ViewPager. Developers can supply text appearance and color, as well as layout sizing and gravity information. - Updated
PagerAdaptermethods to take ViewGroup objects, rather than View to avoid class casting in adapter implementations. - Updated
ViewPagerto use Launcher-style fling behavior. - Bug fixes for user interface interaction and test automation.
- Added extra decorative view support for
- Support for Fragments:
- Changed
setStartDeferred()method tosetUserVisibleHint(boolean). - Added deferred start for off-screen pages to improve performance.
- Changed
- Support for Accessibility APIs:
- Updated
AccessibilityDelegateCompatmethods to return empty lists instead of null. - Added new APIs needed by the v4 samples.
- Updated
- Changes to ViewPager:
- Changes for v4 support library:
-
- Support for Accessibility APIs:
- Added
AccessibilityDelegateCompatto supportView.AccessibilityDelegate. - Added
AccessibilityEventCompatto supportAccessibilityEvent. - Added
AccessibilityManagerCompatto supportAccessibilityManager. - Added
AccessibilityNodeInfoCompatto supportAccessibilityNodeInfo. - Added
AccessibilityRecordCompatto supportAccessibilityRecord. - Added
AccessibilityServiceInfoCompatto supportAccessibilityServiceInfo. - Added
ViewGroupCompatto support accessibility features inViewGroup. - Modified
ViewCompatto support accessibility features inView.
- Added
- Changes to ViewPager:
- Added support for margins between pages.
An optional
Drawablecan be provided to fill the margins. - Added support for
EdgeEffect. - Added support for keyboard navigation
- Added support to control how many pages are kept to either side of the current page.
- Improved touch physics.
- Bug fixes for user interface behavior.
- Added support for margins between pages.
An optional
- Support for Accessibility APIs:
- Changes for v4 support library:
-
- Added
EdgeEffectCompatto supportEdgeEffect. - Added
LocalBroadcastManagerto allow applications to easily register for and receive intents within a single application without broadcasting them globally. - Added support in
ViewCompatto check for and set overscroll modes forViews on Android 2.3 and later. - Changes to Fragment APIs:
- Added new APIs to control the visibility of new menus.
- Added custom animation APIs.
- Added APIs in
FragmentActivityto retain custom, non-configuration instance data. - Various bug fixes.
- Fixed a
Loaderbug that caused issues in cancelingAsyncTasks when running on Froyo and older versions of the platform. The support code now uses its own version ofAsyncTaskto keep the same behavior on all platform versions.
- Added
- Changes for v4 support library:
-
- Adds support for
Fragment.SavedState - Adds
MotionEventCompatto support newerMotionEventAPIs - Adds
VelocityTrackerCompatto support a newerVelocityTrackerAPIs - Adds
ViewConfigurationCompatto support a newerViewConfigurationAPIs - All new APIs (available only in the support library) that allow you to create UIs
with horizontal paging, allowing users to swipe left and right between content views. Classes to
support this include:
ViewPager: AViewGroupthat manages the layout for the child views, which the user can swipe between.PagerAdapter: An adapter that populates theViewPagerwith the views that represent each page.FragmentPagerAdapter: An extension ofPagerAdapterfor flipping between fragments.FragmentStatePagerAdapter: An extension ofPagerAdapterfor flipping between fragments that uses the library's support forFragment.SavedState.
- Adds support for
- New v13 support library:
-
- Includes the
FragmentPagerAdapterandFragmentStatePagerAdapterto support the horizontal paging.These are exactly the same as the APIs added to the v4 support library, but rely on other platform components in Android 3.2. Use this library instead of v4 if you're developing for Android 3.2 and higher (all other APIs in the v4 library are already available with API level 13).
- Includes the
- Changes for v4 library:
-
- Support for fragment animations
- Fix
Fragment.onActivityResult()bug
Revision 22
March 2015
Revision 21.0.3
December 2014
Revision 21.0.2
November 2014
Revision 21.0.1
November 2014
Revision 21
October 2014
Revision 20
July 2014
Revision 19.1.0
March 2014
Revision 19.0.1
December 2013
Revision 19
October 2013
Revision 18
July 2013
Revision 13
May 2013
Revision 12
February 2013
Revision 11
November 2012
Revision 10
August 2012
Revision 9
June 2012
Revision 8
April 2012
Revision 7
March 2012
Revision 6
December 2011
Note: Reference for support library APIs are now available with
the framework references, for example: android.support.v4.app.
Revision 5
December 2011
Revision 4
October 2011
Revision 3
July 2011
Revision 2
May 2011
Revision 1
March 2011
Initial release with the v4 library.