Docs: Added Android Support Library 23.2 Release Notes
Bug: 26448279 Change-Id: I7549f87a374a3c2f632e31b8da9cac8394e5c9e6
This commit is contained in:
@@ -59,8 +59,365 @@ page.title=Support Library
|
||||
<p>This section provides details about the Support Library package releases.</p>
|
||||
|
||||
<div class="toggle-content opened">
|
||||
<p id="rev23"><a href="#" onclick="return toggleContent(this)">
|
||||
<img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img" alt=""
|
||||
<p id="rev23-2-0">
|
||||
<a href="#" onclick="return toggleContent(this)"><img src=
|
||||
"{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
|
||||
alt="">Android Support Library, revision 23.2.0</a> <em>(February
|
||||
2016)</em>
|
||||
</p>
|
||||
|
||||
<div class="toggle-content-toggleme">
|
||||
<dl>
|
||||
<dt>
|
||||
Changes for <a href="features.html#v4">v4 Support library</a>:
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
<ul>
|
||||
<li>Added {@code MediaBrowserCompat} for {@link
|
||||
android.media.browse.MediaBrowser} support, and {@code
|
||||
MediaBrowserServiceCompat} for {@link
|
||||
android.service.media.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.
|
||||
</li>
|
||||
|
||||
<li>The system now calls {@link
|
||||
android.support.v4.app.FragmentActivity#onActivityResult onActivityResult()} for a
|
||||
nested {@link android.support.v4.app.FragmentActivity}.
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
Changes for <a href="features.html#v7-appcompat">v7 AppCompat
|
||||
library</a>:
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
<ul>
|
||||
<li>Added Night Mode functionality to API level 14 and higher. Switch
|
||||
between <a href="{@docRoot}training/material/theme.html">Material
|
||||
Light and Material Dark Themes</a> based on the time of day or
|
||||
app-specific setting.
|
||||
</li>
|
||||
|
||||
<li style="list-style: none; display: inline">
|
||||
<ul>
|
||||
<li>Day and night themes can be found here: {@code
|
||||
<sdk>/extras/android/support/v7/appcompat/res/values/themes_daynight.xml}
|
||||
</li>
|
||||
|
||||
<li>{@code AppCompatDelegate.setDefaultNightMode()}: sets the
|
||||
app’s default mode by passing one of the following constants:
|
||||
</li>
|
||||
|
||||
<li style="list-style: none; display: inline">
|
||||
<ul>
|
||||
<li>{@code MODE_NIGHT_AUTO}
|
||||
</li>
|
||||
|
||||
<li>{@code MODE_NIGHT_NO}
|
||||
</li>
|
||||
|
||||
<li>{@code MODE_NIGHT_YES}
|
||||
</li>
|
||||
|
||||
<li>{@code MODE_NIGHT_FOLLOW_SYSTEM}
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>{@code AppCompatDelegate.setLocalNightMode()}: overrides
|
||||
the night mode setting for the local app component.
|
||||
</li>
|
||||
|
||||
<li>{@code AppCompatDelegate.getDefaultNightMode()}: returns
|
||||
the default night mode.
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
Changes for <a href="features.html#v7-mediarouter">v7 mediarouter
|
||||
library</a>:
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
<ul>
|
||||
<li>{@link android.support.v7.app.MediaRouteControllerDialog} now
|
||||
correctly applies custom app theme colors.
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
Changes for <a href="features.html#design">Design support library</a>:
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
<ul>
|
||||
<li>Added support for <a href=
|
||||
"https://www.google.com/design/spec/components/bottom-sheets.html">bottom
|
||||
sheets</a>. An interaction plugin, {@code
|
||||
BottomSheetBehavior}, allows a child view of a {@link
|
||||
android.support.design.widget.CoordinatorLayout} to act as
|
||||
a bottom sheet. The base class, {@code BottomSheetCallback}, provides
|
||||
callbacks to monitor bottom sheet events.
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
Changes for the <a href="features.html#custom-tabs">CustomTabs support
|
||||
library</a>:
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
<ul>
|
||||
<li>
|
||||
<a href=
|
||||
"https://developer.chrome.com/multidevice/android/customtabs">Chrome
|
||||
Custom Tabs</a> now allows apps to include a bottom bar with action
|
||||
buttons in addition to the existing top action button.
|
||||
</li>
|
||||
|
||||
<li>{@code CustomTabsIntent.Builder.addToolBarItem()}: adds an action
|
||||
button to a custom tab. You can use this to add multiple buttons.
|
||||
</li>
|
||||
|
||||
<li>{@code 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.
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
Added VectorDrawable support library:
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
<ul>
|
||||
<li>Added Classes:
|
||||
</li>
|
||||
|
||||
<li style="list-style: none; display: inline">
|
||||
<ul>
|
||||
<li>{@code VectorDrawableCompat}
|
||||
</li>
|
||||
|
||||
<li>{@code AnimatedVectorDrawableCompat}
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Adds support for {@link
|
||||
android.graphics.drawable.VectorDrawable} assets to apps
|
||||
running on API level 7 or higher. {@link
|
||||
android.graphics.drawable.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.
|
||||
</li>
|
||||
|
||||
<li>This library is now a dependency of the <a href=
|
||||
"features.html#v7-appcompat">v7 AppCompat library</a>, allowing
|
||||
developers and <a href="features.html#v7-appcompat">AppCompat </a>
|
||||
to easily use vector drawables. To use {@code
|
||||
VectorDrawableCompat} within an {@link android.widget.ImageButton} or
|
||||
{@link android.widget.ImageView}, use the {@code app:srcCompat} XML
|
||||
attribute or {@code setImageResource()}
|
||||
method.
|
||||
</li>
|
||||
|
||||
<li>To keep referencing attribute IDs on API level 20 or
|
||||
lower, add the following {@code appt} flag to your {@code
|
||||
build,gradle} file:
|
||||
</li>
|
||||
|
||||
<li style="list-style: none; display: inline">
|
||||
<ul>
|
||||
<li>If you are building with Android Plugin for Gradle 1.5.0 or
|
||||
lower, add the following to your {@code build.gradle} file:
|
||||
</li>
|
||||
|
||||
<li style="list-style: none; display: inline">
|
||||
<pre>
|
||||
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"
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>If you are building with Android Plugin for Gradle 2.0.0 or
|
||||
higher, add the following to your {@code build.gradle} file:
|
||||
</li>
|
||||
|
||||
<li style="list-style: none; display: inline">
|
||||
<pre>
|
||||
android {
|
||||
defaultConfig {
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
Changes for <a href="features.html#v17-leanback">v17 Leanback
|
||||
Library</a>:
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
<ul>
|
||||
<li>Added new capabilities to {@link android.support.v17.leanback.app.GuidedStepFragment},
|
||||
which is a component that guides users through a decision or series of decisions:
|
||||
</li>
|
||||
|
||||
<li style="list-style: none; display: inline">
|
||||
<ul>
|
||||
<li>Added button actions to {@link
|
||||
android.support.v17.leanback.widget.GuidedAction}:
|
||||
</li>
|
||||
|
||||
<ul>
|
||||
<li>{@code GuidedStepFragment.setButtonActions()}: sets a list of
|
||||
{@link android.support.v17.leanback.widget.GuidedAction} buttons that
|
||||
the user may select from the Actions view.
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Description fields are now editable:
|
||||
</li>
|
||||
|
||||
<li style="list-style: none; display: inline">
|
||||
<ul>
|
||||
<li>{@code GuidedAction.Builder.descriptionEditable()}: when passing
|
||||
{@code true}, sets the action’s description to be editable.
|
||||
</li>
|
||||
|
||||
<li>{@code GuidedAction.getEditDescription()}: returns the editable
|
||||
description as a {@code CharSequence}.
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Added drop-down lists of sub-actions:
|
||||
</li>
|
||||
|
||||
<li style="list-style: none; display: inline">
|
||||
<ul>
|
||||
<li>{@code GuidedAction.setSubActions()}: sets a {@link
|
||||
android.support.v17.leanback.widget.GuidedAction} list as a drop-down
|
||||
menu of sub-actions.
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<li>Added the {@code GuidedDatePickerAction} widget for {@link
|
||||
android.widget.DatePicker} functionality:
|
||||
</li>
|
||||
|
||||
<li style="list-style: none; display: inline">
|
||||
<ul>
|
||||
<li>The date is selected using year, month, and day columns and has a
|
||||
customizable range.
|
||||
</li>
|
||||
|
||||
<li>{@code GuidedDatePickerAction.Builder}: builder class for the {@code
|
||||
GuidedDatePickerAction} object.
|
||||
</li>
|
||||
|
||||
<li>{@code GuidedDatePickerAction.Builder.datePickerFormat(String
|
||||
datePickerFormat)}: set the desired date format by passing the
|
||||
appropriate three-character {@code String}, e.g. {@code “YMD”} or {@code
|
||||
“MDY”}. Alternatively, use the {@code datePickerFormat} XML attribute.
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Changes for <a href="features.html#v7-recyclerview">v7 RecyclerView
|
||||
library</a>:
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
<ul>
|
||||
<li>{@link android.support.v7.widget.RecyclerView} now has an opt-in
|
||||
feature called <em>AutoMeasure</em> which allows {@link
|
||||
android.support.v7.widget.RecyclerView.LayoutManager} to easily wrap
|
||||
content or handle various measurement specifications provided by the
|
||||
parent of the {@link android.support.v7.widget.RecyclerView}. It
|
||||
supports all existing animation capabilities of the {@link
|
||||
android.support.v7.widget.RecyclerView}.
|
||||
</li>
|
||||
|
||||
<li style="list-style: none; display: inline">
|
||||
<ul>
|
||||
<li>If you have a custom {@link
|
||||
android.support.v7.widget.RecyclerView.LayoutManager},
|
||||
call {@code setAutoMeasureEnabled(true)} to start using the new
|
||||
AutoMeasure API. All built-in {@link
|
||||
android.support.v7.widget.RecyclerView.LayoutManager} objects
|
||||
enable auto-measure by default.
|
||||
</li>
|
||||
|
||||
<li>{@link android.support.v7.widget.RecyclerView.LayoutManager}
|
||||
no longer ignores some {@link
|
||||
android.support.v7.widget.RecyclerView.LayoutParams} settings,
|
||||
such as {@code MATCH_PARENT} in the scroll direction.
|
||||
<p class="note">
|
||||
<strong>Note:</strong> These lifted restrictions may cause
|
||||
unexpected behavior in your layouts. Make sure you specify
|
||||
the correct layout parameters.
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>When updating a {@link
|
||||
android.support.v7.widget.RecyclerView.ViewHolder} with payload
|
||||
information, {@link android.support.v7.widget.DefaultItemAnimator}
|
||||
now disables change animations.
|
||||
</li>
|
||||
|
||||
<li>You can now modify the {@link
|
||||
android.support.v7.widget.helper.ItemTouchHelper} escape velocity to
|
||||
control swipe sensitivity. To make it easier or harder to swipe,
|
||||
override {@code getSwipeEscapeVelocity(float defaultValue)} and modify {@code defaultValue}.
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end of collapsible section -->
|
||||
|
||||
<div class="toggle-content closed">
|
||||
<p id="rev23-1-1"><a href="#" onclick="return toggleContent(this)">
|
||||
<img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt=""
|
||||
/>Android Support Library, revision 23.1.1</a> <em>(November 2015)</em>
|
||||
</p>
|
||||
<div class="toggle-content-toggleme">
|
||||
|
||||
Reference in New Issue
Block a user