From 4783301fa5f710279fc80bff0e77cad1f43e4112 Mon Sep 17 00:00:00 2001 From: Adarsh Fernando Date: Wed, 24 Feb 2016 11:05:43 -0800 Subject: [PATCH] Docs: Added Android Support Library 23.2 Release Notes Bug: 26448279 Change-Id: I7549f87a374a3c2f632e31b8da9cac8394e5c9e6 --- docs/html/tools/support-library/index.jd | 361 ++++++++++++++++++++++- 1 file changed, 359 insertions(+), 2 deletions(-) diff --git a/docs/html/tools/support-library/index.jd b/docs/html/tools/support-library/index.jd index d702b40e49137..df9dcf9fbc398 100644 --- a/docs/html/tools/support-library/index.jd +++ b/docs/html/tools/support-library/index.jd @@ -59,8 +59,365 @@ page.title=Support Library

This section provides details about the Support Library package releases.

-

- + Android Support Library, revision 23.2.0 (February + 2016) +

+ +
+
+
+ Changes for v4 Support library: +
+ +
+
    +
  • 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. +
  • + +
  • The system now calls {@link + android.support.v4.app.FragmentActivity#onActivityResult onActivityResult()} for a + nested {@link android.support.v4.app.FragmentActivity}. +
  • +
+
+ +
+ Changes for v7 AppCompat + library: +
+ +
+
    +
  • Added Night Mode functionality to API level 14 and higher. Switch + between Material + Light and Material Dark Themes based on the time of day or + app-specific setting. +
  • + +
  • +
      +
    • Day and night themes can be found here: {@code + <sdk>/extras/android/support/v7/appcompat/res/values/themes_daynight.xml} +
    • + +
    • {@code AppCompatDelegate.setDefaultNightMode()}: sets the + app’s default mode by passing one of the following constants: +
    • + +
    • +
        +
      • {@code MODE_NIGHT_AUTO} +
      • + +
      • {@code MODE_NIGHT_NO} +
      • + +
      • {@code MODE_NIGHT_YES} +
      • + +
      • {@code MODE_NIGHT_FOLLOW_SYSTEM} +
      • +
      +
    • + +
    • {@code AppCompatDelegate.setLocalNightMode()}: overrides + the night mode setting for the local app component. +
    • + +
    • {@code AppCompatDelegate.getDefaultNightMode()}: returns + the default night mode. +
    • +
    +
  • +
+
+ +
+ Changes for v7 mediarouter + library: +
+ +
+
    +
  • {@link android.support.v7.app.MediaRouteControllerDialog} now + correctly applies custom app theme colors. +
  • +
+
+ +
+ Changes for Design support library: +
+ +
+
    +
  • Added support for bottom + sheets. 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. +
  • +
+
+ +
+ Changes for the CustomTabs support + library: +
+ +
+
    +
  • + Chrome + Custom Tabs now allows apps to include a bottom bar with action + buttons in addition to the existing top action button. +
  • + +
  • {@code CustomTabsIntent.Builder.addToolBarItem()}: adds an action + button to a custom tab. You can use this to add multiple buttons. +
  • + +
  • {@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. +
  • +
+
+ +
+ Added VectorDrawable support library: +
+ +
+
    +
  • Added Classes: +
  • + +
  • +
      +
    • {@code VectorDrawableCompat} +
    • + +
    • {@code AnimatedVectorDrawableCompat} +
    • +
    +
  • + +
  • 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. +
  • + +
  • This library is now a dependency of the v7 AppCompat library, allowing + developers and AppCompat + 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. +
  • + +
  • To keep referencing attribute IDs on API level 20 or + lower, add the following {@code appt} flag to your {@code + build,gradle} file: +
  • + +
  • +
      +
    • If you are building with Android Plugin for Gradle 1.5.0 or + lower, add the following to your {@code 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"
      +  }
      +}
      +
      +
    • + +
    • If you are building with Android Plugin for Gradle 2.0.0 or + higher, add the following to your {@code build.gradle} file: +
    • + +
    • +
      +android {
      +  defaultConfig {
      +    vectorDrawables.useSupportLibrary = true
      +  }
      +}
      +
      +
    • +
    +
  • +
+
+ +
+ Changes for v17 Leanback + Library: +
+ +
+
    +
  • 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: +
  • + +
  • +
      +
    • Added button actions to {@link + android.support.v17.leanback.widget.GuidedAction}: +
    • + +
        +
      • {@code GuidedStepFragment.setButtonActions()}: sets a list of + {@link android.support.v17.leanback.widget.GuidedAction} buttons that + the user may select from the Actions view. +
      • +
      + + +
    • Description fields are now editable: +
    • + +
    • +
        +
      • {@code GuidedAction.Builder.descriptionEditable()}: when passing + {@code true}, sets the action’s description to be editable. +
      • + +
      • {@code GuidedAction.getEditDescription()}: returns the editable + description as a {@code CharSequence}. +
      • +
      +
    • + +
    • Added drop-down lists of sub-actions: +
    • + +
    • +
        +
      • {@code GuidedAction.setSubActions()}: sets a {@link + android.support.v17.leanback.widget.GuidedAction} list as a drop-down + menu of sub-actions. +
      • +
      +
    • +
    + +
  • Added the {@code GuidedDatePickerAction} widget for {@link + android.widget.DatePicker} functionality: +
  • + +
  • +
      +
    • The date is selected using year, month, and day columns and has a + customizable range. +
    • + +
    • {@code GuidedDatePickerAction.Builder}: builder class for the {@code + GuidedDatePickerAction} object. +
    • + +
    • {@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. +
    • +
    +
  • +
+
+
+ +
+
+ Changes for v7 RecyclerView + library: +
+ +
+
    +
  • {@link android.support.v7.widget.RecyclerView} now has an opt-in + feature called AutoMeasure 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}. +
  • + +
  • +
      +
    • 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. +
    • + +
    • {@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. +

      + Note: These lifted restrictions may cause + unexpected behavior in your layouts. Make sure you specify + the correct layout parameters. +

      +
    • +
    +
  • + +
  • When updating a {@link + android.support.v7.widget.RecyclerView.ViewHolder} with payload + information, {@link android.support.v7.widget.DefaultItemAnimator} + now disables change animations. +
  • + +
  • 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}. +
  • +
+
+
+
+
+ + +
+

+ Android Support Library, revision 23.1.1 (November 2015)