Merge "docs: support library 22.2 updates" into mnc-preview-docs

This commit is contained in:
Rich Slogar
2015-05-26 16:58:41 +00:00
committed by Android (Google) Code Review
2 changed files with 283 additions and 47 deletions

View File

@@ -22,6 +22,8 @@ page.title=Support Library Features
<li><a href="#v8">v8 Support Library</a></li> <li><a href="#v8">v8 Support Library</a></li>
<li><a href="#v13">v13 Support Library</a></li> <li><a href="#v13">v13 Support Library</a></li>
<li><a href="#v17-leanback">v17 Leanback Library</a></li> <li><a href="#v17-leanback">v17 Leanback Library</a></li>
<li><a href="#annotations">Annotations Support Library</a></li>
<li><a href="#design">Design Support Library</a></li>
</ol> </ol>
<h2>See also</h2> <h2>See also</h2>
@@ -131,11 +133,11 @@ page.title=Support Library Features
API reference. API reference.
</p> </p>
<p>This library is located in the {@code &lt;sdk&gt;/extras/android/support/v4/} directory after <p>After you download the Android Support Libraries, this library is located in the
you download the Android Support Libraries. The library does not contain user interface {@code &lt;sdk&gt;/extras/android/support/v4/} directory. The library does not contain user
resources. To include it in your application project, follow the instructions for interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without <a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p> resources</a>.</p>
<p class="caution"><strong>Caution:</strong> Using dynamic dependencies, especially for higher version <p class="caution"><strong>Caution:</strong> Using dynamic dependencies, especially for higher version
numbers, can cause unexpected version updates and regression incompatibilities.</p> numbers, can cause unexpected version updates and regression incompatibilities.</p>
@@ -158,10 +160,11 @@ com.android.support:support-v4:21.0.0
</p> </p>
<p> <p>
This library is located in the {@code &lt;sdk&gt;/extras/android/support/multidex/} directory After you download the Android Support Libraries, this library is located in the
after you download the Android Support Libraries. The library does not contain user interface {@code &lt;sdk&gt;/extras/android/support/multidex/} directory. The library does not contain
resources. To include it in your application project, follow the instructions for <a href= user interface resources. To include it in your application project, follow the instructions
"{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without for
<a href= "{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>. resources</a>.
</p> </p>
@@ -218,11 +221,11 @@ com.android.support:multidex:1.0.0
</li> </li>
</ul> </ul>
<p>This library is located in the {@code &lt;sdk&gt;/extras/android/support/v7/appcompat/} <p>After you download the Android Support Libraries, this library is located in the
directory after you download the Android Support Libraries. The library contains user {@code &lt;sdk&gt;/extras/android/support/v7/appcompat/} directory. The library contains user
interface resources. To include it in your application project, follow the instructions for interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries with <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries with
resources</a>.</p> resources</a>.</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p> <p>The Gradle build script dependency identifier for this library is as follows:</p>
@@ -239,9 +242,8 @@ widget, which lets you show information inside cards that have a consistent look
on any app. These cards are useful for material design on any app. These cards are useful for material design
implementations, and are used extensively in layouts for TV apps.</p> implementations, and are used extensively in layouts for TV apps.</p>
<p>This library is located in the <p>After you download the Android Support Libraries, this library is located in the
{@code &lt;sdk&gt;/extras/android/support/v7/cardview/} directory after you {@code &lt;sdk&gt;/extras/android/support/v7/cardview/} directory. The library contains user interface
download the Android Support Libraries. The library contains user interface
resources. To include it in your application project, follow the instructions resources. To include it in your application project, follow the instructions
for <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding for <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding
libraries with resources</a>.</p> libraries with resources</a>.</p>
@@ -256,13 +258,14 @@ com.android.support:cardview-v7:21.0.0
<h3 id="v7-gridlayout">v7 gridlayout library</h3> <h3 id="v7-gridlayout">v7 gridlayout library</h3>
<p>This library adds support for the {@link android.support.v7.widget.GridLayout} class, which <p>After you download the Android Support Libraries, this library adds support for the
allows you to arrange user interface elements using a grid of rectangular cells. {@link android.support.v7.widget.GridLayout} class, which
For detailed information about the v7 gridlayout library APIs, see the allows you to arrange user interface elements using a grid of rectangular cells.
{@link android.support.v7.widget android.support.v7.widget} package in the API reference.</p> For detailed information about the v7 gridlayout library APIs, see the
{@link android.support.v7.widget android.support.v7.widget} package in the API reference.</p>
<p>This library is located in the {@code &lt;sdk&gt;/extras/android/support/v7/gridlayout/} <p>This library is located in the {@code &lt;sdk&gt;/extras/android/support/v7/gridlayout/}
directory after you download the Android Support Libraries. The library contains user directory . The library contains user
interface resources. To include it in your application project, follow the instructions for interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries with <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries with
resources</a>.</p> resources</a>.</p>
@@ -323,12 +326,11 @@ prominent colors from an image. For example, a music app could use a
from an album cover, and use those colors to build a color-coordinated song from an album cover, and use those colors to build a color-coordinated song
title card.</p> title card.</p>
<p>This library is located in the <p>After you download the Android Support Libraries, this library is located in the
{@code &lt;sdk&gt;/extras/android/support/v7/palette/} directory after {@code &lt;sdk&gt;/extras/android/support/v7/palette/} directory. The library does not contain
you download the Android Support Libraries. The library does not contain user interface user interface resources. To include it in your application project, follow the instructions for
resources. To include it in your application project, follow the instructions for <a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without resources</a>.</p>
resources</a>.</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p> <p>The Gradle build script dependency identifier for this library is as follows:</p>
@@ -346,10 +348,9 @@ class. This class provides support for the
widget</a>, a view for efficiently displaying large data sets by providing a widget</a>, a view for efficiently displaying large data sets by providing a
limited window of data items.</p> limited window of data items.</p>
<p>This library is located in the <p>After you download the Android Support Libraries, this library is located in the
{@code &lt;sdk&gt;/extras/android/support/v7/recyclerview/} directory after you {@code &lt;sdk&gt;/extras/android/support/v7/recyclerview/} directory. The library contains
download the Android Support Libraries. The library contains user interface user interface resources. To include it in your application project, follow the instructions
resources. To include it in your application project, follow the instructions
for <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding for <a href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding
libraries with resources</a>.</p> libraries with resources</a>.</p>
@@ -363,6 +364,12 @@ com.android.support:recyclerview-v7:21.0.0
<h2 id="v8">v8 Support Library</h2> <h2 id="v8">v8 Support Library</h2>
<p>This library is designed to be used with Android 2.2 (API level 8) 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 (API level 8) and higher. It adds support for
the <a href="{@docRoot}guide/topics/renderscript/compute.html">RenderScript</a> computation 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 framework. These APIs are included in the {@link android.support.v8.renderscript} package. You
@@ -374,9 +381,20 @@ com.android.support:recyclerview-v7:21.0.0
<p class="note"> <p class="note">
<strong>Note:</strong> Use of RenderScript with the support library is supported with Android <strong>Note:</strong> Use of RenderScript with the support library is supported with Android
Studio and Gradle-based builds, as well as the Eclipse plugin and Ant build tools. Studio and Gradle-based builds, as well as the Eclipse plugin and Ant build tools. The
renderscript library is located in the <code>build-tools/$VERSION/renderscript/</code> folder.
</p> </p>
<p>The following example shows the Gradle build script properties for this library:</p>
<pre>
defaultConfig {
renderscriptTargetApi 18
renderscriptSupportModeEnabled true
}
</pre>
<h2 id="v13">v13 Support Library</h2> <h2 id="v13">v13 Support Library</h2>
@@ -389,11 +407,11 @@ com.android.support:recyclerview-v7:21.0.0
android.support.v13} package in the API reference. android.support.v13} package in the API reference.
</p> </p>
<p>This library is located in the {@code &lt;sdk&gt;/extras/android/support/v13/} directory after <p>After you download the Android Support Libraries, this library is located in the
you download the Android Support Libraries. The library does not contain user interface {@code &lt;sdk&gt;/extras/android/support/v13/} directory. The library does not contain user
resources. To include it in your application project, follow the instructions for interface resources. To include it in your application project, follow the instructions for
<a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without <a href="{@docRoot}tools/support-library/setup.html#libs-without-res">Adding libraries without
resources</a>.</p> resources</a>.</p>
<p>The Gradle build script dependency identifier for this library is as follows:</p> <p>The Gradle build script dependency identifier for this library is as follows:</p>
@@ -429,9 +447,8 @@ com.android.support:support-v13:18.0.0
into a {@link android.support.v17.leanback.app.RowsFragment}.</li> into a {@link android.support.v17.leanback.app.RowsFragment}.</li>
</ul> </ul>
<p>This library is located in the <p>After you download the Android Support Libraries, this library is located in the
{@code &lt;sdk&gt;/extras/android/support/v17/leanback} directory after {@code &lt;sdk&gt;/extras/android/support/v17/leanback} directory. For more information
you download the Android Support Libraries. For more information
on how to set up your project, follow the instructions in <a on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p> with resources</a>. </p>
@@ -444,3 +461,48 @@ com.android.support:leanback-v17:21.0.0
<h2 id="annotations">Annotations Support Library</h2>
<p>The <a href="{@docRoot}reference/android/support/annotation/package-summary.html">Annotation</a>
package provides APIs to support adding annotation metadata to your apps. </p>
<p></p>
<p>After you download the Android Support Libraries, this library is located in the
{@code &lt;sdk&gt;/extras/android/support/annotations} directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:support-annotations:22.0.0
</pre>
<h2 id="design">Design Support Library</h2>
<p>The
<a href="{@docRoot}reference/android/support/design/package-summary.html">Design</a> package
provides APIs to support adding material design components and patterns to your apps. </p>
<p>The Design Support library adds support for various material design components and patterns for
app developers to build upon, such as navigation drawers, floating action buttons (<i>FAB</i>),
snackbars, and <a href="{@docRoot}design/building-blocks/tabs.html">tabs</a>. </p>
<p>After you download the Android Support Libraries, this library is located in the
{@code &lt;sdk&gt;/extras/android/support/design} directory. For more information
on how to set up your project, follow the instructions in <a
href="{@docRoot}tools/support-library/setup.html#libs-with-res">Adding libraries
with resources</a>. </p>
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
com.android.support:support-design:22.0.0
</pre>

View File

@@ -59,13 +59,187 @@ page.title=Support Library
<p>This section provides details about the Support Library package releases.</p> <p>This section provides details about the Support Library package releases.</p>
<div class="toggle-content opened"> <div class="toggle-content open">
<p id="rev21"><a href="#" onclick="return toggleContent(this)"> <p id="rev21"><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img" alt="" <img src="{@docRoot}assets/images/triangle-open.png" class="toggle-content-img" alt=""
/>Android Support Library, revision 22.1.0</a> <em>(April 2015)</em> />Android Support Library, revision 22.2.0</a> <em>(May 2015)</em>
</p> </p>
<div class="toggle-content-toggleme"> <div class="toggle-content-toggleme">
<dl> <dl>
<dt>Added <a href="features.html#design">Design Support library:</a></dt>
<dd>
<ul>
<li>Added {@link android.support.design.widget.TextInputLayout} for showing
{@link android.widget.EditText} hint and error text as floating labels.
</li>
<li>Added {@link android.support.design.widget.FloatingActionButton} for implementing a
primary action on your interface as a
floating action button, supporting either default or mini sizes.
</li>
<li>Added {@link android.support.design.widget.Snackbar} for providing lightweight
feedback with an optional action in an animated snackbar.
</li>
<li>Added {@link android.support.design.widget.TabLayout} for implementing fixed and
scrollable
<a href="{@docRoot}design/building-blocks/tabs.html">tabs</a> as well as easy
integration with
{@link android.support.v4.view.ViewPager}.
</li>
<li>Added {@link android.support.design.widget.NavigationView} for implementing
<a href="{@docRoot}design/patterns/navigation-drawer.html">navigation drawer</a>
contents, including the ability to inflate menu items via a
<a href="{@docRoot}guide/topics/resources/menu-resource.html">Menu Resource</a>.
</li>
<li>Added {@link android.support.design.widget.CoordinatorLayout}, a general purpose
layout, used for building dependencies between
sibling views and allowing easy scrolling reactions between components via
{@link android.support.design.widget.CoordinatorLayout.Behavior}. Many of the Design
Library components rely on being a child of a
{@link android.support.design.widget.CoordinatorLayout}.
</li>
<li>Added {@link android.support.design.widget.AppBarLayout}, a container for a
{@link android.widget.Toolbar}
and other views (such as {@link android.support.design.widget.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.
</li>
<li>Added {@link android.support.design.widget.CollapsingToolbarLayout} for controlling
how a {@link android.widget.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 {@link android.widget.ImageView},
or adding a content scrim color when the view is partially collapsed.
</li>
</ul>
</dt>
<dt>Changes for <a href="features.html#v4">v4 support library:</a></dt>
<dd>
<ul>
<li>Added the
{@link android.support.v4.view.accessibility.AccessibilityEventCompat#getContentChangeTypes getContentChangeTypes()}
and
{@link android.support.v4.view.accessibility.AccessibilityEventCompat#setContentChangeTypes setContentChangeTypes()}
methods and related change type
fields to the
{@link android.support.v4.view.accessibility.AccessibilityEventCompat}
class for accessibility event handling.
</li>
<li>Added the
{@link android.support.v4.media.session.PlaybackStateCompat#getActiveQueueItemId getActiveQueueItemId()},
{@link android.support.v4.media.session.PlaybackStateCompat#getCustomActions getCustomActions()},
and
{@link android.support.v4.media.session.PlaybackStateCompat#getExtras getExtras()}
methods with related state fields to the
{@link android.support.v4.media.session.PlaybackStateCompat} class for
getting custom actions from the queue.
</li>
<li>Added the
{@link android.support.v4.media.session.PlaybackStateCompat.Builder#addCustomAction addCustomAction()},
{@link android.support.v4.media.session.PlaybackStateCompat.Builder#addCustomAction addCustomAction()},
{@link android.support.v4.media.session.PlaybackStateCompat.Builder#setActiveQueueItemId setActiveQueueItemId()},
and
{@link android.support.v4.media.session.PlaybackStateCompat.Builder#setExtras setExtras()}
methods to the
{@link android.support.v4.media.session.PlaybackStateCompat.Builder} class for adding
adding custom actions to a playback state.
</li>
<li>Added the
{@link android.support.v4.media.session.PlaybackStateCompat.CustomAction#fromCustomAction fromCustomAction()} and
{@link android.support.v4.media.session.PlaybackStateCompat.CustomAction#getCustomAction getCustomAction()} methods
to the
{@link android.support.v4.media.session.PlaybackStateCompat.CustomAction} class
for getting custom actions from the queue.
</li>
<li>Added the {@link android.support.v4.view.ViewCompat#isAttachedToWindow isAttachedToWindow()},
{@link android.support.v4.view.ViewCompat#offsetLeftAndRight offsetLeftAndRight()}, and
{@link android.support.v4.view.ViewCompat#offsetTopAndBottom offsetTopAndBottom()}
methods to the {@link android.support.v4.view.ViewCompat} class for working with views.
</li>
<li>Added the {@link android.support.v4.view.ViewPager#addOnPageChangeListener addOnPageChangeListener()},
{@link android.support.v4.view.ViewPager#clearOnPageChangeListeners clearOnPageChangeListeners()}, and
{@link android.support.v4.view.ViewPager#removeOnPageChangeListener removeOnPageChangeListener()}
methods to the {@link android.support.v4.view.ViewPager} class for responding to page
changes.
<p>Deprecated the
{@link android.support.v4.view.ViewPager#setOnPageChangeListener setOnPageChangeListener()} method.</p>
</li>
<li>Added the
{@link android.support.v4.view.ViewParentCompat#notifySubtreeAccessibilityStateChanged notifySubtreeAccessibilityStateChanged()} method to
the {@link android.support.v4.view.ViewParentCompat} class for notifying a view parent
that the accessibility state of one of its descendants has changed.
</li>
<li>Added the {@link android.support.v4.view.ViewPropertyAnimatorCompat#translationZ translationZ()},
{@link android.support.v4.view.ViewPropertyAnimatorCompat#translationZBy translationZBy()},
{@link android.support.v4.view.ViewPropertyAnimatorCompat#z z()}, and
{@link android.support.v4.view.ViewPropertyAnimatorCompat#zBy zBy()}
methods to the {@link android.support.v4.view.ViewPropertyAnimatorCompat} class for
adding animation.
</li>
</ul>
</dd>
<dt>Changes for <a href="features.html#v7-appcompat">v7 appcompat library</a>:</dt>
<dd>
<ul>
<li>Added the
{@link android.support.v7.app.AppCompatActivity#onWindowStartingSupportActionMode onWindowStartingSupportActionMode()}
method to the
{@link android.support.v7.app.AppCompatActivity},
{@link android.support.v7.app.AppCompatCallback}, and
{@link android.support.v7.app.AppCompatDialog} classes for handling action modes
started from the current window.
</li>
<li>Added the
{@link android.support.v7.app.AppCompatDelegate#isHandleNativeActionModesEnabled isHandleNativeActionModesEnabled()} and
{@link android.support.v7.app.AppCompatDelegate#setHandleNativeActionModesEnabled setHandleNativeActionModesEnabled()}
methods to the
{@link android.support.v7.app.AppCompatDelegate} class for handling native action modes.
</li>
</ul>
</dd>
</dl>
</div>
</div> <!-- end of collapsible section -->
<div class="toggle-content closed">
<p id="rev21"><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt=""
/>Android Support Library, revision 22.1.0</a> <em>(April 2015)</em>
</p>
<div class="toggle-content-toggleme">
<dl>
<div class="toggle-content-toggleme">
<dl>
<dt>Changes for <a href="features.html#annotations">annotations library:</a></dt>
<dd>
<ul>
<li>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.
</li>
</ul>
</dd>
<dt>Changes for <a href="features.html#v4">v4 support library:</a></dt> <dt>Changes for <a href="features.html#v4">v4 support library:</a></dt>
<dd> <dd>
<ul> <ul>
@@ -132,7 +306,7 @@ page.title=Support Library
<li>Updated the {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat} <li>Updated the {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat}
class to add methods for errors, content invalidation and labels. class to add methods for errors, content invalidation and labels.
</li> </li>
<li>Added the following interpolation classses for animation: <li>Added the following interpolation classes for animation:
{@link android.support.v4.view.animation.FastOutLinearInInterpolator}, {@link android.support.v4.view.animation.FastOutLinearInInterpolator},
{@link android.support.v4.view.animation.FastOutSlowInInterpolator}, {@link android.support.v4.view.animation.FastOutSlowInInterpolator},
{@link android.support.v4.view.animation.LinearOutSlowInInterpolator}, {@link android.support.v4.view.animation.LinearOutSlowInInterpolator},
@@ -245,7 +419,7 @@ page.title=Support Library
</dd> </dd>
<dt>Changes for v8 renderscript library:</dt> <dt>Changes for <a href="features.html#v8-renderscript">v8 renderscript library</a>:</dt>
<dd> <dd>
<ul> <ul>
<li>Added the {@link android.support.v8.renderscript.ScriptIntrinsicHistogram} class for <li>Added the {@link android.support.v8.renderscript.ScriptIntrinsicHistogram} class for
@@ -643,7 +817,7 @@ page.title=Support Library
</ul> </ul>
</dd> </dd>
<dt>Changes for v8 renderscript library:</dt> <dt>Changes for <a href="features.html#v8-renderscript">v8 renderscript library</a></dt>
<dd> <dd>
<ul> <ul>
<li>Added error propagation for the RenderScript thunking layer.</li> <li>Added error propagation for the RenderScript thunking layer.</li>