docs: Docs for Support Library 24.2.0 release

am: 085994c40d

Change-Id: I7e69bf585d342f1075856673e52ff15207be4a1c
This commit is contained in:
Andrew Solovay
2016-08-17 17:48:47 +00:00
committed by android-build-merger
4 changed files with 467 additions and 116 deletions

View File

@@ -7,7 +7,15 @@ page.title=Support Library Features
<h2>In this document</h2>
<ol>
<li><a href="#v4">v4 Support Library</a></li>
<li><a href="#v4">v4 Support Libraries</a>
<ol>
<li><a href="#v4-compat">v4 compat library</a></li>
<li><a href="#v4-core-utils">v4 core-utils library</a></li>
<li><a href="#v4-core-ui">v4 core-ui library</a></li>
<li><a href="#v4-media-compat">v4 media-compat library</a></li>
<li><a href="#v4-fragment">v4 fragment library</a></li>
</ol>
</li>
<li><a href="#multidex">Multidex Support Library</a></li>
<li><a href="#v7">v7 Support Libraries</a>
<ol>
@@ -63,94 +71,115 @@ page.title=Support Library Features
include the library in your application.</p>
<h2 id="v4">v4 Support Library</h2>
<p>This library is designed to be used with Android 1.6 (API level 4) and higher. It includes the
largest set of APIs compared to the other libraries, including support for application components,
user interface features, accessibility, data handling, network connectivity, and programming
utilities. Here are a few of the key classes included in the v4 library:</p>
<ul>
<li>App Components
<ul>
<li>{@link android.support.v4.app.Fragment}
- Adds support for encapsulation of user interface and functionality
with Fragments, enabling
applications to provide layouts that adjust between small and
large-screen devices.
</li>
<li>{@link android.support.v4.app.NotificationCompat} - Adds support for rich notification
features.</li>
<li>{@link android.support.v4.content.LocalBroadcastManager} - Allows applications to easily
register for and receive intents within a single application without broadcasting them
globally.</li>
</ul>
</li>
<li>User Interface
<ul>
<li>{@link android.support.v4.view.ViewPager} - Adds a
{@link android.view.ViewGroup} that manages the layout for the
child views, which the user can swipe between.</li>
<li>{@link android.support.v4.view.PagerTitleStrip}
- Adds a non-interactive title strip, that can be added as a child of
{@link android.support.v4.view.ViewPager}.</li>
<li>{@link android.support.v4.view.PagerTabStrip} - Adds a
navigation widget for switching between paged views, that can also be used with
{@link android.support.v4.view.ViewPager}.</li>
<li>{@link android.support.v4.widget.DrawerLayout} - Adds
support for creating a <a href="{@docRoot}training/implementing-navigation/nav-drawer.html"
>Navigation Drawer</a> that can be pulled in from the edge of a window.</li>
<li>{@link android.support.v4.widget.SlidingPaneLayout}
- Adds widget for creating linked summary and detail views that
appropriately adapt to various screen sizes.</li>
</ul>
</li>
<li>Accessibility
<ul>
<li>{@link android.support.v4.widget.ExploreByTouchHelper}
- Adds a helper class for implementing accessibility support for custom views.</li>
<li>{@link android.support.v4.view.accessibility.AccessibilityEventCompat} - Adds support for
{@link android.view.accessibility.AccessibilityEvent}. For more information about implementing
accessibility, see <a href="{@docRoot}guide/topics/ui/accessibility/index.html"
>Accessibility</a>.</li>
<li>{@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat} - Adds support
for {@link android.view.accessibility.AccessibilityNodeInfo}.</li>
<li>{@link android.support.v4.view.accessibility.AccessibilityNodeProviderCompat} - Adds
support for {@link android.view.accessibility.AccessibilityNodeProvider}.</li>
<li>{@link android.support.v4.view.AccessibilityDelegateCompat} - Adds support for
{@link android.view.View.AccessibilityDelegate}.</li>
</ul>
</li>
<li>Content
<ul>
<li>{@link android.support.v4.content.Loader} - Adds support for asynchronous loading of data.
The library also provides concrete implementations of this class, including
{@link android.support.v4.content.CursorLoader} and
{@link android.support.v4.content.AsyncTaskLoader}.</li>
<li>{@link android.support.v4.content.FileProvider} - Adds support for sharing of private
files between applications.</li>
</ul>
</li>
</ul>
<h2 id="v4">v4 Support Libraries</h2>
<p>
There are many other APIs included in this library. For complete, detailed information about the
v4 Support Library APIs, see the {@link android.support.v4.app android.support.v4} package in the
API reference.
These libraries are designed to be used with Android 2.3 (API level 9) and
higher. They include the largest set of APIs compared to the other libraries,
including support for application components, user interface features,
accessibility, data handling, network connectivity, and programming
utilities.
</p>
<p class="caution"><strong>Caution:</strong> Using dynamic dependencies, especially for higher version
numbers, can cause unexpected version updates and regression incompatibilities.</p>
<p>
For complete, detailed information about the classes and methods provided by
the v4 support libraries, see the {@link android.support.v4.app
android.support.v4} package in the API reference.
</p>
<p class="note">
<strong>Note:</strong> Prior to Support Library revision 24.2.0, there was a
single v4 support library. That library was divided into multiple modules to
improve efficiency. For backwards compatibility, if you list
<code>support-v4</code> in your Gradle script, your APK will include all of
the v4 modules. However, to reduce APK size, we recommend that you just list
the specific modules your app needs.
</p>
<h3 id="v4-compat">v4 compat library</h3>
<p>
Provides compatibility wrappers for a number of framework APIs, such as
<code>Context.obtainDrawable()</code> and
<code>View.performAccessibilityAction()</code>.
</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:support-v4:24.1.1
com.android.support:support-compat:24.2.0
</pre>
<h3 id="v4-core-utils">v4 core-utils library</h3>
<p>
Provides a number of utility classes, such as {@link
android.support.v4.content.AsyncTaskLoader} and {@link
android.support.v4.content.PermissionChecker}.
</p>
<p>
The Gradle build script dependency identifier for this library is as follows:
</p>
<pre>
com.android.support:support-core-utils:24.2.0
</pre>
<h3 id="v4-core-ui">v4 core-ui library</h3>
<p>
Implements a variety of UI-related components, such as {@link
android.support.v4.view.ViewPager}, {@link
android.support.v4.widget.NestedScrollView}, and {@link
android.support.v4.widget.ExploreByTouchHelper}.
</p>
<p>
The Gradle build script dependency identifier for this library is as follows:
</p>
<pre>
com.android.support:support-core-ui:24.2.0
</pre>
<h3 id="v4-media-compat">v4 media-compat library</h3>
<p>
Backports portions of the <a href=
"/reference/android/media/package-summary.html">media</a> framework,
including {@link android.media.browse.MediaBrowser} and {@link
android.media.session.MediaSession}.
</p>
<p>
The Gradle build script dependency identifier for this library is as follows:
</p>
<pre>
com.android.support:support-media-compat:24.2.0
</pre>
<h3 id="v4-fragment">v4 fragment library</h3>
<p>
Adds support for encapsulation of user interface and functionality with
<a href=
"/guide/components/fragments.html">fragments</a>,
enabling applications to provide layouts that adjust between small and
large-screen devices. This module has dependencies on <a href=
"#v4-compat">compat</a>, <a href="#v4-core-utils">core-utils</a>, <a href=
"#v4-core-ui">core-ui</a>, and <a href="#v4-media-compat">media-compat</a>.
</p>
<p>
The Gradle build script dependency identifier for this library is as follows:
</p>
<pre>
com.android.support:support-fragment:24.2.0
</pre>
<h2 id="multidex">Multidex Support Library</h2>
@@ -173,7 +202,7 @@ com.android.support:multidex:1.0.0
<h2 id="v7">v7 Support Libraries</h2>
<p>There are several libraries designed to be used with Android 2.1 (API level 7) and higher.
<p>There are several libraries designed to be used with Android 2.3 (API level 9) and higher.
These libraries provide specific feature sets and can be included in your application
independently from each other.</p>
@@ -216,7 +245,7 @@ com.android.support:multidex:1.0.0
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:appcompat-v7:24.1.1
com.android.support:appcompat-v7:24.2.0
</pre>
@@ -231,7 +260,7 @@ implementations, and are used extensively in layouts for TV apps.</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:cardview-v7:24.1.1
com.android.support:cardview-v7:24.2.0
</pre>
@@ -247,7 +276,7 @@ For detailed information about the v7 gridlayout library APIs, see the
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:gridlayout-v7:24.1.1
com.android.support:gridlayout-v7:24.2.0
</pre>
@@ -270,7 +299,7 @@ reference.</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:mediarouter-v7:24.1.1
com.android.support:mediarouter-v7:24.2.0
</pre>
<p class="caution">The v7 mediarouter library APIs introduced in Support Library
@@ -290,7 +319,7 @@ title card.</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:palette-v7:24.1.1
com.android.support:palette-v7:24.2.0
</pre>
@@ -306,7 +335,7 @@ limited window of data items.</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:recyclerview-v7:24.1.1
com.android.support:recyclerview-v7:24.2.0
</pre>
@@ -329,18 +358,18 @@ such as {@link android.support.v7.preference.CheckBoxPreference} and
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:preference-v7:24.1.1
com.android.support:preference-v7:24.2.0
</pre>
<h2 id="v8">v8 Support Library</h2>
<p>This library is designed to be used with Android 2.2 (API level 8) and higher.
<p>This library is designed to be used with Android 2.3 (API level 9) and higher.
This library provides specific feature sets and can be included in your application
independently from other libraries.</p>
<h3 id="v8-renderscript">v8 renderscript library</h3>
<p>This library is designed to be used with Android (API level 8) and higher. It adds support for
<p>This library is designed to be used with Android 2.3 (API level 9) and higher. It adds support for
the <a href="{@docRoot}guide/topics/renderscript/compute.html">RenderScript</a> computation
framework. These APIs are included in the {@link android.support.v8.renderscript} package. You
should be aware that the steps for including these APIs in your application is <em>very
@@ -380,7 +409,7 @@ defaultConfig {
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:support-v13:24.1.1
com.android.support:support-v13:24.2.0
</pre>
@@ -406,7 +435,7 @@ for preference interfaces such as
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:preference-v14:24.1.1
com.android.support:preference-v14:24.2.0
</pre>
@@ -429,7 +458,7 @@ interface and classes, such as
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:preference-leanback-v17:24.1.1
com.android.support:preference-leanback-v17:24.2.0
</pre>
@@ -465,7 +494,7 @@ com.android.support:preference-leanback-v17:24.1.1
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:leanback-v17:24.1.1
com.android.support:leanback-v17:24.2.0
</pre>
@@ -480,7 +509,7 @@ package provides APIs to support adding annotation metadata to your apps. </p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:support-annotations:24.1.1
com.android.support:support-annotations:24.2.0
</pre>
@@ -498,7 +527,7 @@ snackbars, and <a href="{@docRoot}design/building-blocks/tabs.html">tabs</a>. <
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:design:24.1.1
com.android.support:design:24.2.0
</pre>
@@ -519,7 +548,7 @@ Callback</a>. </p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:customtabs:24.1.1
com.android.support:customtabs:24.2.0
</pre>
@@ -543,7 +572,7 @@ PercentRelativeLayout</a>. </p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:percent:24.1.1
com.android.support:percent:24.2.0
</pre>
@@ -566,5 +595,5 @@ RecommendationExtender</a>. </p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:recommendation:24.1.1
com.android.support:recommendation:24.2.0
</pre>

View File

@@ -6,9 +6,324 @@ page.metaDescription=This page provides details about the Support Library packag
<p>This page provides details about the Support Library package releases.</p>
<div class="toggle-content opened">
<p id="rev24-1-1">
<p id="rev24-2-0">
<a href="#" onclick="return toggleContent(this)"><img src=
"{@docRoot}assets/images/styles/disclosure_up.png" class=
"toggle-content-img" alt="">Android Support Library, revision 24.2.0</a>
<em>(August 2016)</em>
</p>
<div class="toggle-content-toggleme">
<p>Release 24.2.0 contains the following changes:</p>
<ul>
<li><a href="#24-2-0-v4-refactor">v4 Support Library split</a></li>
<li><a href="#24-2-0-api-updates">API updates</a></li>
<li><a href="#24-2-0-behavior">Behavior changes</a></li>
<li><a href="#24-2-0-deprecations">Deprecations</a></li>
<li><a href="#24-2-0-bugfixes">Bug fixes</a></li>
</ul>
<p class="note"><strong>Note:</strong> 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.
</p>
<h3 id="24-2-0-v4-refactor">v4 Support Library split</h3>
<p>With this release, the <a href="features.html#v4">v4 Support Library</a> has
been split into several smaller modules:</p>
<dl>
<dt>
<code>support-compat</code>
</dt>
<dd>
Provides compatibility wrappers for new framework APIs, such as
<code>Context.getDrawable()</code> and
<code>View.performAccessibilityAction()</code>.
</dd>
<dt>
<code>support-core-utils</code>
</dt>
<dd>
Provides a number of utility classes, such as {@link
android.support.v4.content.AsyncTaskLoader} and {@link
android.support.v4.content.PermissionChecker}.
</dd>
<dt>
<code>support-core-ui</code>
</dt>
<dd>
Implements a variety of UI-related components, such as {@link
android.support.v4.view.ViewPager}, {@link
android.support.v4.widget.NestedScrollView}, and {@link
android.support.v4.widget.ExploreByTouchHelper}.
</dd>
<dt>
<code>support-media-compat</code>
</dt>
<dd>
Backports portions of the <a href=
"/reference/android/media/package-summary.html">media</a> framework,
including {@link android.media.browse.MediaBrowser} and {@link
android.media.session.MediaSession}.
</dd>
<dt>
<code>support-fragment</code>
</dt>
<dd>
Backports the <a href=
"/guide/components/fragments.html">fragment</a>
framework. This module has dependencies on <code>support-compat</code>,
<code>support-core-utils</code>, <code>support-core-ui</code>, and
<code>support-media-compat</code>.
</dd>
</dl>
<p>For backwards compatibility, if you list <code>support-v4</code> 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.
</p>
<h3 id="24-2-0-api-updates">API updates</h3>
<ul>
<li>Clients using <a href="features.html#custom-tabs">Custom Tabs</a> can
control whether Instant Apps should open. (Note that Instant Apps are not yet
generally available.) To enable or disable Instant Apps, call <a href=
"/reference/android/support/customtabs/CustomTabsIntent.Builder.html#setInstantAppsEnabled(boolean)">
<code>CustomTabsIntent.Builder.setInstantAppsEnabled()</code></a> or
specify <a href=
"/reference/android/support/customtabs/CustomTabsIntent.html#EXTRA_ENABLE_INSTANT_APPS">
<code>EXTRA_ENABLE_INSTANT_APPS</code></a>. By default, Custom Tabs will
default to enabling Instant Apps, when that feature becomes available.
</li>
<li>{@link android.support.design.widget.TextInputLayout} adds support for
the <a href=
"https://material.google.com/components/text-fields.html#text-fields-password-input">
password visibility toggle</a> from the material design specification.
</li>
<li>The new <a href=
"/reference/android/support/transition/package-summary.html"
><code>android.support.transition</code></a>
package backports the <a href=
"/training/transitions/index.html">Transitions</a> framework to API levels 14
and higher. For more information, see the <a href=
"/reference/android/support/transition/package-summary.html"
><code>android.support.transition</code></a> reference.
</li>
<li>The <a href="features.html#custom-tabs">Custom Tabs support library</a>
adds support for using {@link android.widget.RemoteViews} in the secondary
toolbar. The existing {@link
android.support.customtabs.CustomTabsSession#setToolbarItem setToolbarItem()}
method is now deprecated.
</li>
<li>{@link android.support.v7.content.res.AppCompatResources} adds the
ability to load a <code>&lt;vector&gt;</code> (on API level 9 and higher) or
<code>&lt;animated-vector&gt;</code> (on API level 11 and higher) from a
resource ID, by using the new <a href=
"/reference/android/support/v7/content/res/AppCompatResources.html#getDrawable(android.content.Context,%20int)"
><code>getDrawable()</code></a> method.
</li>
<li>{@link android.support.design.widget.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
{@link android.support.design.widget.FloatingActionButton} moves out of the
way of a {@link android.support.design.widget.Snackbar}, but for any
arbitrary view children. For more information, see the <a href=
"/reference/android/support/design/widget/CoordinatorLayout.LayoutParams.html#insetEdge">
<code>LayoutParams.insetEdge</code></a> and <a href=
"/reference/android/support/design/widget/CoordinatorLayout.LayoutParams.html#dodgeInsetEdges">
<code>LayoutParams.dodgeInsetEdges</code></a> reference documentation.
</li>
<li>The new <a href="/reference/android/support/v7/util/DiffUtil.html"><code>
DiffUtil</code></a> class can calculate the difference between two
collections, and can dispatch a list of update operations that are suitable
to be consumed by a {@link android.support.v7.widget.RecyclerView.Adapter}.
</li>
<li>
<a href=
"/reference/android/support/v7/widget/RecyclerView.OnFlingListener.html"><code>
RecyclerView.OnFlingListener</code></a> has been added to support custom
behavior in response to flings. The <a href=
"/reference/android/support/v7/widget/SnapHelper.html"><code>SnapHelper</code></a>
class provides an implementation specifically for snapping child views, and
the <a href=
"/reference/android/support/v7/widget/LinearSnapHelper.html"><code>LinearSnapHelper</code></a>
class extends this implementation to provide center-aligned snapping
behavior similar to {@link android.support.v4.view.ViewPager}.
</li>
</ul>
<h3 id="24-2-0-behavior">Behavior changes</h3>
<ul>
<li>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 {@link
android.support.v7.app.AppCompatDelegate#setLocalNightMode
AppCompatDelegate.setLocalNightMode()}).
</li>
<li>{@link android.support.design.widget.Snackbar} now draws behind the
navigation bar if the status bar is translucent.
</li>
</ul>
<h3 id="24-2-0-deprecations">Deprecations</h3>
<p>Deprecated classes and methods are subject to removal in a future release. You should migrate away from these APIs as soon as possible.</p>
<ul>
<li>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.
<ul>
<li>{@link android.support.v4.view.KeyEventCompat}: Replace with {@link
android.view.KeyEvent}
</li>
<li>{@link android.support.v4.view.MotionEventCompat}: Use {@link
android.view.MotionEvent}
</li>
<li>{@link android.support.v4.view.ViewCompat}: Use {@link
android.view.View}
</li>
<li>{@link android.support.v4.view.ViewConfigurationCompat}: Use {@link
android.view.ViewConfiguration}
</li>
</ul>
</li>
<li>
{@link android.support.v4.accessibilityservice.AccessibilityServiceInfoCompat#getDescription
AccessibilityServiceInfoCompat.getDescription()}
has been deprecated in favor of
<a href="/reference/android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat.html#loadDescription(android.accessibilityservice.AccessibilityServiceInfo, android.content.pm.PackageManager)"><code>loadDescription()</code></a>
which returns a correctly localized description.
</li>
<li>You should not instantiate the <code>ActivityCompat</code> class
directly. The non-static <code>getReferrer(Activity)</code> method will be
made static in an upcoming release.
</li>
<li>{@link android.support.design.widget.CoordinatorLayout.Behavior#isDirty
CoordinatorLayout.Behavior.isDirty()} has been deprecated and is no longer
called by {@link android.support.design.widget.CoordinatorLayout}. Any
implementations, as well as any calls to this method, should be removed.
</li>
<li>{@link android.support.v4.media.session.MediaSessionCompat#obtain
MediaSessionCompat.obtain()} has been deprecated and replaced with the more
appropriately-named method
<a href="/reference/android/support/v4/media/session/MediaSessionCompat.html#fromMediaSession"><code>fromMediaSession()</code></a>.
</li>
<li>{@link
android.support.v4.media.session.MediaSessionCompat.QueueItem#obtain
MediaSessionCompat.QueueItem.obtain()} has been deprecated and replaced with
the more appropriately-named method
<a href="/reference/android/support/v4/media/session/MediaSessionCompat.QueueItem.html#fromQueueItem"><code>fromQueueItem()</code></a>.
</li>
<li>Several abstract classes have been deprecated and replaced with
interfaces that more closely reflect their framework equivalents.
<ul>
<li>{@link
android.support.v4.view.accessibility.AccessibilityManagerCompat.AccessibilityStateChangeListenerCompat}
has been replaced by the <a href=
"/reference/android/support/v4/view/accessibility/AccessibilityManagerCompat.AccessibilityStateChangeListener.html">
<code>AccessibilityManagerCompat.AccessibilityStateChangeListener</code></a>
interface.
</li>
<li>{@link
android.support.v4.widget.SearchViewCompat.OnCloseListenerCompat} has
been replaced by the <a
href="/reference/android/support/v4/widget/SearchViewCompat.OnCloseListener.html"
><code>SearchViewCompat.OnCloseListener</code></a> interface.
</li>
<li>{@link
android.support.v4.widget.SearchViewCompat.OnQueryTextListenerCompat }
has been replaced by the <a
href="/reference/android/support/v4/widget/SearchViewCompat.OnQueryTextListener.html"
><code>SearchViewCompat.OnQueryTextListener</code></a>
interface.
</li>
</ul>
</li>
<li>{@link android.support.customtabs.CustomTabsSession#setToolbarItem
CustomTabsSession.setToolbarItem()} has been deprecated and replaced by the
RemoteViews-based <a href=
"/reference/android/support/customtabs/CustomTabsSession.html#setSecondaryToolbarViews">
<code>setSecondaryToolbarViews()</code></a>.
</li>
</ul>
<h3 id="24-2-0-bugfixes">Bug fixes</h3>
<p>The following known issues have been fixed with release 24.2.0:</p>
<ul>
<li>Ensure <code>SwipeRefreshLayout</code> indicator is shown when
<code>setRefreshing(true)</code> is called before the first measurement pass
(<a href="https://code.google.com/p/android/issues/detail?id=77712">AOSP
issue 77712</a>)
</li>
<li>Prevent <code>TabLayout</code> from flickering when changing pages
(<a href="https://code.google.com/p/android/issues/detail?id=180454">AOSP
issue 180454</a>)
</li>
<li>Avoid <code>ClassNotFoundException</code> when unmarshalling
<code>SavedState</code> on API level 11 and lower (<a href=
"https://code.google.com/p/android/issues/detail?id=196430">AOSP issue
196430</a>)
</li>
</ul>
<p>
A complete list of public bug fixes is available on the <a href=
"https://code.google.com/p/android/issues/list?can=1&q=Component%3DSupport-Libraries+Target%3DSupport-24.2.0">
AOSP Issue Tracker</a>.
</p>
</div>
</div>
<!-- end of collapsible section: 24.2.0 -->
<div class="toggle-content closed">
<p id="rev24-1-1">
<a href="#" onclick="return toggleContent(this)"><img src=
"{@docRoot}assets/images/styles/disclosure_down.png" class=
"toggle-content-img" alt="">Android Support Library, revision 24.1.1</a>
<em>(July 2016)</em>
</p>
@@ -76,7 +391,7 @@ page.metaDescription=This page provides details about the Support Library packag
<ul>
<li>TabLayout.setCustomView(null) results in NullPointerException
(<a href="https://code.google.com/p/android/issues/detail?id=214753">AOSP
issue</a>)
issue 214753</a>)
</li>
<li>TabLayout incorrectly highlights custom tabs (<a href=

View File

@@ -85,17 +85,24 @@ Android Support Repository selected.</p>
<li>Make sure you have downloaded the <strong>Android Support Repository</strong>
using the <a href="#download">SDK Manager</a>.</li>
<li>Open the {@code build.gradle} file for your application.</li>
<li>Add the support library to the {@code dependencies} section. For example, to add the v4
support library, add the following lines:
<li>Add the support library to the {@code dependencies} section. For
example, to add the v4 core-utils library, add the following lines:
<pre>
dependencies {
...
<b>compile "com.android.support:support-v4:24.1.1"</b>
<b>compile "com.android.support:support-core-utils:24.2.0"</b>
}
</pre>
</li>
</ol>
<p class="caution">
<strong>Caution:</strong> Using dynamic dependencies (for example,
<code>palette-v7:23.0.+</code>) can cause unexpected version updates and
regression incompatibilities. We recommend that you explicitly specify a
library version (for example, <code>palette-v7:24.2.0</code>).
</p>
<h2 id="using-apis">Using Support Library APIs</h2>
<p>Support Library classes that provide support for existing framework APIs typically have the
@@ -141,12 +148,12 @@ dependencies {
<pre>
&lt;uses-sdk
android:minSdkVersion="<b>7</b>"
android:targetSdkVersion="17" /&gt;
android:minSdkVersion="<b>14</b>"
android:targetSdkVersion="23" /&gt;
</pre>
<p>The manifest setting tells Google Play that your application can be installed on devices with Android
2.1 (API level 7) and higher. </p>
4.0 (API level 14) and higher. </p>
<p>If you are using Gradle build files, the <code>minSdkVersion</code> setting in the build file
overrides the manifest settings. </p>
@@ -158,7 +165,7 @@ android {
...
defaultConfig {
minSdkVersion 8
minSdkVersion 16
...
}
...
@@ -166,13 +173,15 @@ android {
</pre>
<p>In this case, the build file setting tells Google Play that the default build variant of your
application can be installed on devices with Android 2.2 (API level 8) and higher. For more
application can be installed on devices with Android 4.1 (API level 16) and higher. For more
information about build variants, see
<a href="{@docRoot}studio/build/index.html">Build System Overview</a>. </p>
<p class="note">
<strong>Note:</strong> If you are including the v4 support and v7 appcompat libraries in your
application, you should specify a minimum SDK version of <code>"7"</code> (and not
<code>"4"</code>). The highest support library level you include in your application determines
the lowest API version in which it can operate.
<strong>Note:</strong> If you are including several support libraries, the
minimum SDK version must be the <em>highest</em> version required by any of
the specified libraries. For example, if your app includes both the <a href=
"features.html#v14-preference">v14 Preference Support library</a> and the
<a href="features.html#v17-leanback">v17 Leanback library</a>, your minimum
SDK version must be 17 or higher.
</p>

View File

@@ -48,11 +48,9 @@ animate changes between view hierarchies. This class also covers how to create c
animations.</p>
<p class="note"><strong>Note:</strong> For Android versions earlier than 4.4.2 (API level 19)
but greater than or equal to Android 4.0 (API level 14), use the <code>animateLayoutChanges</code>
attribute to animate layouts. To learn more, see
<a href="{@docRoot}guide/topics/graphics/prop-animation.html">Property Animation</a> and
<a href="{@docRoot}training/animation/layout.html">Animating Layout Changes</a>.</p>
but greater than or equal to Android 4.0 (API level 14), use the Android Support
Library's <a href="/reference/android/support/transitions/package-summary.html"
><code>android.support.transition</code></a> package.</p>
<h2>Lessons</h2>