Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 1 | page.title=Support Package |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 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> |
Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 11 | <li><a href="#Downloading">Downloading the Support Package</a></li> |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 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> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 15 | <li><a href="#Samples">Samples</a></li> |
| 16 | </ol> |
| 17 | |
| 18 | <h2>See also</h2> |
| 19 | <ol> |
| 20 | <li><a |
| 21 | href="{@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 | |
Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 30 | <p>The Support Package includes static "support libraries" that you can add to your Android |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 31 | application in order to use APIs that are either not available for older platform versions or that |
| 32 | offer "utility" APIs that aren't a part of the framework APIs. The goal is to simplify your |
Scott Main | ffcbe48 | 2011-07-15 09:50:49 -0700 | [diff] [blame] | 33 | development by offering more APIs that you can bundle with your application so you can |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 34 | worry less about platform versions.</p> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 35 | |
Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 36 | <p class="note"><strong>Note:</strong> The Support Package includes more than one support |
Scott Main | ffcbe48 | 2011-07-15 09:50:49 -0700 | [diff] [blame] | 37 | library. Each one has a different <em>minimum API level</em>. For example, one library requires API |
Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 38 | level 4 or higher, while another requires API level 13 or higher (v13 is a superset of v4 and includes additional |
| 39 | support classes to work with v13 APIs). The minimum version is indicated |
Scott Main | ffcbe48 | 2011-07-15 09:50:49 -0700 | [diff] [blame] | 40 | by the directory name, such as {@code v4/} and {@code v13/}.</p> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 41 | |
| 42 | |
| 43 | <h2 id="Notes">Revisions</h2> |
| 44 | |
| 45 | <p>The sections below provide notes about successive releases of |
Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 46 | the Support Package, as denoted by revision number.</p> |
| 47 | |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 48 | |
| 49 | |
| 50 | <div class="toggle-content open"> |
| 51 | |
| 52 | <p><a href="#" onclick="return toggleContent(this)"> |
| 53 | <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img" /> |
Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 54 | Support Package, revision 4 (October 2011) |
| 55 | </a></p> |
| 56 | |
| 57 | <div class="toggle-content-toggleme" style="padding-left:2em"> |
| 58 | <dl> |
| 59 | <dt>Changes for v4 support library:</dt> |
| 60 | <dd> |
| 61 | <ul> |
| 62 | <li>Support for Accessiblity APIs: |
| 63 | <ul> |
| 64 | <li>Added <code>AccessibilityDelegateCompat</code> to support |
| 65 | {@link android.view.View.AccessibilityDelegate}.</li> |
| 66 | |
| 67 | <li>Added <code>AccessibilityEventCompat</code> to support |
| 68 | {@link android.view.accessibility.AccessibilityEvent}.</li> |
| 69 | |
| 70 | <li>Added <code>AccessibilityManagerCompat</code> to support |
| 71 | {@link android.view.accessibility.AccessibilityManager}.</li> |
| 72 | |
| 73 | <li>Added <code>AccessibilityNodeInfoCompat</code> to support |
| 74 | {@link android.view.accessibility.AccessibilityNodeInfo}.</li> |
| 75 | |
| 76 | <li>Added <code>AccessibilityRecordCompat</code> to support |
| 77 | {@link android.view.accessibility.AccessibilityRecord}.</li> |
| 78 | |
| 79 | <li>Added <code>AccessibilityServiceInfoCompat</code> to support |
| 80 | {@link android.accessibilityservice.AccessibilityServiceInfo}.</li> |
| 81 | |
| 82 | <li>Added <code>ViewGroupCompat</code> |
| 83 | to support accessibility features in {@link android.view.ViewGroup}. |
| 84 | </li> |
| 85 | |
| 86 | <li>Modified <code>ViewCompat</code> |
| 87 | to support accessibility features in {@link android.view.View}.</li> |
| 88 | </ul> |
| 89 | </li> |
| 90 | |
| 91 | <li>Added <code>EdgeEffectCompat</code> to |
| 92 | support {@link android.widget.EdgeEffect}.</li> |
| 93 | |
| 94 | <li>Added <code>LocalBroadcastManager</code> to allow applications to easily |
| 95 | register for and receive intents within a single application without |
| 96 | broadcasting them globally.</li> |
| 97 | |
| 98 | <li>Added support in <code>ViewCompat</code> to check for and set overscroll |
| 99 | modes for {@link android.view.View}s on Android 2.3 and later.</li> |
| 100 | <li>Changes to Fragment APIs: |
| 101 | <ul> |
| 102 | <li>Added new APIs to control the visibility of new menus.</li> |
| 103 | <li>Added custom animation APIs.</li> |
| 104 | <li>Added APIs in <code>FragmentActivity</code> to retain custom, |
| 105 | non-configuration instance data.</li> |
| 106 | <li>Various bug fixes.</li> |
| 107 | </ul> |
| 108 | </li> |
| 109 | <li>Changes to <code>ViewPager</code>: |
| 110 | <ul> |
| 111 | <li>Added support for margins between pages. |
| 112 | An optional {@link android.graphics.drawable.Drawable} can be provided |
| 113 | to fill the margins.</li> |
| 114 | <li>Added support for {@link android.widget.EdgeEffect}.</li> |
| 115 | <li>Added support for keyboard navigation</li> |
| 116 | <li>Added support to control how many pages are kept to either side |
| 117 | of the current page.</li> |
| 118 | <li>Improved touch physics.</li> |
| 119 | </ul> |
| 120 | </li> |
| 121 | |
| 122 | <li>Fixed a {@link android.content.Loader} bug that caused issues in |
| 123 | canceling {@link android.os.AsyncTask}s when running on Froyo and older |
| 124 | versions of the platform. The support |
| 125 | code now uses its own version of {@link android.os.AsyncTask} to keep the same |
| 126 | behavior on all platform versions.</li> |
| 127 | |
| 128 | </ul> |
| 129 | </dd> |
| 130 | </dl> |
| 131 | </div> |
| 132 | |
| 133 | |
| 134 | |
| 135 | </div> |
| 136 | |
| 137 | |
| 138 | <div class="toggle-content closed"> |
| 139 | |
| 140 | <p><a href="#" onclick="return toggleContent(this)"> |
| 141 | <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" /> |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 142 | Compatibility Package, revision 3 (July 2011) |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 143 | </a></p> |
| 144 | |
| 145 | <div class="toggle-content-toggleme" style="padding-left:2em"> |
| 146 | <dl> |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 147 | <dt>Changes for v4 support library:</dt> |
| 148 | <dd> |
| 149 | <ul> |
| 150 | <li>Adds support for {@link android.app.Fragment.SavedState}</li> |
| 151 | <li>Adds {@code MotionEventCompat} to support newer {@link |
| 152 | android.view.MotionEvent} APIs</li> |
| 153 | <li>Adds {@code VelocityTrackerCompat} to support a newer {@link |
| 154 | android.view.VelocityTracker} APIs</li> |
| 155 | <li>Adds {@code ViewConfigurationCompat} to support a newer {@link |
| 156 | android.view.ViewConfiguration} APIs</li> |
| 157 | <li>All new APIs (available only in the support library) that allow you to create UIs |
Scott Main | ffcbe48 | 2011-07-15 09:50:49 -0700 | [diff] [blame] | 158 | with horizontal paging, allowing users to swipe left and right between content views. Classes to |
| 159 | support this include: |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 160 | <ul> |
| 161 | <li>{@code ViewPager}: A {@link android.view.ViewGroup} that manages the |
| 162 | layout for the child views, which the user can swipe between.</li> |
| 163 | <li>{@code PagerAdapter}: An adapter that populates the {@code ViewPager} with the |
| 164 | views that represent each page.</li> |
| 165 | <li>{@code FragmentPagerAdapter}: An extension of {@code PagerAdapter} for flipping |
| 166 | between fragments.</li> |
Scott Main | ffcbe48 | 2011-07-15 09:50:49 -0700 | [diff] [blame] | 167 | <li>{@code FragmentStatePagerAdapter}: An extension of {@code PagerAdapter} for |
| 168 | flipping between fragments that uses the library's support for {@link |
| 169 | android.app.Fragment.SavedState}.</li> |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 170 | </ul> |
| 171 | </li> |
| 172 | </ul> |
| 173 | </dd> |
| 174 | <dt>New v13 support library:</dt> |
| 175 | <dd> |
| 176 | <ul> |
| 177 | <li>Includes the {@code FragmentPagerAdapter} and {@code FragmentStatePagerAdapter} |
| 178 | to support the horizontal paging. |
| 179 | <p>These are exactly the same as the APIs added to the v4 support library, but rely on |
| 180 | other platform components in Android 3.2. Use this library instead of v4 if you're developing for |
| 181 | Android 3.2 and higher (all other APIs in the v4 library are already available with API level |
| 182 | 13).</p> |
| 183 | </li> |
| 184 | </ul> |
| 185 | </dd> |
| 186 | </dl> |
| 187 | </div> |
| 188 | |
| 189 | </div> |
| 190 | |
| 191 | |
| 192 | <div class="toggle-content closed"> |
| 193 | |
| 194 | <p><a href="#" onclick="return toggleContent(this)"> |
| 195 | <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" /> |
| 196 | Compatibility Package, revision 2 (May 2011) |
| 197 | </a></p> |
| 198 | |
| 199 | <div class="toggle-content-toggleme" style="padding-left:2em"> |
| 200 | <dl> |
| 201 | <dt>Changes for v4 library:</dt> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 202 | <dd> |
| 203 | <ul> |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 204 | <li>Support for fragment animations</li> |
| 205 | <li>Fix {@code Fragment.onActivityResult()} bug</li> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 206 | </ul> |
| 207 | </dd> |
| 208 | </dl> |
| 209 | </div> |
| 210 | |
| 211 | </div> |
| 212 | |
| 213 | |
| 214 | <div class="toggle-content closed"> |
| 215 | |
| 216 | <p><a href="#" onclick="return toggleContent(this)"> |
| 217 | <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" /> |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 218 | Compatibility Package, revision 1 (March 2011) |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 219 | </a></p> |
| 220 | |
| 221 | <div class="toggle-content-toggleme" style="padding-left:2em"> |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 222 | <p>Initial release with the v4 library.</p> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 223 | </div> |
| 224 | |
| 225 | </div> |
| 226 | |
| 227 | |
| 228 | |
Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 229 | <h2 id="Downloading">Downloading the Support Package</h2> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 230 | |
Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 231 | <p>The Support Package is provided as a downloadable package from the Android SDK and AVD |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 232 | Manager. To install:</p> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 233 | |
| 234 | <ol> |
| 235 | <li>Launch the SDK and AVD Manager. |
| 236 | <p>From Eclipse, you can select <strong>Window</strong> |
| 237 | > <strong>Android SDK and AVD Manager</strong>. Or, launch {@code SDK Manager.exe} from |
| 238 | the {@code <sdk>/} directory (on Windows only) or {@code android} from the {@code |
| 239 | <sdk>/tools/} directory.</p></li> |
Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 240 | <li>Expand the Android Repository, check <strong>Android Support package</strong> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 241 | and click <strong>Install selected</strong>.</li> |
| 242 | <li>Proceed to install the package.</li> |
| 243 | </ol> |
| 244 | |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 245 | <p>When done, all files (including source code, samples, and the {@code .jar} files) are saved |
Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 246 | into the <code><sdk>/extras/android/support/</code> directory. This directory contains |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 247 | each of the different support libraries, such as the library for API level 4 and up and the library |
| 248 | for API level 13 and up, each named with the respective version (such as {@code v4/}).</p> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 249 | |
| 250 | |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 251 | <h2 id="SettingUp">Setting Up a Project to Use a Library</h2> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 252 | |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 253 | <p>To add one of the libraries to your Android project:</p> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 254 | <ol> |
| 255 | <li>In your Android project, create a directory named {@code libs} at the root of your |
| 256 | project (next to {@code src/}, {@code res/}, etc.)</li> |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 257 | <li>Locate the JAR file for the library you want to use and copy it into the {@code |
| 258 | libs/} directory. |
| 259 | <p>For example, the library that supports API level 4 and up is located at {@code |
Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 260 | <sdk>/extras/android/support/v4/android-support-v4.jar}.</p> |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 261 | </li> |
| 262 | <li>Add the JAR to your project build path. |
| 263 | <p>In Eclipse, right-click the JAR file in the Package Explorer, select <strong>Build |
| 264 | Path</strong> > <strong>Add to Build Path</strong>. You should then see the JAR file appear in a |
| 265 | new directory called Referenced Libraries.</p> |
| 266 | </li> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 267 | </ol> |
| 268 | |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 269 | <p>Your application is now ready to use the library APIs. All the |
| 270 | provided APIs are available in the {@code android.support} package (for |
| 271 | example, {@code android.support.v4}).</p> |
| 272 | |
| 273 | <p class="note"><strong>Tip:</strong> To see the library APIs in action, take a look at the sample |
Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 274 | apps in {@code extras/android/support/<version>/samples/}.</p> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 275 | |
| 276 | <p class="warning"><strong>Warning:</strong> Be certain that you not confuse the standard |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 277 | {@code android} packages with those in {@code android.support} library. Some code completion tools |
| 278 | might |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 279 | get this wrong, especially if you're building against recent versions of the platform. To be safe, |
| 280 | keep your build target set to the same version as you have defined for your <a |
| 281 | href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code android:minSdkVersion}</a> |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 282 | and double check the import statements for classes that also exist in the support library, such as |
| 283 | {@code SimpleCursorAdapter}.</p> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 284 | |
| 285 | |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 286 | <h2 id="Using">Using the v4 Library APIs</h2> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 287 | |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 288 | <p>The support library for v4 provides access to several classes introduced with Android 3.0 and |
| 289 | beyond, plus some updated version of existing classes, and even some APIs that currently don't |
| 290 | exist in the Android platform. Some of the most useful and notable classes that have |
| 291 | counterparts in the v4 support library are:</p> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 292 | |
| 293 | <ul> |
| 294 | <li>{@link android.app.Fragment}</li> |
| 295 | <li>{@link android.app.FragmentManager}</li> |
| 296 | <li>{@link android.app.FragmentTransaction}</li> |
| 297 | <li>{@link android.app.ListFragment}</li> |
| 298 | <li>{@link android.app.DialogFragment}</li> |
| 299 | <li>{@link android.app.LoaderManager}</li> |
| 300 | <li>{@link android.content.Loader}</li> |
| 301 | <li>{@link android.content.AsyncTaskLoader}</li> |
| 302 | <li>{@link android.content.CursorLoader}</li> |
| 303 | </ul> |
| 304 | |
| 305 | <p>For each of the classes above (and others not listed), the APIs work almost exactly the same |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 306 | as the counterparts in the latest Android platform. Thus, you can usually refer to |
| 307 | the online documentation for information about the supported APIs. There are some |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 308 | differences, however. Most notably:</p> |
| 309 | |
| 310 | <ul> |
| 311 | <li>When creating an activity to use fragments, you must declare your activity to extend the |
| 312 | {@code FragmentActivity} class (instead of the traditional {@link android.app.Activity} |
| 313 | class).</li> |
| 314 | <li>To manage your fragments and loaders, you must use the methods {@code |
| 315 | FragmentActivity.getSupportFragmentManager()} and {@code |
| 316 | FragmentActivity.getSupportLoaderManager()} (instead of the {@link |
| 317 | android.app.Activity#getFragmentManager()} and {@link android.app.Activity#getLoaderManager()} |
| 318 | methods).</li> |
| 319 | <li>The {@link android.app.ActionBar} is <strong>not supported</strong> by the library. |
| 320 | However, when creating your <a href="{@docRoot}guide/topics/ui/menus.html#options-menu">Options |
| 321 | Menu</a>, you can declare which items should be added to the Action Bar when it's available (on |
| 322 | Android 3.0 or later). You can do so with the {@code MenuCompat.setShowAsAction()} method. For |
| 323 | example: |
| 324 | <pre> |
| 325 | public boolean onCreateOptionsMenu(Menu menu) { |
| 326 | MenuInflater inflater = getMenuInflater(); |
| 327 | inflater.inflate(R.menu.options, menu); |
| 328 | MenuCompat.setShowAsAction(menu.findItem(R.id.action_search), 1); |
| 329 | return true; |
| 330 | } |
| 331 | </pre> |
| 332 | </li> |
| 333 | </ul> |
| 334 | |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 335 | <div class="note"><p><strong>Tip:</strong> To enable the Holographic theme on devices |
| 336 | running Android 3.0 or higher, declare in your manifest file that your application targets |
| 337 | API level 11. For example:</p> |
| 338 | <pre> |
| 339 | <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="11" /> |
| 340 | </pre> |
| 341 | <p>This way, your application automatically receives the Holographic theme and the Action Bar for |
| 342 | each activity when running on Android 3.0 and higher.</p> |
| 343 | </div> |
| 344 | |
| 345 | <p>For more information about how you can optimize your application for the latest |
| 346 | Android-powered devices, read <a href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing |
| 347 | Apps for Android 3.0</a>.</p> |
| 348 | |
| 349 | |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 350 | <h2 id="Docs">Reference Docs</h2> |
| 351 | |
| 352 | <p>The libraries currently do not provide reference documentation for the included APIs. To generate |
| 353 | your own set using the {@code javadoc} tool, perform the following from a command (as appropriate |
| 354 | for the library version you're using). In this example, documentation is generated for the v4 |
| 355 | library:</p> |
| 356 | |
| 357 | <pre class="no-pretty-print"> |
Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 358 | cd <sdk>/extras/android/support/v4/ |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 359 | mkdir docs |
| 360 | javadoc -sourcepath src/java/ -subpackages android.support.v4 -d docs |
| 361 | </pre> |
| 362 | <p>Open the {@code docs/index.html} file to begin browsing the generated documentation.</p> |
| 363 | |
| 364 | |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 365 | <h2 id="Samples">Samples</h2> |
| 366 | |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 367 | <p>If you want to see some code that uses the support libraries, samples are included with the |
Robert Ly | 8db858f | 2011-10-18 13:30:47 -0700 | [diff] [blame^] | 368 | Support Package, inside each support library directory. For example, at {@code |
| 369 | extras/android/support/v4/samples/}.</p> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 370 | |
| 371 | <p>Additionally, the <a href="http://code.google.com/p/iosched/">Google I/O App</a> is a complete |
Scott Main | aecaf93 | 2011-07-14 10:01:42 -0700 | [diff] [blame] | 372 | application that uses the v4 support library to provide a single APK for both handsets and tablets |
| 373 | and also demonstrates some of Android's best practices in Android UI design.</p> |
Scott Main | 28fb09e | 2011-05-23 17:27:17 -0700 | [diff] [blame] | 374 | |
| 375 | |
| 376 | |
| 377 | |