• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1page.title=Support Library
2
3@jd:body
4
5<div id="qv-wrapper">
6<div id="qv">
7
8<h2>In this document</h2>
9<ol>
10  <li><a href="#Notes">Revisions</a></li>
11  <li><a href="#Downloading">Downloading the Support Package</a></li>
12  <li><a href="#SettingUp">Setting Up a Project to Use a Library</a></li>
13  <li><a href="#Using">Using the v4 Library APIs</a></li>
14  <li><a href="#Docs">Reference Docs</a></li>
15  <li><a href="#Samples">Samples</a></li>
16</ol>
17
18<h2>See also</h2>
19<ol>
20  <li><a
21href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing Apps for Android 3.0</a></li>
22  <li><a href="http://code.google.com/p/iosched/">Google I/O App source code</a></li>
23</ol>
24
25</div>
26</div>
27
28<p><em>Minimum API level supported:</em> <b>4</b></p>
29
30<p>The Support Package includes static "support libraries" that you can add to your Android
31application in order to use APIs that are either not available for older platform versions or that
32offer "utility" APIs that aren't a part of the framework APIs. The goal is to simplify your
33development by offering more APIs that you can bundle with your application so you can
34worry less about platform versions.</p>
35
36<p class="note"><strong>Note:</strong> The Support Package includes more than one support
37library. Each one has a different <em>minimum API level</em>. For example, one library requires API
38level 4 or higher, while another requires API level 13 or higher (v13 is a superset of v4 and
39includes additional
40support classes to work with v13 APIs). The minimum version is indicated
41by the directory name, such as {@code v4/} and {@code v13/}.</p>
42
43
44<h2 id="Notes">Revisions</h2>
45
46<p>The sections below provide notes about successive releases of
47the Support Package, as denoted by revision number.</p>
48
49<script type="text/javascript">
50function toggleDiv(link) {
51  var toggleable = $(link).parent();
52  if (toggleable.hasClass("closed")) {
53    //$(".toggleme", toggleable).slideDown("fast");
54    toggleable.removeClass("closed");
55    toggleable.addClass("open");
56    $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot +
57"assets/images/triangle-opened.png"));
58  } else {
59    //$(".toggleme", toggleable).slideUp("fast");
60    toggleable.removeClass("open");
61    toggleable.addClass("closed");
62    $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot +
63"assets/images/triangle-closed.png"));
64  }
65  return false;
66}
67</script>
68
69<style>
70.toggleable {
71padding: 5px 0 0;
72}
73.toggleme {
74  padding: 10px 0 0 20px;
75}
76.toggleable a {
77  text-decoration:none;
78}
79.toggleme a {
80  text-decoration:underline;
81}
82.toggleable.closed .toggleme {
83  display:none;
84}
85#jd-content .toggle-img {
86  margin:0 5px 3px 0;
87}
88</style>
89
90<div class="toggleable opened">
91  <a href="#" onclick="return toggleDiv(this)">
92  <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px"
93/>Support Package, revision 9</a> <em>(June 2012)</em>
94  <div class="toggleme">
95    <dl>
96      <dt>Changes for v4 support library:</dt>
97      <dd>
98        <ul>
99
100          <li>User Interface Support
101            <ul>
102              <li>Added {@link android.support.v4.view.PagerTabStrip} support, providing enhanced
103functionality beyond {@link android.support.v4.view.PagerTitleStrip}.</li>
104              <li>Fixed various bugs for {@link android.support.v4.view.PagerTitleStrip} and
105{@link android.support.v4.view.PagerTabStrip}, including {@link
106android.widget.TextView#setAllCaps setAllCaps} option, title alignment,
107appearance improvements, minimum width constraints and touch navigation issues.</li>
108              <li>Added support for {@link android.support.v4.view.ViewPager} page gutters, which
109helps the {@link android.support.v4.view.ViewPager} class provide paging support for content with
110a large horizontal scroll range, such as a map.</li>
111              <li>Fixed numerous bugs for {@link android.support.v4.view.ViewPager}, including size
112and data set change problems, page positioning, user interaction, scroll tracking and keyboard
113navigation problems.</li>
114              <li>Fixed many bugs for {@link android.support.v4.app.Fragment}, including proper
115handling of {@link android.support.v4.app.Fragment#onActivityResult onActivityResult()} when
116the target fragment no longer exists, dispatching selection events to invisible fragments, improved
117{@link android.support.v4.app.FragmentTransaction#replace FragmentTransaction.replace()} behavior
118and added better state handling for fragments being moved out of view.</li>
119              <li>Added support for the {@link
120android.support.v4.view.ViewCompat postOnAnimation()} method in {@link
121android.support.v4.view.ViewCompat}.</li>
122              <li>Updated {@link android.support.v4.app.NavUtils} to use Android 4.1 (API level 16)
123<em>Up</em> navigation functionality when available.</li>
124            </ul>
125          </li>
126
127          <li>Accessibility
128            <ul>
129              <li>Updated accessibility support classes, including {@link
130android.support.v4.view.accessibility.AccessibilityNodeInfoCompat}, to follow fixes made in Android
1314.1 (API level 16).</li>
132              <li>Added support for accessibility scroll actions in {@link
133android.support.v4.view.ViewPager}.</li>
134            </ul>
135          </li>
136
137          <li>General improvements
138            <ul>
139              <li>Updated {@link android.support.v4.app.TaskStackBuilder} to reflect API changes in
140Android 4.1 (API level 16).</li>
141              <li>Enhanced {@link android.support.v4.app.TaskStackBuilder} to allow it to be used
142from a Service.</li>
143              <li>Added support for {@link android.support.v4.content.IntentCompat EXTRA_HTML_TEXT}
144to {@link android.support.v4.app.ShareCompat}.</li>
145              <li>Updated {@link android.support.v4.app.NotificationCompat.Builder} to support the
146{@link android.support.v4.app.NotificationCompat.Builder#setNumber setNumber()} method.</li>
147              <li>Added support in {@link android.support.v4.net.ConnectivityManagerCompat} for the
148{@link android.support.v4.net.ConnectivityManagerCompat#isActiveNetworkMetered
149isActiveNetworkMetered()} method.</li>
150            </ul>
151          </li>
152        </ul>
153      </dd>
154    </dl>
155  </div>
156</div>
157
158<div class="toggleable closed">
159  <a href="#" onclick="return toggleDiv(this)">
160  <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px"
161/>Support Package, revision 8</a> <em>(April 2012)</em>
162  <div class="toggleme">
163    <dl>
164      <dt>Changes for v4 support library:</dt>
165      <dd>
166        <ul>
167          <li>Fixed intent flags for {@link android.app.PendingIntent} objects generated
168            by {@link android.support.v4.app.TaskStackBuilder}.</li>
169          <li>Removed unused attributes from the gridlayout library projects to make sure
170            the library can be built with API Level 7 and higher.</li>
171          <li>Added {@code .classpath} and {@code .project} files for the gridlayout
172            library project.</li>
173        </ul>
174      </dd>
175    </dl>
176  </div>
177</div>
178
179<div class="toggleable closed">
180  <a href="#" onclick="return toggleDiv(this)">
181  <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px"
182/>Support Package, revision 7</a> <em>(March 2012)</em>
183  <div class="toggleme">
184    <dl>
185      <dt>Changes for v4 support library:</dt>
186      <dd>
187        <ul>
188          <li>Added {@link android.support.v4.app.ShareCompat}, which provides helper classes
189for sending and receiving content for social sharing applications, including new metadata for
190attributing shared data to the source app. This class also provides compatible integration with the
191new {@link android.widget.ShareActionProvider} in Android 4.0.</li>
192          <li>Added {@link android.support.v4.app.NavUtils} and {@link
193android.support.v4.app.TaskStackBuilder} to provide support for implementing the
194<a href="{@docRoot}design/index.html">Android Design</a> guidelines for navigation. These
195additions include a way to implement the action bar's <em>Up</em> button across versions.
196For an example implementation of this pattern, see the AppNavigation sample in
197({@code <em>&lt;sdk&gt;</em>/samples/<em>&lt;platform&gt;</em>/AppNavigation}).</li>
198          <li>Added {@link android.support.v4.app.NotificationCompat.Builder} to provide a
199compatibility implementation of Android 3.0's {@link android.app.Notification.Builder} helper class
200for creating standardized system notifications.</li>
201        </ul>
202      </dd>
203    </dl>
204  </div>
205</div>
206
207<div class="toggleable closed">
208  <a href="#" onclick="return toggleDiv(this)">
209  <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px"
210/>Support Package, revision 6</a> <em>(December 2011)</em>
211  <div class="toggleme">
212
213    <p class="note"><strong>Note:</strong> Reference for support library APIs are now available with
214    the framework references, for example: {@link android.support.v4.app}.</p>
215<dl>
216      <dt>Changes for v4 support library:</dt>
217      <dd>
218        <ul>
219          <li>Changes to ViewPager:
220            <ul>
221              <li>Added extra decorative view support for {@link android.support.v4.view.ViewPager}.
222                Decorative views may be supplied as child views of a pager in XML layout.</li>
223              <li>Added {@link android.support.v4.view.PagerAdapter#getPageTitle
224                PagerAdapter.getPageTitle()} to supply title strings for pages, which defaults to no
225                title for each page.</li>
226              <li>Added {@link android.support.v4.view.PagerTitleStrip}, a non-interactive title
227                strip, that can be added as a child of ViewPager. Developers can supply text
228                appearance and color, as well as layout sizing and gravity information.</li>
229              <li>Updated {@link android.support.v4.view.PagerAdapter} methods to take ViewGroup
230                objects, rather than View to avoid class casting in adapter implementations.</li>
231              <li>Updated {@link android.support.v4.view.ViewPager} to use Launcher-style
232                fling behavior.</li>
233              <li>Bug fixes for user interface interaction and test automation.</li>
234            </ul>
235          </li>
236
237          <li>Support for Fragments:
238            <ul>
239              <li>Changed {@code setStartDeferred()} method to {@link
240                android.support.v4.app.Fragment#setUserVisibleHint}.</li>
241              <li>Added deferred start for off-screen pages to improve performance.</li>
242            </ul>
243          </li>
244
245          <li>Support for Accessiblity APIs:
246            <ul>
247              <li>Updated {@link android.support.v4.view.AccessibilityDelegateCompat} methods
248                to return empty lists instead of null.</li>
249              <li>Added new APIs needed by the v4 samples.</li>
250            </ul>
251          </li>
252
253        </ul>
254      </dd>
255    </dl>
256  </div>
257</div>
258
259<div class="toggleable closed">
260  <a href="#" onclick="return toggleDiv(this)">
261  <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px"
262/>Support Package, revision 5</a> <em>(December 2011)</em>
263  <div class="toggleme">
264    <dl>
265      <dt>Changes for v4 support library:</dt>
266      <dd>
267        <ul>
268          <li>Support for Accessiblity APIs:
269            <ul>
270              <li>Added {@link android.support.v4.view.AccessibilityDelegateCompat}
271              to support {@link android.view.View.AccessibilityDelegate}.</li>
272
273              <li>Added {@link android.support.v4.view.accessibility.AccessibilityEventCompat}
274              to support {@link android.view.accessibility.AccessibilityEvent}.</li>
275
276              <li>Added {@link android.support.v4.view.accessibility.AccessibilityManagerCompat}
277              to support {@link android.view.accessibility.AccessibilityManager}.</li>
278
279              <li>Added {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat}
280              to support {@link android.view.accessibility.AccessibilityNodeInfo}.</li>
281
282              <li>Added {@link android.support.v4.view.accessibility.AccessibilityRecordCompat}
283              to support {@link android.view.accessibility.AccessibilityRecord}.</li>
284
285              <li>Added {@link
286              android.support.v4.accessibilityservice.AccessibilityServiceInfoCompat}
287              to support {@link android.accessibilityservice.AccessibilityServiceInfo}.</li>
288
289              <li>Added {@link android.support.v4.view.ViewGroupCompat}
290              to support accessibility features in {@link android.view.ViewGroup}.
291              </li>
292
293              <li>Modified {@link android.support.v4.view.ViewCompat}
294              to support accessibility features in {@link android.view.View}.</li>
295            </ul>
296          </li>
297
298          <li>Changes to ViewPager:
299            <ul>
300              <li>Added support for margins between pages.
301              An optional {@link android.graphics.drawable.Drawable} can be provided
302              to fill the margins.</li>
303              <li>Added support for {@link android.widget.EdgeEffect}.</li>
304              <li>Added support for keyboard navigation</li>
305              <li>Added support to control how many pages are kept to either side
306              of the current page.</li>
307              <li>Improved touch physics.</li>
308              <li>Bug fixes for user interface behavior.</li>
309            </ul>
310          </li>
311        </ul>
312      </dd>
313    </dl>
314  </div>
315</div>
316
317<div class="toggleable closed">
318  <a href="#" onclick="return toggleDiv(this)">
319  <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px"
320/>Support Package, revision 4</a> <em>(October 2011)</em>
321  <div class="toggleme">
322    <dl>
323      <dt>Changes for v4 support library:</dt>
324      <dd>
325        <ul>
326          <li>Added <code>EdgeEffectCompat</code> to
327          support {@link android.widget.EdgeEffect}.</li>
328
329          <li>Added <code>LocalBroadcastManager</code> to allow applications to easily
330            register for and receive intents within a single application without
331            broadcasting them globally.</li>
332
333          <li>Added support in <code>ViewCompat</code> to check for and set overscroll
334          modes for {@link android.view.View}s on Android 2.3 and later.</li>
335          <li>Changes to Fragment APIs:
336            <ul>
337              <li>Added new APIs to control the visibility of new menus.</li>
338              <li>Added custom animation APIs.</li>
339              <li>Added APIs in <code>FragmentActivity</code> to retain custom,
340              non-configuration instance data.</li>
341              <li>Various bug fixes.</li>
342            </ul>
343          </li>
344
345          <li>Fixed a {@link android.content.Loader} bug that caused issues in
346          canceling {@link android.os.AsyncTask}s when running on Froyo and older
347          versions of the platform. The support
348          code now uses its own version of {@link android.os.AsyncTask} to keep the same
349          behavior on all platform versions.</li>
350
351        </ul>
352      </dd>
353    </dl>
354  </div>
355</div>
356
357
358<div class="toggleable closed">
359  <a href="#" onclick="return toggleDiv(this)">
360  <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px"
361/>Compatibility Package, revision 3</a> <em>(July 2011)</em>
362  <div class="toggleme">
363    <dl>
364      <dt>Changes for v4 support library:</dt>
365      <dd>
366        <ul>
367          <li>Adds support for {@link android.app.Fragment.SavedState}</li>
368          <li>Adds {@code MotionEventCompat} to support newer {@link
369android.view.MotionEvent} APIs</li>
370          <li>Adds {@code VelocityTrackerCompat} to support a newer {@link
371android.view.VelocityTracker} APIs</li>
372          <li>Adds {@code ViewConfigurationCompat} to support a newer {@link
373android.view.ViewConfiguration} APIs</li>
374          <li>All new APIs (available only in the support library) that allow you to create UIs
375with horizontal paging, allowing users to swipe left and right between content views. Classes to
376support this include:
377            <ul>
378              <li>{@code ViewPager}: A {@link android.view.ViewGroup} that manages the
379layout for the child views, which the user can swipe between.</li>
380              <li>{@code PagerAdapter}: An adapter that populates the {@code ViewPager} with the
381views that represent each page.</li>
382              <li>{@code FragmentPagerAdapter}: An extension of {@code PagerAdapter} for flipping
383between fragments.</li>
384              <li>{@code FragmentStatePagerAdapter}: An extension of {@code PagerAdapter} for
385flipping between fragments that uses the library's support for {@link
386android.app.Fragment.SavedState}.</li>
387            </ul>
388          </li>
389        </ul>
390      </dd>
391      <dt>New v13 support library:</dt>
392      <dd>
393        <ul>
394          <li>Includes the {@code FragmentPagerAdapter} and {@code FragmentStatePagerAdapter}
395to support the horizontal paging.
396          <p>These are exactly the same as the APIs added to the v4 support library, but rely on
397other platform components in Android 3.2. Use this library instead of v4 if you're developing for
398Android 3.2 and higher (all other APIs in the v4 library are already available with API level
39913).</p>
400          </li>
401        </ul>
402      </dd>
403    </dl>
404  </div>
405</div>
406
407
408<div class="toggleable closed">
409  <a href="#" onclick="return toggleDiv(this)">
410  <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px"
411/>Compatibility Package, revision 2</a> <em>(May 2011)</em>
412  <div class="toggleme">
413    <dl>
414    <dt>Changes for v4 library:</dt>
415    <dd>
416      <ul>
417        <li>Support for fragment animations</li>
418        <li>Fix {@code android.support.v4.app.Fragment#onActivityResult Fragment.onActivityResult()}
419          bug</li>
420      </ul>
421    </dd>
422    </dl>
423  </div>
424</div>
425
426
427<div class="toggleable closed">
428  <a href="#" onclick="return toggleDiv(this)">
429  <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px"
430/>Compatibility Package, revision 1</a> <em>(March 2011)</em>
431  <div class="toggleme">
432      <p>Initial release with the v4 library.</p>
433  </div>
434</div>
435
436
437
438<h2 id="Downloading">Downloading the Support Package</h2>
439
440<p>The Support Package is provided as a downloadable package from the Android SDK
441Manager. To install:</p>
442
443<ol>
444  <li>Launch the Android SDK Manager.
445    <p>From Eclipse, you can select <strong>Window</strong>
446&gt; <strong>Android SDK Manager</strong>. Or, launch {@code SDK Manager.exe} from
447the {@code &lt;sdk&gt;/} directory (on Windows only) or {@code android} from the {@code
448&lt;sdk&gt;/tools/} directory.</p></li>
449  <li>Expand the Android Repository, check <strong>Android Support package</strong>
450and click <strong>Install selected</strong>.</li>
451  <li>Proceed to install the package.</li>
452</ol>
453
454<p>When done, all files (including source code, samples, and the {@code .jar} files) are saved
455into the <code>&lt;sdk&gt;/extras/android/support/</code> directory. This directory contains
456each of the different support libraries, such as the library for API level 4 and up and the library
457for API level 13 and up, each named with the respective version (such as {@code v4/}).</p>
458
459
460<h2 id="SettingUp">Setting Up a Project to Use a Library</h2>
461
462<p>To add one of the libraries to your Android project:</p>
463<ol>
464  <li>In your Android project, create a directory named {@code libs} at the root of your
465project (next to {@code src/}, {@code res/}, etc.)</li>
466  <li>Locate the JAR file for the library you want to use and copy it into the {@code
467libs/} directory.
468    <p>For example, the library that supports API level 4 and up is located at {@code
469&lt;sdk&gt;/extras/android/support/v4/android-support-v4.jar}.</p>
470  </li>
471  <li>Add the JAR to your project build path.
472    <p>In Eclipse, right-click the JAR file in the Package Explorer, select <strong>Build
473Path</strong> &gt; <strong>Add to Build Path</strong>.</p>
474  </li>
475</ol>
476
477<p>Your application is now ready to use the library APIs. All the
478provided APIs are available in the {@code android.support} package (for
479example, {@code android.support.v4}).</p>
480
481<p class="note"><strong>Tip:</strong> To see the library APIs in action, take a look at the sample
482apps in {@code &lt;sdk&gt;/extras/android/support/&lt;version&gt;/samples/}.</p>
483
484<p class="warning"><strong>Warning:</strong> Be certain that you not confuse the standard
485{@code android} packages with those in {@code android.support} library. Some code completion tools
486might
487get this wrong, especially if you're building against recent versions of the platform. To be safe,
488keep your build target set to the same version as you have defined for your <a
489href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code android:minSdkVersion}</a>
490and double check the import statements for classes that also exist in the support library, such as
491{@code SimpleCursorAdapter}.</p>
492
493
494<h2 id="Using">Using the v4 Library APIs</h2>
495
496<p>The support library for v4 provides access to several classes introduced with Android 3.0 and
497beyond, plus some updated version of existing classes, and even some APIs that currently don't
498exist in the Android platform. Some of the most useful and notable classes that have
499counterparts in the v4 support library are:</p>
500
501<ul>
502  <li>{@link android.app.Fragment}</li>
503  <li>{@link android.app.FragmentManager}</li>
504  <li>{@link android.app.FragmentTransaction}</li>
505  <li>{@link android.app.ListFragment}</li>
506  <li>{@link android.app.DialogFragment}</li>
507  <li>{@link android.app.LoaderManager}</li>
508  <li>{@link android.content.Loader}</li>
509  <li>{@link android.content.AsyncTaskLoader}</li>
510  <li>{@link android.content.CursorLoader}</li>
511</ul>
512
513<p>For each of the classes above (and others not listed), the APIs work almost exactly the same
514as the counterparts in the latest Android platform. Thus, you can usually refer to
515the online documentation for information about the supported APIs. There are some
516differences, however. Most notably:</p>
517
518<ul>
519  <li>When creating an activity to use fragments, you must declare your activity to extend the
520{@link android.support.v4.app.FragmentActivity} class (instead of the traditional
521{@link android.app.Activity} class).</li>
522  <li>To manage your fragments and loaders, you must use the methods
523  {@link android.support.v4.app.FragmentActivity#getSupportFragmentManager
524  FragmentActivity.getSupportFragmentManager()} and
525  {@link android.support.v4.app.FragmentActivity#getSupportLoaderManager
526  FragmentActivity.getSupportLoaderManager()} (instead of the
527  {@link android.app.Activity#getFragmentManager()} and
528  {@link android.app.Activity#getLoaderManager()} methods).</li>
529  <li>The {@link android.app.ActionBar} is <strong>not supported</strong> by the library.
530However, when creating your <a href="{@docRoot}guide/topics/ui/menus.html#options-menu">Options
531Menu</a>, you can declare which items should be added to the Action Bar when it's available (on
532Android 3.0 or later). You can do so with the
533{@link android.support.v4.view.MenuCompat#setShowAsAction MenuCompat.setShowAsAction()} method, for
534example:
535<pre>
536public boolean onCreateOptionsMenu(Menu menu) {
537    MenuInflater inflater = getMenuInflater();
538    inflater.inflate(R.menu.options, menu);
539    MenuCompat.setShowAsAction(menu.findItem(R.id.action_search), 1);
540    return true;
541}
542</pre>
543<p>Also see the <a href="{@docRoot}resources/samples/ActionBarCompat/index.html">Action Bar
544Compatibility</a> sample for a demonstration of how to use {@link android.app.ActionBar} on Android
5453.0+ and also support action bar functionality on older versions.</p>
546</li>
547</ul>
548
549<div class="note"><p><strong>Tip:</strong> To enable the Holographic theme on devices
550running Android 3.0 or higher, declare in your manifest file that your application targets
551API level 11, for example:</p>
552<pre>
553&lt;uses-sdk android:minSdkVersion="4" android:targetSdkVersion="11" /&gt;
554</pre>
555<p>This way, your application automatically receives the Holographic theme and the Action Bar for
556each activity when running on Android 3.0 and higher.</p>
557</div>
558
559<p>For more information about how you can optimize your application for the latest
560Android-powered devices, read <a href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing
561Apps for Android 3.0</a>.</p>
562
563
564<h2 id="Docs">Reference Docs</h2>
565
566<p>The reference documentation for the Support Packages is included as part of the Android
567online developer documentation:</p>
568
569<ul>
570  <li><a href="{@docRoot}reference/android/support/v4/app/package-summary.html">Support Package
571    API 4 Reference</a></li>
572  <li><a href="{@docRoot}reference/android/support/v13/app/package-summary.html">Support Package
573    API 13 Reference</a></li>
574</ul>
575
576
577<h2 id="Samples">Samples</h2>
578
579<p>If you want to see some code that uses the support libraries, samples are included with the
580Support Package, inside each support library directory, for example; {@code
581&lt;sdk&gt;/extras/android/support/v4/samples/}. You can also view these samples as part of the
582Android online developer documentation:</p>
583
584<ul>
585  <li><a href="{@docRoot}resources/samples/Support4Demos/index.html">Support API 4 Demos</a></li>
586  <li><a href="{@docRoot}resources/samples/Support13Demos/index.html">Support API 13 Demos</a></li>
587</ul>
588
589<p>Additionally, the <a href="http://code.google.com/p/iosched/">Google I/O App</a> is a complete
590application that uses the v4 support library to provide a single APK for both handsets and tablets
591and also demonstrates some of Android's best practices in Android UI design.</p>
592