Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9709340 authored by Eric Schmidt's avatar Eric Schmidt Committed by android-build-merger
Browse files

docs: Fixed code snippet in notify-user/navigation.html am: 32cc6b7f am: 39cc61a4

am: 2367fb1c

Change-Id: Ibbca09bc1667ba02e9c6d99f39350ca8bb6d5e61
parents 4e111514 2367fb1c
Loading
Loading
Loading
Loading
+125 −96
Original line number Original line Diff line number Diff line
@@ -7,7 +7,15 @@ page.title=Support Library Features


    <h2>In this document</h2>
    <h2>In this document</h2>
    <ol>
    <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="#multidex">Multidex Support Library</a></li>
      <li><a href="#v7">v7 Support Libraries</a>
      <li><a href="#v7">v7 Support Libraries</a>
        <ol>
        <ol>
@@ -63,94 +71,115 @@ page.title=Support Library Features
  include the library in your application.</p>
  include the library in your application.</p>




<h2 id="v4">v4 Support Library</h2>
<h2 id="v4">v4 Support Libraries</h2>


<p>This library is designed to be used with Android 1.6 (API level 4) and higher. It includes the
<p>
  largest set of APIs compared to the other libraries, including support for application components,
  These libraries are designed to be used with Android 2.3 (API level 9) and
  user interface features, accessibility, data handling, network connectivity, and programming
  higher. They include the largest set of APIs compared to the other libraries,
  utilities. Here are a few of the key classes included in the v4 library:</p>
  including support for application components, user interface features,
  accessibility, data handling, network connectivity, and programming
  utilities.
</p>


<ul>
<p>
  <li>App Components
  For complete, detailed information about the classes and methods provided by
    <ul>
  the v4 support libraries, see the {@link android.support.v4.app
      <li>{@link android.support.v4.app.Fragment}
  android.support.v4} package in the API reference.
        - Adds support for encapsulation of user interface and functionality
</p>
        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>


<p>
<p class="note">
  There are many other APIs included in this library. For complete, detailed information about the
  <strong>Note:</strong> Prior to Support Library revision 24.2.0, there was a
  v4 Support Library APIs, see the {@link android.support.v4.app android.support.v4} package in the
  single v4 support library. That library was divided into multiple modules to
  API reference.
  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>
</p>


<p class="caution"><strong>Caution:</strong> Using dynamic dependencies, especially for higher version
<h3 id="v4-compat">v4 compat library</h3>
numbers, can cause unexpected version updates and regression incompatibilities.</p>

<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>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:support-v4:24.1.1
com.android.support:support-compat:24.2.0
</pre>
</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>
<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>
<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
  These libraries provide specific feature sets and can be included in your application
  independently from each other.</p>
  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>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:appcompat-v7:24.1.1
com.android.support:appcompat-v7:24.2.0
</pre>
</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>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:cardview-v7:24.1.1
com.android.support:cardview-v7:24.2.0
</pre>
</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>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:gridlayout-v7:24.1.1
com.android.support:gridlayout-v7:24.2.0
</pre>
</pre>




@@ -270,7 +299,7 @@ reference.</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>


<pre>
<pre>
com.android.support:mediarouter-v7:24.1.1
com.android.support:mediarouter-v7:24.2.0
</pre>
</pre>


<p class="caution">The v7 mediarouter library APIs introduced in Support Library
<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>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:palette-v7:24.1.1
com.android.support:palette-v7:24.2.0
</pre>
</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>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:recyclerview-v7:24.1.1
com.android.support:recyclerview-v7:24.2.0
</pre>
</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>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:preference-v7:24.1.1
com.android.support:preference-v7:24.2.0
</pre>
</pre>


<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.
<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
  This library provides specific feature sets and can be included in your application
  independently from other libraries.</p>
  independently from other libraries.</p>


<h3 id="v8-renderscript">v8 renderscript library</h3>
<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
  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
  should be aware that the steps for including these APIs in your application is <em>very
  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>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:support-v13:24.1.1
com.android.support:support-v13:24.2.0
</pre>
</pre>




@@ -406,7 +435,7 @@ for preference interfaces such as
<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>


<pre>
<pre>
com.android.support:preference-v14:24.1.1
com.android.support:preference-v14:24.2.0
</pre>
</pre>




@@ -429,7 +458,7 @@ interface and classes, such as
<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>


<pre>
<pre>
com.android.support:preference-leanback-v17:24.1.1
com.android.support:preference-leanback-v17:24.2.0
</pre>
</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>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:leanback-v17:24.1.1
com.android.support:leanback-v17:24.2.0
</pre>
</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>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:support-annotations:24.1.1
com.android.support:support-annotations:24.2.0
</pre>
</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>
<p>The Gradle build script dependency identifier for this library is as follows:</p>


<pre>
<pre>
com.android.support:design:24.1.1
com.android.support:design:24.2.0
</pre>
</pre>




@@ -519,7 +548,7 @@ Callback</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>


<pre>
<pre>
com.android.support:customtabs:24.1.1
com.android.support:customtabs:24.2.0
</pre>
</pre>




@@ -543,7 +572,7 @@ PercentRelativeLayout</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>


<pre>
<pre>
com.android.support:percent:24.1.1
com.android.support:percent:24.2.0
</pre>
</pre>




@@ -566,5 +595,5 @@ RecommendationExtender</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>


<pre>
<pre>
com.android.support:recommendation:24.1.1
com.android.support:recommendation:24.2.0
</pre>
</pre>
+317 −2

File changed.

Preview size limit exceeded, changes collapsed.

+21 −12
Original line number Original line Diff line number Diff line
@@ -85,17 +85,24 @@ Android Support Repository selected.</p>
      <li>Make sure you have downloaded the <strong>Android Support Repository</strong>
      <li>Make sure you have downloaded the <strong>Android Support Repository</strong>
        using the <a href="#download">SDK Manager</a>.</li>
        using the <a href="#download">SDK Manager</a>.</li>
      <li>Open the {@code build.gradle} file for your application.</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
      <li>Add the support library to the {@code dependencies} section. For
        support library, add the following lines:
        example, to add the v4 core-utils library, add the following lines:
<pre>
<pre>
dependencies {
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>
</pre>
      </li>
      </li>
    </ol>
    </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>
<h2 id="using-apis">Using Support Library APIs</h2>


<p>Support Library classes that provide support for existing framework APIs typically have the
<p>Support Library classes that provide support for existing framework APIs typically have the
@@ -141,12 +148,12 @@ dependencies {


<pre>
<pre>
  &lt;uses-sdk
  &lt;uses-sdk
      android:minSdkVersion="<b>7</b>"
      android:minSdkVersion="<b>14</b>"
      android:targetSdkVersion="17" /&gt;
      android:targetSdkVersion="23" /&gt;
</pre>
</pre>


<p>The manifest setting tells Google Play that your application can be installed on devices with Android
<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
<p>If you are using Gradle build files, the <code>minSdkVersion</code> setting in the build file
  overrides the manifest settings.  </p>
  overrides the manifest settings.  </p>
@@ -158,7 +165,7 @@ android {
    ...
    ...


    defaultConfig {
    defaultConfig {
        minSdkVersion 8
        minSdkVersion 16
        ...
        ...
    }
    }
    ...
    ...
@@ -166,13 +173,15 @@ android {
</pre>
</pre>


<p>In this case, the build file setting tells Google Play that the default build variant of your
<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
  information about build variants, see
  <a href="{@docRoot}studio/build/index.html">Build System Overview</a>. </p>
  <a href="{@docRoot}studio/build/index.html">Build System Overview</a>. </p>


<p class="note">
<p class="note">
  <strong>Note:</strong> If you are including the v4 support and v7 appcompat libraries in your
  <strong>Note:</strong> If you are including several support libraries, the
  application, you should specify a minimum SDK version of <code>"7"</code> (and not
  minimum SDK version must be the <em>highest</em> version required by any of
  <code>"4"</code>). The highest support library level you include in your application determines
  the specified libraries. For example, if your app includes both the <a href=
  the lowest API version in which it can operate.
  "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>
</p>
+3 −5
Original line number Original line Diff line number Diff line
@@ -48,11 +48,9 @@ animate changes between view hierarchies. This class also covers how to create c
animations.</p>
animations.</p>


<p class="note"><strong>Note:</strong> For Android versions earlier than 4.4.2 (API level 19)
<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>
but greater than or equal to Android 4.0 (API level 14), use the Android Support
attribute to animate layouts. To learn more, see
Library's <a href="/reference/android/support/transitions/package-summary.html"
<a href="{@docRoot}guide/topics/graphics/prop-animation.html">Property Animation</a> and
><code>android.support.transition</code></a> package.</p>
<a href="{@docRoot}training/animation/layout.html">Animating Layout Changes</a>.</p>



<h2>Lessons</h2>
<h2>Lessons</h2>