This page provides details about older Support Library package releases. For the most recent Support Library releases, see Recent Support Library Revisions.
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.
JobIntentService class, to help
developers schedule tasks in a way that complies with the new Android O
background execution limits.
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.
FragmentActivity.setSupportMediaController() and
FragmentActivity.getSupportMediaController()
have been removed. Please use the new static MediaControllerCompat.setMediaController() and MediaControllerCompat.getMediaController() methods.
BottomNavigationView now calls
onNavigationItemReselected() when an already-selected item is selected,
rather than calling
onNavigationItemSelected().
findViewById() method now return
<T extends View> T instead of View. This change
has the following implications:
someMethod(View) and
someMethod(TextView) that takes the result of a call to
findViewById().
View when the return type is unconstrained (for example,
assertNotNull(findViewById(...)).someViewMethod()).
findViewById() methods (for
example, Activity.findViewById()) will need their return
type updated.
FragmentManager and Fragment have an
isStateSaved() method to allow querying whether or not a
transaction will be allowed without state loss. This is especially useful
to check when handling an onClick() event before executing any
transaction.
AnimatedVectorDrawableCompat.
Path motion allows one object animator to change two properties at the same
time based on one path; the path is specified as
android:pathData in the animator’s XML).
FlingAnimation that supports animating with an
initial velocity and smoothly slows down.
DynamicAnimation support animating custom
property for any object.
SpringAnimation and FlingAnimation can
now animate a float value without requiring a View or an
Object to be associated with it.
For more information, see the Spring animation and Fling animation preview pages.
ResourcesCompat.getFont allows loading font
resources—including font-family XML—that may be used with
TextView.setTypeface().
android:fontFamily XML attribute.
app: attributes as well as the android:
attributes.)
FontsContractCompat that allows you to request fonts
from a font provider instead of bundling them in your app.
EmojiCompat can process a given CharSequence
and add EmojiSpans.
EmojiTextView and other widgets to display emoji.
FontRequestEmojiCompatConfig to request emoji font from a
font provider.
TextViewCompat as well as XML attributes
to control autosizing in TextView.
PlaybackTransportRowPresenter that renders playback
controls with a SeekBar.
PlaybackTransportControlGlue that works with
PlaybackTransportRowPresenter and supports seek.
PlaybackSeekDataProvider for app to
provide seek thumbnails to PlaybackTransportControlGlue.
PreferenceDataStore now allows you to implement your own
preferences storage, set with new methods in Preference
and PreferenceManager.
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
Fade transition is interrupted and reversed, the
View starts the animation from the beginning. (Fix ported from
Android Framework.)
Transition.Fade ignores initial alpha of View
(AOSP issue 221820)
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.
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.
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.
AutoTransition
animation can be interrupted by view "jumps".
(AOSP issue 221816)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.
executePendingTransactions(), commitNow(), popBackStackImmediate(), and similar transaction calls are not allowed during
FragmentManager state changes. Reentrant
execution of transactions are unsafe and FragmentManager now enforces this during its state
changes.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).
SwitchCompat requires minimum SDK
version of 14 or higher. (AOSP issue 251302)
updateListener skips the first frame.
BottomNavigationView label animation
is broken.
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" />
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
getLatLong(float[])
is deprecated. Instead, use the new method getLatLong(),
which takes no arguments and returns double[].
mediacompat
PlaybackStateCompat.Builder.setErrorMessage(CharSequence) is deprecated.
Instead, use the new method
setErrorMessage(int, CharSequence),
which is passed an error code and an optional description.
EXTRA_SUGGESTION_KEYWORDS is deprecated. Instead, use the
MediaBrowserCompat search functionality.
v7.recyclerview
LinearLayoutManager.getInitialItemPrefetchCount() has been
renamed to LinearLayoutManager.getInitialPrefetchItemCount().
The old name is still supported but will be removed in a future release.
appcompat-v7
ActionBarDrawerToggle.setDrawerSlideAnimationEnabled(boolean)
simplifies disabling the navigation drawer toggle icon's animation.customtabsCustomTabsService.requestPostMessageChannel()
and
CustomTabsService.postMessage()
reference for details.dynamic-animationleanback-v17Parallax
reference for details.TimePicker
widget for picking times on a TV interface.mediacompat
MediaBrowserCompat.search()
and
MediaBrowserServiceCompat.onSearch()
reference for details.MediaSessionCompat.setRepeatMode()
and
setShuffleModeEnabled()
reference for details.StaggeredGridLayoutManager throws IllegalArgumentException
(AOSP issue 230295)RecyclerView prefetch does not properly handle a RecyclerView that is attached but not onscreenLinearLayout not recognized by RobolectricActivity is destroyed, onActivityCreated() is improperly called for its fragmentsAppCompatImageView constructor causes ArrayIndexOutOfBoundsExceptionCall.Details activity transitionFragmentManager.FragmentLifecycleCallbacks
class is now static.setMediaButtonReceiver()
VectorDrawable error with string resource (AOSP issue 232407)
TextInputLayout overlays hint and
text if text is set by XML (AOSP issue 230171)
MediaControllerCompat (AOSP issue
231441)
RecyclerViewLayoutTest.triggerFocusSearchInOnRecycledCallback()
crashing
RecyclerView crashes when recycling
view holders (AOSP issue 225762)
getAllowGeneratedReplies() incorrectly returns false for actions inside a
WearableExtender
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.
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).
Fragment.postponeEnterTransition() and Fragment.startPostponedEnterTransition(). This API is similar to Activity.postponeEnterTransition() and Activity.startPostponedEnterTransition() used with Activity Transitions.
MediaSessionCompatTest fails with
IllegalArgumentException
DetailsFragment.installTitleView() is not called in 25.1.0
BottomNavigationView needs spacing
between item icon and text
(AOSP issue 230653)
PlaybackFragment and
PlaybackSupportFragment
TextInputLayout focus does not change
properly in emulator from support library version 25.1.0 (AOSP issue
230461)
BottomNavigationView (AOSP
issue 230343)
RecyclerView
with StaggeredGridLayoutManager
crashes with full-span items (AOSP issue 230295)
MediaSessionCompat when
using setCallback(null)
PlaybackGlueHostOld and
PlaybackSupportGlueHostOld don't notify callbacks when
playback row changes
PlaybackOverlayFragment example
/test can not start playing
RecyclerViewFocusRecoveryTest is failing on API 15
RecyclerViewLayoutTest.triggerFocusSearchInOnRecycledCallback()
crashes on API 15
setActions() in onSubactionClicked() is broken
RecyclerView crashes when recycling some view holders
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.
RecyclerView widgets
(for example, vertical scrolling list of horizontal scrolling lists) can get
significant performance benefits by hinting the inner RecyclerView widgets’ layout managers how many
items to prepare before being scrolled on screen. Call
LinearLayoutManager.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 calling
LinearLayoutManager.setInitialPrefetchItemCount(4). Doing so
allows RecyclerView to create all relevant
views early, while the outer RecyclerView
is scrolling, which significantly reduces the amount of stuttering during
scrolls.
FragmentActivity.setSupportMediaController() and
FragmentActivity.getSupportMediaController()
have been deprecated. Please use the new static MediaControllerCompat.setMediaController() and MediaControllerCompat.getMediaController()
methods.
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.
Snackbar has been refactored to
allow apps to display custom content.
BaseTransientBottomBar is the new base class that exposes the
general sliding and animations behavior.
SeekBarPreference
with customizable layout and attributes to the v7 preference
support library.
ArraySet
class to the v4 support library. This class corresponds to the framework
ArraySet class that was introduced with API level 23.
RecyclerView RecyclerView item
prefetching improvements:
RecyclerView prefetch
enables prefetching of content from a RecyclerView within another scrolling RecyclerView, with API to control how much
prefetching is done:
LayoutManager
objects to implement to enable prefetching during scrolls and flings
state_enabled on pre-L devices.
RecyclerView. This also fixed support pref
fragments broken focus when using DPAD navigation such as on Android TV
devices.
AlertDialog is too wide.
InputContentInfoCompat calls
requestPermission() when it should call releasePermission().
MediaBrowserCompat crashes.
GONE.
AnimatedVectorDrawableCompat on API level
below 24
RecyclerView failed tests on Leanback
RecyclerView crashes when recycling
view holders (AOSP issue 225762)
Fragment.onDestroy()
not called for fragment in backstack
CollapsingToolbarLayout scrim is
not drawn when collapsed
CoordinatorLayout.offsetChildByInset() throws
IllegalArgumentException
RecyclerView items detach
inner RecyclerViews, prevent future
prefetches
RecyclerView items can't be
nested-prefetched
RecyclerView
items is discarded during first layout
RecyclerView prefetch fails if two drag
events arrive at same position
RecyclerView should speculatively
layout while RenderThread is rendering
FloatingActionButton:
Programmatically setting BackgroundTintList does not work properly (AOSP
issue 227428)
TextInputLayout: Typeface is not
getting set for ErrorView (AOSP issue 227803)
TextInputLayout always falls back
to light error color below API 23 (AOSP issue 221992)
FloatingActionButton shows as
pressed when pointer leaves
A complete list of public bug fixes is available on the AOSP Issue Tracker.
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.app
BackgroundManager.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()
PlaybackControlSupportGlue
PlaybackOverlayFragment
PlaybackOverlaySupportFragment
android.support.v17.leanback.widget
android.support.v4.app
FragmentActivity.getSupportMediaController()
FragmentActivity.setSupportMediaController()
TextInputLayout password toggle
is now disabled by default to avoid unnecessarily overwriting
developer-specified end drawables. It may be manually enabled via the
passwordToggleEnabled XML attribute.
BottomNavigationView items are now
single line to match Material spec.
RecyclerView crashes during prefetch if
layout manager is null.
BottomNavigationView elevation is
now set properly. (AOSP issue 226182)
BottomNavigationView crashing when
adding menu items programmatically. (AOSP issue 225731)
TextInputLayout left+right
compound drawables. (AOSP issue 225836)
RecyclerView crashes when recycling
view holders. (AOSP issue 225762)
RecyclerView: Rendering problems in
Android Studio. (AOSP issue 225753)
BottomNavigationView still shows
menu item as selected after onNavigationItemSelected() returns false. (AOSP issue 225898)
NoSuchMethodError. (AOSP
issue 225647)
TextInputEditText does not show
hints in IME extract mode. (AOSP issue 221880)
A complete list of public bug fixes is available on the AOSP Issue Tracker.
ContextCompat constructor has been
made protected. This class should not be publicly instantiated, but it may be
extended by support libraries targeting newer API levels.
ActivityCompat constructor 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 method
fromMediaSession().
android.support.v4.media.session.MediaSessionCompat.QueueItem.obtain(Object)
has been removed. Usages should be replaced with the more appropriately
named method
MediaSessionCompat.QueueItem#fromQueueItem.
android.support.v7.widget.Space has been removed. Usages
should be replaced with android.support.v4.widget.Space.
android.support.design.widget.BottomNavigationView class
implements the bottom
navigation pattern from the Material Design spec.
android.support.v13.view.inputmethod package includes classes
for accessing android.view.inputmethod.InputConnection features introduced after API
level 13.
android.v7.widget.RecyclerView.DividerItemDecoration class
provides a base implementation for vertical or horizontal dividers between
items.
android.support.v7.app.NotificationCompat,
DecoratedCustomViewStyle and
DecoratedMediaCustomViewStyle, mirror classes added in
platform API 24.
A complete list of public bug fixes is available on the AOSP Issue Tracker.
Fixed issues:
FloatingActionButton can no longer
be anchored to indirect children of CoordinatorLayout. (AOSP issue 220250)
CollapsingToolbarLayout doesn’t scale properly
with fitsSystemWindows=true. (AOSP issue 220389)
CoordinatorLayout throws IndexOutOfBoundsException when Snackbar is shown and dismissed. (AOSP issue
220762)
TextInputLayout fails to resolve
error text color. (AOSP issue 220305)
BatchedCallback.onMoved() calls BatchedCallback.onInserted(). (AOSP issue 220309)
TextInputLayout overrides right
compound drawable. (AOSP issue 220728)
A complete list of public bug fixes is available on the AOSP Issue Tracker.
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.
With this release, the v4 Support Library has been split into several smaller modules:
support-compat
Context.getDrawable() and
View.performAccessibilityAction().
support-core-utils
AsyncTaskLoader and PermissionChecker.
support-core-ui
ViewPager, NestedScrollView, and ExploreByTouchHelper.
support-media-compat
MediaBrowser and MediaSession.
support-fragment
support-compat,
support-core-utils, support-core-ui, and
support-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.
CustomTabsIntent.Builder.setInstantAppsEnabled() or
specify
EXTRA_ENABLE_INSTANT_APPS. By default, Custom Tabs will
default to enabling Instant Apps, when that feature becomes available.
TextInputLayout adds support for
the
password visibility toggle from the material design specification.
android.support.transition
package backports the Transitions framework to API levels 14
and higher. For more information, see the android.support.transition reference.
RemoteViews in the secondary
toolbar. The existing setToolbarItem()
method is now deprecated.
AppCompatResources adds 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 new getDrawable() method.
CoordinatorLayout now supports
defining inset views, and specifying that other views should dodge the inset
views. This allows apps to replicate behavior patterns similar to the way
FloatingActionButton moves out of the
way of a Snackbar, but for any
arbitrary view children. For more information, see the
LayoutParams.insetEdge and
LayoutParams.dodgeInsetEdges reference documentation.
DiffUtil class can calculate the difference between two
collections, and can dispatch a list of update operations that are suitable
to be consumed by a RecyclerView.Adapter.
RecyclerView.OnFlingListener has been added to support custom
behavior in response to flings. The SnapHelper
class provides an implementation specifically for snapping child views, and
the LinearSnapHelper
class extends this implementation to provide center-aligned snapping
behavior similar to ViewPager.
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.
AppCompatDelegate.setLocalNightMode()).
Snackbar now draws behind the
navigation bar if the status bar is translucent.
Bluetooth devices are no longer listed as media routes. Routing audio to Bluetooth devices is now solely controlled at the Android system level.
Deprecated classes and methods are subject to removal in a future release. You should migrate away from these APIs as soon as possible.
android.support.v4.view.KeyEventCompat: Replace with KeyEvent
android.support.v4.view.MotionEventCompat: Use MotionEvent
android.support.v4.view.ViewCompat: Use View
android.support.v4.view.ViewConfigurationCompat: Use ViewConfiguration
AccessibilityServiceInfoCompat.getDescription()
has been deprecated in favor of
AccessibilityServiceInfoCompat.loadDescription(),
which returns a correctly localized description.
ActivityCompat class
directly. The non-static getReferrer(Activity) method will be
made static in an upcoming release.
CoordinatorLayout.Behavior.isDirty() has been deprecated and is no longer
called by CoordinatorLayout. 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 method
fromMediaSession().
MediaSessionCompat.QueueItem.obtain() has been deprecated and replaced with
the more appropriately-named method
fromQueueItem().
AccessibilityStateChangeListenerCompat
has been replaced by the
AccessibilityManagerCompat.AccessibilityStateChangeListener
interface.
OnCloseListenerCompat has
been replaced by the SearchViewCompat.OnCloseListener interface.
OnQueryTextListenerCompat
has been replaced by the SearchViewCompat.OnQueryTextListener
interface.
CustomTabsSession.setToolbarItem() has been deprecated and replaced by the
RemoteViews-based
setSecondaryToolbarViews().
The following known issues have been fixed with release 24.2.0:
SwipeRefreshLayout indicator is shown when
setRefreshing(true) is called before the first measurement pass
(AOSP
issue 77712)
TabLayout from flickering when changing pages
(AOSP
issue 180454)
ClassNotFoundException when unmarshalling
SavedState on API level 11 and lower (AOSP issue
196430)
A complete list of public bug fixes is available on the AOSP Issue Tracker.
Fixed issues:
NotificationCompat.Action.WearableExtender
has new getHintDisplayActionInline() and
setHintDisplayActionInline() 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.
Fragment.setUserVisbileHint() will no longer cause a fragment to become
started if the hint has been added to a FragmentTransaction that is not yet committed. This
affects users of FragmentPagerAdapter that
override setUserVisbileHint() and assume a specific lifecycle state of the fragment
after calling super.setUserVisibleHint(). For more information,
see the reference page for docs for Fragment.setUserVisbileHint().
Fixed issues:
Fragment.commitNow()
for synchronous commit
NotificationCompat.MessagingStyle
for multi-party conversations
NotificationManagerCompat.areNotificationsEnabled()
and getImportance()
MediaSessionCompat
now mirrors the functionality of MediaSession and no longer calls setMediaButtonReceiver() automatically
Note: Only MediaBrowserServiceCompat in 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.
ColorStateList objects from XML
AppBarLayout
handling of elevation using StateListAnimator
OnboardingFragment to provide first-run welcome
and setup flow
RemoteViews
hierarchy for the secondary toolbarCustomTabsClient.connectAndInitialize()
for one-line warm upAppCompatDelegate.setCompatVectorFromResourcesEnabled()
method to re-enable usage of vector drawables in DrawableContainer objects on devices
running Android 4.4 (API level 19) and lower. See AppCompat v23.2 — Age of the vectors for
more information.
AppCompatDelegate.setDefaultNightMode() not
loading correct resources in API level 23. (Issue
206573)
NullPointerException. (Issue
207638)
TextInputLayout doesn't clear error
tint after setErrorEnabled(false) on API level 21 - 22 (Issue
202829)
FloatingActionButton does not return
when animations are disabled. (Issue
206416)
AppBarLayout
snap functionality when used with scroll|enterAlways|enterAlwaysCollapsed|snap scroll flags.
(Issue
207398)
VectorDrawableCompat does
not render correctly in
TextView on API level 23. (Issue
206227)
AppLaunchChecker to 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).
MediaBrowserServiceCompat.mConnections. (Issue
205220)
ViewPager
does not account for page margins when flipping page. (Issue
203816)
Fragment.onRequestPermissionsResult() is now delivered to child
fragments.
AppCompatSpinner that could cause
multiple popups to appear. (Issue
205052)
AppCompatDialogFragment and AlertDialog. (Issue
204805)
TintResources that were causing
memory and configuration issues. (Issue
205236)MediaRouteControllerDialog
volume slider’s behavior. (Issue
202299)
PreferenceFragmentCompat would crash
if dividerHeight is specified. (Issue
204778)
RecyclerView would not invoke scroll
callbacks if the range of visible items shrank. (Issue
200987)
RecyclerView would freeze if it was in
linear layout, was weighted, and contained images. (Issue
203276)
OrientationHelper.getStartAfterPadding(). (Issue
180521)
android:nestedScrollingEnabled. (Issue
197932)
BottomSheetBehavior when
fitsSystemWindows is true. (Issue
203057)
Snackbar. (Issue
182145)
Snackbar
swipe. (Issue
203924)
AppBarLayout with
enterAlways. (Issue
203661)
TextInputLayout unnecessarily clears
EditText object's background color filter.
(Issue
203357)
DrawableCompat.wrap() and LayerDrawable on
API levels 17 to 19. (Issue 201817)
ArrayIndexOutOfBoundsException in ViewDragHelper.shouldInterceptTouchEvent(). (Issue
182262)
ViewPager related to
scroll calculation for size changes.
NullPointerException when DrawerLayout.removeDrawerListener() is called without a set DrawerLayout.DrawerListener. (Issue 202478)
ViewPager does not set
AccessibilityEvent parameters properly
when scrolling.
Drawable.wrap(). (Issue 201924)
VectorDrawable and its associated build flags.
SwitchCompat and API level 7. (Issue 201942)
android.support.v7.app.NotificationCompat.MediaStyle
cancel button becomes invisible on API level
21 and below. (Issue 202156)
AppCompatSpinner on API level 21 and below.
(Issue 202246)
app:textAllCaps = "false" style did not
work. (Issue 202117)
SearchView.
(Issue
201836)
KeyEvent on API level 11 and
lower. (Issue 202939)
CardView. (Issue
194497)
RecyclerView does not allow adapter
changes while calculating a layout or scroll. (Issue
202046)
notifyItemChanged() on an item that is out of view. (Issue
202136)
RecyclerView.LayoutManager adds and removes a view in the same
measurement pass. (Issue
193958)
MediaRouter.getInstance() on API level 17. (Issue
180654)
GridLayout.onAddFocusables() that
caused the wrong item to be selected.
GuidedStepFragment actions
disappearing after an action was collapsed.
TabLayout crash
caused by tab-pooling. (Issue
201827)
NavigationView that caused the wrong
color to be selected. (Issue
201951)
setBackgroundTintList() was no longer able to change the background
color. (Issue
201873)
AppBarLayout did not completely scroll
out of view when used with android:fitsSystemWindows = “true”.
(Issue
201822)
BottomSheetDialog did not display
short content views correctly. (Issue
201793)
BottomSheetDialogFragment moved
sporadically when content inside was changed. (Issue
202125)
TextInputLayout.getCounterMaxLength() restored a saved state.
(Issue
202375)
ClassCastException that occurred when restoring a
CoordinatorLayout using the
saved state of a view that was not a CoordinatorLayout.
android:tintMode. (Issue
201907)
MediaBrowserCompat for MediaBrowser support, and MediaBrowserServiceCompat for MediaBrowserService support. 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.
onActivityResult() for a
nested FragmentActivity.
<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_AUTO
MODE_NIGHT_NO
MODE_NIGHT_YES
MODE_NIGHT_FOLLOW_SYSTEM
AppCompatDelegate.setLocalNightMode(): overrides
the night mode setting for the local app component.
AppCompatDelegate.getDefaultNightMode(): returns
the default night mode.
MediaRouteControllerDialog now
correctly applies custom app theme colors.
BottomSheetBehavior, allows a child view of a CoordinatorLayout to act as
a bottom sheet. The base class, BottomSheetCallback, provides
callbacks to monitor bottom sheet events.
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.
VectorDrawableCompat
AnimatedVectorDrawableCompat
VectorDrawable assets to apps
running on API level 7 or higher. AnimatedVectorDrawable assets
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.
VectorDrawableCompat within an ImageButton or
ImageView, use the app:srcCompat XML
attribute or setImageResource()
method.
appt flag to your build,gradle file:
build.gradle file:
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" } }
build.gradle file:
android { defaultConfig { vectorDrawables.useSupportLibrary = true } }
GuidedStepFragment,
which is a component that guides users through a decision or series of decisions:
GuidedAction:
GuidedStepFragment.setButtonActions(): sets a list of
GuidedAction buttons that
the user may select from the Actions view.
GuidedAction.Builder.descriptionEditable(): when passing
true, sets the action’s description to be editable.
GuidedAction.getEditDescription(): returns the editable
description as a CharSequence.
GuidedAction.setSubActions(): sets a GuidedAction list as a drop-down
menu of sub-actions.
GuidedDatePickerAction widget for DatePicker functionality:
GuidedDatePickerAction.Builder: builder class for the GuidedDatePickerAction object.
GuidedDatePickerAction.Builder.datePickerFormat(String
datePickerFormat): set the desired date format by passing the
appropriate three-character String, e.g. “YMD” or “MDY”. Alternatively, use the datePickerFormat XML attribute.
RecyclerView now has an opt-in
feature called AutoMeasure which allows RecyclerView.LayoutManager to easily wrap
content or handle various measurement specifications provided by the
parent of the RecyclerView. It
supports all existing animation capabilities of the RecyclerView.
RecyclerView.LayoutManager,
call setAutoMeasureEnabled(true) to start using the new
AutoMeasure API. All built-in RecyclerView.LayoutManager objects
enable auto-measure by default.
RecyclerView.LayoutManager
no longer ignores some RecyclerView.LayoutParams settings,
such as MATCH_PARENT in the scroll direction.
Note: These lifted restrictions may cause unexpected behavior in your layouts. Make sure you specify the correct layout parameters.
RecyclerView.ViewHolder with payload
information, DefaultItemAnimator
now disables change animations.
ItemTouchHelper escape velocity to
control swipe sensitivity. To make it easier or harder to swipe,
override getSwipeEscapeVelocity(float defaultValue) and modify defaultValue.
ItemTouchHelper utility class provides, and then add an item.
(Issue 190500)getHeaderView method to the NavigationView class.FloatingActionButton object on
devices running Android 4.0 (API level 15) and lower.
(Issue 183315)OnScrollChangedListener interface support to the
NestedScrollView widget. It
allows you to receive callbacks when the scroll X or Y positions change.MediaButtonReceiver class to forward received playback controls
to a service that’s managing the MediaSessionCompat class. The
MediaSessionCompat class 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.Seekbar and ImageButton widgets.ImageView widget to support the tint feature.SwitchCompat widget.MediaRouteChooserDialog class:MediaRouteControllerDialog class:setRegion() method to support extracting color from a specific
region of a Bitmap object.ItemAnimator class for better
customizations:ViewHolder object,
which enables item content animations. Also, the ItemAnimator object
decides whether it wants to reuse the same ViewHolder object or create a
new one.ItemAnimator class the flexibility
to collect data at the correct point in the layout lifecycle. This information is later
passed into the animate callbacks.ItemAnimator class, you can change
your base class to SimpleItemAnimator and your code should work as before.
The SimpleItemAnimator class provides the old API by wrapping the new API.ItemAnimator class. The following
code will no longer compile:recyclerView.itemAnimator.supportsChangeAnimations = false
recyclerView.getItemAnimator().setSupportsChangeAnimations(false)
You can replace it with:
val animator: SimpleItemAnimator? = recyclerView.itemAnimator as? SimpleItemAnimator animator?.supportsChangeAnimations = false
ItemAnimator animator = recyclerView.getItemAnimator(); if (animator instanceof SimpleItemAnimator) { ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false); }
EditText dialogs.GuidedStepFragment class for the Support library
(extends android.support.v4.app.Fragment), and improved animations and
transitions.GuidedStepFragment class so it can be placed on top of
existing content.SearchFragment class.VerticalGridFragment
class.TextInputLayout widget.AppBarLayout class by adding the
SCROLL_FLAG_SNAP constant. When scrolling ends, if the view is only
partially visible, the view is snapped and scrolled to its closest edge.NavigationView class by using the
app:actionLayout attribute or MenuItemCompat.setActionView()
method.enableUrlBarHiding() method to the CustomTabsIntent
class. It lets the client customize whether the URL bar should be hidden automatically
on scroll down.setActionButton() method to the CustomTabsSession
class. It lets the client
change the icon for a custom action button in an already launched custom tab.TAB_SHOWN and TAB_HIDDEN constants as new events
for the onNavigationEvent method of the CustomTabsCallback
class.Fragment class by limiting the use of
hardware layers to Android 4.1 (API level 16) and higher.
(Issue 183896)Toolbar class to act as the
ActionBar by using the setSupportActionBar() method.
(Issue 183334)AppCompatDialogFragment class so it
no longer throws the Windows feature must be requested before adding content
error.
(Issue 183186)AppBarLayout class so it now draws correctly after
rotation.
(Issue 183109)TabLayout class so it now behaves correctly when a
user clicks after a swipe.
(Issue 183123)minSdkVersion
value from 16 to 15 for version support.CustomTabsSessionToken from an intent.For a complete list of the Support Library changes, see the Support Library API Differences Report.
hide() and show() methods to the
FloatingActionButton class for programmatic
triggering of animations. LENGTH_INDEFINITE constant to the
Snackbar class for showing a snackbar
until it is dismissed or another snackbar is shown. Also, added the
setActionTextColor(int) and
setActionTextColor(ColorStateList)
methods. getSelectedTabPosition() method to the
TabLayout class for retrieving the currently
selected tab. android.support.v7.app.NotificationCompat.MediaStyle class for method
chaining. RecyclerView for batch insertion of items. For a complete list of the Support Library changes, see the Support Library API Differences Report.
TextInputLayout for showing
EditText hint and error text as floating labels.
FloatingActionButton for implementing a
primary action on your interface as a
floating action button, supporting either default or mini sizes.
Snackbar for providing lightweight
feedback with an optional action in an animated snackbar.
TabLayout for implementing fixed and
scrollable
tabs as well as easy
integration with
ViewPager.
NavigationView for implementing
navigation drawer
contents, including the ability to inflate menu items via a
Menu Resource.
CoordinatorLayout, a general purpose
layout, used for building dependencies between
sibling views and allowing easy scrolling reactions between components via
CoordinatorLayout.Behavior. Many of the Design
Library components rely on being a child of a
CoordinatorLayout.
AppBarLayout, a container for a
Toolbar
and other views (such as TabLayout) 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.
CollapsingToolbarLayout for controlling
how a Toolbar collapses. A toolbar may collapse by:
pinning components to the top of the screen while it collapses, introducing
parallax scrolling of components such as an ImageView,
or adding a content scrim color when the view is partially collapsed.
getContentChangeTypes()
and
setContentChangeTypes()
methods and related change type
fields to the
AccessibilityEventCompat
class for accessibility event handling.
getActiveQueueItemId(),
getCustomActions(),
and
getExtras()
methods with related state fields to the
PlaybackStateCompat class for
getting custom actions from the queue.
addCustomAction(),
setActiveQueueItemId(),
and
setExtras()
methods to the
PlaybackStateCompat.Builder class for adding
custom actions to a playback state.
fromCustomAction() and
getCustomAction() methods
to the
PlaybackStateCompat.CustomAction class
for getting custom actions from the queue.
isAttachedToWindow(),
offsetLeftAndRight(), and
offsetTopAndBottom()
methods to the ViewCompat class for working with views.
addOnPageChangeListener(),
clearOnPageChangeListeners(), and
removeOnPageChangeListener()
methods to the ViewPager class for responding to page
changes.
Deprecated the
ViewPager.setOnPageChangeListener() method.
notifySubtreeAccessibilityStateChanged() method to
the ViewParentCompat class for notifying a view parent
that the accessibility state of one of its descendants has changed.
translationZ(),
translationZBy(),
z(), and
zBy()
methods to the ViewPropertyAnimatorCompat class for
adding animation.
onWindowStartingSupportActionMode()
method to the
AppCompatActivity,
AppCompatCallback, and
AppCompatDialog classes for handling action modes
started from the current window.
isHandleNativeActionModesEnabled() and
setHandleNativeActionModesEnabled()
methods to the
AppCompatDelegate class for handling native action modes.
For a complete list of the Support Library changes, see the Support Library API Differences Report.
ColorUtils class
to provide a set of color-related utility methods.
unwrap() and
wrap() methods to the
DrawableCompat class , allowing you to use
setTint(),
setTintList(),
and setTintMode()
on all API level 4 or higher devices.
TraceCompat class to
write trace events to the system trace buffer, which can then be collected and
visualized using the Systrace tool.
CircularIntArray class
to create circular integer array data structures.
clear(),
removeFromStart(),
and removeFromEnd()
methods to the CircularArray class. Also, changed the
existing methods in this class to be non-final.
InputDeviceCompat
as a helper class to access data in the
InputDeviceCompat class.
LayoutInflaterCompat
class as a helper class to access data in the
LayoutInflaterCompat class
and added the LayoutInflaterFactory interface.
NestedScrollingChildHelper
and NestedScrollingParentHelper
helper classes for implementing nested scrolling parent and child views.NestedScrollingChild
interface to be implemented by View subclasses.NestedScrollingParent
and ScrollingView interfaces to support
scrolling operations and provide scroll related APIs.getNestedScrollAxes() method to the ViewGroupCompat
class.ViewParentCompat class to
support nested scrolling.
NestedScrollView
class to support nested scrolling parent and child on both new and old versions of
Android.
MotionEventCompat
class for getting axis values and event source.
AccessibilityNodeInfoCompat
class to add methods for errors, content invalidation and labels.
FastOutLinearInInterpolator,
FastOutSlowInInterpolator,
LinearOutSlowInInterpolator,
LinearOutSlowInInterpolator, and
PathInterpolatorCompat.
Space class to create gaps between
components in general purpose layouts. This class is deprecated in the gridlayout library.
TextViewCompat class for accessing
features in a TextView.
onPull() method in the
EdgeEffectCompat class.
AppCompatAutoCompleteTextView,
AppCompatButton,
AppCompatCheckBox,
AppCompatCheckedTextView,
AppCompatEditText,
AppCompatMultiAutoCompleteTextView,
AppCompatRadioButton,
AppCompatRatingBar,
AppCompatSpinner, and
AppCompatTextView.
AppCompatActivity as the base
class for activities that use the support library action bar features. This class
replaces the deprecated ActionBarActivity.
AppCompatCallback interface
to be implemented for AppCompat to be able to perform callbacks.
AppCompatDelegate abstract class
as a delegate you can use to extend AppCompat's support to any activity.
AppCompatDialog class
as the base class for AppCompat themed dialogs.
AlertDialog and
AlertDialog.Builder classes to provide an AppCompat
themed AlertDialog.
Palette.Builder class
for generating Palette instances.
from(Bitmap)
method to the Palette class to
start generating a Palette with the returned
Palette.Builder instance.
Palette.generate() and
Palette.generateAsync() methods.
getAbsoluteAlignment() method to the GridLayout.Spec
class.
app:theme for styling
Toolbar. You can now use
android:theme for toolbars on all API level 7 and higher devices and
android:theme support for all widgets on API level 11 and higher devices.
GuidedStepFragment,
GuidanceStylist and
GuidedActionsStylist to support
creating multi-step decision flows.
SortedList classes to display items in
a list order and provide notification of changes to the list.
SortedListAdapterCallback class
that can bind a sorted list to a
RecyclerView.Adapter class.
ScriptIntrinsicHistogram class for
use as a histogram filter.ScriptIntrinsicResize class for
performing a resize of a 2D allocation.
getDrawable() method to return a drawable object for a specified specific resource ID,
screen density, and theme.
setImportantForAccessibility() method so you can indicate if a view should trigger
accessibility events.
getStatusBarBackgroundDrawable() method so you can get the status bar background
drawable.
NotificationCompat.CarExtender.UnreadConversation
class so Android Auto messaging apps can retrieve additional notification data.
getProgressCircleDiameter() method to return the diameter of a circle layout.
DrawerLayout
status bar color to colorPrimaryDark.
Base_Widget_AppCompat_Spinner_Underlined.Widget_AppCompat_AutoCompleteTextView,
MultiAutoCompleteTextView,
TextAppearance_AppCompat_Button, and
Base_Widget_AppCompat_RatingBar.getRecycledPoolSize() and
setRecycledPoolSize() methods to allow customized recycled pool sizes.WRAP_CONTENT attribute to the
layout width setting to support wrapped content for title icons.R.transition in XML to
improve transition updates. PlaybackOverlayFragment class.BrowseFragment class and the
DetailsFragment class.replace() method to replace items in an object’s adapter array. MediaRouter dialogs to use the
material design style.getlayoutPosition()
and getadapterPosition() methods to the RecyclerView
class.classgetChildPosition() and
findViewHolderForPosition() methods in the
RecyclerView class. getPosition() method in the
RecyclerView.ViewHolder class. getViewPosition() method in the
RecyclerView.LayoutParams class. NotificationCompat.WearableExtender
methods to improve the display of barcodes in notifications on wearable devices.
NotificationCompat.CarExtender
class to support Android Auto extensions to notifications.PopupMenu constructor to support new popup
menus.Toolbar
class.SearchView widget to support displaying
the commitIcon. buttonGravity attribute from the
Toolbar class. setCardBackgroundColor(ColorStateList) API to
support changing the background color of the CardView.CardView to more accurately report its
opacity value as TRANSLUCENT.TOUCH_SLOP_DEFAULT and
TOUCH_SLOP_PAGING constants
to the RecyclerView class
to support touch slop configurations for paging.CardView. Fragment
transitions for devices running Android 5.0 (API level 21).
Be aware that transitions have no effect on devices running
Android 4.4 and lower.
DocumentFile to ease
the transition from File
while working with document trees. However, this class demands
more processing overhead compared to the platform's
DocumentsContract API added in
Android 4.4 (API level 19). So you should switch to using DocumentsContract when running on Android 4.4
and higher.Toolbar, which generalizes
the functionality of ActionBar for
use within app layouts.ActionBarDrawerToggle,
which contains the menu-to-arrow animationSwitchCompat, a backport
of the Switch widget that was added in
Android 4.0 (API level 14).CardView widget, which
provides a material design-compatible implementation for displaying
data items.RecyclerView widget,
which provides a flexible list view for providing a limited window
into a large data set.Palette class,
which lets you extract prominent colors from an image.BrowseFragment,
DetailsFragment, and
PlaybackOverlayFragment.
For more information about using these user interface widgets,
see Building TV
Playback Apps.NotificationCompat.WearableExtender, which allows you
to specify wearable-specific features in your notifications.NotificationCompat.Action.WearableExtender,
which allows actions to be added on wearable notifications.NotificationManagerCompat, which allows you
to issue notifications that properly support wearable features.RemoteInput, which allows a handheld device
to receive voice input from a notification that appears on a wearable device.SwipeRefreshLayout.SwipeRefreshLayout class,
which enables users to refresh the contents of a view with a vertical
swipe gesture.PrintHelper by adding asynchronous
handling of printing.DrawerLayout class approximation of
the addChildrenForAccessibility()
method.ActionBarDrawerToggle.MediaRouteProvider.ProviderMetadata.MediaRouteChooserDialog to hide disabled
routes.getObbDirs(),
getExternalFilesDirs(),
getExternalCacheDirs(),
and getStorageState().
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.PrintHelper class that works with the
Print APIs to print images with a minimum of code.PopupMenuCompat and
ListPopupWindowCompat.findFocus() method in
AccessibilityNodeProviderCompat and the
getLiveRegion() method in
AccessibilityNodeInfoCompat.ScaleGestureDetectorCompat for
accessing new scaling gesture methods.ActionBarDrawerToggle in
right-to-left language displays.AutoScrollHelper option to consume
touch events or allow them to be passed through to other views.BidiFormatter for handling
text strings that combine right to left and left to right-formatted text.ViewPager to better handle cases where the
pager has a measured width of zero in the initial layout processing.DrawerLayout and
SlidingPaneLayout to not throw exceptions for
measurement while the project code is being edited.ExploreByTouchHelper to simplify the
implementation of accessibility for custom views.ViewPager incorrectly
populating TYPE_VIEW_SCROLLED accessibility events.ViewPager when
populating an accessibility event.AccessibilityNodeInfoCompat
by changing CharSequence inputs to String objects.
AccessibilityRecordCompat
constructor that used an Object as input.TransportMediator helper class to manage
media transport control, such as play, pause, skip and other media actions.DisplayManagerCompat for managing
display output to one or more device displays.WakefulBroadcastReceiver helper class for
implementing a common pattern of detecting a device wakeup event and passing work off
to a Service while ensuring that the device does not go back to
sleep before the handoff is complete.commitContentChanged() and
rollbackContentChanged(), to AsyncTaskLoader to
help deal with background updates for data changes that are subsequently canceled.
ActionBar to 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 new
ActionBarActivity class.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.
DrawerLayout for creating a
Navigation
Drawer that can be pulled in from the edge of a window.SlidingPaneLayout widget for creating linked
summary and detail views that appropriately adapt to various screen sizes.ActionBarDrawerToggle as a way to tie
together the functions of DrawerLayout and ActionBar.ViewDragHelper as a new common component
for dragging views within a parent view.ScrollerCompat to provide Scroller and OverScroller compatibility support.
FileProvider to allow sharing of private
files between applications.ViewPager to throw an exception if the
associated PagerAdapter class is modified without a
call to notifyDataSetChanged().
ViewPager children drawing sort
order.GestureDetectorCompat to dispatch missing
onSingleTapConfirmed(MotionEvent) calls
between tap timeout and long press events.GridLayout to provide support for the
GridLayout layout object.android.support.v7.widget.Space which can be used to create blank areas
within a GridLayout layout object.ViewPager.ViewPager to select the
wrong page.removeView() method
during layout for ViewPager.SearchViewCompat where using the
back button to dismiss does not clear the search text. This fix only applies to
host API levels 14 and higher.Fragment classes.FragmentManager debugging.
FragmentTabHost where fragment
and tab interaction could result in a ListView state loss.
FragmentStatePagerAdapter.PageTransformer
interface to ViewPager to allow applications to
supply a custom transition behavior for scrolling.TaskStackBuilder
from current release.PagerTitleStrip to correctly track the
PagerAdapter currently in use.PagerTitleStrip.PagerTabStrip to properly respect padding
when drawing an underline.AccessibilityEventCompat.ViewCompat.performAccessibilityAction() method to ViewCompat.
GestureDetectorCompat.
AtomicFile class.make methods in
IntentCompat.trimToSize() method in
LruCache utility class.ConnectivityManagerCompat to get NetworkInfo
from a CONNECTIVITY_ACTION
broadcast.NotificationCompat.PagerTabStrip support, providing enhanced
functionality beyond PagerTitleStrip.PagerTitleStrip and
PagerTabStrip, including setAllCaps option, title alignment,
appearance improvements, minimum width constraints and touch navigation issues.ViewPager page gutters, which
helps the ViewPager class provide paging support for content with
a large horizontal scroll range, such as a map.ViewPager, including size
and data set change problems, page positioning, user interaction, scroll tracking and keyboard
navigation problems.Fragment, including proper
handling of onActivityResult() when
the target fragment no longer exists, dispatching selection events to invisible fragments, improved
FragmentTransaction.replace() behavior
and added better state handling for fragments being moved out of view.postOnAnimation() method in ViewCompat.NavUtils to use Android 4.1 (API level 16)
Up navigation functionality when available.AccessibilityNodeInfoCompat, to follow fixes made in Android
4.1 (API level 16).ViewPager.TaskStackBuilder to reflect API changes in
Android 4.1 (API level 16).TaskStackBuilder to allow it to be used
from a Service.EXTRA_HTML_TEXT
to ShareCompat.NotificationCompat.Builder to support the
setNumber() method.ConnectivityManagerCompat for the
isActiveNetworkMetered() method.PendingIntent objects generated
by TaskStackBuilder..classpath and .project files for the gridlayout
library project.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
new ShareActionProvider in Android 4.0.NavUtils and TaskStackBuilder to 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).NotificationCompat.Builder to provide a
compatibility implementation of Android 3.0's Notification.Builder helper class
for creating standardized system notifications.Note: Reference for support library APIs are now available with
the framework references, for example: android.support.v4.app.
ViewPager.
Decorative views may be supplied as child views of a pager in XML layout.PagerAdapter.getPageTitle() to supply title strings for pages, which defaults to no
title for each page.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.PagerAdapter methods to take ViewGroup
objects, rather than View to avoid class casting in adapter implementations.ViewPager to use Launcher-style
fling behavior.setStartDeferred() method to setUserVisibleHint(boolean).AccessibilityDelegateCompat methods
to return empty lists instead of null.AccessibilityDelegateCompat
to support View.AccessibilityDelegate.AccessibilityEventCompat
to support AccessibilityEvent.AccessibilityManagerCompat
to support AccessibilityManager.AccessibilityNodeInfoCompat
to support AccessibilityNodeInfo.AccessibilityRecordCompat
to support AccessibilityRecord.AccessibilityServiceInfoCompat
to support AccessibilityServiceInfo.ViewGroupCompat
to support accessibility features in ViewGroup.
ViewCompat
to support accessibility features in View.Drawable can be provided
to fill the margins.EdgeEffect.EdgeEffectCompat to
support EdgeEffect.LocalBroadcastManager to allow applications to easily
register for and receive intents within a single application without
broadcasting them globally.ViewCompat to check for and set overscroll
modes for Views on Android 2.3 and later.FragmentActivity to retain custom,
non-configuration instance data.Loader bug that caused issues in
canceling AsyncTasks when running on Froyo and older
versions of the platform. The support
code now uses its own version of AsyncTask to keep the same
behavior on all platform versions.Fragment.SavedStateMotionEventCompat to support newer MotionEvent APIsVelocityTrackerCompat to support a newer VelocityTracker APIsViewConfigurationCompat to support a newer ViewConfiguration APIsViewPager: A ViewGroup that manages the
layout for the child views, which the user can swipe between.PagerAdapter: An adapter that populates the ViewPager with the
views that represent each page.FragmentPagerAdapter: An extension of PagerAdapter for flipping
between fragments.FragmentStatePagerAdapter: An extension of PagerAdapter for
flipping between fragments that uses the library's support for Fragment.SavedState.FragmentPagerAdapter and FragmentStatePagerAdapter
to 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).
Fragment.onActivityResult()
bugInitial release with the v4 library.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-05-20 UTC.