summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
author Scott Main <smain@google.com> 2012-06-21 17:14:39 -0700
committer Scott Main <smain@google.com> 2012-06-21 21:27:30 -0700
commit50e990c64fa23ce94efa76b9e72df7f8ec3cee6a (patch)
tree52605cd25e01763596477956963fabcd087054b0 /docs
parenta2860267cad115659018d636bf9203a644c680a7 (diff)
Massive clobber of all HTML files in developer docs for new site design
Change-Id: Idc55a0b368c1d2c1e7d4999601b739dd57f08eb3
Diffstat (limited to 'docs')
-rw-r--r--docs/html/about/about_toc.cs44
-rw-r--r--docs/html/about/dashboards/index.jd235
-rw-r--r--docs/html/about/flexible.jd34
-rw-r--r--docs/html/about/index.jd157
-rw-r--r--docs/html/about/marketplace.jd62
-rw-r--r--docs/html/about/start.jd63
-rw-r--r--docs/html/about/versions/android-1.1.jd (renamed from docs/html/sdk/android-1.1.jd)0
-rw-r--r--docs/html/about/versions/android-1.5-highlights.jd (renamed from docs/html/sdk/android-1.5-highlights.jd)0
-rw-r--r--docs/html/about/versions/android-1.5.jd (renamed from docs/html/sdk/android-1.5.jd)10
-rw-r--r--docs/html/about/versions/android-1.6-highlights.jd (renamed from docs/html/sdk/android-1.6-highlights.jd)2
-rw-r--r--docs/html/about/versions/android-1.6.jd (renamed from docs/html/sdk/android-1.6.jd)10
-rw-r--r--docs/html/about/versions/android-2.0-highlights.jd (renamed from docs/html/sdk/android-2.0-highlights.jd)2
-rw-r--r--docs/html/about/versions/android-2.0.1.jd (renamed from docs/html/sdk/android-2.0.1.jd)14
-rw-r--r--docs/html/about/versions/android-2.0.jd (renamed from docs/html/sdk/android-2.0.jd)12
-rw-r--r--docs/html/about/versions/android-2.1.jd (renamed from docs/html/sdk/android-2.1.jd)12
-rw-r--r--docs/html/about/versions/android-2.2-highlights.jd (renamed from docs/html/sdk/android-2.2-highlights.jd)0
-rw-r--r--docs/html/about/versions/android-2.2.jd (renamed from docs/html/sdk/android-2.2.jd)232
-rw-r--r--docs/html/about/versions/android-2.3-highlights.jd (renamed from docs/html/sdk/android-2.3-highlights.jd)42
-rw-r--r--docs/html/about/versions/android-2.3.3.jd (renamed from docs/html/sdk/android-2.3.3.jd)239
-rw-r--r--docs/html/about/versions/android-2.3.4.jd148
-rw-r--r--docs/html/about/versions/android-2.3.jd (renamed from docs/html/sdk/android-2.3.jd)252
-rw-r--r--docs/html/about/versions/android-3.0-highlights.jd (renamed from docs/html/sdk/android-3.0-highlights.jd)56
-rw-r--r--docs/html/about/versions/android-3.0.jd (renamed from docs/html/sdk/android-3.0.jd)236
-rw-r--r--docs/html/about/versions/android-3.1-highlights.jd (renamed from docs/html/sdk/android-3.1-highlights.jd)15
-rw-r--r--docs/html/about/versions/android-3.1.jd (renamed from docs/html/sdk/android-3.1.jd)261
-rw-r--r--docs/html/about/versions/android-3.2.jd (renamed from docs/html/sdk/android-3.2.jd)195
-rw-r--r--docs/html/about/versions/android-4.0-highlights.jd (renamed from docs/html/sdk/android-4.0-highlights.jd)185
-rw-r--r--docs/html/about/versions/android-4.0.3.jd (renamed from docs/html/sdk/android-4.0.3.jd)263
-rw-r--r--docs/html/about/versions/android-4.0.jd (renamed from docs/html/sdk/android-4.0.jd)266
-rw-r--r--docs/html/about/versions/api-levels.jd (renamed from docs/html/guide/appendix/api-levels.jd)48
-rw-r--r--docs/html/about/versions/index.jd (renamed from docs/html/guide/basics/what-is-android.jd)2
-rw-r--r--docs/html/design/building-blocks/index.jd2
-rw-r--r--docs/html/design/building-blocks/progress.jd1
-rw-r--r--docs/html/design/design_toc.cs4
-rw-r--r--docs/html/design/index.jd4
-rw-r--r--docs/html/design/media/typography_sizes.pngbin7361 -> 3923 bytes
-rw-r--r--docs/html/design/patterns/index.jd2
-rw-r--r--docs/html/design/style/iconography.jd2
-rw-r--r--docs/html/design/style/index.jd2
-rw-r--r--docs/html/develop/index.jd366
-rw-r--r--docs/html/distribute/distribute_toc.cs112
-rw-r--r--docs/html/distribute/googleplay/about/distribution.jd127
-rw-r--r--docs/html/distribute/googleplay/about/monetizing.jd152
-rw-r--r--docs/html/distribute/googleplay/about/visibility.jd247
-rw-r--r--docs/html/distribute/googleplay/index.html (renamed from docs/html/community/index.html)4
-rw-r--r--docs/html/distribute/googleplay/promote/badges.jd203
-rw-r--r--docs/html/distribute/googleplay/promote/brand.jd174
-rw-r--r--docs/html/distribute/googleplay/promote/index.jd43
-rw-r--r--docs/html/distribute/googleplay/promote/linking.jd213
-rw-r--r--docs/html/distribute/googleplay/promote/product-pages.jd4
-rw-r--r--docs/html/distribute/googleplay/publish/console.jd201
-rw-r--r--docs/html/distribute/googleplay/publish/index.jd23
-rw-r--r--docs/html/distribute/googleplay/publish/preparing.jd570
-rw-r--r--docs/html/distribute/googleplay/publish/register.jd72
-rw-r--r--docs/html/distribute/googleplay/strategies/app-quality.jd116
-rw-r--r--docs/html/distribute/googleplay/strategies/featuring.jd4
-rw-r--r--docs/html/distribute/googleplay/strategies/index.jd33
-rw-r--r--docs/html/distribute/index.jd39
-rw-r--r--docs/html/distribute/open.jd107
-rw-r--r--docs/html/favicon-a.icobin0 -> 1150 bytes
-rw-r--r--docs/html/favicon.icobin1150 -> 318 bytes
-rw-r--r--docs/html/guide/appendix/g-app-intents.jd2
-rw-r--r--docs/html/guide/appendix/glossary.jd8
-rw-r--r--docs/html/guide/appendix/install-location.jd4
-rw-r--r--docs/html/guide/appendix/media-formats.jd6
-rw-r--r--docs/html/guide/components/activities.jd (renamed from docs/html/guide/topics/fundamentals/activities.jd)13
-rw-r--r--docs/html/guide/components/bound-services.jd (renamed from docs/html/guide/topics/fundamentals/bound-services.jd)14
-rw-r--r--docs/html/guide/components/fragments.jd (renamed from docs/html/guide/topics/fundamentals/fragments.jd)10
-rw-r--r--docs/html/guide/components/fundamentals.jd (renamed from docs/html/guide/topics/fundamentals.jd)22
-rw-r--r--docs/html/guide/components/index.jd56
-rw-r--r--docs/html/guide/components/intents-filters.jd (renamed from docs/html/guide/topics/intents/intents-filters.jd)0
-rw-r--r--docs/html/guide/components/loaders.jd (renamed from docs/html/guide/topics/fundamentals/loaders.jd)0
-rw-r--r--docs/html/guide/components/processes-and-threads.jd (renamed from docs/html/guide/topics/fundamentals/processes-and-threads.jd)146
-rw-r--r--docs/html/guide/components/services.jd (renamed from docs/html/guide/topics/fundamentals/services.jd)14
-rw-r--r--docs/html/guide/components/tasks-and-back-stack.jd (renamed from docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd)9
-rw-r--r--docs/html/guide/developing/eclipse-adt.html10
-rw-r--r--docs/html/guide/developing/other-ide.html10
-rw-r--r--docs/html/guide/developing/testing/index.jd36
-rw-r--r--docs/html/guide/developing/tools/aapt.html10
-rw-r--r--docs/html/guide/google/index.jd97
-rw-r--r--docs/html/guide/google/play/billing/billing_about.html12
-rwxr-xr-xdocs/html/guide/google/play/billing/billing_admin.jd (renamed from docs/html/guide/market/billing/billing_admin.jd)59
-rwxr-xr-xdocs/html/guide/google/play/billing/billing_best_practices.jd (renamed from docs/html/guide/market/billing/billing_best_practices.jd)14
-rwxr-xr-xdocs/html/guide/google/play/billing/billing_integrate.jd (renamed from docs/html/guide/market/billing/billing_integrate.jd)70
-rwxr-xr-xdocs/html/guide/google/play/billing/billing_overview.jd (renamed from docs/html/guide/market/billing/billing_overview.jd)140
-rwxr-xr-xdocs/html/guide/google/play/billing/billing_reference.jd (renamed from docs/html/guide/market/billing/billing_reference.jd)109
-rwxr-xr-xdocs/html/guide/google/play/billing/billing_subscriptions.jd859
-rwxr-xr-xdocs/html/guide/google/play/billing/billing_testing.jd (renamed from docs/html/guide/market/billing/billing_testing.jd)46
-rwxr-xr-xdocs/html/guide/google/play/billing/index.jd116
-rw-r--r--docs/html/guide/google/play/expansion-files.jd (renamed from docs/html/guide/market/expansion-files.jd)34
-rw-r--r--docs/html/guide/google/play/filters.jd (renamed from docs/html/guide/appendix/market-filters.jd)4
-rw-r--r--docs/html/guide/google/play/index.jd16
-rw-r--r--docs/html/guide/google/play/licensing/adding-licensing.jd (renamed from docs/html/guide/market/licensing/adding-licensing.jd)25
-rw-r--r--docs/html/guide/google/play/licensing/index.jd (renamed from docs/html/guide/market/licensing/index.jd)10
-rw-r--r--docs/html/guide/google/play/licensing/licensing-reference.jd (renamed from docs/html/guide/market/licensing/licensing-reference.jd)6
-rw-r--r--docs/html/guide/google/play/licensing/overview.jd (renamed from docs/html/guide/market/licensing/overview.jd)4
-rw-r--r--docs/html/guide/google/play/licensing/setting-up.jd (renamed from docs/html/guide/market/licensing/setting-up.jd)28
-rw-r--r--docs/html/guide/google/play/publishing/multiple-apks.jd (renamed from docs/html/guide/market/publishing/multiple-apks.jd)26
-rw-r--r--docs/html/guide/guide_toc.cs1228
-rw-r--r--docs/html/guide/index.jd140
-rw-r--r--docs/html/guide/market/billing/billing_about.html12
-rwxr-xr-xdocs/html/guide/market/billing/index.jd94
-rw-r--r--docs/html/guide/practices/app-design/accessibility.html (renamed from docs/html/guide/practices/design/accessibility.html)0
-rw-r--r--docs/html/guide/practices/app-design/index.jd (renamed from docs/html/guide/practices/design/index.jd)0
-rw-r--r--docs/html/guide/practices/app-design/jni.jd (renamed from docs/html/guide/practices/design/jni.jd)0
-rw-r--r--docs/html/guide/practices/app-design/performance.jd (renamed from docs/html/guide/practices/design/performance.jd)4
-rw-r--r--docs/html/guide/practices/app-design/responsiveness.jd (renamed from docs/html/guide/practices/design/responsiveness.jd)0
-rw-r--r--docs/html/guide/practices/app-design/seamlessness.jd (renamed from docs/html/guide/practices/design/seamlessness.jd)2
-rw-r--r--docs/html/guide/practices/compatibility.jd6
-rw-r--r--docs/html/guide/practices/index.html8
-rw-r--r--docs/html/guide/practices/index.jd52
-rw-r--r--docs/html/guide/practices/jni.jd719
-rw-r--r--docs/html/guide/practices/optimizing-for-3.0.jd26
-rw-r--r--docs/html/guide/practices/performance.jd410
-rw-r--r--docs/html/guide/practices/responsiveness.jd140
-rw-r--r--docs/html/guide/practices/screens-distribution.jd2
-rw-r--r--docs/html/guide/practices/screens-support-1.5.jd2
-rw-r--r--docs/html/guide/practices/screens_support.jd6
-rw-r--r--docs/html/guide/practices/seamlessness.jd249
-rw-r--r--docs/html/guide/practices/security.jd5
-rw-r--r--docs/html/guide/practices/tablets-and-handsets.jd12
-rw-r--r--docs/html/guide/practices/ui_guidelines/activity_task_design.jd16
-rw-r--r--docs/html/guide/practices/ui_guidelines/icon_design_launcher.jd4
-rw-r--r--docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd2
-rw-r--r--docs/html/guide/practices/ui_guidelines/widget_design.jd2
-rw-r--r--docs/html/guide/publishing/licensing.html11
-rw-r--r--docs/html/guide/topics/admin/index.jd22
-rw-r--r--docs/html/guide/topics/admin/keychain.jd4
-rw-r--r--docs/html/guide/topics/appwidgets/index.jd4
-rw-r--r--docs/html/guide/topics/connectivity/bluetooth.jd (renamed from docs/html/guide/topics/wireless/bluetooth.jd)4
-rw-r--r--docs/html/guide/topics/connectivity/index.jd42
-rw-r--r--docs/html/guide/topics/connectivity/nfc/advanced-nfc.jd (renamed from docs/html/guide/topics/nfc/advanced-nfc.jd)4
-rw-r--r--docs/html/guide/topics/connectivity/nfc/index.jd (renamed from docs/html/guide/topics/nfc/index.jd)4
-rw-r--r--docs/html/guide/topics/connectivity/nfc/nfc.jd (renamed from docs/html/guide/topics/nfc/nfc.jd)10
-rw-r--r--docs/html/guide/topics/connectivity/sip.jd (renamed from docs/html/guide/topics/network/sip.jd)6
-rw-r--r--docs/html/guide/topics/connectivity/usb/accessory.jd (renamed from docs/html/guide/topics/usb/accessory.jd)2
-rw-r--r--docs/html/guide/topics/connectivity/usb/adk.jd (renamed from docs/html/guide/topics/usb/adk.jd)103
-rw-r--r--docs/html/guide/topics/connectivity/usb/host.jd (renamed from docs/html/guide/topics/usb/host.jd)2
-rw-r--r--docs/html/guide/topics/connectivity/usb/index.jd (renamed from docs/html/guide/topics/usb/index.jd)8
-rw-r--r--docs/html/guide/topics/connectivity/wifip2p.jd (renamed from docs/html/guide/topics/wireless/wifip2p.jd)0
-rw-r--r--docs/html/guide/topics/data/backup.jd12
-rw-r--r--docs/html/guide/topics/data/data-storage.jd23
-rw-r--r--docs/html/guide/topics/data/index.html9
-rw-r--r--docs/html/guide/topics/data/index.jd23
-rw-r--r--docs/html/guide/topics/data/install-location.jd206
-rw-r--r--docs/html/guide/topics/drawing/index.html9
-rw-r--r--docs/html/guide/topics/drawing/opengl.jd53
-rw-r--r--docs/html/guide/topics/graphics/2d-graphics.jd2
-rw-r--r--docs/html/guide/topics/graphics/animation.jd64
-rw-r--r--docs/html/guide/topics/graphics/index.jd90
-rw-r--r--docs/html/guide/topics/graphics/opengl.jd52
-rw-r--r--docs/html/guide/topics/graphics/overview.jd73
-rw-r--r--docs/html/guide/topics/graphics/prop-animation.jd25
-rw-r--r--docs/html/guide/topics/graphics/renderscript/compute.jd (renamed from docs/html/guide/topics/renderscript/compute.jd)0
-rw-r--r--docs/html/guide/topics/graphics/renderscript/graphics.jd (renamed from docs/html/guide/topics/renderscript/graphics.jd)3
-rw-r--r--docs/html/guide/topics/graphics/renderscript/index.jd (renamed from docs/html/guide/topics/renderscript/index.jd)0
-rw-r--r--docs/html/guide/topics/graphics/renderscript/reference.jd (renamed from docs/html/guide/topics/renderscript/reference.jd)0
-rw-r--r--docs/html/guide/topics/intents/index.html9
-rw-r--r--docs/html/guide/topics/location/index.jd10
-rw-r--r--docs/html/guide/topics/location/strategies.jd (renamed from docs/html/guide/topics/location/obtaining-user-location.jd)6
-rw-r--r--docs/html/guide/topics/manifest/action-element.jd2
-rw-r--r--docs/html/guide/topics/manifest/activity-element.jd2
-rw-r--r--docs/html/guide/topics/manifest/category-element.jd2
-rw-r--r--docs/html/guide/topics/manifest/compatible-screens-element.jd4
-rw-r--r--docs/html/guide/topics/manifest/data-element.jd2
-rw-r--r--docs/html/guide/topics/manifest/intent-filter-element.jd2
-rw-r--r--docs/html/guide/topics/manifest/manifest-element.jd2
-rw-r--r--docs/html/guide/topics/manifest/manifest-intro.jd2
-rw-r--r--docs/html/guide/topics/manifest/supports-gl-texture-element.jd2
-rw-r--r--docs/html/guide/topics/manifest/uses-feature-element.jd4
-rw-r--r--docs/html/guide/topics/manifest/uses-library-element.jd2
-rw-r--r--docs/html/guide/topics/manifest/uses-sdk-element.jd430
-rw-r--r--docs/html/guide/topics/media/camera.jd3
-rw-r--r--docs/html/guide/topics/media/index.jd115
-rw-r--r--docs/html/guide/topics/media/mediaplayer.jd2
-rw-r--r--docs/html/guide/topics/providers/calendar-provider.jd49
-rw-r--r--docs/html/guide/topics/providers/contacts-provider.jd2361
-rw-r--r--docs/html/guide/topics/providers/content-provider-basics.jd4
-rw-r--r--docs/html/guide/topics/providers/content-provider-creating.jd4
-rw-r--r--docs/html/guide/topics/providers/content-providers.jd14
-rw-r--r--docs/html/guide/topics/resources/animation-resource.jd4
-rw-r--r--docs/html/guide/topics/resources/index.jd154
-rw-r--r--docs/html/guide/topics/resources/layout-resource.jd6
-rwxr-xr-xdocs/html/guide/topics/resources/localization.jd29
-rw-r--r--docs/html/guide/topics/resources/menu-resource.jd11
-rw-r--r--docs/html/guide/topics/resources/overview.jd103
-rw-r--r--docs/html/guide/topics/resources/providing-resources.jd8
-rw-r--r--docs/html/guide/topics/resources/runtime-changes.jd4
-rw-r--r--docs/html/guide/topics/search/index.jd2
-rw-r--r--docs/html/guide/topics/search/search-dialog.jd2
-rw-r--r--docs/html/guide/topics/security/index.jd65
-rw-r--r--docs/html/guide/topics/security/permissions.jd407
-rw-r--r--docs/html/guide/topics/security/security.jd1155
-rw-r--r--docs/html/guide/topics/sensors/index.jd118
-rw-r--r--docs/html/guide/topics/sensors/sensors_overview.jd38
-rw-r--r--docs/html/guide/topics/testing/index.jd86
-rw-r--r--docs/html/guide/topics/text/copy-paste.jd (renamed from docs/html/guide/topics/clipboard/copy-paste.jd)0
-rw-r--r--docs/html/guide/topics/text/creating-input-method.jd (renamed from docs/html/resources/articles/creating-input-method.jd)4
-rw-r--r--docs/html/guide/topics/text/index.jd40
-rw-r--r--docs/html/guide/topics/text/spell-checker-framework.jd (renamed from docs/html/resources/articles/spell-checker-framework.jd)50
-rw-r--r--docs/html/guide/topics/ui/accessibility/apps.jd8
-rw-r--r--docs/html/guide/topics/ui/accessibility/index.jd4
-rw-r--r--docs/html/guide/topics/ui/accessibility/services.jd4
-rw-r--r--docs/html/guide/topics/ui/actionbar.jd19
-rw-r--r--docs/html/guide/topics/ui/binding.jd27
-rw-r--r--docs/html/guide/topics/ui/controls.jd92
-rw-r--r--docs/html/guide/topics/ui/controls/button.jd245
-rw-r--r--docs/html/guide/topics/ui/controls/checkbox.jd101
-rw-r--r--docs/html/guide/topics/ui/controls/pickers.jd259
-rw-r--r--docs/html/guide/topics/ui/controls/radiobutton.jd103
-rw-r--r--docs/html/guide/topics/ui/controls/spinner.jd147
-rw-r--r--docs/html/guide/topics/ui/controls/text.jd306
-rw-r--r--docs/html/guide/topics/ui/controls/togglebutton.jd124
-rw-r--r--docs/html/guide/topics/ui/declaring-layout.jd249
-rw-r--r--docs/html/guide/topics/ui/dialogs.jd2
-rw-r--r--docs/html/guide/topics/ui/images/android_focused.png (renamed from docs/html/resources/tutorials/views/images/android_focused.png)bin2785 -> 2785 bytes
-rw-r--r--docs/html/guide/topics/ui/images/android_normal.png (renamed from docs/html/resources/tutorials/views/images/android_normal.png)bin2056 -> 2056 bytes
-rw-r--r--docs/html/guide/topics/ui/images/android_pressed.png (renamed from docs/html/resources/tutorials/views/images/android_pressed.png)bin2337 -> 2337 bytes
-rwxr-xr-xdocs/html/guide/topics/ui/images/hello-gallery.png (renamed from docs/html/guide/tutorials/views/images/hello-gallery.png)bin5593 -> 5593 bytes
-rwxr-xr-xdocs/html/guide/topics/ui/images/hello-gridview.png (renamed from docs/html/guide/tutorials/views/images/hello-gridview.png)bin21768 -> 21768 bytes
-rwxr-xr-xdocs/html/guide/topics/ui/images/hello-linearlayout.png (renamed from docs/html/guide/tutorials/views/images/hello-linearlayout.png)bin4207 -> 4207 bytes
-rw-r--r--docs/html/guide/topics/ui/images/hello-listview.png (renamed from docs/html/resources/tutorials/views/images/hello-listview.png)bin26359 -> 26359 bytes
-rw-r--r--docs/html/guide/topics/ui/images/hello-mapview.png (renamed from docs/html/resources/tutorials/views/images/hello-mapview.png)bin50499 -> 50499 bytes
-rwxr-xr-xdocs/html/guide/topics/ui/images/hello-relativelayout.png (renamed from docs/html/guide/tutorials/views/images/hello-relativelayout.png)bin2399 -> 2399 bytes
-rwxr-xr-xdocs/html/guide/topics/ui/images/hello-tablelayout.png (renamed from docs/html/guide/tutorials/views/images/hello-tablelayout.png)bin3446 -> 3446 bytes
-rw-r--r--docs/html/guide/topics/ui/images/hello-tabwidget.png (renamed from docs/html/resources/tutorials/views/images/hello-tabwidget.png)bin10393 -> 10393 bytes
-rw-r--r--docs/html/guide/topics/ui/images/hello-webview.png (renamed from docs/html/resources/tutorials/views/images/hello-webview.png)bin16490 -> 16490 bytes
-rw-r--r--docs/html/guide/topics/ui/images/ic_tab_artists_grey.png (renamed from docs/html/resources/tutorials/views/images/ic_tab_artists_grey.png)bin791 -> 791 bytes
-rw-r--r--docs/html/guide/topics/ui/images/ic_tab_artists_white.png (renamed from docs/html/resources/tutorials/views/images/ic_tab_artists_white.png)bin1127 -> 1127 bytes
-rw-r--r--docs/html/guide/topics/ui/index.jd285
-rw-r--r--docs/html/guide/topics/ui/layout-objects.jd289
-rw-r--r--docs/html/guide/topics/ui/layout/grid.jd (renamed from docs/html/resources/tutorials/views/hello-tablelayout.jd)83
-rw-r--r--docs/html/guide/topics/ui/layout/gridview.jd (renamed from docs/html/resources/tutorials/views/hello-gridview.jd)35
-rw-r--r--docs/html/guide/topics/ui/layout/linear.jd116
-rw-r--r--docs/html/guide/topics/ui/layout/listview.jd151
-rw-r--r--docs/html/guide/topics/ui/layout/relative.jd118
-rw-r--r--docs/html/guide/topics/ui/layout/tabs.jd (renamed from docs/html/resources/tutorials/views/hello-tabwidget.jd)33
-rw-r--r--docs/html/guide/topics/ui/menus.jd2
-rw-r--r--docs/html/guide/topics/ui/notifiers/index.jd10
-rw-r--r--docs/html/guide/topics/ui/notifiers/notifications.jd32
-rw-r--r--docs/html/guide/topics/ui/overview.jd74
-rw-r--r--docs/html/guide/topics/ui/sharables/sample_images.zipbin0 -> 254816 bytes
-rw-r--r--docs/html/guide/topics/views/custom-views.jd544
-rw-r--r--docs/html/guide/topics/views/intro.jd49
-rw-r--r--docs/html/guide/topics/views/ui-xml.jd138
-rw-r--r--docs/html/guide/topics/wireless/index.jd23
-rw-r--r--docs/html/guide/topics/wireless/wifi.jd18
-rw-r--r--docs/html/guide/tutorials/hello-world.html10
-rw-r--r--docs/html/guide/tutorials/images/hello_world_0.pngbin6328 -> 0 bytes
-rw-r--r--docs/html/guide/tutorials/images/hello_world_1.pngbin10031 -> 0 bytes
-rw-r--r--docs/html/guide/tutorials/images/hello_world_2.pngbin11040 -> 0 bytes
-rw-r--r--docs/html/guide/tutorials/images/hello_world_3.pngbin11000 -> 0 bytes
-rw-r--r--docs/html/guide/tutorials/images/hello_world_4.pngbin61711 -> 0 bytes
-rw-r--r--docs/html/guide/tutorials/images/hello_world_5.pngbin6244 -> 0 bytes
-rw-r--r--docs/html/guide/tutorials/images/hello_world_8.pngbin10993 -> 0 bytes
-rw-r--r--docs/html/guide/tutorials/images/hello_world_9.pngbin6791 -> 0 bytes
-rw-r--r--docs/html/guide/tutorials/index.html10
-rw-r--r--docs/html/guide/tutorials/localization/index.html10
-rw-r--r--docs/html/guide/tutorials/notepad/codelab/NotepadCodeLab.zipbin90916 -> 0 bytes
-rw-r--r--docs/html/guide/tutorials/notepad/index.html10
-rw-r--r--docs/html/guide/tutorials/notepad/notepad-ex1.jd582
-rw-r--r--docs/html/guide/tutorials/notepad/notepad-ex2.jd642
-rw-r--r--docs/html/guide/tutorials/notepad/notepad-ex3.jd366
-rw-r--r--docs/html/guide/tutorials/notepad/notepad-extra-credit.jd70
-rw-r--r--docs/html/guide/tutorials/notepad/notepad-index.jd143
-rw-r--r--docs/html/guide/tutorials/views/hello-autocomplete.jd116
-rw-r--r--docs/html/guide/tutorials/views/hello-datepicker.jd151
-rw-r--r--docs/html/guide/tutorials/views/hello-formstuff.jd262
-rw-r--r--docs/html/guide/tutorials/views/hello-gallery.jd135
-rw-r--r--docs/html/guide/tutorials/views/hello-gridview.jd129
-rw-r--r--docs/html/guide/tutorials/views/hello-linearlayout.jd130
-rw-r--r--docs/html/guide/tutorials/views/hello-listview.jd90
-rw-r--r--docs/html/guide/tutorials/views/hello-mapview.jd245
-rw-r--r--docs/html/guide/tutorials/views/hello-relativelayout.jd75
-rw-r--r--docs/html/guide/tutorials/views/hello-spinner.jd106
-rw-r--r--docs/html/guide/tutorials/views/hello-tablelayout.jd118
-rw-r--r--docs/html/guide/tutorials/views/hello-tabwidget.jd124
-rw-r--r--docs/html/guide/tutorials/views/hello-timepicker.jd159
-rw-r--r--docs/html/guide/tutorials/views/hello-webview.jd118
-rwxr-xr-xdocs/html/guide/tutorials/views/images/android.pngbin693 -> 0 bytes
-rwxr-xr-xdocs/html/guide/tutorials/views/images/androidmarker.pngbin702 -> 0 bytes
-rwxr-xr-xdocs/html/guide/tutorials/views/images/hello-autocomplete.pngbin4601 -> 0 bytes
-rwxr-xr-xdocs/html/guide/tutorials/views/images/hello-datepicker.pngbin7322 -> 0 bytes
-rwxr-xr-xdocs/html/guide/tutorials/views/images/hello-formstuff.pngbin4258 -> 0 bytes
-rwxr-xr-xdocs/html/guide/tutorials/views/images/hello-listview.pngbin6926 -> 0 bytes
-rwxr-xr-xdocs/html/guide/tutorials/views/images/hello-mapview.pngbin16922 -> 0 bytes
-rwxr-xr-xdocs/html/guide/tutorials/views/images/hello-spinner.pngbin2513 -> 0 bytes
-rw-r--r--docs/html/guide/tutorials/views/images/hello-tabwidget.pngbin2117 -> 0 bytes
-rwxr-xr-xdocs/html/guide/tutorials/views/images/hello-timepicker.pngbin5644 -> 0 bytes
-rwxr-xr-xdocs/html/guide/tutorials/views/images/hello-webview.pngbin5874 -> 0 bytes
-rw-r--r--docs/html/guide/tutorials/views/index.html10
-rw-r--r--docs/html/guide/webapps/debugging.jd6
-rw-r--r--docs/html/guide/webapps/index.jd77
-rw-r--r--docs/html/guide/webapps/overview.jd71
-rw-r--r--docs/html/images/about/growth-chart.pngbin0 -> 147154 bytes
-rw-r--r--docs/html/images/activity_fragment_lifecycle.pngbin47065 -> 43463 bytes
-rw-r--r--docs/html/images/activity_lifecycle.pngbin81796 -> 82637 bytes
-rw-r--r--docs/html/images/android-logo.pngbin0 -> 2793 bytes
-rw-r--r--docs/html/images/billing_subscription_flow.pngbin0 -> 56972 bytes
-rw-r--r--docs/html/images/brand/android_app_on_play_logo_large.pngbin0 -> 4095 bytes
-rw-r--r--docs/html/images/brand/android_app_on_play_logo_small.pngbin0 -> 2891 bytes
-rw-r--r--docs/html/images/brand/droid.gifbin0 -> 6371 bytes
-rw-r--r--docs/html/images/brand/get_it_on_play_logo_large.pngbin0 -> 3995 bytes
-rw-r--r--docs/html/images/brand/get_it_on_play_logo_small.pngbin0 -> 2752 bytes
-rw-r--r--docs/html/images/brand/google_play_logo_450.pngbin0 -> 5910 bytes
-rw-r--r--docs/html/images/brand/learnmore.gifbin0 -> 3300 bytes
-rw-r--r--docs/html/images/brand/logo_android.gifbin0 -> 1034 bytes
-rw-r--r--docs/html/images/brand/mediaplayer.gifbin0 -> 5816 bytes
-rw-r--r--docs/html/images/brand/norad.gifbin0 -> 889 bytes
-rw-r--r--docs/html/images/dac-design-icon.pngbin0 -> 4237 bytes
-rw-r--r--docs/html/images/debugging-tall.pngbin0 -> 149662 bytes
-rw-r--r--docs/html/images/develop-placeholder.pngbin0 -> 26860 bytes
-rw-r--r--docs/html/images/develop/app_components.pngbin0 -> 112736 bytes
-rw-r--r--docs/html/images/develop/auth-code.pngbin0 -> 16105 bytes
-rw-r--r--docs/html/images/develop/connectivity.pngbin0 -> 99713 bytes
-rw-r--r--docs/html/images/develop/marquee-play.pngbin0 -> 57091 bytes
-rw-r--r--docs/html/images/develop/resources.pngbin0 -> 57422 bytes
-rw-r--r--docs/html/images/distribute/feature-market.pngbin0 -> 3964 bytes
-rw-r--r--docs/html/images/distribute/feature-monetize.pngbin0 -> 8039 bytes
-rw-r--r--docs/html/images/distribute/feature-register.pngbin0 -> 4459 bytes
-rw-r--r--docs/html/images/distribute/marquee-play.pngbin0 -> 113586 bytes
-rw-r--r--docs/html/images/editorschoice_ann.pngbin0 -> 187 bytes
-rw-r--r--docs/html/images/fragment_lifecycle.pngbin74551 -> 75783 bytes
-rw-r--r--docs/html/images/fundamentals/diagram_backstack.pngbin42790 -> 42966 bytes
-rw-r--r--docs/html/images/fundamentals/diagram_backstack_singletask_multiactivity.pngbin57883 -> 59073 bytes
-rw-r--r--docs/html/images/fundamentals/diagram_multiple_instances.pngbin24344 -> 23644 bytes
-rw-r--r--docs/html/images/fundamentals/diagram_multitasking.pngbin24646 -> 25030 bytes
-rw-r--r--docs/html/images/fundamentals/fragments.pngbin37486 -> 49465 bytes
-rw-r--r--docs/html/images/fundamentals/restore_instance.pngbin73436 -> 73704 bytes
-rw-r--r--docs/html/images/fundamentals/service_binding_tree_lifecycle.pngbin76028 -> 80443 bytes
-rw-r--r--docs/html/images/gp-apps-home.pngbin0 -> 254308 bytes
-rw-r--r--docs/html/images/gp-buyer-currency.pngbin0 -> 37422 bytes
-rw-r--r--docs/html/images/gp-collectibles.pngbin0 -> 61717 bytes
-rw-r--r--docs/html/images/gp-dc-countries.pngbin0 -> 32900 bytes
-rw-r--r--docs/html/images/gp-dc-details.pngbin0 -> 254690 bytes
-rw-r--r--docs/html/images/gp-dc-home.pngbin0 -> 58768 bytes
-rw-r--r--docs/html/images/gp-dc-profile.pngbin0 -> 55143 bytes
-rw-r--r--docs/html/images/gp-dc-reviews.pngbin0 -> 79404 bytes
-rw-r--r--docs/html/images/gp-dc-stats-mini.pngbin0 -> 69890 bytes
-rw-r--r--docs/html/images/gp-dc-stats.pngbin0 -> 128669 bytes
-rw-r--r--docs/html/images/gp-details-pages-magicpiano.pngbin0 -> 363318 bytes
-rw-r--r--docs/html/images/gp-details-ww-purchase.pngbin0 -> 59564 bytes
-rw-r--r--docs/html/images/gp-details-ww.pngbin0 -> 123069 bytes
-rw-r--r--docs/html/images/gp-devconsole-home.pngbin0 -> 141513 bytes
-rw-r--r--docs/html/images/gp-device.pngbin0 -> 138914 bytes
-rw-r--r--docs/html/images/gp-games-home.pngbin0 -> 88720 bytes
-rw-r--r--docs/html/images/gp-growth-downloads.pngbin0 -> 39580 bytes
-rw-r--r--docs/html/images/gp-rating-web.pngbin0 -> 58423 bytes
-rw-r--r--docs/html/images/gp-sendto.pngbin0 -> 48342 bytes
-rw-r--r--docs/html/images/gp-subs.pngbin0 -> 48429 bytes
-rw-r--r--docs/html/images/gp-supported-dev-requirements.pngbin0 -> 21130 bytes
-rw-r--r--docs/html/images/gp-tab.pngbin0 -> 100677 bytes
-rw-r--r--docs/html/images/gp-top-new-paid.pngbin0 -> 79187 bytes
-rw-r--r--docs/html/images/gpp-cat-feature280-photo.pngbin0 -> 254786 bytes
-rw-r--r--docs/html/images/gpp-cat-feature280-puzzle.pngbin0 -> 217985 bytes
-rw-r--r--docs/html/images/gpp-cat-feature280-sports.pngbin0 -> 170856 bytes
-rw-r--r--docs/html/images/home-marquee.jpgbin0 -> 25416 bytes
-rw-r--r--docs/html/images/home/design.pngbin0 -> 201003 bytes
-rw-r--r--docs/html/images/home/developers_live.pngbin0 -> 238375 bytes
-rw-r--r--docs/html/images/home/google-io.pngbin0 -> 611444 bytes
-rw-r--r--docs/html/images/home/google-play.pngbin0 -> 250345 bytes
-rw-r--r--docs/html/images/home/ics-android.pngbin0 -> 82115 bytes
-rw-r--r--docs/html/images/layoutparams.pngbin61601 -> 61909 bytes
-rw-r--r--docs/html/images/market/version-codes.pngbin20098 -> 20789 bytes
-rw-r--r--docs/html/images/opengl/ccw-square.pngbin0 -> 15301 bytes
-rw-r--r--docs/html/images/opengl/ccw-winding.pngbin0 -> 17960 bytes
-rw-r--r--docs/html/images/opengl/coordinates.pngbin14019 -> 19368 bytes
-rw-r--r--docs/html/images/opengl/helloopengl-es10-1.pngbin8448 -> 0 bytes
-rw-r--r--docs/html/images/opengl/helloopengl-es10-2.pngbin7259 -> 0 bytes
-rw-r--r--docs/html/images/opengl/helloopengl-es20-1.pngbin6935 -> 0 bytes
-rw-r--r--docs/html/images/opengl/helloopengl-es20-2.pngbin6833 -> 0 bytes
-rw-r--r--docs/html/images/opengl/ogl-triangle-projected.pngbin0 -> 12765 bytes
-rw-r--r--docs/html/images/opengl/ogl-triangle-touch.pngbin0 -> 14560 bytes
-rw-r--r--docs/html/images/opengl/ogl-triangle.pngbin0 -> 12302 bytes
-rw-r--r--docs/html/images/play_tableft.pngbin0 -> 475930 bytes
-rw-r--r--docs/html/images/providers/ContactsDataFlow.pngbin0 -> 38071 bytes
-rw-r--r--docs/html/images/providers/contacts_structure.pngbin0 -> 18777 bytes
-rw-r--r--docs/html/images/providers/contacts_tables.pngbin0 -> 57257 bytes
-rw-r--r--docs/html/images/providers/data_columns.pngbin0 -> 22128 bytes
-rwxr-xr-xdocs/html/images/publishing/publishing_unknown_sources.pngbin49351 -> 0 bytes
-rw-r--r--docs/html/images/publishing/publishing_unknown_sources_sm.pngbin0 -> 9836 bytes
-rwxr-xr-xdocs/html/images/publishing/publishing_via_email.pngbin53620 -> 47608 bytes
-rw-r--r--docs/html/images/resources/res-selection-flowchart.pngbin75022 -> 76558 bytes
-rw-r--r--docs/html/images/resources/resource_devices_diagram1.pngbin19175 -> 22141 bytes
-rw-r--r--docs/html/images/resources/resource_devices_diagram2.pngbin19956 -> 22429 bytes
-rw-r--r--docs/html/images/robot-sdk.pngbin0 -> 98477 bytes
-rw-r--r--docs/html/images/robot-tiny.pngbin0 -> 454 bytes
-rw-r--r--docs/html/images/screens_support/screens-densities.pngbin16219 -> 19640 bytes
-rw-r--r--docs/html/images/screens_support/screens-ranges.pngbin22143 -> 22609 bytes
-rw-r--r--docs/html/images/sdk-cube.pngbin0 -> 90911 bytes
-rw-r--r--docs/html/images/service_lifecycle.pngbin74708 -> 75061 bytes
-rw-r--r--docs/html/images/tools-home.pngbin0 -> 190613 bytes
-rw-r--r--docs/html/images/topdev_ann.pngbin0 -> 264 bytes
-rw-r--r--docs/html/images/training/basics/basic-lifecycle-create.pngbin70470 -> 78949 bytes
-rw-r--r--docs/html/images/training/basics/basic-lifecycle-paused.pngbin67399 -> 75348 bytes
-rw-r--r--docs/html/images/training/basics/basic-lifecycle-savestate.pngbin49135 -> 51430 bytes
-rw-r--r--docs/html/images/training/basics/basic-lifecycle-stopped.pngbin71327 -> 79764 bytes
-rw-r--r--docs/html/images/training/basics/basic-lifecycle.pngbin62632 -> 69368 bytes
-rw-r--r--docs/html/images/training/basics/network-settings1.pngbin0 -> 21155 bytes
-rw-r--r--docs/html/images/training/basics/network-settings2.pngbin0 -> 24700 bytes
-rw-r--r--docs/html/images/ui/button-types.pngbin0 -> 2997 bytes
-rw-r--r--docs/html/images/ui/buttons-holo.pngbin0 -> 6400 bytes
-rw-r--r--docs/html/images/ui/checkboxes.pngbin0 -> 29858 bytes
-rw-r--r--docs/html/images/ui/edittext-actionlabel.pngbin0 -> 14345 bytes
-rw-r--r--docs/html/images/ui/edittext-actionsend.pngbin0 -> 4340 bytes
-rw-r--r--docs/html/images/ui/edittext-autocomplete.pngbin0 -> 18252 bytes
-rw-r--r--docs/html/images/ui/edittext-email.pngbin0 -> 22098 bytes
-rw-r--r--docs/html/images/ui/edittext-noextract.pngbin0 -> 26788 bytes
-rw-r--r--docs/html/images/ui/edittext-phone.pngbin0 -> 22308 bytes
-rw-r--r--docs/html/images/ui/edittext-text-next.pngbin0 -> 21739 bytes
-rw-r--r--docs/html/images/ui/edittext-text.pngbin0 -> 25358 bytes
-rw-r--r--docs/html/images/ui/edittext.pngbin0 -> 2367 bytes
-rw-r--r--docs/html/images/ui/gridlayout-small.pngbin0 -> 21912 bytes
-rw-r--r--docs/html/images/ui/gridlayout.pngbin0 -> 70249 bytes
-rw-r--r--docs/html/images/ui/gridview-small.pngbin0 -> 20625 bytes
-rw-r--r--docs/html/images/ui/gridview.pngbin0 -> 64565 bytes
-rw-r--r--docs/html/images/ui/linearlayout-small.pngbin0 -> 20967 bytes
-rw-r--r--docs/html/images/ui/linearlayout.pngbin0 -> 67936 bytes
-rw-r--r--docs/html/images/ui/listview-small.pngbin0 -> 18055 bytes
-rw-r--r--docs/html/images/ui/listview.pngbin0 -> 57993 bytes
-rw-r--r--docs/html/images/ui/pickers.pngbin0 -> 39836 bytes
-rw-r--r--docs/html/images/ui/radiobuttons.pngbin0 -> 10610 bytes
-rw-r--r--docs/html/images/ui/relativelayout-small.pngbin0 -> 20777 bytes
-rw-r--r--docs/html/images/ui/relativelayout.pngbin0 -> 67073 bytes
-rw-r--r--docs/html/images/ui/sample-linearlayout.pngbin0 -> 12918 bytes
-rw-r--r--docs/html/images/ui/sample-relativelayout.pngbin0 -> 15231 bytes
-rw-r--r--docs/html/images/ui/spinner.pngbin0 -> 4738 bytes
-rw-r--r--docs/html/images/ui/switch.pngbin0 -> 7702 bytes
-rw-r--r--docs/html/images/ui/tabs-small.pngbin0 -> 22887 bytes
-rw-r--r--docs/html/images/ui/tabs.pngbin0 -> 73947 bytes
-rw-r--r--docs/html/images/ui/togglebutton.pngbin0 -> 5830 bytes
-rw-r--r--docs/html/images/ui/ui-controls.pngbin0 -> 17888 bytes
-rw-r--r--docs/html/images/ui/ui_index.pngbin0 -> 50178 bytes
-rw-r--r--docs/html/images/ui/webview-small.pngbin0 -> 25681 bytes
-rw-r--r--docs/html/images/ui/webview.pngbin0 -> 79862 bytes
-rw-r--r--docs/html/images/viewgroup.pngbin24973 -> 25722 bytes
-rw-r--r--docs/html/images/webapps/webapps.pngbin35420 -> 38655 bytes
-rw-r--r--docs/html/index.jd272
-rw-r--r--docs/html/intl/es/training/monitoring-device-state/battery-monitoring.jd120
-rw-r--r--docs/html/intl/es/training/monitoring-device-state/connectivity-monitoring.jd70
-rw-r--r--docs/html/intl/es/training/monitoring-device-state/docking-monitoring.jd74
-rw-r--r--docs/html/intl/es/training/monitoring-device-state/index.jd49
-rw-r--r--docs/html/intl/es/training/monitoring-device-state/manifest-receivers.jd50
-rw-r--r--docs/html/intl/es/training/multiscreen/adaptui.jd212
-rw-r--r--docs/html/intl/es/training/multiscreen/index.jd63
-rw-r--r--docs/html/intl/es/training/multiscreen/screendensities.jd100
-rw-r--r--docs/html/intl/es/training/multiscreen/screensizes.jd279
-rw-r--r--docs/html/intl/ja/guide/developing/eclipse-adt.jd14
-rw-r--r--docs/html/intl/ja/guide/developing/other-ide.jd30
-rw-r--r--docs/html/intl/ja/guide/index.jd4
-rw-r--r--docs/html/intl/ja/guide/publishing/app-signing.jd4
-rw-r--r--docs/html/intl/ja/guide/publishing/preparing.jd14
-rw-r--r--docs/html/intl/ja/guide/publishing/versioning.jd6
-rw-r--r--docs/html/intl/ja/guide/topics/fundamentals.jd10
-rw-r--r--docs/html/intl/ja/guide/tutorials/hello-world.jd8
-rw-r--r--docs/html/intl/ja/index.jd2
-rw-r--r--docs/html/intl/ja/resources/tutorials/hello-world.jd8
-rw-r--r--docs/html/intl/ja/sdk/1.5_r2/installing.jd8
-rw-r--r--docs/html/intl/ja/sdk/1.5_r3/installing.jd8
-rw-r--r--docs/html/intl/ja/training/monitoring-device-state/battery-monitoring.jd120
-rw-r--r--docs/html/intl/ja/training/monitoring-device-state/connectivity-monitoring.jd70
-rw-r--r--docs/html/intl/ja/training/monitoring-device-state/docking-monitoring.jd74
-rw-r--r--docs/html/intl/ja/training/monitoring-device-state/index.jd49
-rw-r--r--docs/html/intl/ja/training/monitoring-device-state/manifest-receivers.jd50
-rw-r--r--docs/html/intl/ja/training/multiscreen/adaptui.jd212
-rw-r--r--docs/html/intl/ja/training/multiscreen/index.jd64
-rw-r--r--docs/html/intl/ja/training/multiscreen/screendensities.jd100
-rw-r--r--docs/html/intl/ja/training/multiscreen/screensizes.jd279
-rw-r--r--docs/html/intl/ko/training/monitoring-device-state/battery-monitoring.jd120
-rw-r--r--docs/html/intl/ko/training/monitoring-device-state/connectivity-monitoring.jd70
-rw-r--r--docs/html/intl/ko/training/monitoring-device-state/docking-monitoring.jd74
-rw-r--r--docs/html/intl/ko/training/monitoring-device-state/index.jd49
-rw-r--r--docs/html/intl/ko/training/monitoring-device-state/manifest-receivers.jd50
-rw-r--r--docs/html/intl/ko/training/multiscreen/adaptui.jd212
-rw-r--r--docs/html/intl/ko/training/multiscreen/index.jd64
-rw-r--r--docs/html/intl/ko/training/multiscreen/screendensities.jd100
-rw-r--r--docs/html/intl/ko/training/multiscreen/screensizes.jd279
-rw-r--r--docs/html/intl/ru/training/monitoring-device-state/battery-monitoring.jd120
-rw-r--r--docs/html/intl/ru/training/monitoring-device-state/connectivity-monitoring.jd70
-rw-r--r--docs/html/intl/ru/training/monitoring-device-state/docking-monitoring.jd74
-rw-r--r--docs/html/intl/ru/training/monitoring-device-state/index.jd49
-rw-r--r--docs/html/intl/ru/training/monitoring-device-state/manifest-receivers.jd50
-rw-r--r--docs/html/intl/ru/training/multiscreen/adaptui.jd212
-rw-r--r--docs/html/intl/ru/training/multiscreen/index.jd64
-rw-r--r--docs/html/intl/ru/training/multiscreen/screendensities.jd100
-rw-r--r--docs/html/intl/ru/training/multiscreen/screensizes.jd279
-rw-r--r--docs/html/intl/zh-CN/training/monitoring-device-state/battery-monitoring.jd120
-rw-r--r--docs/html/intl/zh-CN/training/monitoring-device-state/connectivity-monitoring.jd70
-rw-r--r--docs/html/intl/zh-CN/training/monitoring-device-state/docking-monitoring.jd74
-rw-r--r--docs/html/intl/zh-CN/training/monitoring-device-state/index.jd49
-rw-r--r--docs/html/intl/zh-CN/training/monitoring-device-state/manifest-receivers.jd50
-rw-r--r--docs/html/intl/zh-CN/training/multiscreen/adaptui.jd212
-rw-r--r--docs/html/intl/zh-CN/training/multiscreen/index.jd64
-rw-r--r--docs/html/intl/zh-CN/training/multiscreen/screendensities.jd100
-rw-r--r--docs/html/intl/zh-CN/training/multiscreen/screensizes.jd279
-rw-r--r--docs/html/legal.jd129
-rw-r--r--docs/html/license.jd52
-rw-r--r--docs/html/live/index.jd5
-rw-r--r--docs/html/mwc2010/index.html8
-rw-r--r--docs/html/offline.jd8
-rw-r--r--docs/html/resources/articles/avoiding-memory-leaks.jd111
-rw-r--r--docs/html/resources/articles/backward-compatibility.jd252
-rw-r--r--docs/html/resources/articles/can-i-use-this-intent.jd71
-rw-r--r--docs/html/resources/articles/contacts.jd424
-rw-r--r--docs/html/resources/articles/drawable-mutations.jd93
-rw-r--r--docs/html/resources/articles/faster-screen-orientation-change.jd133
-rw-r--r--docs/html/resources/articles/future-proofing.jd91
-rw-r--r--docs/html/resources/articles/gestures.jd213
-rw-r--r--docs/html/resources/articles/glsurfaceview.jd270
-rw-r--r--docs/html/resources/articles/images/File.pngbin14329 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/File_002.pngbin13623 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/JFlubber.pngbin8824 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/WikiNotes.pngbin58942 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/all_drawables_changed.pngbin60168 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/android.pngbin79299 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/buttons.pngbin4733 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/contacts-2.pngbin12970 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/contacts.pngbin73617 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/correct_drawables.pngbin60746 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/ddms_allocation_tracker.pngbin83383 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/ddms_allocation_trackerl.pngbin514553 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/device.pngbin112261 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/device_002.pngbin97176 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/gestures.pngbin11254 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/gestures_002.pngbin140982 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/gestures_003.pngbin15609 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/gestures_004.pngbin15484 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/gestures_005.pngbin14652 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/gestures_006.pngbin14643 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/grid.pngbin32134 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/ime.pngbin14225 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/ime_002.pngbin14589 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/ime_003.pngbin51163 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/ime_004.pngbin10840 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/ime_005.pngbin13099 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/ime_006.pngbin14041 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/layouts_comparison_small.pngbin132330 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/list01.pngbin81747 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/list02.pngbin85815 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/list_fade_1.pngbin44890 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/list_fade_2.pngbin136484 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/list_fade_3.pngbin105257 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/list_fade_4.pngbin190068 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/live_wallpapers_small.pngbin152066 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/merge1.jpgbin49327 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/merge2.pngbin29721 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/merge3.pngbin26044 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/merge4.jpgbin44128 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/merge5.pngbin35091 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/mutated_states.pngbin60394 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/on-screen-inputs.pngbin44392 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/on-screen-inputs_002.pngbin34148 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/on-screen-inputs_003.pngbin24749 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/on-screen-inputs_004.pngbin55736 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/on-screen-inputs_005.pngbin14092 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/on-screen-inputs_006.pngbin24405 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/photostream_landscape.pngbin104835 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/photostream_portrait.pngbin124993 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/qsb.pngbin34882 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/qsb_002.pngbin246945 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/qsb_003.pngbin43897 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/relativelayout_1.pngbin10385 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/relativelayout_2.pngbin8335 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/relativelayout_3.pngbin8394 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/relativelayout_wire_1.pngbin3554 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/relativelayout_wire_2.pngbin3553 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/relativelayout_wire_3.pngbin3543 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/search01.pngbin132998 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/search02.pngbin115605 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/service-api-changes-starting-with_runningservices.pngbin40632 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/service-api-changes-starting-with_stopservice.pngbin39834 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/shared_states.pngbin54451 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/shelves2.pngbin123418 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/speech-input.pngbin41478 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/text_field.pngbin63949 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/ui-1.6.pngbin14329 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/ui-1.6_002.pngbin13623 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/viewstub1.pngbin123418 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/viewstub2.pngbin112198 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/viewstub3.pngbin30279 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/viewstub4.pngbin46944 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/webview.pngbin14463 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/window_background.pngbin136846 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/window_background_null.pngbin136728 -> 0 bytes
-rw-r--r--docs/html/resources/articles/images/window_background_root.pngbin29229 -> 0 bytes
-rw-r--r--docs/html/resources/articles/index.jd168
-rw-r--r--docs/html/resources/articles/layout-tricks-efficiency.jd179
-rw-r--r--docs/html/resources/articles/layout-tricks-merge.jd202
-rw-r--r--docs/html/resources/articles/layout-tricks-reuse.jd81
-rw-r--r--docs/html/resources/articles/layout-tricks-stubs.jd86
-rw-r--r--docs/html/resources/articles/listview-backgrounds.jd88
-rw-r--r--docs/html/resources/articles/live-folders.jd170
-rw-r--r--docs/html/resources/articles/live-wallpapers.jd102
-rw-r--r--docs/html/resources/articles/multitasking-android-way.jd103
-rw-r--r--docs/html/resources/articles/on-screen-inputs.jd265
-rw-r--r--docs/html/resources/articles/painless-threading.jd149
-rw-r--r--docs/html/resources/articles/qsb.jd169
-rw-r--r--docs/html/resources/articles/service-api-changes-starting-with.jd177
-rw-r--r--docs/html/resources/articles/speech-input.jd94
-rw-r--r--docs/html/resources/articles/timed-ui-updates.jd151
-rw-r--r--docs/html/resources/articles/touch-mode.jd140
-rw-r--r--docs/html/resources/articles/track-mem.jd64
-rw-r--r--docs/html/resources/articles/tts.jd243
-rw-r--r--docs/html/resources/articles/ui-1.5.jd50
-rw-r--r--docs/html/resources/articles/ui-1.6.jd132
-rw-r--r--docs/html/resources/articles/using-webviews.jd63
-rw-r--r--docs/html/resources/articles/wikinotes-intents.jd257
-rw-r--r--docs/html/resources/articles/wikinotes-linkify.jd115
-rw-r--r--docs/html/resources/articles/window-bg-speed.jd127
-rw-r--r--docs/html/resources/articles/zipalign.jd100
-rw-r--r--docs/html/resources/browser.jd49
-rw-r--r--docs/html/resources/community-groups.jd120
-rw-r--r--docs/html/resources/community-more.jd71
-rw-r--r--docs/html/resources/dashboard/opengl.jd79
-rw-r--r--docs/html/resources/dashboard/platform-versions.jd117
-rw-r--r--docs/html/resources/dashboard/screens.jd101
-rw-r--r--docs/html/resources/images/ActionBarCompat1.png (renamed from docs/html/resources/samples/images/ActionBarCompat1.png)bin19637 -> 19637 bytes
-rw-r--r--docs/html/resources/images/ActionBarCompat2.png (renamed from docs/html/resources/samples/images/ActionBarCompat2.png)bin22271 -> 22271 bytes
-rw-r--r--docs/html/resources/images/BluetoothChat1.png (renamed from docs/html/resources/samples/images/BluetoothChat1.png)bin16064 -> 16064 bytes
-rw-r--r--docs/html/resources/images/BluetoothChat2.png (renamed from docs/html/resources/samples/images/BluetoothChat2.png)bin15678 -> 15678 bytes
-rw-r--r--docs/html/resources/images/BluetoothHDP.png (renamed from docs/html/resources/samples/images/BluetoothHDP.png)bin58734 -> 58734 bytes
-rw-r--r--docs/html/resources/images/BusinessCard1.png (renamed from docs/html/resources/samples/images/BusinessCard1.png)bin6425 -> 6425 bytes
-rw-r--r--docs/html/resources/images/BusinessCard2.png (renamed from docs/html/resources/samples/images/BusinessCard2.png)bin8902 -> 8902 bytes
-rw-r--r--docs/html/resources/images/ContactManager1.png (renamed from docs/html/resources/samples/images/ContactManager1.png)bin18050 -> 18050 bytes
-rw-r--r--docs/html/resources/images/ContactManager2.png (renamed from docs/html/resources/samples/images/ContactManager2.png)bin17125 -> 17125 bytes
-rw-r--r--docs/html/resources/images/CubeLiveWallpaper1.png (renamed from docs/html/resources/samples/images/CubeLiveWallpaper1.png)bin49522 -> 49522 bytes
-rw-r--r--docs/html/resources/images/CubeLiveWallpaper3.png (renamed from docs/html/resources/samples/images/CubeLiveWallpaper3.png)bin45714 -> 45714 bytes
-rw-r--r--docs/html/resources/images/HomeSample.png (renamed from docs/html/resources/samples/images/HomeSample.png)bin44416 -> 44416 bytes
-rw-r--r--docs/html/resources/images/JetBoy.png (renamed from docs/html/resources/samples/images/JetBoy.png)bin53801 -> 53801 bytes
-rw-r--r--docs/html/resources/images/KeyChainDemo1.png (renamed from docs/html/resources/samples/images/KeyChainDemo1.png)bin142236 -> 142236 bytes
-rwxr-xr-xdocs/html/resources/images/KeyChainDemo2.png (renamed from docs/html/resources/samples/images/KeyChainDemo2.png)bin40334 -> 40334 bytes
-rwxr-xr-xdocs/html/resources/images/KeyChainDemo3.png (renamed from docs/html/resources/samples/images/KeyChainDemo3.png)bin62468 -> 62468 bytes
-rwxr-xr-xdocs/html/resources/images/KeyChainDemo4.png (renamed from docs/html/resources/samples/images/KeyChainDemo4.png)bin61334 -> 61334 bytes
-rw-r--r--docs/html/resources/images/MultiResolution.png (renamed from docs/html/resources/samples/images/MultiResolution.png)bin96462 -> 96462 bytes
-rw-r--r--docs/html/resources/images/NewsReader.png (renamed from docs/html/resources/samples/images/NewsReader.png)bin183245 -> 183245 bytes
-rw-r--r--docs/html/resources/images/NfcDemo.png (renamed from docs/html/resources/samples/images/NfcDemo.png)bin12750 -> 12750 bytes
-rw-r--r--docs/html/resources/images/SampleSyncAdapter1.png (renamed from docs/html/resources/samples/images/SampleSyncAdapter1.png)bin32368 -> 32368 bytes
-rw-r--r--docs/html/resources/images/SampleSyncAdapter2.png (renamed from docs/html/resources/samples/images/SampleSyncAdapter2.png)bin45843 -> 45843 bytes
-rw-r--r--docs/html/resources/images/SampleSyncAdapter3.png (renamed from docs/html/resources/samples/images/SampleSyncAdapter3.png)bin38011 -> 38011 bytes
-rw-r--r--docs/html/resources/images/SearchableDictionary1.png (renamed from docs/html/resources/samples/images/SearchableDictionary1.png)bin15800 -> 15800 bytes
-rw-r--r--docs/html/resources/images/SearchableDictionary2.png (renamed from docs/html/resources/samples/images/SearchableDictionary2.png)bin18114 -> 18114 bytes
-rwxr-xr-xdocs/html/resources/images/SipDemo.png (renamed from docs/html/resources/samples/images/SipDemo.png)bin72267 -> 72267 bytes
-rw-r--r--docs/html/resources/images/Snake.png (renamed from docs/html/resources/samples/images/Snake.png)bin5445 -> 5445 bytes
-rw-r--r--docs/html/resources/images/SoftKeyboard.png (renamed from docs/html/resources/samples/images/SoftKeyboard.png)bin13426 -> 13426 bytes
-rw-r--r--docs/html/resources/images/SpinnerTest1.png (renamed from docs/html/resources/samples/images/SpinnerTest1.png)bin8872 -> 8872 bytes
-rw-r--r--docs/html/resources/images/SpinnerTest2.png (renamed from docs/html/resources/samples/images/SpinnerTest2.png)bin17278 -> 17278 bytes
-rw-r--r--docs/html/resources/images/StackWidget.png (renamed from docs/html/resources/samples/images/StackWidget.png)bin2525 -> 2525 bytes
-rw-r--r--docs/html/resources/images/TicTacToeLib.png (renamed from docs/html/resources/samples/images/TicTacToeLib.png)bin28337 -> 28337 bytes
-rw-r--r--docs/html/resources/images/TicTacToeMain.png (renamed from docs/html/resources/samples/images/TicTacToeMain.png)bin37680 -> 37680 bytes
-rw-r--r--docs/html/resources/images/VoicemailProviderDemo.png (renamed from docs/html/resources/samples/images/VoicemailProviderDemo.png)bin34137 -> 34137 bytes
-rw-r--r--docs/html/resources/images/WeatherListWidget.png (renamed from docs/html/resources/samples/images/WeatherListWidget.png)bin28360 -> 28360 bytes
-rw-r--r--docs/html/resources/images/WifiDirect.png (renamed from docs/html/resources/samples/images/WifiDirect.png)bin33285 -> 33285 bytes
-rw-r--r--docs/html/resources/images/Wiktionary.png (renamed from docs/html/resources/samples/images/Wiktionary.png)bin35229 -> 35229 bytes
-rw-r--r--docs/html/resources/images/WiktionarySimple.png (renamed from docs/html/resources/samples/images/WiktionarySimple.png)bin69288 -> 69288 bytes
-rw-r--r--docs/html/resources/images/XmlPhotosAdapter.png (renamed from docs/html/resources/samples/images/XmlPhotosAdapter.png)bin108550 -> 108550 bytes
-rw-r--r--docs/html/resources/images/XmlRssReader.png (renamed from docs/html/resources/samples/images/XmlRssReader.png)bin118780 -> 118780 bytes
-rw-r--r--docs/html/resources/images/hcgallery-phone1.png (renamed from docs/html/resources/samples/images/hcgallery-phone1.png)bin26118 -> 26118 bytes
-rw-r--r--docs/html/resources/images/hcgallery-phone2.png (renamed from docs/html/resources/samples/images/hcgallery-phone2.png)bin52306 -> 52306 bytes
-rw-r--r--docs/html/resources/images/hcgallery.png (renamed from docs/html/resources/samples/images/hcgallery.png)bin249709 -> 249709 bytes
-rw-r--r--docs/html/resources/images/randommusicplayer.png (renamed from docs/html/resources/samples/images/randommusicplayer.png)bin18502 -> 18502 bytes
-rw-r--r--docs/html/resources/images/sample_lunarlander.png (renamed from docs/html/resources/samples/images/sample_lunarlander.png)bin27514 -> 27514 bytes
-rw-r--r--docs/html/resources/images/sample_note.png (renamed from docs/html/resources/samples/images/sample_note.png)bin6011 -> 6011 bytes
-rw-r--r--docs/html/resources/images/sample_notepad.png (renamed from docs/html/resources/samples/images/sample_notepad.png)bin6530 -> 6530 bytes
-rw-r--r--docs/html/resources/images/sample_notepadtest_junit.png (renamed from docs/html/resources/samples/images/sample_notepadtest_junit.png)bin20515 -> 20515 bytes
-rwxr-xr-xdocs/html/resources/images/vpn-confirmation.png (renamed from docs/html/resources/samples/images/vpn-confirmation.png)bin60214 -> 60214 bytes
-rw-r--r--docs/html/resources/index.jd90
-rw-r--r--docs/html/resources/resources-data.js946
-rw-r--r--docs/html/resources/samples/get.jd92
-rw-r--r--docs/html/resources/samples/index.jd11
-rw-r--r--docs/html/resources/topics.jd72
-rw-r--r--docs/html/resources/tutorials/hello-world.jd607
-rw-r--r--docs/html/resources/tutorials/index.html8
-rwxr-xr-xdocs/html/resources/tutorials/localization/index.jd595
-rw-r--r--docs/html/resources/tutorials/notepad/index.jd4
-rw-r--r--docs/html/resources/tutorials/notepad/notepad-ex1.jd2
-rw-r--r--docs/html/resources/tutorials/notepad/notepad-ex3.jd2
-rw-r--r--docs/html/resources/tutorials/notepad/notepad-extra-credit.jd2
-rw-r--r--docs/html/resources/tutorials/opengl/opengl-es10.jd532
-rw-r--r--docs/html/resources/tutorials/opengl/opengl-es20.jd652
-rw-r--r--docs/html/resources/tutorials/testing/helloandroid_test.jd508
-rw-r--r--docs/html/resources/tutorials/views/hello-autocomplete.jd173
-rw-r--r--docs/html/resources/tutorials/views/hello-datepicker.jd173
-rw-r--r--docs/html/resources/tutorials/views/hello-formstuff.jd400
-rw-r--r--docs/html/resources/tutorials/views/hello-gallery.jd171
-rw-r--r--docs/html/resources/tutorials/views/hello-linearlayout.jd133
-rw-r--r--docs/html/resources/tutorials/views/hello-listview.jd170
-rw-r--r--docs/html/resources/tutorials/views/hello-mapview.jd303
-rw-r--r--docs/html/resources/tutorials/views/hello-relativelayout.jd89
-rw-r--r--docs/html/resources/tutorials/views/hello-spinner.jd149
-rw-r--r--docs/html/resources/tutorials/views/hello-timepicker.jd167
-rw-r--r--docs/html/resources/tutorials/views/hello-webview.jd131
-rwxr-xr-xdocs/html/resources/tutorials/views/images/android.pngbin693 -> 0 bytes
-rwxr-xr-xdocs/html/resources/tutorials/views/images/androidmarker.pngbin702 -> 0 bytes
-rw-r--r--docs/html/resources/tutorials/views/images/hello-autocomplete.pngbin17719 -> 0 bytes
-rwxr-xr-xdocs/html/resources/tutorials/views/images/hello-datepicker.pngbin7322 -> 0 bytes
-rw-r--r--docs/html/resources/tutorials/views/images/hello-formstuff.pngbin23272 -> 0 bytes
-rwxr-xr-xdocs/html/resources/tutorials/views/images/hello-gallery.pngbin5593 -> 0 bytes
-rwxr-xr-xdocs/html/resources/tutorials/views/images/hello-gridview.pngbin21768 -> 0 bytes
-rwxr-xr-xdocs/html/resources/tutorials/views/images/hello-linearlayout.pngbin4207 -> 0 bytes
-rwxr-xr-xdocs/html/resources/tutorials/views/images/hello-relativelayout.pngbin2399 -> 0 bytes
-rwxr-xr-xdocs/html/resources/tutorials/views/images/hello-spinner.pngbin2513 -> 0 bytes
-rwxr-xr-xdocs/html/resources/tutorials/views/images/hello-tablelayout.pngbin3446 -> 0 bytes
-rwxr-xr-xdocs/html/resources/tutorials/views/images/hello-timepicker.pngbin5644 -> 0 bytes
-rw-r--r--docs/html/resources/tutorials/views/index.jd121
-rw-r--r--docs/html/sdk/OLD_RELEASENOTES.jd12
-rw-r--r--docs/html/sdk/RELEASENOTES.jd30
-rw-r--r--docs/html/sdk/adding-components.jd209
-rw-r--r--docs/html/sdk/android-2.3.4.jd381
-rw-r--r--docs/html/sdk/api_diff/10/changes/changes-summary.html2
-rw-r--r--docs/html/sdk/api_diff/11/changes/changes-summary.html2
-rw-r--r--docs/html/sdk/api_diff/12/changes/changes-summary.html2
-rw-r--r--docs/html/sdk/api_diff/13/changes/changes-summary.html2
-rw-r--r--docs/html/sdk/api_diff/14/changes/changes-summary.html2
-rw-r--r--docs/html/sdk/api_diff/15/changes/changes-summary.html2
-rw-r--r--docs/html/sdk/api_diff/3/changes/changes-summary.html2
-rw-r--r--docs/html/sdk/api_diff/4/changes/changes-summary.html2
-rw-r--r--docs/html/sdk/api_diff/5/changes/changes-summary.html2
-rw-r--r--docs/html/sdk/api_diff/6/changes/changes-summary.html2
-rw-r--r--docs/html/sdk/api_diff/7/changes/changes-summary.html2
-rw-r--r--docs/html/sdk/api_diff/8/changes/changes-summary.html2
-rw-r--r--docs/html/sdk/api_diff/9/changes/changes-summary.html2
-rw-r--r--docs/html/sdk/exploring.jd166
-rw-r--r--docs/html/sdk/index.jd131
-rw-r--r--docs/html/sdk/installing/adding-packages.jd78
-rw-r--r--docs/html/sdk/installing/index.jd133
-rw-r--r--docs/html/sdk/installing/installing-adt.jd206
-rw-r--r--docs/html/sdk/installing/next.jd52
-rw-r--r--docs/html/sdk/older_releases.jd2
-rw-r--r--docs/html/sdk/preview/features.jd8
-rw-r--r--docs/html/sdk/preview/installing.jd8
-rw-r--r--docs/html/sdk/requirements.jd114
-rw-r--r--docs/html/sdk/sdk_toc.cs228
-rw-r--r--docs/html/sdk/terms.jd207
-rw-r--r--docs/html/sdk/terms_body.html336
-rw-r--r--docs/html/sdk/win-usb.jd6
-rw-r--r--docs/html/search.jd148
-rw-r--r--docs/html/shareables/training/CustomView.zipbin0 -> 72290 bytes
-rw-r--r--docs/html/shareables/training/FragmentBasics.zipbin283520 -> 283814 bytes
-rw-r--r--docs/html/shareables/training/NetworkUsage.zipbin0 -> 24270 bytes
-rw-r--r--docs/html/shareables/training/OpenGLES.zipbin0 -> 27980 bytes
-rw-r--r--docs/html/sitemap-intl.txt8
-rw-r--r--docs/html/sitemap.txt150
-rw-r--r--docs/html/support.jd74
-rw-r--r--docs/html/tools/aidl.jd (renamed from docs/html/guide/developing/tools/aidl.jd)12
-rw-r--r--docs/html/tools/avd.html (renamed from docs/html/guide/developing/tools/avd.html)4
-rw-r--r--docs/html/tools/building/building-cmdline.jd (renamed from docs/html/guide/developing/building/building-cmdline.jd)26
-rw-r--r--docs/html/tools/building/building-eclipse.jd (renamed from docs/html/guide/developing/building/building-eclipse.jd)8
-rw-r--r--docs/html/tools/building/index.jd (renamed from docs/html/guide/developing/building/index.jd)2
-rw-r--r--docs/html/tools/debug-tasks.html (renamed from docs/html/guide/developing/debug-tasks.html)4
-rw-r--r--docs/html/tools/debugging/ddms.jd (renamed from docs/html/guide/developing/debugging/ddms.jd)10
-rw-r--r--docs/html/tools/debugging/debugging-devtools.jd (renamed from docs/html/guide/developing/debugging/debugging-devtools.jd)18
-rw-r--r--docs/html/tools/debugging/debugging-log.jd (renamed from docs/html/guide/developing/debugging/debugging-log.jd)2
-rw-r--r--docs/html/tools/debugging/debugging-projects-cmdline.jd (renamed from docs/html/guide/developing/debugging/debugging-projects-cmdline.jd)4
-rw-r--r--docs/html/tools/debugging/debugging-projects.jd (renamed from docs/html/guide/developing/debugging/debugging-projects.jd)0
-rw-r--r--docs/html/tools/debugging/debugging-tracing.jd (renamed from docs/html/guide/developing/debugging/debugging-tracing.jd)2
-rw-r--r--docs/html/tools/debugging/debugging-ui.jd (renamed from docs/html/guide/developing/debugging/debugging-ui.jd)18
-rw-r--r--docs/html/tools/debugging/index.jd (renamed from docs/html/guide/developing/debugging/index.jd)22
-rw-r--r--docs/html/tools/device.jd (renamed from docs/html/guide/developing/device.jd)8
-rw-r--r--docs/html/tools/devices/emulator.jd (renamed from docs/html/guide/developing/devices/emulator.jd)36
-rw-r--r--docs/html/tools/devices/index.jd (renamed from docs/html/guide/developing/devices/index.jd)10
-rw-r--r--docs/html/tools/devices/managing-avds-cmdline.jd (renamed from docs/html/guide/developing/devices/managing-avds-cmdline.jd)12
-rw-r--r--docs/html/tools/devices/managing-avds.jd (renamed from docs/html/guide/developing/devices/managing-avds.jd)0
-rw-r--r--docs/html/tools/eclipse-adt.html10
-rw-r--r--docs/html/tools/extras/index.jd5
-rw-r--r--docs/html/tools/extras/oem-usb.jd (renamed from docs/html/sdk/oem-usb.jd)10
-rw-r--r--docs/html/tools/extras/support-library.jd (renamed from docs/html/sdk/compatibility-library.jd)25
-rw-r--r--docs/html/tools/help/MonkeyDevice.jd (renamed from docs/html/guide/developing/tools/MonkeyDevice.jd)18
-rw-r--r--docs/html/tools/help/MonkeyImage.jd (renamed from docs/html/guide/developing/tools/MonkeyImage.jd)10
-rw-r--r--docs/html/tools/help/MonkeyRunner.jd (renamed from docs/html/guide/developing/tools/MonkeyRunner.jd)8
-rw-r--r--docs/html/tools/help/aapt.html10
-rw-r--r--docs/html/tools/help/adb.jd (renamed from docs/html/guide/developing/tools/adb.jd)6
-rw-r--r--docs/html/tools/help/adt.jd (renamed from docs/html/guide/developing/tools/adt.jd)16
-rw-r--r--docs/html/tools/help/android.jd (renamed from docs/html/guide/developing/tools/android.jd)10
-rw-r--r--docs/html/tools/help/bmgr.jd (renamed from docs/html/guide/developing/tools/bmgr.jd)2
-rw-r--r--docs/html/tools/help/ddms.html (renamed from docs/html/guide/developing/tools/ddms.html)4
-rw-r--r--docs/html/tools/help/dmtracedump.jd (renamed from docs/html/guide/developing/tools/dmtracedump.jd)2
-rw-r--r--docs/html/tools/help/draw9patch.jd (renamed from docs/html/guide/developing/tools/draw9patch.jd)0
-rw-r--r--docs/html/tools/help/emulator.jd (renamed from docs/html/guide/developing/tools/emulator.jd)18
-rw-r--r--docs/html/tools/help/etc1tool.jd (renamed from docs/html/guide/developing/tools/etc1tool.jd)0
-rw-r--r--docs/html/tools/help/hierarchy-viewer.jd (renamed from docs/html/guide/developing/tools/hierarchy-viewer.jd)2
-rw-r--r--docs/html/tools/help/hprof-conv.jd (renamed from docs/html/guide/developing/tools/hprof-conv.jd)0
-rw-r--r--docs/html/tools/help/index.jd (renamed from docs/html/guide/developing/tools/index.jd)7
-rw-r--r--docs/html/tools/help/layoutopt.jd (renamed from docs/html/guide/developing/tools/layoutopt.jd)2
-rw-r--r--docs/html/tools/help/logcat.jd (renamed from docs/html/guide/developing/tools/logcat.jd)4
-rw-r--r--docs/html/tools/help/mksdcard.jd (renamed from docs/html/guide/developing/tools/mksdcard.jd)2
-rw-r--r--docs/html/tools/help/monkey.jd (renamed from docs/html/guide/developing/tools/monkey.jd)4
-rw-r--r--docs/html/tools/help/monkeyrunner_concepts.jd (renamed from docs/html/guide/developing/tools/monkeyrunner_concepts.jd)18
-rw-r--r--docs/html/tools/help/proguard.jd (renamed from docs/html/guide/developing/tools/proguard.jd)2
-rw-r--r--docs/html/tools/help/sqlite3.jd (renamed from docs/html/guide/developing/tools/sqlite3.jd)0
-rw-r--r--docs/html/tools/help/traceview.jd (renamed from docs/html/guide/developing/tools/traceview.jd)2
-rw-r--r--docs/html/tools/help/zipalign.jd (renamed from docs/html/guide/developing/tools/zipalign.jd)2
-rw-r--r--docs/html/tools/index.jd96
-rw-r--r--docs/html/tools/other-ide.html10
-rw-r--r--docs/html/tools/othertools.html (renamed from docs/html/guide/developing/tools/othertools.html)4
-rw-r--r--docs/html/tools/projects/index.jd (renamed from docs/html/guide/developing/projects/index.jd)16
-rw-r--r--docs/html/tools/projects/projects-cmdline.jd (renamed from docs/html/guide/developing/projects/projects-cmdline.jd)8
-rw-r--r--docs/html/tools/projects/projects-eclipse.jd (renamed from docs/html/guide/developing/projects/projects-eclipse.jd)6
-rw-r--r--docs/html/tools/publishing/app-signing.jd (renamed from docs/html/guide/publishing/app-signing.jd)10
-rw-r--r--docs/html/tools/publishing/preparing.jd359
-rwxr-xr-xdocs/html/tools/publishing/publishing_overview.jd238
-rw-r--r--docs/html/tools/publishing/versioning.jd174
-rw-r--r--docs/html/tools/revisions/index.jd9
-rw-r--r--docs/html/tools/revisions/platforms.jd831
-rw-r--r--docs/html/tools/samples/index.jd31
-rw-r--r--docs/html/tools/sdk/OLD_RELEASENOTES.jd527
-rw-r--r--docs/html/tools/sdk/RELEASENOTES.jd803
-rw-r--r--docs/html/tools/sdk/addons.jd9
-rw-r--r--docs/html/tools/sdk/adt-notes.jd (renamed from docs/html/sdk/adt-notes.jd)0
-rw-r--r--docs/html/tools/sdk/adt_download.html (renamed from docs/html/sdk/adt_download.html)0
-rw-r--r--docs/html/tools/sdk/download.jd (renamed from docs/html/sdk/download.jd)0
-rw-r--r--docs/html/tools/sdk/eclipse-adt.jd (renamed from docs/html/sdk/eclipse-adt.jd)279
-rw-r--r--docs/html/tools/sdk/images/2.0/camera-modes.pngbin0 -> 87824 bytes
-rw-r--r--docs/html/tools/sdk/images/2.0/email-inbox.pngbin0 -> 38766 bytes
-rw-r--r--docs/html/tools/sdk/images/2.0/mms-search.pngbin0 -> 12842 bytes
-rw-r--r--docs/html/tools/sdk/images/2.0/multiple-accounts.pngbin0 -> 39122 bytes
-rw-r--r--docs/html/tools/sdk/images/2.0/quick-connect.pngbin0 -> 30379 bytes
-rw-r--r--docs/html/tools/sdk/images/2.2/22browser.pngbin0 -> 126458 bytes
-rw-r--r--docs/html/tools/sdk/images/2.2/22exchange.pngbin0 -> 113049 bytes
-rw-r--r--docs/html/tools/sdk/images/2.2/22gallery.pngbin0 -> 146789 bytes
-rw-r--r--docs/html/tools/sdk/images/2.2/22home.pngbin0 -> 146759 bytes
-rw-r--r--docs/html/tools/sdk/images/2.2/22hotspot.pngbin0 -> 50561 bytes
-rw-r--r--docs/html/tools/sdk/images/2.2/22keyboard.pngbin0 -> 41355 bytes
-rw-r--r--docs/html/tools/sdk/images/2.2/jit-graph.pngbin0 -> 11990 bytes
-rw-r--r--docs/html/tools/sdk/images/2.3/ffc.pngbin0 -> 311628 bytes
-rw-r--r--docs/html/tools/sdk/images/2.3/home-menu.pngbin0 -> 278552 bytes
-rw-r--r--docs/html/tools/sdk/images/2.3/home-plain.pngbin0 -> 428133 bytes
-rw-r--r--docs/html/tools/sdk/images/2.3/nfc.pngbin0 -> 27547 bytes
-rw-r--r--docs/html/tools/sdk/images/2.3/onetouch.pngbin0 -> 43272 bytes
-rw-r--r--docs/html/tools/sdk/images/2.3/power.pngbin0 -> 62788 bytes
-rw-r--r--docs/html/tools/sdk/images/2.3/running.pngbin0 -> 72197 bytes
-rw-r--r--docs/html/tools/sdk/images/2.3/selection.pngbin0 -> 30206 bytes
-rw-r--r--docs/html/tools/sdk/images/2.3/sipcall.pngbin0 -> 34554 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/browser.pngbin0 -> 73398 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/browser_full.pngbin0 -> 751808 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/camera.pngbin0 -> 81122 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/camera_full.pngbin0 -> 870501 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/contacts.pngbin0 -> 15102 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/contacts_full.pngbin0 -> 126300 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/copy.pngbin0 -> 21333 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/copy_full.pngbin0 -> 97476 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/home_hero1.pngbin0 -> 158528 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/home_hero1_full.pngbin0 -> 798511 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/homescreen_cust_port.pngbin0 -> 84171 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/homescreen_cust_port_full.pngbin0 -> 675192 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/mail_drag.pngbin0 -> 25096 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/mail_drag_full.pngbin0 -> 126694 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/tasks.pngbin0 -> 76666 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/tasks_full.pngbin0 -> 753902 bytes
-rw-r--r--docs/html/tools/sdk/images/3.0/widgets.pngbin0 -> 236461 bytes
-rw-r--r--docs/html/tools/sdk/images/3.1/controls.pngbin0 -> 103866 bytes
-rw-r--r--docs/html/tools/sdk/images/3.1/home.pngbin0 -> 142023 bytes
-rw-r--r--docs/html/tools/sdk/images/3.1/home_full.pngbin0 -> 624953 bytes
-rw-r--r--docs/html/tools/sdk/images/3.1/resizeable.pngbin0 -> 64928 bytes
-rw-r--r--docs/html/tools/sdk/images/3.1/tasks.pngbin0 -> 136355 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/allapps-lg.pngbin0 -> 167249 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/allapps.pngbin0 -> 26073 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/bbench.pngbin0 -> 9161 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/beam-lg.pngbin0 -> 121355 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/beam-maps-lg.pngbin0 -> 175873 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/beam-maps.pngbin0 -> 23063 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/beam.pngbin0 -> 17497 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/browser-lg.pngbin0 -> 212370 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/browser-tabs-lg.pngbin0 -> 230345 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/browser-tabs.pngbin0 -> 27626 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/browser.pngbin0 -> 29700 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/calendar-widget-lg.pngbin0 -> 191944 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/calendar-widget.pngbin0 -> 28184 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/camera-lg.pngbin0 -> 360317 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/camera.pngbin0 -> 48868 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/contact-call-lg.pngbin0 -> 206397 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/contact-call.pngbin0 -> 29626 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/contact-call.xcf (renamed from docs/html/sdk/images/4.0/contact-call.xcf)bin1081675 -> 1081675 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/contact-connect-lg.pngbin0 -> 185666 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/contact-connect.pngbin0 -> 27749 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/contact-email-lg.pngbin0 -> 106147 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/contact-email.pngbin0 -> 22350 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/contact-faves-lg.pngbin0 -> 280921 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/contact-faves.pngbin0 -> 36503 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/face-unlock-lg.pngbin0 -> 228900 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/face-unlock.pngbin0 -> 148069 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/folders.xcfbin0 -> 259819 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/gallery-edit-lg.pngbin0 -> 360693 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/gallery-edit.pngbin0 -> 43068 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/gallery-share-lg.pngbin0 -> 340002 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/gallery-share.pngbin0 -> 46363 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/gallery-widget.pngbin0 -> 268739 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/home-lg.pngbin0 -> 290279 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/home.pngbin0 -> 51314 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/live-effects.pngbin0 -> 64701 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/lock-camera-lg.pngbin0 -> 185967 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/lock-camera.pngbin0 -> 26512 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/lock-lg.pngbin0 -> 235618 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/lock.pngbin0 -> 30920 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/quick-responses-lg.pngbin0 -> 125876 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/quick-responses.pngbin0 -> 20648 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/screenshot-lg.pngbin0 -> 572192 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/screenshot.pngbin0 -> 62111 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/tasks-lg.pngbin0 -> 335903 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/tasks.pngbin0 -> 43450 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/text-replace-lg.pngbin0 -> 114302 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/text-replace.pngbin0 -> 19053 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/tts-lg.pngbin0 -> 121886 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/tts.pngbin0 -> 27595 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/usage-all-lg.pngbin0 -> 83625 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/usage-all.pngbin0 -> 17602 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/usage-maps-lg.pngbin0 -> 92558 bytes
-rw-r--r--docs/html/tools/sdk/images/4.0/usage-maps.pngbin0 -> 19163 bytes
-rw-r--r--docs/html/tools/sdk/images/battery.pngbin0 -> 22208 bytes
-rw-r--r--docs/html/tools/sdk/images/camera.pngbin0 -> 47444 bytes
-rw-r--r--docs/html/tools/sdk/images/donut_small_bg.pngbin0 -> 4031 bytes
-rw-r--r--docs/html/tools/sdk/images/market.pngbin0 -> 40382 bytes
-rw-r--r--docs/html/tools/sdk/images/search.pngbin0 -> 24245 bytes
-rw-r--r--docs/html/tools/sdk/index.jd10
-rw-r--r--docs/html/tools/sdk/installing.jd (renamed from docs/html/sdk/installing.jd)32
-rw-r--r--docs/html/tools/sdk/libraries.jd9
-rw-r--r--docs/html/tools/sdk/ndk/1.5_r1/index.jd (renamed from docs/html/sdk/ndk/1.5_r1/index.jd)0
-rw-r--r--docs/html/tools/sdk/ndk/1.6_r1/index.jd (renamed from docs/html/sdk/ndk/1.6_r1/index.jd)0
-rw-r--r--docs/html/tools/sdk/ndk/index.jd (renamed from docs/html/sdk/ndk/index.jd)105
-rw-r--r--docs/html/tools/sdk/ndk/overview.jd (renamed from docs/html/sdk/ndk/overview.jd)81
-rw-r--r--docs/html/tools/sdk/older_releases.jd613
-rw-r--r--docs/html/tools/sdk/platforms.jd9
-rw-r--r--docs/html/tools/sdk/preview/features.jd8
-rw-r--r--docs/html/tools/sdk/preview/index.jd (renamed from docs/html/sdk/preview/index.jd)0
-rw-r--r--docs/html/tools/sdk/preview/installing.jd8
-rw-r--r--docs/html/tools/sdk/preview/requirements.jd (renamed from docs/html/sdk/preview/requirements.jd)0
-rw-r--r--docs/html/tools/sdk/preview/upgrading.jd (renamed from docs/html/sdk/preview/upgrading.jd)0
-rw-r--r--docs/html/tools/sdk/tools-notes.jd (renamed from docs/html/sdk/tools-notes.jd)46
-rw-r--r--docs/html/tools/sdk/usb-drivers.jd9
-rw-r--r--docs/html/tools/sdk/win-usb.jd172
-rw-r--r--docs/html/tools/testing/activity_test.jd (renamed from docs/html/resources/tutorials/testing/activity_test.jd)113
-rw-r--r--docs/html/tools/testing/activity_testing.jd (renamed from docs/html/guide/topics/testing/activity_testing.jd)45
-rw-r--r--docs/html/tools/testing/contentprovider_testing.jd (renamed from docs/html/guide/topics/testing/contentprovider_testing.jd)64
-rw-r--r--docs/html/tools/testing/index.jd40
-rw-r--r--docs/html/tools/testing/service_testing.jd (renamed from docs/html/guide/topics/testing/service_testing.jd)22
-rwxr-xr-xdocs/html/tools/testing/testing_android.jd (renamed from docs/html/guide/topics/testing/testing_android.jd)110
-rw-r--r--docs/html/tools/testing/testing_eclipse.jd (renamed from docs/html/guide/developing/testing/testing_eclipse.jd)24
-rw-r--r--docs/html/tools/testing/testing_otheride.jd (renamed from docs/html/guide/developing/testing/testing_otheride.jd)30
-rw-r--r--docs/html/tools/testing/what_to_test.jd (renamed from docs/html/guide/topics/testing/what_to_test.jd)4
-rw-r--r--docs/html/tools/tools_toc.cs214
-rw-r--r--docs/html/tools/workflow.jd (renamed from docs/html/guide/developing/index.jd)24
-rw-r--r--docs/html/tools/workflow/app-signing.jd618
-rw-r--r--docs/html/tools/workflow/index.jd150
-rw-r--r--docs/html/tools/workflow/publishing/app-signing.jd618
-rw-r--r--docs/html/tools/workflow/publishing/preparing.jd (renamed from docs/html/guide/publishing/preparing.jd)46
-rw-r--r--docs/html/tools/workflow/publishing/publishing.jd (renamed from docs/html/guide/publishing/publishing.jd)30
-rwxr-xr-xdocs/html/tools/workflow/publishing/publishing_overview.jd (renamed from docs/html/guide/publishing/publishing_overview.jd)16
-rw-r--r--docs/html/tools/workflow/publishing/versioning.jd (renamed from docs/html/guide/publishing/versioning.jd)6
-rwxr-xr-xdocs/html/tools/workflow/publishing_overview.jd231
-rw-r--r--docs/html/tools/workflow/versioning.jd174
-rw-r--r--docs/html/training/advanced.jd11
-rw-r--r--docs/html/training/backward-compatible-ui/index.jd2
-rw-r--r--docs/html/training/basics/activity-lifecycle/index.jd2
-rw-r--r--docs/html/training/basics/activity-lifecycle/pausing.jd2
-rw-r--r--docs/html/training/basics/activity-lifecycle/recreating.jd2
-rw-r--r--docs/html/training/basics/activity-lifecycle/starting.jd2
-rw-r--r--docs/html/training/basics/activity-lifecycle/stopping.jd4
-rw-r--r--docs/html/training/basics/firstapp/building-ui.jd29
-rw-r--r--docs/html/training/basics/firstapp/creating-project.jd16
-rw-r--r--docs/html/training/basics/firstapp/index.jd2
-rw-r--r--docs/html/training/basics/firstapp/running-app.jd10
-rw-r--r--docs/html/training/basics/firstapp/starting-activity.jd10
-rw-r--r--docs/html/training/basics/fragments/communicating.jd2
-rw-r--r--docs/html/training/basics/fragments/creating.jd4
-rw-r--r--docs/html/training/basics/fragments/fragment-ui.jd2
-rw-r--r--docs/html/training/basics/fragments/index.jd2
-rw-r--r--docs/html/training/basics/fragments/support-lib.jd4
-rw-r--r--docs/html/training/basics/intents/index.jd4
-rw-r--r--docs/html/training/basics/intents/sending.jd2
-rw-r--r--docs/html/training/basics/network-ops/connecting.jd284
-rw-r--r--docs/html/training/basics/network-ops/index.jd73
-rw-r--r--docs/html/training/basics/network-ops/managing.jd445
-rw-r--r--docs/html/training/basics/network-ops/xml.jd555
-rw-r--r--docs/html/training/basics/supporting-devices/languages.jd4
-rw-r--r--docs/html/training/basics/supporting-devices/platforms.jd8
-rw-r--r--docs/html/training/camera/index.jd2
-rw-r--r--docs/html/training/camera/photobasics.jd2
-rw-r--r--docs/html/training/camera/videobasics.jd2
-rw-r--r--docs/html/training/custom-views/create-view.jd281
-rw-r--r--docs/html/training/custom-views/custom-drawing.jd284
-rw-r--r--docs/html/training/custom-views/index.jd79
-rw-r--r--docs/html/training/custom-views/making-interactive.jd292
-rw-r--r--docs/html/training/custom-views/optimizing-view.jd176
-rw-r--r--docs/html/training/design-navigation/ancestral-temporal.jd4
-rw-r--r--docs/html/training/design-navigation/wireframing.jd6
-rw-r--r--docs/html/training/displaying-bitmaps/index.jd2
-rw-r--r--docs/html/training/displaying-bitmaps/process-bitmap.jd4
-rw-r--r--docs/html/training/efficient-downloads/efficient-network-access.jd2
-rw-r--r--docs/html/training/graphics/opengl/draw.jd195
-rw-r--r--docs/html/training/graphics/opengl/environment.jd223
-rw-r--r--docs/html/training/graphics/opengl/index.jd75
-rw-r--r--docs/html/training/graphics/opengl/motion.jd92
-rw-r--r--docs/html/training/graphics/opengl/projection.jd152
-rw-r--r--docs/html/training/graphics/opengl/shapes.jd153
-rw-r--r--docs/html/training/graphics/opengl/touch.jd145
-rw-r--r--docs/html/training/id-auth/index.jd2
-rw-r--r--docs/html/training/implementing-navigation/ancestral.jd4
-rw-r--r--docs/html/training/implementing-navigation/index.jd4
-rw-r--r--docs/html/training/implementing-navigation/lateral.jd2
-rw-r--r--docs/html/training/implementing-navigation/temporal.jd4
-rw-r--r--docs/html/training/improving-layouts/optimizing-layout.jd6
-rw-r--r--docs/html/training/index.jd12
-rw-r--r--docs/html/training/managing-audio/index.jd2
-rw-r--r--docs/html/training/monitoring-device-state/battery-monitoring.jd2
-rw-r--r--docs/html/training/monitoring-device-state/connectivity-monitoring.jd2
-rw-r--r--docs/html/training/monitoring-device-state/docking-monitoring.jd2
-rw-r--r--docs/html/training/monitoring-device-state/index.jd4
-rw-r--r--docs/html/training/monitoring-device-state/manifest-receivers.jd2
-rw-r--r--docs/html/training/multiple-apks/api.jd14
-rw-r--r--docs/html/training/multiple-apks/index.jd2
-rw-r--r--docs/html/training/multiple-apks/multiple.jd12
-rw-r--r--docs/html/training/multiple-apks/screensize.jd12
-rw-r--r--docs/html/training/multiple-apks/texture.jd10
-rw-r--r--docs/html/training/multiscreen/index.jd8
-rw-r--r--docs/html/training/multiscreen/screensizes.jd2
-rw-r--r--docs/html/training/sharing/index.jd2
-rw-r--r--docs/html/training/sharing/receive.jd6
-rw-r--r--docs/html/training/sharing/send.jd2
-rw-r--r--docs/html/training/training_toc.cs (renamed from docs/html/resources/resources_toc.cs)460
-rw-r--r--docs/html/training/tv/optimizing-layouts-tv.jd4
-rw-r--r--docs/html/videos/index.jd355
1020 files changed, 31833 insertions, 25563 deletions
diff --git a/docs/html/about/about_toc.cs b/docs/html/about/about_toc.cs
new file mode 100644
index 000000000000..04cc5a39f661
--- /dev/null
+++ b/docs/html/about/about_toc.cs
@@ -0,0 +1,44 @@
+<ul id="nav">
+
+<li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot?>about/index.html">Welcome</a></div>
+ <ul>
+ <!-- <li><a href="<?cs var:toroot ?>about/marketplace.html">Open Marketplace</a></li>
+
+ <li><a href="<?cs var:toroot ?>about/flexible.html">Flexible Framework</a></li>
+ -->
+ <li><a href="<?cs var:toroot?>about/start.html">Get Started</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>about/versions/android-4.0-highlights.html">
+ <span class="en">Ice Cream Sandwich</span></a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>about/versions/android-4.0.3.html">Android 4.0.3 APIs</a></li>
+ <li><a href="<?cs var:toroot ?>about/versions/android-4.0.html">Android 4.0 APIs</a> </li>
+ </ul>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>about/versions/android-3.0-highlights.html">
+ <span class="en">Honeycomb</span></a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>about/versions/android-3.2.html">Android 3.2 APIs</a></li>
+ <li><a href="<?cs var:toroot ?>about/versions/android-3.1.html">Android 3.1 APIs</a></li>
+ <li><a href="<?cs var:toroot ?>about/versions/android-3.0.html">Android 3.0 APIs</a> </li>
+ </ul>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>about/versions/android-2.3-highlights.html">
+ <span class="en">Gingerbread</span></a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>about/versions/android-2.3.4.html">Android 2.3.4 APIs</a></li>
+ <li><a href="<?cs var:toroot ?>about/versions/android-2.3.3.html">Android 2.3.3 APIs</a></li>
+ </ul>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="<?cs
+var:toroot?>about/dashboards/index.html">Dashboards</a></div>
+ </li>
+
+</ul> \ No newline at end of file
diff --git a/docs/html/about/dashboards/index.jd b/docs/html/about/dashboards/index.jd
new file mode 100644
index 000000000000..c18d398b22ce
--- /dev/null
+++ b/docs/html/about/dashboards/index.jd
@@ -0,0 +1,235 @@
+page.title=Dashboards
+header.hide=1
+@jd:body
+
+
+
+<h2 id="Platform">Platform Versions</h2>
+
+<p>This page provides data about the relative number of active devices
+running a given version of the Android platform. This can help you
+understand the landscape of device distribution and decide how to prioritize
+the development of your application features for the devices currently in
+the hands of users. For information about how to target your application to devices based on
+platform version, read about <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API levels</a>.</p>
+
+
+<h3 id="PlatformCurrent">Current Distribution</h3>
+
+<p>The following pie chart and table is based on the number of Android devices that have accessed
+Google Play within a 14-day period ending on the data collection date noted below.</p>
+
+<div class="col-6" style="margin-left:0">
+
+
+<table>
+<tr>
+ <th>Version</th>
+ <th>Codename</th>
+ <th>API Level</th>
+ <th>Distribution</th>
+</tr>
+<tr><td><a href="/about/versions/android-1.5.html">1.5</a></td><td>Cupcake</td> <td>3</td><td>0.3%</td></tr>
+<tr><td><a href="/about/versions/android-1.6.html">1.6</a></td><td>Donut</td> <td>4</td><td>0.6%</td></tr>
+<tr><td><a href="/about/versions/android-2.1.html">2.1</a></td><td>Eclair</td> <td>7</td><td>5.2%</td></tr>
+<tr><td><a href="/about/versions/android-2.2.html">2.2</a></td><td>Froyo</td> <td>8</td><td>19.1%</td></tr>
+<tr><td><a href="/about/versions/android-2.3.html">2.3 - 2.3.2</a>
+ </td><td rowspan="2">Gingerbread</td> <td>9</td><td>0.4%</td></tr>
+<tr><td><a href="/about/versions/android-2.3.3.html">2.3.3 - 2.3.7
+ </a></td><!-- Gingerbread --> <td>10</td><td>64.6%</td></tr>
+<tr><td><a href="/about/versions/android-3.1.html">3.1</a></td>
+ <td rowspan="2">Honeycomb</td> <td>12</td><td>0.7%</td></tr>
+<tr><td><a href="/about/versions/android-3.2.html">3.2</a></td><!-- Honeycomb --><td>13</td><td>2%</td></tr>
+<tr><td><a href="/about/versions/android-4.0.html">4.0 - 4.0.2</a></td>
+ <td rowspan="2">Ice Cream Sandwich</td><td>14</td><td>0.4%</td></tr>
+<tr><td><a href="/about/versions/android-4.0.3.html">4.0.3 - 4.0.4</a> </td><!-- ICS --> <td>15</td><td>6.7%</td></tr>
+</table>
+
+
+</div>
+
+<div class="col-7" style="margin-right:0">
+<img alt=""
+src="http://chart.apis.google.com/chart?&cht=p&chs=460x250&chd=t:0.3,0.6,5.2,19.1,0.4,64.6,0.7,2.0,0.4,6.7&chl=Android%201.5|Android%201.6|Android%202.1|Android%202.2|Android%202.3|Android%202.3.3|Android%203.1|Android%203.2|Android%204.0|Android%204.0.3&chco=c4df9b,6fad0c&chf=bg,s,00000000" />
+
+</div><!-- end dashboard-panel -->
+
+<p style="clear:both"><em>Data collected during a 14-day period ending on June 1, 2012</em></p>
+<!--
+<p style="font-size:.9em">* <em>Other: 0.1% of devices running obsolete versions</em></p>
+-->
+
+<h3 id="PlatformHistorical">Historical Distribution</h3>
+
+<p>The following stacked line graph provides a history of the relative number of
+active Android devices running different versions of the Android platform. It also provides a
+valuable perspective of how many devices your application is compatible with, based on the
+platform version.</p>
+
+<p>Notice that the platform versions are stacked on top of each other with the oldest active
+version at the top. This format indicates the total percent of active devices that are compatible
+with a given version of Android. For example, if you develop your application for
+the version that is at the very top of the chart, then your application is
+compatible with 100% of active devices (and all future versions), because all Android APIs are
+forward compatible. Or, if you develop your application for a version lower on the chart,
+then it is currently compatible with the percentage of devices indicated on the y-axis, where the
+line for that version meets the y-axis on the right.</p>
+
+<p>Each dataset in the timeline is based on the number of Android devices that accessed
+Google Play within a 14-day period ending on the date indicated on the x-axis.</p>
+
+<img alt="" height="250" width="660"
+src="http://chart.apis.google.com/chart?&cht=lc&chs=660x250&chxt=x,x,y,r&chxr=0,0,12|1,0,12|2,0,100|3,0,100&chxl=0%3A%7C12/01%7C12/15%7C01/01%7C01/15%7C02/01%7C02/15%7C03/01%7C03/15%7C04/01%7C04/15%7C05/01%7C05/15%7C06/01%7C1%3A%7C2011%7C%7C2012%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C2012%7C2%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25%7C3%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25&chxp=0,0,1,2,3,4,5,6,7,8,9,10,11,12&chxtc=0,5&chd=t:98.6,98.5,98.3,98.2,98.6,98.4,98.4,98.6,98.5,98.6,98.8,98.7,98.9|97.3,97.3,97.2,97.2,97.6,97.5,97.6,97.8,97.8,97.9,98.1,98.1,98.3|87.7,88.1,88.7,89.2,89.9,90.3,90.8,91.4,91.8,92.1,92.5,92.7,93.1|52.4,55.2,58.2,60.1,62.0,63.7,65.2,66.8,68.6,69.9,71.5,72.6,74.0|2.3,2.6,3.5,3.6,4.0,4.1,4.3,4.6,5.5,6.5,7.6,8.2,9.4|1.2,1.3,2.0,2.2,2.6,3.0,3.2,3.5,4.5,5.5,6.6,7.4,8.7|0.0,0.0,0.3,0.4,0.7,0.8,1.1,1.3,2.3,3.3,4.4,5.3,6.7&chm=b,c3df9b,0,1,0|b,b6dc7d,1,2,0|tAndroid%202.2,5b831d,2,0,15,,t::-5|b,aadb5e,2,3,0|tAndroid%202.3.3,496c13,3,0,15,,t::-5|b,9ddb3d,3,4,0|b,91da1e,4,5,0|b,80c414,5,6,0|B,6fad0c,6,7,0&chg=7,25&chdl=Android%201.6|Android%202.1|Android%202.2|Android%202.3.3|Android%203.1|Android%203.2|Android%204.0.3&chco=add274,a0d155,94d134,84c323,73ad18,62960f,507d08&chf=bg,s,00000000" />
+
+<p><em>Last historical dataset collected during a 14-day period ending on June 1, 2012</em></p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h2 id="Screens">Screen Sizes and Densities</h2>
+
+<p>This section provides data about the relative number of active devices that have a particular
+screen configuration, defined by a combination of screen size and density. To simplify the way that
+you design your user interfaces for different screen configurations, Android divides the range of
+actual screen sizes and densities into:</p>
+
+<ul>
+<li>A set of four generalized <strong>sizes</strong>: <em>small</em>, <em>normal</em>,
+<em>large</em>, and <em>xlarge</em></em></li>
+<li>A set of four generalized <strong>densities</strong>: <em>ldpi</em> (low), <em>mdpi</em>
+(medium), <em>hdpi</em> (high), and <em>xhdpi</em> (extra high)</li>
+</ul>
+
+<p>For information about how you can support multiple screen configurations in your
+application, see <a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
+Screens</a>.</p>
+
+<p class="note"><strong>Note:</strong> This data is based on the number
+of Android devices that have accessed Google Play within a 7-day period
+ending on the data collection date noted below.</p>
+
+
+<div class="col-6" style="margin-left:0">
+
+
+<table>
+<tr>
+<th></th>
+<th scope="col">ldpi</th>
+<th scope="col">mdpi</th>
+<th scope="col">hdpi</th>
+<th scope="col">xhdpi</th>
+</tr>
+<tr><th scope="row">small</th>
+<td>2.3%</td> <!-- small/ldpi -->
+<td></td> <!-- small/mdpi -->
+<td>2.4%</td> <!-- small/hdpi -->
+<td></td> <!-- small/xhdpi -->
+</tr>
+<tr><th scope="row">normal</th>
+<td>0.7%</td> <!-- normal/ldpi -->
+<td>26.2%</td> <!-- normal/mdpi -->
+<td>57.8%</td> <!-- normal/hdpi -->
+<td>0.9%</td> <!-- normal/xhdpi -->
+</tr>
+<tr><th scope="row">large</th>
+<td>0.3%</td> <!-- large/ldpi -->
+<td>2%</td> <!-- large/mdpi -->
+<td></td> <!-- large/hdpi -->
+<td></td> <!-- large/xhdpi -->
+</tr>
+<tr><th scope="row">xlarge</th>
+<td></td> <!-- xlarge/ldpi -->
+<td>7.4%</td> <!-- xlarge/mdpi -->
+<td></td> <!-- xlarge/hdpi -->
+<td></td> <!-- xlarge/xhdpi -->
+</tr>
+</table>
+
+
+</div>
+
+<div class="col-7" style="margin-right:0">
+<img alt=""
+src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chco=c4df9b,6fad0c&chl=Xlarge%20/%20mdpi|Large%20/%20ldpi|Large%20/%20mdpi|Normal%20/%20hdpi|Normal%20/%20ldpi|Normal%20/%20mdpi|Normal%20/%20xhdpi|Small%20/%20hdpi|Small%20/%20ldpi&chd=t%3A7.4,0.3,2.0,57.8,0.7,26.2,0.9,2.4,2.3&chf=bg,s,00000000" />
+
+</div>
+
+<p style="clear:both"><em>Data collected during a 7-day period ending on May 1, 2012</em></p>
+
+
+
+
+
+
+
+
+
+
+
+<h2 id="OpenGL">Open GL Version</h2>
+
+<p>This section provides data about the relative number of active devices that support a particular
+version of OpenGL ES. Note that support for one particular version of OpenGL ES also implies
+support for any lower version (for example, support for version 2.0 also implies support for
+1.1).</p>
+
+<p>To declare which version of OpenGL ES your application requires, you should use the {@code
+android:glEsVersion} attribute of the <a
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code &lt;uses-feature&gt;}</a>
+element. You can also use the <a
+href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
+&lt;supports-gl-texture&gt;}</a> element to declare the GL compression formats that your application
+uses.</p>
+
+<p class="note"><strong>Note:</strong> This data is based on the number
+of Android devices that have accessed Google Play within a 7-day period
+ending on the data collection date noted below.</p>
+
+
+<div class="col-6" style="margin-left:0">
+<table>
+<tr>
+<th scope="col">OpenGL ES Version</th>
+<th scope="col">Distribution</th>
+</tr>
+<tr>
+<td>1.1 only</th>
+<td>9.9%</td>
+</tr>
+<tr>
+<td>2.0 &amp; 1.1</th>
+<td>90.1%</td>
+</tr>
+</table>
+</div>
+
+<div class="col-7" style="margin-right:0">
+<img alt=""
+src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chco=c4df9b,6fad0c&chl=GL%201.1%20only|GL% 202.0%20%26%201.1&chd=t%3A9.9,90.1&chf=bg,s,00000000" />
+
+</div>
+
+
+<p style="clear:both"><em>Data collected during a 7-day period ending on June 4, 2012</em></p>
diff --git a/docs/html/about/flexible.jd b/docs/html/about/flexible.jd
new file mode 100644
index 000000000000..ec3a44ccd2a2
--- /dev/null
+++ b/docs/html/about/flexible.jd
@@ -0,0 +1,34 @@
+page.title=Flexible Framework
+walkthru=1
+
+@jd:body
+
+<style>
+blockquote {
+ color:#9933CC;
+}
+</style>
+
+<blockquote>Android's flexible framework means it runs on more devices and reaches more
+users</blockquote>
+
+<p>Android powers millions of devices around the world and in a variety of form-factors. The Android
+framework is specially built to run apps on more than just one screen size and hardware
+configuration. As an app developer, Android's scale and variety offers you the potential to quickly
+reach millions of users.</p>
+
+<p>Android apps are flexible and easily adapt to the device on which they are running. Although the
+system scales your assets when necessary, you can provide alternative app resources that are
+optimized for specific device categories, such as the screen size and density. Android applies the
+appropriate resources when running your app, based on the current device’s configuration.</p>
+
+<blockquote>You're in control of which devices can install your app</blockquote>
+
+<p>Some devices provide a different user experience when using apps, but you’re always in control of
+how your app behaves on each device. If you publish your app on Google Play, you also have
+control over which kinds of devices are allowed to install your app and you can closely control how
+your app is distributed.</p>
+
+<p>Every device that includes Google Play has been certified compatible. This means that
+the device has passed a rigorous test suite to ensure that the device uses a version of Android that
+supports all the platform APIs and will successfully run your app.</p> \ No newline at end of file
diff --git a/docs/html/about/index.jd b/docs/html/about/index.jd
new file mode 100644
index 000000000000..c2d642628c71
--- /dev/null
+++ b/docs/html/about/index.jd
@@ -0,0 +1,157 @@
+page.title=Android, the world's most popular mobile platform
+walkthru=0
+header.hide=0
+
+@jd:body
+
+<div style="position:absolute;width:440px;">
+<p>Android powers hundreds of millions of mobile devices in more than 190
+countries around the world. It's the largest installed base of any mobile platform
+and growing fast&mdash;every day another 900,000 users power up their
+Android devices for the first time and start looking for apps, games,
+and other digital content. </p>
+
+<div style="width:330px">
+<p>Android gives you a world-class platform for creating apps and games for
+Android users everywhere, as well as an open marketplace for distributing
+to them instantly.</p>
+</div>
+</div>
+
+<img src="{@docRoot}images/about/growth-chart.png" alt="" height="400" width="681"
+style="margin:20px 0 10px 30px;" />
+<div style="position:relative;left: 450px;width: 250px;top: -20px;color: #777;">
+ <em>Android growth in device activations</em></div>
+
+
+<h3>Global partnerships and large installed base</h3>
+
+<p>Building on the contributions of the open-source Linux community and more
+than 300 hardware, software, and carrier partners, Android has rapidly become
+the fastest-growing mobile OS.</p>
+
+<blockquote>Every day more than 900,000 new Android devices are activated worldwide.</blockquote>
+
+<p>Android’s openness has made it a favorite for consumers and developers alike,
+driving strong growth in app consumption. Android users download more than
+1 billion apps and games from Google Play each month. </p>
+
+<p>With it's partners, Android is continuously pushing the boundaries of hardware and software
+forward to bring new capabilities to users and developers. For developers,
+Android innovation lets you build powerful, differentiated applications
+that use the latest mobile technologies.</p>
+
+<!-- <h3>Rapid innovation</h3>
+
+<p>Android is continuously pushing the boundaries of hardware and software
+forward, to bring new capabilities to users and developers. For developers, the
+rapid evolution of Android technology lets you stay in front with powerful,
+differentiated applications.</p>
+
+<p>Android gives you access to the latest technologies and innovations across a
+multitude of device form-factors, chipset architectures, and price points. From
+multicore processing and high-performance graphics to state-of-the-art sensors,
+vibrant touchscreens, and emerging mobile technologies such as Near Field
+Communication (NFC), Wi-Fi Direct, and face tracking.</p> -->
+
+<h3>Powerful development framework</h3>
+
+<blockquote>Easily optimize a single binary for phones, tablets, and other devices.</blockquote>
+
+<p>Android gives you everything you need to build best-in-class app experiences.
+It gives you a single application model that lets you deploy
+your apps broadly to hundreds of millions of users across a wide range of
+devices&mdash;from phones to tablets and beyond.</p>
+
+<p>Android also gives you tools for creating apps that look great and take
+advantage of the hardware capabilities available on each device. It
+automatically adapts your UI to look it's best on each device, while giving you
+as much control as you want over your UI on different device
+types. </p>
+
+<p>For example, you can create a single app binary that's optimized for
+both phone and tablet form factors. You declare your UI in lightweight sets of XML
+resources, one set for parts of the UI that are common to all form factors and
+other sets for optimzations specific to phones or tablets.
+At runtime, Android applies the correct resource sets based on its screen size,
+density, locale,
+and so on.</p>
+
+
+<p>To help you develop efficiently, the <a href="{@docRoot}tools/index.html">Android
+ Developer Tools</a>
+offers a full Java IDE with advanced features for developing, debugging, and
+packaging Android apps. Using the IDE, you can develop on any available Android
+device or create virtual devices that emulate any hardware configuration.</p>
+
+<blockquote>A billion downloads a month and growing. Get your apps in front
+of millions of users at Google's scale.</blockquote>
+
+<h3>Open marketplace for distributing your apps</h3>
+
+<p>Google Play is the premier marketplace for selling and distributing Android apps.
+When you publish an app on Google Play, you reach the huge installed base of
+Android.</p>
+
+<div style="float:left;margin-right:24px;margin-top:12px;">
+<img src="{@docRoot}images/gp-device.png">
+</div>
+
+<p>As an open marketplace, Google Play puts you in control of how you sell your
+products. You can publish whenever you want, as often as you want, and to the
+customers you want. You can distribute broadly to all markets and
+devices or focus on specific segments, devices, or ranges of hardware
+capabilities.</p>
+
+<p>You can monetize in the way that works best for your business&mdash;priced or
+free, with in-app products or subscriptions&mdash;for highest engagement and
+revenues. You also have complete control of the pricing for your apps
+and in-app products and can set or change prices in any supported currency at
+any time.<p>
+
+<p>Beyond growing your customer base, Google Play helps you build visibility and
+engagement across your apps and brand. As your apps rise in popularity, Google
+Play gives them higher placement in weekly "top" charts and rankings, and for
+the best apps promotional slots in curated collections.
+</p>
+
+<p>Preinstalled on hundreds of millions of Android devices around the world,
+Google Play can be a growth engine for your business.</p>
+
+<p><a class="landing-page-link" href="{@docRoot}about/start.html">GET STARTED</a></p>
+
+<div style="background: #F0F0F0;
+ border-top: 1px solid #DDD;
+ padding: 20px 0 24px 0;
+ overflow: auto;
+ clear:both;
+ margin-bottom:-10px;
+ margin-top:60px;"">
+ <div style="padding:0 0 0 29px;">
+ <h4>Developer Story: Robot Invader</h4>
+ <img alt="" class="screenshot thumbnail" style="-webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px height:78px;
+ width: 78px;
+ float: left;
+ margin: 17px 20px 9px 0;" src=
+ "//g0.gstatic.com/android/market/com.robotinvader.knightmare/hi-256-0-9e08d83bc8d01649e167131d197ada1cd1783fb0">
+ <div style="width:700px;">
+ <p style="margin-top:26px;margin-bottom:12px;">Robot Invader chose
+ Android as the launch platform for their first game,
+ <a data-g-event="Developers Page" data-g-label="Case Study Link" href=
+ "//play.google.com/store/apps/details?id=com.robotinvader.knightmare"><em>Wind-up
+ Knight</em></a>.
+ </p>
+ <p>
+ Hear from the developers themselves how Android helped them reach more
+ than 100 devices with a single app binary, then iterate rapidly to ensure
+ a great experience for users.
+ </p>
+ </div>
+ <iframe style="float:left;
+ margin-right:24px;
+ margin-top:14px;" width="700" height="394" src=
+ "http://www.youtube.com/embed/hTtlLiUTowY" frameborder="0" allowfullscreen></iframe>
+ </div>
+</div> \ No newline at end of file
diff --git a/docs/html/about/marketplace.jd b/docs/html/about/marketplace.jd
new file mode 100644
index 000000000000..34f57a5588b5
--- /dev/null
+++ b/docs/html/about/marketplace.jd
@@ -0,0 +1,62 @@
+page.title=Open Marketplace
+walkthru=1
+
+@jd:body
+
+<style>
+blockquote {
+ color:#9933CC;
+}
+</style>
+
+<p>Android offers an open distribution model, not a walled garden. Once you’ve developed an
+app for Android and want to distribute it, you have choice.</p>
+
+<p>Your final application is contained in an APK file that you can make available to users any
+way you want. For example, you can upload it to your own web site to allow visitors to
+install it onto their devices. More often, you’ll want to use a trusted
+marketplace where users can discover and search for your apps.</p>
+
+<p>How you choose to distribute your app affects precisely how many users your app will reach. Which
+distribution provider you choose also affects the kinds of services available to you as a publisher,
+such as licensing and in-app billing APIs, user bug reports, installation analytics, marketing
+services, and more.</p>
+
+<p>Among your choices is Google Play, the premier marketplace for selling and distributing apps
+to Android users around the world. When you publish an app on Google Play, you reach hundreds of
+millions of customers in over 130 countries.</p>
+
+
+<h3>Your business, your customers</h3>
+
+<blockquote>Google Play makes your apps available to your customers
+immediately</blockquote>
+
+<p>As an open marketplace, Google Play puts you in control of your business and makes it easy for
+you to manage how you sell your products. You can publish whenever you want, as often as you want,
+and to the exact set of customers you want.</p>
+
+
+<h3>Visibility for your apps</h3>
+
+<p>Beyond growing your customer base, Google Play helps you build visibility and engagement across
+your apps and brand. As your apps rise in popularity, Google Play gives you higher placement in
+weekly "top" lists and offers promotional slots in curated collections. You can engage customers
+using rich, colorful product pages that feature app screenshots, videos, and user reviews, as well
+as cross-marketing links to your other products.</p>
+
+<h3>Flexible monetizing and distribution</h3>
+
+<blockquote class="right">You can distribute
+your apps free or priced and you can sell in-app products for additional revenue</blockquote>
+
+<p>Google Play offers a choice of monetizing options to meet your business needs. You control the
+pricing of your apps and in-app products&mdash;you can set and change prices at any time, even
+individually in local currencies around the world. On purchase, Google Play handles transactions in
+the buyer’s currency and makes payouts in your own currency.</p>
+
+
+<p>After publishing, you can manage the distribution of your app. You can distribute broadly to all
+markets and devices or focus on specific segments, devices, or ranges of hardware capabilities.
+Google Play provides the tools for controlling distribution and ensures that your app is available
+only to the users who you are targeting.</p>
diff --git a/docs/html/about/start.jd b/docs/html/about/start.jd
new file mode 100644
index 000000000000..af8344d0bb72
--- /dev/null
+++ b/docs/html/about/start.jd
@@ -0,0 +1,63 @@
+page.title=Get Started
+walkthru=0
+
+@jd:body
+
+<p>Everything you need to start developing apps for Android is available here on
+developer.android.com. You'll find everything from the developer SDK, API documentation, and design
+guidelines, to information about the current device landscape and how you can distribute and
+monetize your app.</p>
+
+<p>No two apps are built in the same way, but we've structured the information you need to build an
+app into the following three sections that represent the general order for app development.
+
+
+<style>
+h2.blue{color:#33B5E5}
+h2.blue+hr{background:#33B5E5}
+
+h2.orange{color:#FF8800}
+h2.orange+hr{background:#FF8800}
+
+h2.green{color:#99CC00}
+h2.green+hr{background:#99CC00}
+</style>
+
+<div class="col-4" style="margin-left:0">
+<h2 class="blue">1. Design</h2>
+
+<p>Before you write a single line of code, you need to design the user interface and make it fit
+the Android user experience. Although you may know what a user will <em>do</em> with your app, you
+should pause to focus on how a user will <em>interact</em> with it. Your design should be sleek,
+simple, powereful, and tailored to the Android experience.</p>
+
+<p>So whether your a one-man shop or a large team, you should study the <a
+href="{@docRoot}design/index.html">Design</a> guidelines first.</p>
+</div>
+
+<div class="col-5">
+<h2 class="orange">2. Develop</h2>
+<p>Once your design is finalized, all you need are the tools to turn your app ideas into reality.
+Android's framework provides you the APIs to build apps that take full advantage of
+device hardware, connected accessory devices, the Internet, software features, and more.
+With the power of Android, there's no limit to the power of your apps.</p>
+
+<p>Everything you need to learn about the app framework and developer tools is in the <a
+href="{@docRoot}develop/index.html">Develop</a> documentation.</p>
+
+</div>
+
+
+<div class="col-4" style="margin-right:0">
+<h2 class="green">3. Distribute</h2>
+<p>Now your app is complete. You've built it to support a variety of screen sizes and
+densities, and tested it on the Android emulator and on real devices. You're ready to ship your app.</p>
+
+<p>How you proceed depends on a variety of factors, such as your monetization strategy and which
+types of devices your app supports. Everything you need to get started with this process is
+available in the <a href="{@docRoot}distribute/index.html">Distribute</a> section.</p>
+</div>
+
+
+<p style="clear:both">Now that you know what's available, get started by installing the <a
+href="{@docRoot}sdk/index.html">Android SDK</a>.</p> \ No newline at end of file
diff --git a/docs/html/sdk/android-1.1.jd b/docs/html/about/versions/android-1.1.jd
index b61f18615c75..b61f18615c75 100644
--- a/docs/html/sdk/android-1.1.jd
+++ b/docs/html/about/versions/android-1.1.jd
diff --git a/docs/html/sdk/android-1.5-highlights.jd b/docs/html/about/versions/android-1.5-highlights.jd
index ff64e8c28cf9..ff64e8c28cf9 100644
--- a/docs/html/sdk/android-1.5-highlights.jd
+++ b/docs/html/about/versions/android-1.5-highlights.jd
diff --git a/docs/html/sdk/android-1.5.jd b/docs/html/about/versions/android-1.5.jd
index 9ed798c2a8f8..78dcbd761040 100644
--- a/docs/html/sdk/android-1.5.jd
+++ b/docs/html/about/versions/android-1.5.jd
@@ -31,7 +31,7 @@ Differences Report &raquo;</a> </li>
<h2>See Also</h2>
<ol>
- <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
+ <li><a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a></li>
</ol>
</div>
@@ -54,14 +54,14 @@ compliant and includes no external libraries. </p>
<p>To get started developing or testing against the Android
{@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to
download the platform into your Android 1.6 or later SDK. For more information,
-see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
-Components</a>.</p>
+see <a href="{@docRoot}sdk/exploring.html">Exploring the
+SDK</a>.</p>
<h2 id="features">Platform Highlights</h2>
<p>For a list of new user features and platform highlights, see the <a
-href="http://developer.android.com/sdk/android-{@sdkPlatformVersion}-highlights.html">Android
+href="http://developer.android.com/about/versions/android-{@sdkPlatformVersion}-highlights.html">Android
{@sdkPlatformVersion} Platform Highlights</a> document.</p>
<h2 id="relnotes">Revisions</h2>
@@ -184,7 +184,7 @@ application, you need to set the proper value, "{@sdkPlatformApiLevel}", in the
element in your application's manifest. </p>
<p>For more information about how to use API Level, see the <a
-href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a> document. </p>
<h2 id="api">Framework API Changes</h2>
diff --git a/docs/html/sdk/android-1.6-highlights.jd b/docs/html/about/versions/android-1.6-highlights.jd
index f0a50fb090b0..2ee1d807029b 100644
--- a/docs/html/sdk/android-1.6-highlights.jd
+++ b/docs/html/about/versions/android-1.6-highlights.jd
@@ -208,6 +208,6 @@ application.</p>
<h3 id="DeveloperAPIs">New Framework APIs</h3>
<p>For a detailed overview of new APIs, see the
-<a href="{@docRoot}sdk/android-1.6.html#api-changes">Version Notes</a>.
+<a href="{@docRoot}about/versions/android-1.6.html#api-changes">Version Notes</a>.
For a complete report of all API changes, see the
<a href="{@docRoot}sdk/api_diff/4/changes.html">API Differences Report</a>.
diff --git a/docs/html/sdk/android-1.6.jd b/docs/html/about/versions/android-1.6.jd
index a01a5f69643e..2a66cd3e7e5a 100644
--- a/docs/html/sdk/android-1.6.jd
+++ b/docs/html/about/versions/android-1.6.jd
@@ -31,7 +31,7 @@ Differences Report &raquo;</a> </li>
<h2>See Also</h2>
<ol>
- <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
+ <li><a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a></li>
</ol>
</div>
@@ -55,14 +55,14 @@ and includes no external libraries.</p>
<p>To get started developing or testing against the Android
{@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to
download the latest Android 1.6 platform into your Android 1.6 or later SDK. For
-more information, see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
-Components</a>.</p>
+more information, see <a href="{@docRoot}sdk/exploring.html">Exploring the
+SDK</a>.</p>
<h2 id="features">Platform Highlights</h2>
<p>For a list of new user features and platform highlights, see the <a
-href="http://developer.android.com/sdk/android-{@sdkPlatformVersion}-highlights.html">Android
+href="http://developer.android.com/about/versions/android-{@sdkPlatformVersion}-highlights.html">Android
{@sdkPlatformVersion} Platform Highlights</a> document.</p>
@@ -208,7 +208,7 @@ application, you need to set the proper value, "{@sdkPlatformApiLevel}", in the
element in your application's manifest. </p>
<p>For more information about how to use API Level, see the <a
-href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a> document. </p>
<h2 id="api">Framework API Changes</h2>
diff --git a/docs/html/sdk/android-2.0-highlights.jd b/docs/html/about/versions/android-2.0-highlights.jd
index d4d13fcc78a7..2ba9ac76f6f9 100644
--- a/docs/html/sdk/android-2.0-highlights.jd
+++ b/docs/html/about/versions/android-2.0-highlights.jd
@@ -192,7 +192,7 @@ hardware acceleration.</p>
<p>Android 2.0 includes several new developer APIs.
For an overview of new APIs, see the
-<a href="{@docRoot}sdk/android-2.0.html#api">Android 2.0 version notes</a>.</p>
+<a href="{@docRoot}about/versions/android-2.0.html#api">Android 2.0 version notes</a>.</p>
<p>For a complete report of all API changes, see the
<a href="{@docRoot}sdk/api_diff/5/changes.html">API Differences Report</a>.</p>
diff --git a/docs/html/sdk/android-2.0.1.jd b/docs/html/about/versions/android-2.0.1.jd
index 0c8afb61fb8f..bcba7177b684 100644
--- a/docs/html/sdk/android-2.0.1.jd
+++ b/docs/html/about/versions/android-2.0.1.jd
@@ -31,7 +31,7 @@ differences report &raquo;</a> </li>
<h2>See Also</h2>
<ol>
- <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
+ <li><a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a></li>
</ol>
</div>
@@ -56,14 +56,14 @@ includes no external libraries. </p>
<p>To get started developing or testing against the Android
{@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to
download the platform into your Android 1.6 or later SDK. For more information,
-see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
-Components</a>.</p>
+see <a href="{@docRoot}sdk/exploring.html">Exploring the
+SDK</a>.</p>
<h2 id="features">Platform Highlights</h2>
<p>For a list of new user features and platform highlights, see the <a
-href="http://developer.android.com/sdk/android-2.0-highlights.html">Android
+href="http://developer.android.com/about/versions/android-2.0-highlights.html">Android
2.0 Platform Highlights</a> document.</p>
<h2 id="relnotes">Revisions</h2>
@@ -246,7 +246,7 @@ through Settings.</p>
<h3 id="ant">Ant Support</h3>
<ul>
-<li>Debug- and release-mode application signing. Release-mode signing includes integrated support for <code>zipalign</code> optimization. For more information, see <a href="{@docRoot}guide/publishing/app-signing.html#releasecompile">Signing Your Applications</a>.</li>
+<li>Debug- and release-mode application signing. Release-mode signing includes integrated support for <code>zipalign</code> optimization. For more information, see <a href="{@docRoot}tools/publishing/app-signing.html#releasecompile">Signing Your Applications</a>.</li>
<li>Adds new Ant build system with support for Emma instrumentation projects (code coverage).</li>
</ul>
@@ -257,7 +257,7 @@ through Settings.</p>
framework API provided by the Android {@sdkPlatformVersion} platform. Note,
however, that Android 2.0.1 is a minor release to Android 2.0, so for more
information about the changes made to in Android 2.0, please refer to the
-<a href="{@docRoot}sdk/android-2.0.html#api">Android 2.0 version notes</a>.</p>
+<a href="{@docRoot}about/versions/android-2.0.html#api">Android 2.0 version notes</a>.</p>
<h3 id="api-level">API level</h3>
@@ -274,7 +274,7 @@ set the proper value, "{@sdkPlatformApiLevel}", in the attributes of the <code>&
element in your application's manifest. </p>
<p>For more information about how to use API Level, see the <a
-href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a> document. </p>
<h3 id="api-changes">API changes summary</h3>
diff --git a/docs/html/sdk/android-2.0.jd b/docs/html/about/versions/android-2.0.jd
index 2c319236297b..7a12e48672e3 100644
--- a/docs/html/sdk/android-2.0.jd
+++ b/docs/html/about/versions/android-2.0.jd
@@ -26,7 +26,7 @@ sdk.platform.majorMinor=major
<h2>See Also</h2>
<ol>
- <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
+ <li><a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a></li>
</ol>
</div>
@@ -49,14 +49,14 @@ compliant and includes no external libraries. </p>
<p>To get started developing or testing against the Android
{@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to
download the platform into your SDK. For more information,
-see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
-Components</a>.</p>
+see <a href="{@docRoot}sdk/exploring.html">Exploring the
+SDK</a>.</p>
<h2 id="features">Platform Highlights</h2>
<p>For a list of new user features and platform highlights, see the <a
-href="http://developer.android.com/sdk/android-{@sdkPlatformVersion}-highlights.html">Android
+href="http://developer.android.com/about/versions/android-{@sdkPlatformVersion}-highlights.html">Android
{@sdkPlatformVersion} Platform Highlights</a> document.</p>
<h2 id="relnotes">Revisions</h2>
@@ -235,7 +235,7 @@ through Settings.</p>
<h3 id="ant">Ant Support</h3>
<ul>
-<li>Debug- and release-mode application signing. Release-mode signing includes integrated support for <code>zipalign</code> optimization. For more information, see <a href="{@docRoot}guide/publishing/app-signing.html#releasecompile">Signing Your Applications</a>.</li>
+<li>Debug- and release-mode application signing. Release-mode signing includes integrated support for <code>zipalign</code> optimization. For more information, see <a href="{@docRoot}tools/publishing/app-signing.html#releasecompile">Signing Your Applications</a>.</li>
<li>Adds new Ant build system with support for Emma instrumentation projects (code coverage).</li>
</ul>
@@ -259,7 +259,7 @@ set the proper value, "{@sdkPlatformApiLevel}", in the attributes of the <code>&
element in your application's manifest. </p>
<p>For more information about how to use API Level, see the <a
-href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a> document. </p>
<h3 id="api-changes">API changes summary</h3>
diff --git a/docs/html/sdk/android-2.1.jd b/docs/html/about/versions/android-2.1.jd
index 1ee833c0094c..3cb0708ec42a 100644
--- a/docs/html/sdk/android-2.1.jd
+++ b/docs/html/about/versions/android-2.1.jd
@@ -31,7 +31,7 @@ Differences Report &raquo;</a> </li>
<h2>See Also</h2>
<ol>
- <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
+ <li><a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a></li>
</ol>
</div>
@@ -55,14 +55,14 @@ includes no external libraries. </p>
<p>To get started developing or testing against the Android
{@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to
download the platform into your SDK. For more information,
-see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
-Components</a>.</p>
+see <a href="{@docRoot}sdk/exploring.html">Exploring the
+SDK</a>.</p>
<h2 id="features">Platform Highlights</h2>
<p>Android {@sdkPlatformVersion} does not add significant user features, see the <a
-href="http://developer.android.com/sdk/android-2.0-highlights.html">Android
+href="http://developer.android.com/about/versions/android-2.0-highlights.html">Android
2.0 Platform Highlights</a> document for the latest user features.</p>
<h2 id="relnotes">Revisions</h2>
@@ -87,7 +87,7 @@ class="toggle-content-img" alt="" />
<dl>
<dt>Dependencies:</dt>
<dd>
-<p>Requires <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r12</a> or
+<p>Requires <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r12</a> or
higher.</p>
</dd>
<dt>Notes:</dt>
@@ -164,7 +164,7 @@ application, you need to set the proper value, "{@sdkPlatformApiLevel}", in the
element in your application's manifest. </p>
<p>For more information about how to use API Level, see the <a
-href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a> document. </p>
<h2 id="api">Framework API Changes</h2>
diff --git a/docs/html/sdk/android-2.2-highlights.jd b/docs/html/about/versions/android-2.2-highlights.jd
index 37a20d506512..37a20d506512 100644
--- a/docs/html/sdk/android-2.2-highlights.jd
+++ b/docs/html/about/versions/android-2.2-highlights.jd
diff --git a/docs/html/sdk/android-2.2.jd b/docs/html/about/versions/android-2.2.jd
index c22220cf7262..361e8b695d55 100644
--- a/docs/html/sdk/android-2.2.jd
+++ b/docs/html/about/versions/android-2.2.jd
@@ -11,12 +11,8 @@ sdk.platform.majorMinor=minor
<h2>In this document</h2>
<ol>
<li><a href="#features">Platform Highlights</a></li>
- <li><a href="#relnotes">Revisions</a></li>
<li><a href="#api-level">API Level</a></li>
<li><a href="#api">Framework API Changes</a>
- <li><a href="#apps">Built-in Applications</a></li>
- <li><a href="#locs">Locales</a></li>
- <li><a href="#skins">Emulator Skins</a></li>
</ol>
</li>
@@ -31,7 +27,7 @@ Differences Report &raquo;</a> </li>
<h2>See Also</h2>
<ol>
- <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
+ <li><a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a></li>
</ol>
</div>
@@ -46,113 +42,18 @@ fixes. For information on developer features and API changes, see the
<a href="#api">Framework API</a> section.</p>
<p>For developers, the Android {@sdkPlatformVersion} platform is available as a
-downloadable component for the Android SDK. The downloadable platform includes a
-fully compliant Android library and system image, as well as a set of emulator
-skins, sample applications, and more. The downloadable platform
-includes no external libraries. </p>
-
-<p>To get started developing or testing against the Android
-{@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to
-download the platform into your SDK. For more information,
-see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
-Components</a>. If you are new to Android, <a
-href="{@docRoot}sdk/index.html">download the SDK Starter Package</a>
-first.</p>
+downloadable component for the Android SDK. The downloadable platform includes
+an Android library and system image, as well as a set of emulator skins and
+more. To get started developing or testing against Android {@sdkPlatformVersion},
+use the Android SDK Manager to download the platform into your SDK.</p>
<h2 id="features">Platform Highlights</h2>
<p>For a list of new user features and platform highlights, see the <a
-href="http://developer.android.com/sdk/android-2.2-highlights.html">Android
+href="http://developer.android.com/about/versions/android-2.2-highlights.html">Android
2.2 Platform Highlights</a> document.</p>
-<h2 id="relnotes">Revisions</h2>
-
-<p>The sections below provide notes about successive releases of
-the Android {@sdkPlatformVersion} platform component for the Android SDK, as denoted by
-revision number. To determine what revision(s) of the Android
-{@sdkPlatformVersion} platforms are installed in your SDK environment, refer to
-the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
-
-
-<div class="toggle-content opened" style="padding-left:1em;">
-
-<p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-opened.png"
-class="toggle-content-img" alt="" />
- Android {@sdkPlatformVersion}, Revision 3</a> <em>(July 2011)</em>
-</a></p>
-
-<div class="toggle-content-toggleme" style="padding-left:2em;">
-
-<dl>
-<dt>Dependencies:</dt>
-<dd>
-<p>Requires <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r12</a> or
-higher.</p>
-</dd>
-<dt>Notes:</dt>
-<dd>
-<p>Improvements to the platform's rendering library to support the visual layout editor in the ADT
-Eclipse plugin. This revision allows for more drawing features in ADT and fixes several
-bugs in the previous rendering library. It also unlocks several editor features that were added in
-ADT 12.</p>
-</dd>
-</dl>
-
-</div>
-</div>
-
-<div class="toggle-content closed" style="padding-left:1em;">
-
-<p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png"
-class="toggle-content-img" alt="" />
- Android {@sdkPlatformVersion}, Revision 2</a> <em>(July 2010)</em>
-</a></p>
-
-<div class="toggle-content-toggleme" style="padding-left:2em;">
-<dt>Dependencies:</dt>
-<dd>
-<p>Requires SDK Tools r6 or higher.</p>
-</dd>
-
-<dt>System Image:</dt>
-<dd>
-<ul>
-<li>Adds default Search Widget.</li>
-<li>Includes proper provisioning for the platform's Backup Manager. For more information about how to use the Backup Manager, see <a href="{@docRoot}guide/topics/data/backup.html">Data Backup</a>.</li>
-<li>Updates the Android 2.2 system image to FRF91.</li>
-</ul>
-</dd>
-
-</dl>
- </div>
-</div>
-
-<div class="toggle-content closed" style="padding-left:1em;">
-
-<p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png"
-class="toggle-content-img" alt="" />
- Android {@sdkPlatformVersion}, Revision 1</a> <em>(May 2010)</em>
-</a></p>
-
-<div class="toggle-content-toggleme" style="padding-left:2em;">
-<dl>
-<dt>Dependencies:</dt>
-<dd>
-<p>Requires SDK Tools r6 or higher.</p>
-</dd>
-
-<dt>Tools:</dt>
-<dd>
-<p>Adds support for building with Android library projects. See <a href="tools-notes.html">SDK Tools, r6</a> for information.</p>
-</dd>
-
-</dl>
- </div>
-</div>
<h2 id="api-level">API Level</h2>
@@ -170,7 +71,7 @@ application, you need to set the proper value, "{@sdkPlatformApiLevel}", in the
element in your application's manifest. </p>
<p>For more information about how to use API Level, see the <a
-href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a> document. </p>
<h2 id="api">Framework API Changes</h2>
@@ -348,123 +249,4 @@ href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API
Differences Report</a>.</p>
-<h2 id="apps">Built-in Applications</h2>
-
-<p>The system image included in the downloadable platform provides these
-built-in applications:</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
- <ul>
- <li>Alarm Clock</li>
- <li>Browser</li>
- <li>Calculator</li>
- <li>Camera</li>
- <li>Contacts</li>
- <li>Custom Locale (developer app)</li>
- <li>Dev Tools (developer app)</li>
- <li>Email</li>
- </ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
- <ul>
-
- <li>Gallery</li>
- <li>IMEs for Japanese, Chinese, and Latin text input</li>
- <li>Messaging</li>
- <li>Music</li>
- <li>Phone</li>
- <li>Settings</li>
- <li>Spare Parts (developer app)</li>
- </ul>
-</td>
-</tr>
-</table>
-
-
-<h2 id="locs" style="margin-top:.75em;">Locales</h2>
-
-<p>The system image included in the downloadable platform provides a variety of
-built-in locales. In some cases, region-specific strings are available for the
-locales. In other cases, a default version of the language is used. The
-languages that are available in the Android {@sdkPlatformVersion} system
-image are listed below (with <em>language</em>_<em>country/region</em> locale
-descriptor).</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>Chinese, PRC (zh_CN)</li>
-<li>Chinese, Taiwan (zh_TW)</li>
-<li>Czech (cs_CZ)</li>
-<li>Dutch, Netherlands (nl_NL)</li>
-<li>Dutch, Belgium (nl_BE)</li>
-<li>English, US (en_US)</li>
-<li>English, Britain (en_GB)</li>
-<li>English, Canada (en_CA)</li>
-<li>English, Australia (en_AU)</li>
-<li>English, New Zealand (en_NZ)</li>
-<li>English, Singapore(en_SG)</li>
-<li>French, France (fr_FR)</li>
-<li>French, Belgium (fr_BE)</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<li>French, Canada (fr_CA)</li>
-<li>French, Switzerland (fr_CH)</li>
-<li>German, Germany (de_DE)</li>
-<li>German, Austria (de_AT)</li>
-<li>German, Switzerland (de_CH)</li>
-<li>German, Liechtenstein (de_LI)</li>
-<li>Italian, Italy (it_IT)</li>
-<li>Italian, Switzerland (it_CH)</li>
-<li>Japanese (ja_JP)</li>
-<li>Korean (ko_KR)</li>
-<li>Polish (pl_PL)</li>
-<li>Russian (ru_RU)</li>
-<li>Spanish (es_ES)</li>
-</td>
-</tr>
-</table>
-
-<p>Localized UI strings match the locales that are accessible
-through Settings.</p>
-
-<p class="note"><strong>Note:</strong> Android supports more locales than are listed above. However,
-the entire collection of locale strings cannot fit on a single system image, so the above list is
-only what's included in the system image for the SDK. All of Android's supported locales are
-available in the <a href="http://source.android.com/">Android Open Source Project</a>.</p>
-
-<h2 id="skins">Emulator Skins</h2>
-
-<p>The downloadable platform includes a set of emulator skins that you can use
-for modeling your application in different screen sizes and resolutions. The
-emulator skins are:</p>
-
-<ul>
- <li>
- QVGA (240x320, low density, small screen)
- </li>
- <li>
- WQVGA (240x400, low density, normal screen)
- </li>
- <li>
- FWQVGA (240x432, low density, normal screen)
- </li>
- <li>
- HVGA (320x480, medium density, normal screen)
- </li>
- <li>
- WVGA800 (480x800, high density, normal screen)
- </li>
- <li>
- WVGA854 (480x854 high density, normal screen)
- </li>
-</ul>
-<p>For more information about how to develop an application that displays
-and functions properly on all Android-powered devices, see <a
-href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
-Screens</a>.</p>
diff --git a/docs/html/sdk/android-2.3-highlights.jd b/docs/html/about/versions/android-2.3-highlights.jd
index b076b3de191c..582bce9f81fd 100644
--- a/docs/html/sdk/android-2.3-highlights.jd
+++ b/docs/html/about/versions/android-2.3-highlights.jd
@@ -1,4 +1,4 @@
-page.title=Android 2.3 Platform Highlights
+page.title=Gingerbread
@jd:body
@@ -14,8 +14,7 @@ page.title=Android 2.3 Platform Highlights
}
#jd-content div.video {
float:right;
- padding:0 60px 40px;
- margin-top:-15px;
+ padding:0 0 0 40px;
}
#jd-content table.columns {
margin:0 0 1em 0;
@@ -38,16 +37,6 @@ page.title=Android 2.3 Platform Highlights
}
</style>
-<div class="video">
-<object width="278" height="180">
-<param name="movie" value="http://www.youtube.com/v/Jx3pdWBlZ34?hl=en&fs=1"></param>
-<param name="allowFullScreen" value="true"></param><param name="allowscriptaccess"
-value="always"></param>
-<embed src="http://www.youtube.com/v/Jx3pdWBlZ34?hl=en&fs=1" type="application/x-shockwave-flash"
-allowscriptaccess="always" allowfullscreen="true" width="278" height="180"></embed>
-</object>
-</div>
-
<p>The Android 2.3 platform introduces many new and exciting features for
users and developers. This document provides a glimpse at some of the new features
and technologies in Android 2.3. For detailed information about the new developer APIs, see the <a
@@ -63,8 +52,10 @@ href="android-2.3.html">Android 2.3 version notes</a>.</p>
<h2 id="UserFeatures" style="clear:right">New User Features</h2>
<div>
-<img style="float:right;padding-bottom:2em;" src="images/2.3/home-menu.png" alt="" height="280" />
-<img style="float:right;padding-bottom:2em;" src="images/2.3/home-plain.png" alt="" height="280" />
+<img style="float:right;margin-left:20px;padding-bottom:2em;"
+src="{@docRoot}sdk/images/2.3/home-menu.png" alt="" height="280" />
+<img style="float:right;margin-left:20px;padding-bottom:2em;"
+src="{@docRoot}sdk/images/2.3/home-plain.png" alt="" height="280" />
<h3>UI refinements for simplicity and speed</h3>
@@ -98,8 +89,10 @@ the key and sliding to select a character.</p>
</div>
<div style="padding-top:1em;">
-<div style="margin-right:1em;float:left;"><img src="images/2.3/onetouch.png" alt="" height="260" /></div>
-<div style="padding-right:2em;float:left;"><img src="images/2.3/selection.png" alt="" height="160" /></div>
+<div style="margin-right:1em;float:left;"><img src="{@docRoot}sdk/images/2.3/onetouch.png" alt=""
+height="260" /></div>
+<div style="padding-right:2em;float:left;"><img src="{@docRoot}sdk/images/2.3/selection.png" alt=""
+height="160" /></div>
<h3>One-touch word selection and copy/paste</h3>
@@ -116,8 +109,10 @@ modes, no use of a trackball is needed.</p>
</div>
<div style="clear:left">
-<div style="padding-right:2em;float:right;"><img src="images/2.3/running.png" alt="" height="280" /></div>
-<div style="padding-left:1em;float:right;"><img src="images/2.3/power.png" alt="" height="280" /></div>
+<div style="padding-right:2em;float:right;margin-left:20px;"><img
+src="{@docRoot}sdk/images/2.3/running.png" alt="" height="280" /></div>
+<div style="padding-left:1em;float:right;margin-left:20px;"><img
+src="{@docRoot}sdk/images/2.3/power.png" alt="" height="280" /></div>
<h3>Improved power management </h3>
@@ -147,8 +142,10 @@ necessary stop an application or report feedback to its developer. </p>
managing information and relationships. </p>
<div style="padding-top:1em;">
-<div style="padding-right:1.5em;float:left;"><img src="images/2.3/sipcall.png" alt="" height="190" align="left"/><br>
-<img src="images/2.3/ffc.png" alt="" height="190" align="left" style="margin-bottom:1.5em;margin-top:.75em;"/><div></div>
+<div style="padding-right:1.5em;float:left;"><img src="{@docRoot}sdk/images/2.3/sipcall.png" alt=""
+height="190" align="left"/><br>
+<img src="{@docRoot}sdk/images/2.3/ffc.png" alt="" height="190" align="left"
+style="margin-bottom:1.5em;margin-top:.75em;"/><div></div>
</div>
<p style="margin-top:1em;margin-bottom:.75em;"><strong>Internet calling</strong></p>
@@ -162,7 +159,8 @@ Additionally, support for the platform's SIP and internet calling features on
specific devices is determined by their manufacturers and associated carriers.
</p>
-<div style="padding-right:1.5em;float:right;;"><img src="images/2.3/nfc.png" alt="" height="190" /> </div>
+<div style="padding-right:1.5em;float:right;margin-left:20px;;"><img
+src="{@docRoot}sdk/images/2.3/nfc.png" alt="" height="190" /> </div>
<p style="margin-top:1.25em;margin-bottom:.75em;"><strong>Near-field communications</strong></p>
diff --git a/docs/html/sdk/android-2.3.3.jd b/docs/html/about/versions/android-2.3.3.jd
index 405c063fa857..55ff346ac242 100644
--- a/docs/html/sdk/android-2.3.3.jd
+++ b/docs/html/about/versions/android-2.3.3.jd
@@ -10,12 +10,8 @@ sdk.platform.apiLevel=10
<h2>In this document</h2>
<ol>
- <li><a href="#relnotes">Revisions</a></li>
<li><a href="#api">API Overview</a></li>
<li><a href="#api-level">API Level</a></li>
- <li><a href="#apps">Built-in Applications</a></li>
- <li><a href="#locs">Locales</a></li>
- <li><a href="#skins">Emulator Skins</a></li>
</ol>
<h2>Reference</h2>
@@ -25,11 +21,6 @@ href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API
Differences Report &raquo;</a> </li>
</ol>
-<h2>See Also</h2>
-<ol>
- <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
-</ol>
-
</div>
</div>
@@ -40,78 +31,11 @@ Differences Report &raquo;</a> </li>
and APIs to the Android 2.3 platform.</p>
<p>For developers, the Android {@sdkPlatformVersion} platform is available as a
-downloadable component for the Android SDK. The downloadable platform includes
-an Android library and system image, as well as a set of emulator
-skins and more. The downloadable platform
-includes no external libraries.</p>
-
-<p>To get started developing or testing against Android
-{@sdkPlatformVersion}, use the Android SDK Manager to
-download the platform into your SDK. For more information,
-see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
-Components</a>. If you are new to Android, <a
-href="{@docRoot}sdk/index.html">download the SDK Starter Package</a>
-first.</p>
-
-<p>For a high-level introduction to Android 2.3, see the <a
-href="{@docRoot}sdk/android-2.3-highlights.html">Platform Highlights</a>.</p>
-
-
-<h2 id="relnotes">Revisions</h2>
-
-<p>The sections below provide notes about successive releases of
-the Android {@sdkPlatformVersion} platform component for the Android SDK, as denoted by
-revision number. To determine what revision(s) of the Android
-{@sdkPlatformVersion} platforms are installed in your SDK environment, refer to
-the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
-
-
-<div class="toggle-content opened" style="padding-left:1em;">
-
-<p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-opened.png"
-class="toggle-content-img" alt="" />
- Android {@sdkPlatformVersion}, Revision 2</a> <em>(July 2011)</em>
-</a></p>
-
-<div class="toggle-content-toggleme" style="padding-left:2em;">
-
-<dl>
-<dt>Dependencies:</dt>
-<dd>
-<p>Requires <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r12</a> or
-higher.</p>
-</dd>
-<dt>Notes:</dt>
-<dd>
-<p>Improvements to the platform's rendering library to support the visual layout editor in the ADT
-Eclipse plugin. This revision allows for more drawing features in ADT and fixes several
-bugs in the previous rendering library. It also unlocks several editor features that were added in
-ADT 12.</p>
-</dd>
-</dl>
-
-</div>
-</div>
-
-<div class="toggle-content closed" style="padding-left:1em;">
+downloadable component for the Android SDK. The downloadable platform includes
+an Android library and system image, as well as a set of emulator skins and
+more. To get started developing or testing against Android {@sdkPlatformVersion},
+use the Android SDK Manager to download the platform into your SDK.</p>
-<p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png"
-class="toggle-content-img" alt="" />
- Android {@sdkPlatformVersion}, Revision 1</a> <em>(February 2011)</em>
-</a></p>
-
-<div class="toggle-content-toggleme" style="padding-left:2em;">
-<dl>
-<dt>Dependencies:</dt>
-<dd>
-<p>Requires SDK Tools r9 or higher.</p>
-</dd>
-</dl>
-
-</div>
-</div>
<h2 id="api">API Overview</h2>
@@ -264,156 +188,5 @@ manifest. If your application is designed to run only on Android 2.3 and higher,
declaring the attribute prevents the application from being installed on earlier
versions of the platform.</p>
-<p>For more information about how to use API Level, see the <a
-href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
-
-<h2 id="apps">Built-in Applications</h2>
-
-<p>The system image included in the downloadable platform provides these
-built-in applications:</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>Browser</li>
-<li>Calculator</li>
-<li>Camera</li>
-<li>Clock</li>
-<li>Contacts</li>
-<li>Cusom Locale</li>
-<li>Dev Tools</li>
-<li>Downloads</li>
-<li>Email</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<ul>
-<li>Gallery</li>
-<li>IMEs for Japanese, Chinese, and Latin text input</li>
-<li>Messaging</li>
-<li>Music</li>
-<li>Phone</li>
-<li>Search</li>
-<li>Settings</li>
-<li>Spare Parts (developer app)</li>
-<li>Speech Recorder</li>
-</ul>
-</td>
-</tr>
-</table>
-
-
-<h2 id="locs" style="margin-top:.75em;">Locales</h2>
-
-<p>The system image included in the downloadable SDK platform provides a variety of
-built-in locales. In some cases, region-specific strings are available for the
-locales. In other cases, a default version of the language is used. The
-languages that are available in the Android {@sdkPlatformVersion} system
-image are listed below (with <em>language</em>_<em>country/region</em> locale
-descriptor).</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>Arabic, Egypt (ar_EG)</li>
-<li>Arabic, Israel (ar_IL)</li>
-<li>Bulgarian, Bulgaria (bg_BG)</li>
-<li>Catalan, Spain (ca_ES)</li>
-<li>Czech, Czech Republic (cs_CZ)</li>
-<li>Danish, Denmark(da_DK)</li>
-<li>German, Austria (de_AT)</li>
-<li>German, Switzerland (de_CH)</li>
-<li>German, Germany (de_DE)</li>
-<li>German, Liechtenstein (de_LI)</li>
-<li>Greek, Greece (el_GR)</li>
-<li>English, Australia (en_AU)</li>
-<li>English, Canada (en_CA)</li>
-<li>English, Britain (en_GB)</li>
-<li>English, Ireland (en_IE)</li>
-<li>English, India (en_IN)</li>
-<li>English, New Zealand (en_NZ)</li>
-<li>English, Singapore(en_SG)</li>
-<li>English, US (en_US)</li>
-<li>English, South Africa (en_ZA)</li>
-<li>Spanish (es_ES)</li>
-<li>Spanish, US (es_US)</li>
-<li>Finnish, Finland (fi_FI)</li>
-<li>French, Belgium (fr_BE)</li>
-<li>French, Canada (fr_CA)</li>
-<li>French, Switzerland (fr_CH)</li>
-<li>French, France (fr_FR)</li>
-<li>Hebrew, Israel (he_IL)</li>
-<li>Hindi, India (hi_IN)</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<li>Croatian, Croatia (hr_HR)</li>
-<li>Hungarian, Hungary (hu_HU)</li>
-<li>Indonesian, Indonesia (id_ID)</li>
-<li>Italian, Switzerland (it_CH)</li>
-<li>Italian, Italy (it_IT)</li>
-<li>Japanese (ja_JP)</li>
-<li>Korean (ko_KR)</li>
-<li>Lithuanian, Lithuania (lt_LT)</li>
-<li>Latvian, Latvia (lv_LV)</li>
-<li>Norwegian-Bokmol, Norway(nb_NO)</li>
-<li>Dutch, Belgium (nl_BE)</li>
-<li>Dutch, Netherlands (nl_NL)</li>
-<li>Polish (pl_PL)</li>
-<li>Portuguese, Brazil (pt_BR)</li>
-<li>Portuguese, Portugal (pt_PT)</li>
-<li>Romanian, Romania (ro_RO)</li>
-<li>Russian (ru_RU)</li></li>
-<li>Slovak, Slovakia (sk_SK)</li>
-<li>Slovenian, Slovenia (sl_SI)</li>
-<li>Serbian (sr_RS)</li>
-<li>Swedish, Sweden (sv_SE)</li>
-<li>Thai, Thailand (th_TH)</li>
-<li>Tagalog, Philippines (tl_PH)</li>
-<li>Turkish, Turkey (tr_TR)</li>
-<li>Ukrainian, Ukraine (uk_UA)</li>
-<li>Vietnamese, Vietnam (vi_VN)</li>
-<li>Chinese, PRC (zh_CN)</li>
-<li>Chinese, Taiwan (zh_TW)</li>
-</td>
-</tr>
-</table>
-
-<p class="note"><strong>Note:</strong> The Android platform may support more
-locales than are included in the SDK system image. All of the supported locales
-are available in the <a href="http://source.android.com/">Android Open Source
-Project</a>.</p>
-
-<h2 id="skins">Emulator Skins</h2>
-
-<p>The downloadable platform includes a set of emulator skins that you can use
-for modeling your application in different screen sizes and resolutions. The
-emulator skins are:</p>
-
-<ul>
- <li>
- QVGA (240x320, low density, small screen)
- </li>
- <li>
- WQVGA400 (240x400, low density, normal screen)
- </li>
- <li>
- WQVGA432 (240x432, low density, normal screen)
- </li>
- <li>
- HVGA (320x480, medium density, normal screen)
- </li>
- <li>
- WVGA800 (480x800, high density, normal screen)
- </li>
- <li>
- WVGA854 (480x854 high density, normal screen)
- </li>
-</ul>
-
-<p>For more information about how to develop an application that displays
-and functions properly on all Android-powered devices, see <a
-href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
-Screens</a>.</p>
+<p>For more information, read <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API
+Level?</a></p> \ No newline at end of file
diff --git a/docs/html/about/versions/android-2.3.4.jd b/docs/html/about/versions/android-2.3.4.jd
new file mode 100644
index 000000000000..bb4feecae287
--- /dev/null
+++ b/docs/html/about/versions/android-2.3.4.jd
@@ -0,0 +1,148 @@
+page.title=Android 2.3.4 Platform
+sdk.platform.version=2.3.4
+sdk.platform.apiLevel=10
+
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+ <li><a href="#api">API Overview</a></li>
+ <li><a href="#openaccessory">Open Accessory Library</a></li>
+ <li><a href="#api-level">API Level</a></li>
+</ol>
+
+<h2>Reference</h2>
+<ol>
+<li><a
+href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API
+Differences Report &raquo;</a> </li>
+</ol>
+
+</div>
+</div>
+
+<p>
+<em>API Level:</em>&nbsp;<strong>{@sdkPlatformApiLevel}</strong></p>
+
+<p>Android 2.3.4 is a maintenance release that adds several bug fixes and patches
+to the Android 2.3 platform, without any API changes from Android 2.3.3. Additionally,
+Android 2.3.4 brings support for the Open Accessory API to mobile devices,
+through the optional <a href="#usb">Open Accessory Library</a>. </p>
+
+<p>For developers, the Android {@sdkPlatformVersion} platform is available as a
+downloadable component for the Android SDK. The downloadable platform includes
+an Android library and system image, as well as a set of emulator skins and
+more. To get started developing or testing against Android {@sdkPlatformVersion},
+use the Android SDK Manager to download the platform into your SDK.</p>
+
+
+
+<h2 id="api">API Overview</h2>
+
+<p>Android 2.3.4 provides the same framework API to applications as Android 2.3.3
+(API level 10). For a summary of the API, see the
+<a href="{@docRoot}about/versions/android-2.3.3.html">Android 2.3.3 version notes</a>.</p>
+
+
+<h2 id="openaccessory">Open Accessory Library</h2>
+
+<p><em>Open Accessory</em> is a new capability for integrating
+connected peripherals with applications running on the platform. The capability
+is based on a USB (Universal Serial Bus) stack built into the platform and an
+API exposed to applications. Peripherals that attach to Android-powered devices
+as accessories connect as USB hosts. </p>
+
+<p>Open Accessory is introduced in <a
+href="{@docRoot}about/versions/android-3.1.html#usb">Android 3.1</a> (API level 12), but is
+made available to devices running Android 2.3.4 by means of an optional external
+library, the Open Accessory Library. The library exposes a framework API that
+lets applications discover, communicate with, and manage a variety of device
+types connected over USB. It also provides the implementation of the API against
+parts of the Android platform that are not directly exposed to applications in
+Android 2.3.4.</p>
+
+<p>The Open Accessory Library is optional on any given device. Device
+manufacturers may choose whether to include the Open Accessory Library in their
+products or exclude it. The library is forward-compatible with Android 3.1, so
+applications developed against Android 2.3.4 will run properly on devices
+running Android 3.1, if those devices support USB accessories. </p>
+
+<p>The API provided by the Open Accessory Library is based on the Open Accessory
+API provided in Android 3.1. In most areas, you can use the same techniques and
+APIs. However, developing for the Open Accessory Library on Android 2.3.4 differs
+from the standard USB API in these ways:
+
+<ul>
+<li>Obtaining a {@link android.hardware.usb.UsbManager} object &mdash; To obtain
+a {@link android.hardware.usb.UsbManager} object when using the add-on library,
+use the helper method <code>getInstance()</code> rather than {@link
+android.content.Context#getSystemService(java.lang.String) getSystemService()}
+For example:
+
+<pre>UsbManager manager = UsbManager.getInstance(this);</pre></li>
+
+<li>Obtaining a {@link android.hardware.usb.UsbAccessory} from a filtered intent
+&mdash; When you filter for a connected device or accessory with an intent
+filter, the {@link android.hardware.usb.UsbAccessory} object is contained
+inside the intent that is passed to your application. If you are using the
+add-on library, you can get the {@link android.hardware.usb.UsbAccessory} object
+in the following manner:
+
+<pre>UsbAccessory accessory = UsbManager.getAccessory(intent)</pre></li>
+
+<li>No USB host support &mdash; Android 2.3.4 and the Open Accessory Library do
+not support USB host mode (for example, through {@link
+android.hardware.usb.UsbDevice}), although USB host mode is supported in Android
+3.1. An Android-powered device running Android 2.3.4 can not function as a USB
+host. The library enables the Android-powered device to function as
+a peripheral only, with the connected accessory functioning as USB host
+(through {@link android.hardware.usb.UsbAccessory}).</li>
+</ul>
+
+<p>To develop apps using the Open Accessory Library, you need:</p>
+
+<ul>
+<li>The latest version of the Android SDK tools</li>
+<li>The latest version of the Google APIs add-on, which includes the library
+itself (for linking)</li>
+<li>An actual hardware device running Android 2.3.4 (or Android 3.1) with USB
+accessories support, for runtime testing against connected devices</li>
+</ul>
+
+<p>For a full discussion of how to develop applications that interact with USB
+accessories, please see the related <a
+href="{@docRoot}guide/topics/connectivity/usb/index.html">developer documentation</a>.</p>
+
+<p>Additionally, developers can request filtering on Google Play, such that
+their applications are not available to users whose devices do not provide the
+appropriate accessory support. To request filtering, add the element below
+to the application manifest:</p>
+
+<pre>&lt;uses-feature
+ android:name="android.hardware.usb.accessory"
+ android:required="true"&gt;</pre>
+
+
+<h2 id="api-level">API Level</h2>
+
+<p>The Android 2.3.4 platform does <em>not</em> increment the API level &mdash;
+it uses the same API level as Android 2.3.3, API level 10.
+
+<p>To use APIs introduced in API level 10 in your application,
+you need compile the application against the Android library that is provided in
+the latest version of the Google APIs Add-On, which also includes the Open
+Accessory Library.</p>
+
+<p>Depending on your needs, you might
+also need to add an <code>android:minSdkVersion="{@sdkPlatformApiLevel}"</code>
+attribute to the <code>&lt;uses-sdk&gt;</code> element in the application's
+manifest. If your application is designed to run only on Android 2.3.3 and higher,
+declaring the attribute prevents the application from being installed on earlier
+versions of the platform.</p>
+
+<p>For more information, read <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API
+Level?</a></p>
diff --git a/docs/html/sdk/android-2.3.jd b/docs/html/about/versions/android-2.3.jd
index b46691309891..2afa564ffc20 100644
--- a/docs/html/sdk/android-2.3.jd
+++ b/docs/html/about/versions/android-2.3.jd
@@ -10,12 +10,8 @@ sdk.platform.apiLevel=9
<h2>In this document</h2>
<ol>
- <li><a href="#relnotes">Revisions</a></li>
<li><a href="#api">API Overview</a></li>
<li><a href="#api-level">API Level</a></li>
- <li><a href="#apps">Built-in Applications</a></li>
- <li><a href="#locs">Locales</a></li>
- <li><a href="#skins">Emulator Skins</a></li>
</ol>
<h2>Reference</h2>
@@ -25,11 +21,6 @@ href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API
Differences Report &raquo;</a> </li>
</ol>
-<h2>See Also</h2>
-<ol>
- <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
-</ol>
-
</div>
</div>
@@ -37,85 +28,13 @@ Differences Report &raquo;</a> </li>
<em>API Level:</em>&nbsp;<strong>{@sdkPlatformApiLevel}</strong></p>
<p>For developers, the Android {@sdkPlatformVersion} platform is available as a
-downloadable component for the Android SDK. The downloadable platform includes
-an Android library and system image, as well as a set of emulator
-skins and more. The downloadable platform
-includes no external libraries.</p>
-
-<p>To get started developing or testing against Android
-{@sdkPlatformVersion}, use the Android SDK Manager to
-download the platform into your SDK. For more information,
-see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
-Components</a>. If you are new to Android, <a
-href="{@docRoot}sdk/index.html">download the SDK Starter Package</a>
-first.</p>
-
-<p>For a high-level introduction to Android {@sdkPlatformVersion}, see the <a
-href="{@docRoot}sdk/android-{@sdkPlatformVersion}-highlights.html">Platform Highlights</a>.</p>
-
-
-<h2 id="relnotes">Revisions</h2>
-
-<p>The sections below provide notes about successive releases of
-the Android {@sdkPlatformVersion} platform component for the Android SDK, as denoted by
-revision number. To determine what revision(s) of the Android
-{@sdkPlatformVersion} platforms are installed in your SDK environment, refer to
-the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
-
-<script type="text/javascript">
-function toggleDiv(link) {
- var toggleable = $(link).parent();
- if (toggleable.hasClass("closed")) {
- //$(".toggleme", toggleable).slideDown("fast");
- toggleable.removeClass("closed");
- toggleable.addClass("open");
- $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/triangle-opened.png"));
- } else {
- //$(".toggleme", toggleable).slideUp("fast");
- toggleable.removeClass("open");
- toggleable.addClass("closed");
- $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/triangle-closed.png"));
- }
- return false;
-}
-</script>
-<style>
-.toggleable {
- padding: .25em 1em 0em 1em;
- margin-bottom: 0;
-}
-.toggleme {
- padding: 1em 1em 0 2em;
- line-height:1em;
-}
-.toggleable a {
- text-decoration:none;
-}
-.toggleme a {
- text-decoration:underline;
-}
-.toggleable.closed .toggleme {
- display:none;
-}
-#jd-content .toggle-img {
- margin:0;
-}
-</style>
-
-<div class="toggleable opened">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
- Android {@sdkPlatformVersion}, Revision 1</a> <em>(December 2010)</em></a>
- <div class="toggleme">
-<dl>
-<dt>Dependencies:</dt>
-<dd>
-<p>Requires SDK Tools r8 or higher.</p>
-</dd>
-
-</dl>
- </div>
-</div>
+downloadable component for the Android SDK. The downloadable platform includes
+an Android library and system image, as well as a set of emulator skins and
+more. To get started developing or testing against Android {@sdkPlatformVersion},
+use the Android SDK Manager to download the platform into your SDK.</p>
+
+
+
<h2 id="api">API Overview</h2>
@@ -648,7 +567,7 @@ events and surfaces.</li>
</ul>
<p>For full information on working with native code or to download the NDK,
-see the <a href="{@docRoot}sdk/ndk/index.html">Android NDK</a> page.</p>
+see the <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a> page.</p>
<h3 id="dalvik">Dalvik Runtime</h3>
@@ -787,156 +706,5 @@ manifest. If your application is designed to run only on Android 2.3 and higher,
declaring the attribute prevents the application from being installed on earlier
versions of the platform.</p>
-<p>For more information about how to use API Level, see the <a
-href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
-
-<h2 id="apps">Built-in Applications</h2>
-
-<p>The system image included in the downloadable platform provides these
-built-in applications:</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>Browser</li>
-<li>Calculator</li>
-<li>Camera</li>
-<li>Clock</li>
-<li>Contacts</li>
-<li>Cusom Locale</li>
-<li>Dev Tools</li>
-<li>Downloads</li>
-<li>Email</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<ul>
-<li>Gallery</li>
-<li>IMEs for Japanese, Chinese, and Latin text input</li>
-<li>Messaging</li>
-<li>Music</li>
-<li>Phone</li>
-<li>Search</li>
-<li>Settings</li>
-<li>Spare Parts (developer app)</li>
-<li>Speech Recorder</li>
-</ul>
-</td>
-</tr>
-</table>
-
-
-<h2 id="locs" style="margin-top:.75em;">Locales</h2>
-
-<p>The system image included in the downloadable SDK platform provides a variety of
-built-in locales. In some cases, region-specific strings are available for the
-locales. In other cases, a default version of the language is used. The
-languages that are available in the Android {@sdkPlatformVersion} system
-image are listed below (with <em>language</em>_<em>country/region</em> locale
-descriptor).</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>Arabic, Egypt (ar_EG)</li>
-<li>Arabic, Israel (ar_IL)</li>
-<li>Bulgarian, Bulgaria (bg_BG)</li>
-<li>Catalan, Spain (ca_ES)</li>
-<li>Czech, Czech Republic (cs_CZ)</li>
-<li>Danish, Denmark(da_DK)</li>
-<li>German, Austria (de_AT)</li>
-<li>German, Switzerland (de_CH)</li>
-<li>German, Germany (de_DE)</li>
-<li>German, Liechtenstein (de_LI)</li>
-<li>Greek, Greece (el_GR)</li>
-<li>English, Australia (en_AU)</li>
-<li>English, Canada (en_CA)</li>
-<li>English, Britain (en_GB)</li>
-<li>English, Ireland (en_IE)</li>
-<li>English, India (en_IN)</li>
-<li>English, New Zealand (en_NZ)</li>
-<li>English, Singapore(en_SG)</li>
-<li>English, US (en_US)</li>
-<li>English, South Africa (en_ZA)</li>
-<li>Spanish (es_ES)</li>
-<li>Spanish, US (es_US)</li>
-<li>Finnish, Finland (fi_FI)</li>
-<li>French, Belgium (fr_BE)</li>
-<li>French, Canada (fr_CA)</li>
-<li>French, Switzerland (fr_CH)</li>
-<li>French, France (fr_FR)</li>
-<li>Hebrew, Israel (he_IL)</li>
-<li>Hindi, India (hi_IN)</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<li>Croatian, Croatia (hr_HR)</li>
-<li>Hungarian, Hungary (hu_HU)</li>
-<li>Indonesian, Indonesia (id_ID)</li>
-<li>Italian, Switzerland (it_CH)</li>
-<li>Italian, Italy (it_IT)</li>
-<li>Japanese (ja_JP)</li>
-<li>Korean (ko_KR)</li>
-<li>Lithuanian, Lithuania (lt_LT)</li>
-<li>Latvian, Latvia (lv_LV)</li>
-<li>Norwegian-Bokmol, Norway(nb_NO)</li>
-<li>Dutch, Belgium (nl_BE)</li>
-<li>Dutch, Netherlands (nl_NL)</li>
-<li>Polish (pl_PL)</li>
-<li>Portuguese, Brazil (pt_BR)</li>
-<li>Portuguese, Portugal (pt_PT)</li>
-<li>Romanian, Romania (ro_RO)</li>
-<li>Russian (ru_RU)</li></li>
-<li>Slovak, Slovakia (sk_SK)</li>
-<li>Slovenian, Slovenia (sl_SI)</li>
-<li>Serbian (sr_RS)</li>
-<li>Swedish, Sweden (sv_SE)</li>
-<li>Thai, Thailand (th_TH)</li>
-<li>Tagalog, Philippines (tl_PH)</li>
-<li>Turkish, Turkey (tr_TR)</li>
-<li>Ukrainian, Ukraine (uk_UA)</li>
-<li>Vietnamese, Vietnam (vi_VN)</li>
-<li>Chinese, PRC (zh_CN)</li>
-<li>Chinese, Taiwan (zh_TW)</li>
-</td>
-</tr>
-</table>
-
-<p class="note"><strong>Note:</strong> The Android platform may support more
-locales than are included in the SDK system image. All of the supported locales
-are available in the <a href="http://source.android.com/">Android Open Source
-Project</a>.</p>
-
-<h2 id="skins">Emulator Skins</h2>
-
-<p>The downloadable platform includes a set of emulator skins that you can use
-for modeling your application in different screen sizes and resolutions. The
-emulator skins are:</p>
-
-<ul>
- <li>
- QVGA (240x320, low density, small screen)
- </li>
- <li>
- WQVGA400 (240x400, low density, normal screen)
- </li>
- <li>
- WQVGA432 (240x432, low density, normal screen)
- </li>
- <li>
- HVGA (320x480, medium density, normal screen)
- </li>
- <li>
- WVGA800 (480x800, high density, normal screen)
- </li>
- <li>
- WVGA854 (480x854 high density, normal screen)
- </li>
-</ul>
-
-<p>For more information about how to develop an application that displays
-and functions properly on all Android-powered devices, see <a
-href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
-Screens</a>.</p>
+<p>For more information, read <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API
+Level?</a></p> \ No newline at end of file
diff --git a/docs/html/sdk/android-3.0-highlights.jd b/docs/html/about/versions/android-3.0-highlights.jd
index 33897de91c6c..21dbda6af4ce 100644
--- a/docs/html/sdk/android-3.0-highlights.jd
+++ b/docs/html/about/versions/android-3.0-highlights.jd
@@ -1,4 +1,4 @@
-page.title=Android 3.0 Platform Highlights
+page.title=Honeycomb
@jd:body
@@ -15,7 +15,6 @@ page.title=Android 3.0 Platform Highlights
#jd-content div.video {
float:right;
padding:0 60px 40px;
- margin-top:-15px;
}
#jd-content table.columns {
margin:0 0 1em 0;
@@ -44,7 +43,7 @@ page.title=Android 3.0 Platform Highlights
<p>The Android 3.0 platform introduces many new and exciting features for users and developers.
This document provides a glimpse of some of the new features and technologies, as delivered in
Android 3.0. For a more detailed look at new developer APIs, see the <a
-href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a> document.</p>
+href="{@docRoot}about/versions/android-3.0.html">Android 3.0 Platform</a> document.</p>
<ul>
<li><a href="#UserFeatures">New User Features</a></li>
@@ -54,7 +53,9 @@ href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a> document.</p>
<h2 id="UserFeatures" style="clear:right">New User Features</h2>
<div style="padding-top:0em;">
-<div style="margin-right:1em;margin-left:1em;float:right;padding-top:2em;"><a href="images/3.0/home_hero1_full.png" target="_android"><img src="images/3.0/home_hero1.png" alt="" height="280" /></a></div>
+<div style="float:right;margin-left:20px;"><a
+href="{@docRoot}sdk/images/3.0/home_hero1_full.png" target="_android"><img
+src="{@docRoot}sdk/images/3.0/home_hero1.png" alt="" height="280" /></a></div>
<h3>New UI designed from the ground up for tablets</h3>
@@ -75,7 +76,9 @@ href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a> document.</p>
</div>
<div style="padding-top:0em;">
-<div style="margin-right:1em;float:right;margin-left:1em;"><a href="images/3.0/homescreen_cust_port_full.png" target="_android"><img src="images/3.0/homescreen_cust_port.png" alt="" height="280" /></a></div>
+<div style="float:right;margin-left:20px;"><a
+href="{@docRoot}sdk/images/3.0/homescreen_cust_port_full.png" target="_android"><img
+src="{@docRoot}sdk/images/3.0/homescreen_cust_port.png" alt="" height="280" /></a></div>
<p style="margin-top:1em;margin-bottom:.75em;"><strong>Customizable Home screens</strong></p>
@@ -84,7 +87,8 @@ href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a> document.</p>
</div>
<div style="padding-top:0em;">
-<div style="margin-right:1.5em;float:left;"><a href="images/3.0/tasks_full.png" target="_android"><img src="images/3.0/tasks.png" alt="" height="280" /></a>
+<div style="margin-right:1.5em;float:left;"><a href="{@docRoot}sdk/images/3.0/tasks_full.png"
+target="_android"><img src="{@docRoot}sdk/images/3.0/tasks.png" alt="" height="280" /></a>
<!--<p style="font-size:90%">Figure</p> --></div>
@@ -100,7 +104,8 @@ href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a> document.</p>
<p>The Android soft keyboard is redesigned to make entering text fast and accurate on larger screen sizes. The keys are reshaped and repositioned for improved targeting, and new keys have been added, such as a Tab key, to provide richer and more efficient text input. Users can touch-hold keys to access menus of special characters and switch text/voice input modes from a button in the System Bar.</p>
<div style="padding-top:1em;">
-<div style="margin-right:1em;float:right;"><a href="images/3.0/copy_full.png" target="_android"><img src="images/3.0/copy.png" alt="" height="180" /></a></div>
+<div style="margin-left:20px;float:right;"><a href="{@docRoot}sdk/images/3.0/copy_full.png"
+target="_android"><img src="{@docRoot}sdk/images/3.0/copy.png" alt="" height="180" /></a></div>
<h3>Improved text selection, copy and paste</h3>
@@ -116,8 +121,11 @@ href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a> document.</p>
<h3>Updated set of standard apps</h3>
<div style="padding-top:0em;">
-<div style="margin-right:1em;float:right;;padding-top:0em;margin-left:1em;"><a href="images/3.0/browser_full.png" target="_android"><img src="images/3.0/browser.png" alt="" height="200" /></a><br>
-<a href="images/3.0/camera_full.png" target="_android"><img src="images/3.0/camera.png" alt="" height="200" /></a></div>
+<div style="margin-left:20px;float:right;;padding-top:0em;"><a
+href="{@docRoot}sdk/images/3.0/browser_full.png" target="_android"><img
+src="{@docRoot}sdk/images/3.0/browser.png" alt="" height="200" /></a><br>
+<a href="{@docRoot}sdk/images/3.0/camera_full.png" target="_android"><img
+src="{@docRoot}sdk/images/3.0/camera.png" alt="" height="200" /></a></div>
<p>The Android 3.0 platform includes an updated set of standard applications that are designed for use on larger screen devices. The sections below highlight some of the new features. </p>
@@ -156,7 +164,9 @@ href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a> document.</p>
<h3 id="ui">New UI Framework for creating great tablet apps</h3>
<div style="padding-top:0em;">
-<div style="margin-right:1em;float:right;margin-left:1em;"><a href="images/3.0/contacts_full.png" target="_android"><img src="images/3.0/contacts.png" alt="" height="200" /></a></div>
+<div style="float:right;margin-left:20px;"><a
+href="{@docRoot}sdk/images/3.0/contacts_full.png" target="_android"><img
+src="{@docRoot}sdk/images/3.0/contacts.png" alt="" height="200" /></a></div>
<p style="margin-top:.75em;margin-bottom:.75em;"><strong>Activity fragments, for greater control of content and design flexibility</strong></p>
@@ -171,7 +181,9 @@ href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a> document.</p>
<div style="padding-top:0em;">
-<div style="margin-right:1.5em;float:left;margin-left:0em;"><a href="images/3.0/widgets.png" target="_android"><img src="images/3.0/widgets.png" alt="" height="200" target="_android" /></a></div>
+<div style="margin-right:1.5em;float:left;margin-left:0em;"><a
+href="{@docRoot}sdk/images/3.0/widgets.png" target="_android"><img
+src="{@docRoot}sdk/images/3.0/widgets.png" alt="" height="200" target="_android" /></a></div>
<p style="margin-top:1.25em;margin-bottom:.75em;"><strong>Expanded Home screen widgets</strong></p>
@@ -188,7 +200,10 @@ href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a> document.</p>
<p>Notifications are a key part of the Android user experience because they let applications show key updates and status information to users in real time. Android 3.0 extends this capability, letting developers include richer content and control more properties. A new builder class lets developers quickly create notifications that include large and small icons, a title, a priority flag, and any properties already available in previous versions. Notifications can offer more types of content by building on the expanded set of UI Widgets that are now available as remote Views.</p>
<div style="padding-top:0em;">
-<div style="margin-right:1em;float:right;margin-left:1em;"><a href="images/3.0/mail_drag_full.png" target="_android"><img src="images/3.0/mail_drag.png" alt="" height="200" style="padding-top:1em;"/></a></div>
+<div style="float:right;margin-left:20px;"><a
+href="{@docRoot}sdk/images/3.0/mail_drag_full.png" target="_android"><img
+src="{@docRoot}sdk/images/3.0/mail_drag.png" alt="" height="200"
+style="padding-top:1em;"/></a></div>
<p style="margin-top:1.25em;margin-bottom:.75em;"><strong>Multiselect, clipboard, and drag-and-drop</strong></p>
@@ -244,20 +259,3 @@ href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a> document.</p>
<p>Android 3.0 brings a new UI designed for tablets and other larger screen devices, but it also is fully compatible with applications developed for earlier versions of the platform, or for smaller screen sizes. Existing applications can seamlessly participate in the new holographic UI theme without code changes, by adding a single attribute in their manifest files. The platform emulates the Menu key, which is replaced by the overflow menu in the Action Bar in the new UI. Developers wanting to take fuller advantage of larger screen sizes can also create dedicated layouts and assets for larger screens and add them to their existing applications.</p>
-
-<h2>More information</h2>
-
-<div class="video">
-<object width="278" height="180">
-<param name="movie" value="http://www.youtube.com/v/hPUGNCIozp0?hl=en&fs=1"></param>
-<param name="allowFullScreen" value="true"></param><param name="allowscriptaccess"
-value="always"></param>
-<embed src="http://www.youtube.com/v/hPUGNCIozp0?hl=en&fs=1" type="application/x-shockwave-flash"
-allowscriptaccess="always" allowfullscreen="true" width="278" height="180"></embed>
-</object>
-</div>
-
-<p>For more information about the new developer APIs, see the <a
-href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a> document.</p>
-
-<p>For a video overview of platform features, see the Android 3.0 Sneak Peek. </p>
diff --git a/docs/html/sdk/android-3.0.jd b/docs/html/about/versions/android-3.0.jd
index 3acb35885af8..76e07959135e 100644
--- a/docs/html/sdk/android-3.0.jd
+++ b/docs/html/about/versions/android-3.0.jd
@@ -8,12 +8,8 @@ sdk.platform.apiLevel=11
<h2>In this document</h2>
<ol>
- <li><a href="#relnotes">Revisions</a></li>
<li><a href="#api">API Overview</a></li>
<li><a href="#api-level">API Level</a></li>
- <li><a href="#apps">Built-in Applications</a></li>
- <li><a href="#locs">Locales</a></li>
- <li><a href="#skins">Emulator Skins</a></li>
</ol>
<h2>Reference</h2>
@@ -23,12 +19,6 @@ href="{@docRoot}sdk/api_diff/11/changes.html">API
Differences Report &raquo;</a> </li>
</ol>
-<h2>See Also</h2>
-<ol>
- <li><a href="{@docRoot}guide/practices/tablets-and-handsets.html">Supporting Tablets and
-Handsets</a></li>
-</ol>
-
</div>
</div>
@@ -40,76 +30,14 @@ component for the Android SDK. The downloadable platform includes an Android lib
image, as well as a set of emulator skins and more. The downloadable platform includes no external
libraries.</p>
-<p>To get started developing or testing against Android {@sdkPlatformVersion}, use the Android SDK
-Manager to download the platform into your SDK. For more information, see <a
-href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>. If you are new to Android, <a
-href="{@docRoot}sdk/index.html">download the SDK Starter Package</a> first.</p>
-
-<p>For a high-level introduction to Android {@sdkPlatformVersion}, see the <a
-href="{@docRoot}sdk/android-{@sdkPlatformVersion}-highlights.html">Platform
-Highlights</a>.</p>
-
-<p class="note"><strong>Note:</strong>
-If you've already published an Android application, please test and optimize your application on
-Android 3.0 as soon as possible. You should do so to be sure your application provides the best
-experience possible on the latest Android-powered devices. For information about what you can do,
-read <a href="{@docRoot}guide/practices/tablets-and-handsets.html">Supporting Tablets and
-Handsets</a>.</p>
-
-
-<h2 id="relnotes">Revisions</h2>
-
-<p>To determine what revision of the Android {@sdkPlatformVersion} platform you have installed,
-refer to the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
-
-
+<p>For developers, the Android {@sdkPlatformVersion} platform is available as a
+downloadable component for the Android SDK. The downloadable platform includes
+an Android library and system image, as well as a set of emulator skins and
+more. To get started developing or testing against Android {@sdkPlatformVersion},
+use the Android SDK Manager to download the platform into your SDK.</p>
-<div class="toggle-content opened" style="padding-left:1em;">
-<p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-opened.png"
-class="toggle-content-img" alt="" />
- Android {@sdkPlatformVersion}, Revision 2</a> <em>(July 2011)</em>
-</a></p>
-<div class="toggle-content-toggleme" style="padding-left:2em;">
-
-<dl>
-<dt>Dependencies:</dt>
-<dd>
-<p>Requires <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r12</a> or
-higher.</p>
-</dd>
-<dt>Notes:</dt>
-<dd>
-<p>Improvements to the platform's rendering library to support the visual layout editor in the ADT
-Eclipse plugin. This revision allows for more drawing features in ADT and fixes several
-bugs in the previous rendering library. It also unlocks several editor features that were added in
-ADT 12.</p>
-</dd>
-</dl>
-
-</div>
-</div>
-
-<div class="toggle-content closed" style="padding-left:1em;">
-
-<p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" />
- Android {@sdkPlatformVersion}, Revision 1</a> <em>(February 2011)</em>
-</a></p>
-
-<div class="toggle-content-toggleme" style="padding-left:2em;">
-
-<dl>
-<dt>Dependencies:</dt>
-<dd>
-<p>Requires <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r10</a> or higher.</p>
-</dd>
-</dl>
-
-</div>
-</div>
@@ -165,7 +93,7 @@ android.app.FragmentTransaction#commit commit()} and the system applies the frag
the activity.</p>
<p>For more information about using fragments, read the <a
-href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a> documentation. Several
+href="{@docRoot}guide/components/fragments.html">Fragments</a> documentation. Several
samples are also available in the <a
href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/index.html#Fragment">
API Demos</a> application.</p>
@@ -261,11 +189,9 @@ before attempting to paste it.</p>
object) at a time, but one {@link android.content.ClipData} can contain multiple {@link
android.content.ClipData.Item}s.</p>
-<p>For more information, read the <a href="{@docRoot}guide/topics/clipboard/copy-paste.html">Copy
-and Paste</a> documentation. You can also see a simple implementation of copy and paste in the <a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/content/ClipboardSample.html">API Demos</a>
-and a more complete implementation in the <a
-href="{@docRoot}resources/samples/NotePad/index.html">Note Pad</a> application.</p>
+<p>For more information, read the <a href="{@docRoot}guide/topics/text/copy-paste.html">Copy
+and Paste</a> documentation. You can also see a simple implementation of copy and paste in the API Demos
+sample and a more complete implementation in the Note Pad sample.</p>
@@ -385,7 +311,7 @@ changed, then call {@link android.app.LoaderManager#initLoader initLoader()} to
loader for your activity or fragment.</p>
<p>For more information, read the <a
-href="{@docRoot}guide/topics/fundamentals/loaders.html">Loaders</a> documentation. You can also see
+href="{@docRoot}guide/components/loaders.html">Loaders</a> documentation. You can also see
example code using loaders in the <a
href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/LoaderCursor.html">LoaderCursor</a>
and <a
@@ -453,7 +379,7 @@ such as a {@link android.animation.ValueAnimator} or {@link android.animation.Ob
discussed above.</p>
<p>For more information, see the <a
-href="{@docRoot}guide/topics/graphics/animation.html">Property Animation</a> documentation. You can
+href="{@docRoot}guide/topics/graphics/prop-animation.html">Property Animation</a> documentation. You can
also see several samples using the animation APIs in the <a
href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/animation/index.html">API
Demos</a> application.</p>
@@ -1046,141 +972,5 @@ manifest. If your application is designed to run only on Android 2.3 and higher,
declaring the attribute prevents the application from being installed on earlier
versions of the platform.</p>
-<p>For more information about how to use API Level, see the <a
-href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
-
-
-<h2 id="apps">Built-in Applications</h2>
-
-<p>The system image included in the downloadable platform provides these
-built-in applications:</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>API Demos</li>
-<li>Browser</li>
-<li>Calculator</li>
-<li>Camera</li>
-<li>Clock</li>
-<li>Contacts</li>
-<li>Custom Locale</li>
-<li>Dev Tools</li>
-<li>Downloads</li>
-<li>Email</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<ul>
-<li>Gallery</li>
-<li>Gestures Builder</li>
-<li>Messaging</li>
-<li>Music</li>
-<li>Search</li>
-<li>Settings</li>
-<li>Spare Parts</li>
-<li>Speech Recorder</li>
-<li>Widget Preview</li>
-</ul>
-</td>
-</tr>
-</table>
-
-
-<h2 id="locs" style="margin-top:.75em;">Locales</h2>
-
-<p>The system image included in the downloadable SDK platform provides a variety of
-built-in locales. In some cases, region-specific strings are available for the
-locales. In other cases, a default version of the language is used. The
-languages that are available in the Android 3.0 system
-image are listed below (with <em>language</em>_<em>country/region</em> locale
-descriptor).</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>Arabic, Egypt (ar_EG)</li>
-<li>Arabic, Israel (ar_IL)</li>
-<li>Bulgarian, Bulgaria (bg_BG)</li>
-<li>Catalan, Spain (ca_ES)</li>
-<li>Czech, Czech Republic (cs_CZ)</li>
-<li>Danish, Denmark(da_DK)</li>
-<li>German, Austria (de_AT)</li>
-<li>German, Switzerland (de_CH)</li>
-<li>German, Germany (de_DE)</li>
-<li>German, Liechtenstein (de_LI)</li>
-<li>Greek, Greece (el_GR)</li>
-<li>English, Australia (en_AU)</li>
-<li>English, Canada (en_CA)</li>
-<li>English, Britain (en_GB)</li>
-<li>English, Ireland (en_IE)</li>
-<li>English, India (en_IN)</li>
-<li>English, New Zealand (en_NZ)</li>
-<li>English, Singapore(en_SG)</li>
-<li>English, US (en_US)</li>
-<li>English, South Africa (en_ZA)</li>
-<li>Spanish (es_ES)</li>
-<li>Spanish, US (es_US)</li>
-<li>Finnish, Finland (fi_FI)</li>
-<li>French, Belgium (fr_BE)</li>
-<li>French, Canada (fr_CA)</li>
-<li>French, Switzerland (fr_CH)</li>
-<li>French, France (fr_FR)</li>
-<li>Hebrew, Israel (he_IL)</li>
-<li>Hindi, India (hi_IN)</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<li>Croatian, Croatia (hr_HR)</li>
-<li>Hungarian, Hungary (hu_HU)</li>
-<li>Indonesian, Indonesia (id_ID)</li>
-<li>Italian, Switzerland (it_CH)</li>
-<li>Italian, Italy (it_IT)</li>
-<li>Japanese (ja_JP)</li>
-<li>Korean (ko_KR)</li>
-<li>Lithuanian, Lithuania (lt_LT)</li>
-<li>Latvian, Latvia (lv_LV)</li>
-<li>Norwegian bokmål, Norway (nb_NO)</li>
-<li>Dutch, Belgium (nl_BE)</li>
-<li>Dutch, Netherlands (nl_NL)</li>
-<li>Polish (pl_PL)</li>
-<li>Portuguese, Brazil (pt_BR)</li>
-<li>Portuguese, Portugal (pt_PT)</li>
-<li>Romanian, Romania (ro_RO)</li>
-<li>Russian (ru_RU)</li></li>
-<li>Slovak, Slovakia (sk_SK)</li>
-<li>Slovenian, Slovenia (sl_SI)</li>
-<li>Serbian (sr_RS)</li>
-<li>Swedish, Sweden (sv_SE)</li>
-<li>Thai, Thailand (th_TH)</li>
-<li>Tagalog, Philippines (tl_PH)</li>
-<li>Turkish, Turkey (tr_TR)</li>
-<li>Ukrainian, Ukraine (uk_UA)</li>
-<li>Vietnamese, Vietnam (vi_VN)</li>
-<li>Chinese, PRC (zh_CN)</li>
-<li>Chinese, Taiwan (zh_TW)</li>
-</td>
-</tr>
-</table>
-
-<p class="note"><strong>Note:</strong> The Android platform may support more
-locales than are included in the SDK system image. All of the supported locales
-are available in the <a href="http://source.android.com/">Android Open Source
-Project</a>.</p>
-
-<h2 id="skins">Emulator Skins</h2>
-
-<p>The downloadable platform includes the following emulator skin:</p>
-
-<ul>
- <li>
- WXGA (1280x800, medium density, xlarge screen)
- </li>
-</ul>
-
-<p>For more information about how to develop an application that displays
-and functions properly on all Android-powered devices, see <a
-href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
-Screens</a>.</p> \ No newline at end of file
+<p>For more information, read <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API
+Level?</a></p>
diff --git a/docs/html/sdk/android-3.1-highlights.jd b/docs/html/about/versions/android-3.1-highlights.jd
index 88bc1eec0c55..5283c2a45861 100644
--- a/docs/html/sdk/android-3.1-highlights.jd
+++ b/docs/html/about/versions/android-3.1-highlights.jd
@@ -1,4 +1,4 @@
-page.title=Android 3.1 Platform Highlights
+page.title=Honeycomb MR1
@jd:body
@@ -15,7 +15,6 @@ page.title=Android 3.1 Platform Highlights
#jd-content div.video {
float:right;
padding:0 60px 40px;
- margin-top:-15px;
}
#jd-content table.columns {
margin:0 0 1em 0;
@@ -45,11 +44,11 @@ features introduced in Android 3.0. It builds on the same tablet-optimized UI
and features offered in Android 3.0 and adds several new capabilities for
users and developers. This document provides an overview of the new features and
technologies introduced in Android 3.1. For a more detailed look at new
-developer APIs, see the <a href="{@docRoot}sdk/android-3.1.html">API
+developer APIs, see the <a href="{@docRoot}about/versions/android-3.1.html">API
Overview</a> document.</p>
<p>For a high-level introduction to Android 3.0, please see the <a
-href="{@docRoot}sdk/android-3.0-highlights.html">Android 3.0 Platform
+href="{@docRoot}about/versions/android-3.0-highlights.html">Android 3.0 Platform
Highlights</a>.</p>
<ul>
@@ -60,7 +59,9 @@ Highlights</a>.</p>
<h2 id="UserFeatures" style="clear:right">New User Features</h2>
<div style="padding-top:0em;">
-<div style="margin-right:1em;margin-left:1em;float:right;padding-top:2em;"><a href="images/3.1/home_full.png" target="_android"><img src="images/3.1/home.png" alt="" height="280" /></a>
+<div style="margin-right:1em;margin-left:1em;float:right;padding-top:2em;"><a
+href="{@docRoot}sdk/images/3.1/home_full.png" target="_android"><img
+src="{@docRoot}sdk/images/3.1/home.png" alt="" height="280" /></a>
<div style="padding-left:1.25em;padding-bottom:1.25em;width:450px;font-size:.9em"><strong>Figure 1.</strong> An Android 3.1 Home screen.</div>
</div>
@@ -293,7 +294,7 @@ many new ways to engage users and build powerful interaction experiences with
connected hardware.</p>
<p>To learn more about how to develop applications that interact with
-accessories, see the <a href="{@docRoot}guide/topics/usb/accessory.html">USB
+accessories, see the <a href="{@docRoot}guide/topics/connectivity/usb/accessory.html">USB
Accessory</a> documentation.</p>
<h3 id="host">USB host API</h3>
@@ -305,7 +306,7 @@ connected devices such as audio devices. input devices, communications devices,
hubs, cameras, and more.</p>
<p>To learn more about how to develop applications that interact with
-USB devices, see the <a href="{@docRoot}guide/topics/usb/host.html">USB
+USB devices, see the <a href="{@docRoot}guide/topics/connectivity/usb/host.html">USB
Host</a> documentation.</p>
<h3 id="inputdevices">Input from mice, joysticks, and gamepads</h3>
diff --git a/docs/html/sdk/android-3.1.jd b/docs/html/about/versions/android-3.1.jd
index 7ec7e331b982..2a845f0e4b51 100644
--- a/docs/html/sdk/android-3.1.jd
+++ b/docs/html/about/versions/android-3.1.jd
@@ -8,12 +8,8 @@ sdk.platform.apiLevel=12
<h2>In this document</h2>
<ol>
- <li><a href="#relnotes">Revisions</a></li>
<li><a href="#api">API Overview</a></li>
<li><a href="#api-level">API Level</a></li>
- <li><a href="#apps">Built-in Applications</a></li>
- <li><a href="#locs">Locales</a></li>
- <li><a href="#skins">Emulator Skins</a></li>
</ol>
<h2>Reference</h2>
@@ -23,12 +19,6 @@ href="{@docRoot}sdk/api_diff/12/changes.html">API
Differences Report &raquo;</a> </li>
</ol>
-<h2>See Also</h2>
-<ol>
- <li><a href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing
-Apps for Android 3.x</a></li>
-</ol>
-
</div>
</div>
@@ -40,108 +30,12 @@ downloadable component for the Android SDK. The downloadable platform includes
an Android library and system image, as well as a set of emulator skins and
more. The downloadable platform includes no external libraries.</p>
-<p>To get started developing or testing against Android {@sdkPlatformVersion},
-use the Android SDK Manager to download the platform into your SDK. For more
-information, see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
-Components</a>. If you are new to Android, <a
-href="{@docRoot}sdk/index.html">download the SDK Starter Package</a> first.</p>
-
-<p>For a high-level introduction to Android {@sdkPlatformVersion}, see the <a
-href="{@docRoot}sdk/android-{@sdkPlatformVersion}-highlights.html">Platform
-Highlights</a>.</p>
-
-<p class="note"><strong>Reminder:</strong> If you've already published an
-Android application, please test and optimize your application on Android 3.0
-and Android 3.1 as soon as possible. You should do so to be sure your
-application provides the best experience possible on the latest Android-powered
-devices. For information about what you can do, read <a
-href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing Apps for
-Android 3.0</a>.</p>
-
-
-<h2 id="relnotes">Revisions</h2>
-
-<p>To determine what revision of the Android {@sdkPlatformVersion} platform you
-have installed, refer to the "Installed Packages" listing in the Android SDK and
-AVD Manager.</p>
-
-
-<div class="toggle-content opened" style="padding-left:1em;">
-
-<p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-opened.png"
-class="toggle-content-img" alt="" />
- Android {@sdkPlatformVersion}, Revision 3</a> <em>(July 2011)</em>
-</a></p>
-
-<div class="toggle-content-toggleme" style="padding-left:2em;">
-
-<dl>
-<dt>Dependencies:</dt>
-<dd>
-<p>Requires <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r12</a> or
-higher.</p>
-</dd>
-<dt>Notes:</dt>
-<dd>
-<p>Improvements to the platform's rendering library to support the visual layout editor in the ADT
-Eclipse plugin. This revision allows for more drawing features in ADT and fixes several
-bugs in the previous rendering library. It also unlocks several editor features that were added in
-ADT 12.</p>
-</dd>
-</dl>
-
-</div>
-</div>
-
-
-<div class="toggle-content closed" style="padding-left:1em;">
-
-<p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png"
-class="toggle-content-img" alt="" />
- Android {@sdkPlatformVersion}, Revision 2</a> <em>(May 2011)</em>
-</a></p>
-
-<div class="toggle-content-toggleme" style="padding-left:2em;">
-
-<dl>
-<dt>Dependencies:</dt>
-<dd>
-<p>Requires <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r11</a> or
-higher.</p>
-</dd>
-<dt>Notes:</dt>
-<dd>
-<p>Fixes an issue with the visual layout editor rendering library that prevented Android 3.1 from
-running in ADT.</p>
-</dd>
-</dl>
-
-</div>
-</div>
-
-
-<div class="toggle-content closed" style="padding-left:1em;">
-
-<p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png"
-class="toggle-content-img" alt="" />
- Android {@sdkPlatformVersion}, Revision 1</a> <em>(May 2011)</em>
-</a></p>
+<p>For developers, the Android {@sdkPlatformVersion} platform is available as a
+downloadable component for the Android SDK. The downloadable platform includes
+an Android library and system image, as well as a set of emulator skins and
+more. To get started developing or testing against Android {@sdkPlatformVersion},
+use the Android SDK Manager to download the platform into your SDK.</p>
-<div class="toggle-content-toggleme" style="padding-left:2em;">
-
-<dl>
-<dt>Dependencies:</dt>
-<dd>
-<p>Requires <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r11</a> or
-higher.</p>
-</dd>
-</dl>
-
-</div>
-</div>
<h2 id="#api" style="margin-top:1.5em;">API Overview</h2>
@@ -236,7 +130,7 @@ accessories (connection of USB hosts), declare this element:
<p>For complete information about how to develop applications that interact with
USB accessories, please see the
-<a href="{@docRoot}guide/topics/usb/index.html">developer documentation</a>.</p>
+<a href="{@docRoot}guide/topics/connectivity/usb/index.html">developer documentation</a>.</p>
<p class="note">To look at sample applications that use the USB host API, see <a
href="{@docRoot}resources/samples/USB/AdbTest/index.html">ADB Test</a> and <a
@@ -930,7 +824,7 @@ devices.</li>
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
&lt;uses-feature&gt;}</a> manifest elements. For more information about
declaring features in an application manifest, read <a
-href="{@docRoot}guide/appendix/market-filters.html">Google Play
+href="{@docRoot}guide/google/play/filters.html">Google Play
Filters</a>.</p>
@@ -965,142 +859,5 @@ also need to add an <code>android:minSdkVersion="{@sdkPlatformApiLevel}"</code>
attribute to the <code>&lt;uses-sdk&gt;</code> element in the application's
manifest.</p>
-<p>For more information about how to use API Level, see the <a
-href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
-
-
-<h2 id="apps">Built-in Applications</h2>
-
-<p>The system image included in the downloadable platform provides these
-built-in applications:</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>API Demos</li>
-<li>Browser</li>
-<li>Calculator</li>
-<li>Camera</li>
-<li>Clock</li>
-<li>Contacts</li>
-<li>Custom Locale</li>
-<li>Dev Tools</li>
-<li>Downloads</li>
-<li>Email</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<ul>
-<li>Gallery</li>
-<li>Gestures Builder</li>
-<li>Messaging</li>
-<li>Music</li>
-<li>Search</li>
-<li>Settings</li>
-<li>Spare Parts</li>
-<li>Speech Recorder</li>
-<li>Widget Preview</li>
-</ul>
-</td>
-</tr>
-</table>
-
-
-<h2 id="locs" style="margin-top:.75em;">Locales</h2>
-
-<p>The system image included in the downloadable SDK platform provides a variety
-of
-built-in locales. In some cases, region-specific strings are available for the
-locales. In other cases, a default version of the language is used. The
-languages that are available in the Android 3.0 system
-image are listed below (with <em>language</em>_<em>country/region</em> locale
-descriptor).</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>Arabic, Egypt (ar_EG)</li>
-<li>Arabic, Israel (ar_IL)</li>
-<li>Bulgarian, Bulgaria (bg_BG)</li>
-<li>Catalan, Spain (ca_ES)</li>
-<li>Czech, Czech Republic (cs_CZ)</li>
-<li>Danish, Denmark(da_DK)</li>
-<li>German, Austria (de_AT)</li>
-<li>German, Switzerland (de_CH)</li>
-<li>German, Germany (de_DE)</li>
-<li>German, Liechtenstein (de_LI)</li>
-<li>Greek, Greece (el_GR)</li>
-<li>English, Australia (en_AU)</li>
-<li>English, Canada (en_CA)</li>
-<li>English, Britain (en_GB)</li>
-<li>English, Ireland (en_IE)</li>
-<li>English, India (en_IN)</li>
-<li>English, New Zealand (en_NZ)</li>
-<li>English, Singapore(en_SG)</li>
-<li>English, US (en_US)</li>
-<li>English, South Africa (en_ZA)</li>
-<li>Spanish (es_ES)</li>
-<li>Spanish, US (es_US)</li>
-<li>Finnish, Finland (fi_FI)</li>
-<li>French, Belgium (fr_BE)</li>
-<li>French, Canada (fr_CA)</li>
-<li>French, Switzerland (fr_CH)</li>
-<li>French, France (fr_FR)</li>
-<li>Hebrew, Israel (he_IL)</li>
-<li>Hindi, India (hi_IN)</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<li>Croatian, Croatia (hr_HR)</li>
-<li>Hungarian, Hungary (hu_HU)</li>
-<li>Indonesian, Indonesia (id_ID)</li>
-<li>Italian, Switzerland (it_CH)</li>
-<li>Italian, Italy (it_IT)</li>
-<li>Japanese (ja_JP)</li>
-<li>Korean (ko_KR)</li>
-<li>Lithuanian, Lithuania (lt_LT)</li>
-<li>Latvian, Latvia (lv_LV)</li>
-<li>Norwegian bokmål, Norway (nb_NO)</li>
-<li>Dutch, Belgium (nl_BE)</li>
-<li>Dutch, Netherlands (nl_NL)</li>
-<li>Polish (pl_PL)</li>
-<li>Portuguese, Brazil (pt_BR)</li>
-<li>Portuguese, Portugal (pt_PT)</li>
-<li>Romanian, Romania (ro_RO)</li>
-<li>Russian (ru_RU)</li></li>
-<li>Slovak, Slovakia (sk_SK)</li>
-<li>Slovenian, Slovenia (sl_SI)</li>
-<li>Serbian (sr_RS)</li>
-<li>Swedish, Sweden (sv_SE)</li>
-<li>Thai, Thailand (th_TH)</li>
-<li>Tagalog, Philippines (tl_PH)</li>
-<li>Turkish, Turkey (tr_TR)</li>
-<li>Ukrainian, Ukraine (uk_UA)</li>
-<li>Vietnamese, Vietnam (vi_VN)</li>
-<li>Chinese, PRC (zh_CN)</li>
-<li>Chinese, Taiwan (zh_TW)</li>
-</td>
-</tr>
-</table>
-
-<p class="note"><strong>Note:</strong> The Android platform may support more
-locales than are included in the SDK system image. All of the supported locales
-are available in the <a href="http://source.android.com/">Android Open Source
-Project</a>.</p>
-
-<h2 id="skins">Emulator Skins</h2>
-
-<p>The downloadable platform includes the following emulator skin:</p>
-
-<ul>
- <li>
- WXGA (1280x800, medium density, xlarge screen)
- </li>
-</ul>
-
-<p>For more information about how to develop an application that displays
-and functions properly on all Android-powered devices, see <a
-href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
-Screens</a>.</p> \ No newline at end of file
+<p>For more information, read <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API
+Level?</a></p>
diff --git a/docs/html/sdk/android-3.2.jd b/docs/html/about/versions/android-3.2.jd
index 27df22cba0d9..02111a058737 100644
--- a/docs/html/sdk/android-3.2.jd
+++ b/docs/html/about/versions/android-3.2.jd
@@ -8,13 +8,9 @@ sdk.platform.apiLevel=13
<h2>In this document</h2>
<ol>
- <li><a href="#relnotes">Revisions</a></li>
<li><a href="#highlights">Highlights</a></li>
<li><a href="#api">API Overview</a></li>
<li><a href="#api-level">API Level</a></li>
- <li><a href="#apps">Built-in Applications</a></li>
- <li><a href="#locs">Locales</a></li>
- <li><a href="#skins">Emulator Skins</a></li>
</ol>
<h2>Reference</h2>
@@ -24,22 +20,12 @@ href="{@docRoot}sdk/api_diff/13/changes.html">API
Differences Report &raquo;</a> </li>
</ol>
-<h2>See Also</h2>
-<ol>
- <li><a href="{@docRoot}guide/practices/screens_support.html">Supporting
- Multiple Screens</a></li>
- <li><a href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing
-Apps for Android 3.x</a></li>
-</ol>
-
</div>
</div>
<p><em>API Level:</em>&nbsp;<strong>{@sdkPlatformApiLevel}</strong></p>
-<p>Welcome to Android 3.2!</p>
-
<p>Android 3.2 is an incremental platform release that adds new
capabilities for users and developers. The sections below provide an overview
of the new features and developer APIs.</p>
@@ -47,46 +33,10 @@ of the new features and developer APIs.</p>
<p>For developers, the Android {@sdkPlatformVersion} platform is available as a
downloadable component for the Android SDK. The downloadable platform includes
an Android library and system image, as well as a set of emulator skins and
-more. The downloadable platform includes no external libraries.</p>
-
-<p>To get started developing or testing against Android {@sdkPlatformVersion},
-use the Android SDK Manager to download the platform into your SDK. For more
-information, see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
-Components</a>. If you are new to Android, <a
-href="{@docRoot}sdk/index.html">download the SDK Starter Package</a> first.</p>
-
-<p class="note"><strong>Reminder:</strong> If you've already published an
-Android application, please test and optimize your application on Android 3.2 as
-soon as possible. You should do so to be sure your application provides the best
-experience possible on the latest Android-powered devices. For information about
-what you can do, read <a
-href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing Apps for
-Android 3.x</a>.</p>
-
-
-<h2 id="relnotes">Revisions</h2>
-
-<p>To determine what revision of the Android {@sdkPlatformVersion} platform you
-have installed, refer to the "Installed Packages" listing in the Android SDK and
-AVD Manager.</p>
-
-
-<div class="toggle-content opened" style="padding-left:1em;">
-
- <p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-opened.png"
-class="toggle-content-img" alt="" />
- Android {@sdkPlatformVersion}, Revision 1</a> <em>(July 2011)</em>
- </a></p>
+more. To get started developing or testing against Android {@sdkPlatformVersion},
+use the Android SDK Manager to download the platform into your SDK.</p>
- <div class="toggle-content-toggleme" style="padding-left:2em;">
-<dl>
-<dt>Initial release. SDK Tools r12 or higher is recommended.</dt>
-</dl>
-
- </div>
-</div>
<h2 id="highlights" style="margin-top:1.5em;">Platform Highlights</h2>
@@ -288,7 +238,7 @@ size qualifiers</a>.</p>
<h4>New manifest attributes for screen-size compatibility</h4>
<p>The framework offers a new set of <a
-href="{@docRoot}"><code>&lt;supports-screens&gt;</code></a> manifest attributes that let
+href="{@docRoot}guide/topics/manifest/supports-screens-element.html"><code>&lt;supports-screens&gt;</code></a> manifest attributes that let
you manage your app's support for different screen sizess.
Specifically, you can specify the largest and smallest screens on which your app
is designed to run, as well as the largest screen on which it is designed run
@@ -600,142 +550,7 @@ also need to add an <code>android:minSdkVersion="{@sdkPlatformApiLevel}"</code>
attribute to the <code>&lt;uses-sdk&gt;</code> element in the application's
manifest.</p>
-<p>For more information about how to use API Level, see the <a
-href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
-
+<p>For more information, read <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API
+Level?</a></p>
-<h2 id="apps">Built-in Applications</h2>
-<p>The system image included in the downloadable platform provides these
-built-in applications:</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>API Demos</li>
-<li>Browser</li>
-<li>Calculator</li>
-<li>Camera</li>
-<li>Clock</li>
-<li>Contacts</li>
-<li>Custom Locale</li>
-<li>Dev Tools</li>
-<li>Downloads</li>
-<li>Email</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<ul>
-<li>Gallery</li>
-<li>Gestures Builder</li>
-<li>Messaging</li>
-<li>Music</li>
-<li>Search</li>
-<li>Settings</li>
-<li>Spare Parts</li>
-<li>Speech Recorder</li>
-<li>Widget Preview</li>
-</ul>
-</td>
-</tr>
-</table>
-
-
-<h2 id="locs" style="margin-top:.75em;">Locales</h2>
-
-<p>The system image included in the downloadable SDK platform provides a variety
-of
-built-in locales. In some cases, region-specific strings are available for the
-locales. In other cases, a default version of the language is used. The
-languages that are available in the Android 3.0 system
-image are listed below (with <em>language</em>_<em>country/region</em> locale
-descriptor).</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>Arabic, Egypt (ar_EG)</li>
-<li>Arabic, Israel (ar_IL)</li>
-<li>Bulgarian, Bulgaria (bg_BG)</li>
-<li>Catalan, Spain (ca_ES)</li>
-<li>Czech, Czech Republic (cs_CZ)</li>
-<li>Danish, Denmark(da_DK)</li>
-<li>German, Austria (de_AT)</li>
-<li>German, Switzerland (de_CH)</li>
-<li>German, Germany (de_DE)</li>
-<li>German, Liechtenstein (de_LI)</li>
-<li>Greek, Greece (el_GR)</li>
-<li>English, Australia (en_AU)</li>
-<li>English, Canada (en_CA)</li>
-<li>English, Britain (en_GB)</li>
-<li>English, Ireland (en_IE)</li>
-<li>English, India (en_IN)</li>
-<li>English, New Zealand (en_NZ)</li>
-<li>English, Singapore(en_SG)</li>
-<li>English, US (en_US)</li>
-<li>English, Zimbabwe (en_ZA)</li>
-<li>Spanish (es_ES)</li>
-<li>Spanish, US (es_US)</li>
-<li>Finnish, Finland (fi_FI)</li>
-<li>French, Belgium (fr_BE)</li>
-<li>French, Canada (fr_CA)</li>
-<li>French, Switzerland (fr_CH)</li>
-<li>French, France (fr_FR)</li>
-<li>Hebrew, Israel (he_IL)</li>
-<li>Hindi, India (hi_IN)</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<li>Croatian, Croatia (hr_HR)</li>
-<li>Hungarian, Hungary (hu_HU)</li>
-<li>Indonesian, Indonesia (id_ID)</li>
-<li>Italian, Switzerland (it_CH)</li>
-<li>Italian, Italy (it_IT)</li>
-<li>Japanese (ja_JP)</li>
-<li>Korean (ko_KR)</li>
-<li>Lithuanian, Lithuania (lt_LT)</li>
-<li>Latvian, Latvia (lv_LV)</li>
-<li>Norwegian bokmål, Norway (nb_NO)</li>
-<li>Dutch, Belgium (nl_BE)</li>
-<li>Dutch, Netherlands (nl_NL)</li>
-<li>Polish (pl_PL)</li>
-<li>Portuguese, Brazil (pt_BR)</li>
-<li>Portuguese, Portugal (pt_PT)</li>
-<li>Romanian, Romania (ro_RO)</li>
-<li>Russian (ru_RU)</li></li>
-<li>Slovak, Slovakia (sk_SK)</li>
-<li>Slovenian, Slovenia (sl_SI)</li>
-<li>Serbian (sr_RS)</li>
-<li>Swedish, Sweden (sv_SE)</li>
-<li>Thai, Thailand (th_TH)</li>
-<li>Tagalog, Philippines (tl_PH)</li>
-<li>Turkish, Turkey (tr_TR)</li>
-<li>Ukrainian, Ukraine (uk_UA)</li>
-<li>Vietnamese, Vietnam (vi_VN)</li>
-<li>Chinese, PRC (zh_CN)</li>
-<li>Chinese, Taiwan (zh_TW)</li>
-</td>
-</tr>
-</table>
-
-<p class="note"><strong>Note:</strong> The Android platform may support more
-locales than are included in the SDK system image. All of the supported locales
-are available in the <a href="http://source.android.com/">Android Open Source
-Project</a>.</p>
-
-<h2 id="skins">Emulator Skins</h2>
-
-<p>The downloadable platform includes the following emulator skin:</p>
-
-<ul>
- <li>
- WXGA (1280x800, medium density, xlarge screen)
- </li>
-</ul>
-
-<p>For more information about how to develop an application that displays
-and functions properly on all Android-powered devices, see <a
-href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
-Screens</a>.</p>
diff --git a/docs/html/sdk/android-4.0-highlights.jd b/docs/html/about/versions/android-4.0-highlights.jd
index 98f467d54813..9fdb02c8815b 100644
--- a/docs/html/sdk/android-4.0-highlights.jd
+++ b/docs/html/about/versions/android-4.0-highlights.jd
@@ -1,4 +1,4 @@
-page.title=Android 4.0 Platform Highlights
+page.title=Ice Cream Sandwich
@jd:body
@@ -15,7 +15,6 @@ page.title=Android 4.0 Platform Highlights
#jd-content div.video {
float:right;
padding:0 0 40px 60px;
- margin-top:-30px;
}
#jd-content table.columns {
margin:0 0 1em 0;
@@ -38,11 +37,6 @@ page.title=Android 4.0 Platform Highlights
}
</style>
-<div class="video">
-<iframe width="380" height="223" src="http://www.youtube.com/embed/-F_ke3rxopc?hd=1" frameborder="0"
-allowfullscreen></iframe>
-</div>
-
<p>Welcome to Android 4.0!</p>
<p>Android 4.0 delivers a refined, unified UI for phones and tablets and
@@ -50,7 +44,7 @@ introduces innovative features for users and developers. This document provides
a glimpse of the many new features and technologies that make Android 4.0
simple, beautiful, and beyond smart. <!--For technical details about
new developer APIs described below, see the <a
-href="{@docRoot}sdk/android-4.0.html">Android 4.0 API Overview</a>
+href="{@docRoot}about/versions/android-4.0.html">Android 4.0 API Overview</a>
document.--></p>
<ul>
@@ -61,12 +55,16 @@ document.--></p>
<h2 id="UserFeatures" style="clear:right">Android 4.0 for Users</h2>
<div style="padding-bottom:0em;">
-<a href="{@docRoot}sdk/images/4.0/home-lg.png" target="_android"><img style="float:right;xborder:1px solid #ddd;border-radius: 5px;" src="{@docRoot}sdk/images/4.0/home.png" alt="" height="300" width="180" /></a>
-<a href="{@docRoot}sdk/images/4.0/lock-lg.png" target="_android"><img style="float:right;border:1px solid #ddd;border-radius: 5px;" src="{@docRoot}sdk/images/4.0/lock.png" alt="" height="300" width="180" /></a>
+<a href="{@docRoot}sdk/images/4.0/home-lg.png" target="_android"><img
+style="margin-left:10px;float:right;xborder:1px solid #ddd;border-radius: 5px;"
+src="{@docRoot}sdk/images/4.0/home.png" alt="" height="300" width="180" /></a>
+<a href="{@docRoot}sdk/images/4.0/lock-lg.png" target="_android"><img
+style="margin-left:20px;float:right;border:1px solid #ddd;border-radius: 5px;"
+src="{@docRoot}sdk/images/4.0/lock.png" alt="" height="300" width="180" /></a>
</div>
-<h3 id="simple" style="color:#172861">Simple, beautiful, beyond smart</h3>
+<h3 id="simple" style="color:#258AAF">Simple, beautiful, beyond smart</h3>
<p>Android 4.0 builds on the things people love most about Android &mdash; easy
multitasking, rich notifications, customizable home screens, resizable widgets,
@@ -98,16 +96,23 @@ thumbnail switches to the app.</p>
<div style="padding-top:0em;">
<div style="margin-right:.5em;float:left;width:182px;padding-top:.5em;">
<a href="{@docRoot}sdk/images/4.0/tasks-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/tasks.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>
-<div style="padding-left:1em;padding-bottom:1em;font-size:.9em;padding-right:1em;">The Recent Apps list makes multitasking simple.</div>
+<img src="{@docRoot}sdk/images/4.0/tasks.png" alt="" height="240" width="144" style="border:1px
+solid #ddd;border-radius: 6px;" /></a>
+<div style="padding-bottom:1em;font-size:.9em;padding-right:1em;">The Recent Apps list makes
+multitasking simple.</div>
<a href="{@docRoot}sdk/images/4.0/lock-camera-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/lock-camera.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>
-<div style="padding-left:1em;padding-bottom:1em;font-size:.9em;padding-right:1.75em;">Jump to the camera or see notifications without unlocking.</div>
+<img src="{@docRoot}sdk/images/4.0/lock-camera.png" alt="" height="240" width="144"
+style="border:1px solid #ddd;border-radius: 6px;" /></a>
+<div style="padding-bottom:1em;font-size:.9em;padding-right:1.75em;">Jump to the camera or see
+notifications without unlocking.</div>
<a href="{@docRoot}sdk/images/4.0/contact-call-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/contact-call.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;padding:0" /></a>
+<img src="{@docRoot}sdk/images/4.0/contact-call.png" alt="" height="240" width="144"
+style="border:1px solid #ddd;border-radius: 6px;padding:0" /></a>
<!--<a href="{@docRoot}sdk/images/4.0/quick-response-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/quick-responses-new.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>-->
-<div style="padding-left:1em;padding-bottom:.5em;font-size:.9em;padding-right:1.75em;">For incoming calls, you can respond instantly by&nbsp;text.</div>
+<img src="{@docRoot}sdk/images/4.0/quick-responses-new.png" alt="" height="240" width="144"
+style="border:1px solid #ddd;border-radius: 6px;" /></a>-->
+<div style="padding-bottom:.5em;font-size:.9em;padding-right:1.75em;">For incoming calls, you can
+respond instantly by&nbsp;text.</div>
</div>
</div>
@@ -118,12 +123,18 @@ top of the screen, while on larger-screen devices they appear in the System
Bar.</p>
<div style="padding-top:0em;">
-<div style="margin-right:1em;float:right;margin-left:1em;margin-top:.5em;margin-bottom:0;padding-bottom:0;width:326px">
+<div
+style="float:right;margin-left:20px;margin-top:.5em;margin-bottom:0;padding-bottom:
+0 ; width:326px">
<a href="{@docRoot}sdk/images/4.0/allapps-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/allapps.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>
+<img src="{@docRoot}sdk/images/4.0/allapps.png" alt="" height="240" width="144" style="border:1px
+solid #ddd;border-radius: 6px;" /></a>
<a href="{@docRoot}sdk/images/4.0/calendar-widget-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/calendar-widget.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>
-<div style="padding-left:1em;padding-bottom:1em;margin-top:0;padding-top:0;font-size:.9em"><!--<strong>Figure 3.</strong>-->The All Apps launcher (left) and resizable widgets (right) give you apps and rich content from the home screen.</div>
+<img src="{@docRoot}sdk/images/4.0/calendar-widget.png" alt="" height="240" width="144"
+style="border:1px solid #ddd;border-radius: 6px;" /></a>
+<div style="padding-bottom:1em;margin-top:0;padding-top:0;font-size:.9em"><!--<strong>Figure
+3.</strong>-->The All Apps launcher (left) and resizable widgets (right) give you apps and rich
+content from the home screen.</div>
</div>
</div>
@@ -181,13 +192,19 @@ easier. Users can now dismiss individual notifications, apps from the Recent
Apps list, and browser tabs with a simple swipe of a finger. </p>
<div style="padding-top:0em;">
-<div style="margin-right:1em;float:right;margin-left:1em;margin-top:1.5em;margin-bottom:0;padding-bottom:0;width:200px">
+<div
+style="float:right;margin-left:20px;margin-top:1.5em;margin-bottom:0;padding-bottom
+: 0 ; width:200px">
<a href="{@docRoot}sdk/images/4.0/text-replace-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/text-replace.png" alt="" width="190" style="border:1px solid #ddd;border-radius: 6px;" /></a>
-<div style="padding-left:1em;padding-bottom:1.25em;margin-top:0;padding-top:0;font-size:.9em"><!--<strong>Figure 3.</strong>-->A spell-checker lets you find errors and fix them faster. </div>
+<img src="{@docRoot}sdk/images/4.0/text-replace.png" alt="" width="190" style="border:1px solid
+#ddd;border-radius: 6px;" /></a>
+<div style="padding-bottom:1.25em;margin-top:0;padding-top:0;font-size:.9em"><!--<strong>Figure
+3.</strong>-->A spell-checker lets you find errors and fix them faster. </div>
<a href="{@docRoot}sdk/images/4.0/tts-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/tts.png" alt="" width="190" style="border:1px solid #ddd;border-radius: 6px;" /></a>
-<div style="padding-left:1em;padding-bottom:1.25em;margin-top:0;padding-top:0;font-size:.9em">A powerful voice input engine lets you dictate continously.</div>
+<img src="{@docRoot}sdk/images/4.0/tts.png" alt="" width="190" style="border:1px solid
+#ddd;border-radius: 6px;" /></a>
+<div style="padding-bottom:1.25em;margin-top:0;padding-top:0;font-size:.9em">A powerful voice input
+engine lets you dictate continously.</div>
</div>
</div>
@@ -225,10 +242,14 @@ quickly replace them from a list of suggestions.</p>
<div style="padding-top:0em;">
<div style="margsin-right:.8em;float:left;width:350px;padding-top:1em;">
<a href="{@docRoot}sdk/images/4.0/usage-all-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/usage-all.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>
+<img src="{@docRoot}sdk/images/4.0/usage-all.png" alt="" height="240" width="144" style="border:1px
+solid #ddd;border-radius: 6px;" /></a>
<a href="{@docRoot}sdk/images/4.0/usage-maps-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/usage-maps.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>
-<div style="padding-left:1em;padding-bottom:1em;font-size:.9em;padding-right:1.75em;"><!--<strong>Figure 3.</strong>--> Data usage controls let you monitor total usage by network type and application and then set limits if needed.</div>
+<img src="{@docRoot}sdk/images/4.0/usage-maps.png" alt="" height="240" width="144" style="border:1px
+solid #ddd;border-radius: 6px;" /></a>
+<div style="padding-bottom:1em;font-size:.9em;padding-right:1.75em;"><!--<strong>Figure
+3.</strong>--> Data usage controls let you monitor total usage by network type and application and
+then set limits if needed.</div>
</div>
</div>
@@ -270,19 +291,27 @@ accessibility features are active, everything visible on the screen can be
spoken aloud by the standard screen reader.</p>
-<h3 id="comms" style="color:#172861">Communication and sharing</h3>
+<h3 id="comms" style="color:#258AAF">Communication and sharing</h3>
<div style="padding-top:0em;">
-<div style="margin-right:1em;float:right;margin-left:.5em;margin-top:1.5em;margin-bottom:0;padding-bottom:0;width:490px">
-<!--<img src="{@docRoot}sdk/images/4.0/contact-call.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;" />-->
+<div
+style="float:right;margin-left:20px;margin-top:1.5em;margin-bottom:0;padding-bottom
+: 0 ; width:490px">
+<!--<img src="{@docRoot}sdk/images/4.0/contact-call.png" alt="" height="240" width="144"
+style="border:1px solid #ddd;border-radius: 6px;" />-->
<a href="{@docRoot}sdk/images/4.0/contact-faves-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/contact-faves.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;padding:0" /></a>
+<img src="{@docRoot}sdk/images/4.0/contact-faves.png" alt="" height="240" width="144"
+style="border:1px solid #ddd;border-radius: 6px;padding:0" /></a>
<a href="{@docRoot}sdk/images/4.0/contact-connect-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/contact-connect.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;padding:0" /></a>
+<img src="{@docRoot}sdk/images/4.0/contact-connect.png" alt="" height="240" width="144"
+style="border:1px solid #ddd;border-radius: 6px;padding:0" /></a>
<a href="{@docRoot}sdk/images/4.0/contact-email-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/contact-email.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;padding:0" /></a>
+<img src="{@docRoot}sdk/images/4.0/contact-email.png" alt="" height="240" width="144"
+style="border:1px solid #ddd;border-radius: 6px;padding:0" /></a>
-<div style="padding-left:1em;padding-bottom:1.25em;margin-top:0;padding-top:0;font-size:.9em"><!--<strong>Figure 3.</strong>-->Contacts and profiles are integrated across apps and social networks, for a consistent, personal experience everywhere &mdash; from incoming calls to emails.</div>
+<div style="padding-bottom:1.25em;margin-top:0;padding-top:0;font-size:.9em"><!--<strong>Figure
+3.</strong>-->Contacts and profiles are integrated across apps and social networks, for a
+consistent, personal experience everywhere &mdash; from incoming calls to emails.</div>
</div>
</div>
@@ -327,14 +356,18 @@ their own voice messages, transcriptions, and more to the visual voicemail
inbox. </p>
<div style="padding-top:0em;">
-<div style="margsin-right:0em;float:left;width:282px;padding-top:1em;">
+<div style="margin-right:0em;float:left;width:282px;padding-top:1em;">
<a href="{@docRoot}sdk/images/4.0/camera-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/camera.png" alt="" width="240" height="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>
+<img src="{@docRoot}sdk/images/4.0/camera.png" alt="" width="240" height="144" style="border:1px
+solid #ddd;border-radius: 6px;" /></a>
<a href="{@docRoot}sdk/images/4.0/gallery-edit-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/gallery-edit.png" alt="" width="240" height="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>
+<img src="{@docRoot}sdk/images/4.0/gallery-edit.png" alt="" width="240" height="144"
+style="border:1px solid #ddd;border-radius: 6px;" /></a>
<a href="{@docRoot}sdk/images/4.0/gallery-share-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/gallery-share.png" alt="" width="240" height="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>
-<div style="padding-left:1em;padding-bottom:1em;font-size:.9em;padding-right:2.75em;">Capture the picture you want, edit, and share instantly. </div>
+<img src="{@docRoot}sdk/images/4.0/gallery-share.png" alt="" width="240" height="144"
+style="border:1px solid #ddd;border-radius: 6px;" /></a>
+<div style="padding-bottom:1em;font-size:.9em;padding-right:2.75em;">Capture the picture you want,
+edit, and share instantly. </div>
</div>
</div>
@@ -370,9 +403,13 @@ the camera controls. </p>
<div style="padding-top:0em;">
-<div style="margin-right:1em;float:right;margin-left:1em;padding-top:1em;margin-bottom:1em;padding-bottom:0;width:160px">
-<img src="{@docRoot}sdk/images/4.0/gallery-widget.png" alt="" width="144" style="border:1px solid #ddd;border-radius: 6px;" />
-<div style="padding-left:1em;padding-bottom:1.25em;margin-top:0;padding-top:0;font-size:.9em">A Photo Gallery widget on the home screen.</div>
+<div
+style="float:right;margin-left:20px;padding-top:1em;margin-bottom:1em;padding-
+bottom : 0 ;width:160px">
+<img src="{@docRoot}sdk/images/4.0/gallery-widget.png" alt="" width="144" style="border:1px solid
+#ddd;border-radius: 6px;" />
+<div style="padding-bottom:1.25em;margin-top:0;padding-top:0;font-size:.9em">A Photo Gallery widget
+on the home screen.</div>
</div>
<p style="margin-top:1em;margin-bottom:.75em;"><strong>Redesigned Gallery app
@@ -395,13 +432,18 @@ adding the widget to the home screen, users can flick through the photo stacks
to locate the image they want, then tap to load it in Gallery. </p>
<div style="padding-top:0em;clear:right;">
-<div style="margin-right:1em;float:right;margin-left:1em;padding-top:1em;margin-bottom:1em;padding-bottom:0;width:320px">
-<img src="{@docRoot}sdk/images/4.0/live-effects.png" alt="" width="297" style="border:1px solid #ddd;border-radius: 6px;" />
-<div style="padding-left:1em;padding-bottom:1em;margin-top:0;padding-top:0;font-size:.9em">Live Effects let you change backgrounds and use Silly Faces during video.</div>
+<div
+style="float:right;margin-left:20px;padding-top:1em;margin-bottom:1em;padding-
+bottom : 0 ;width:320px">
+<img src="{@docRoot}sdk/images/4.0/live-effects.png" alt="" width="297" style="border:1px solid
+#ddd;border-radius: 6px;" />
+<div style="padding-bottom:1em;margin-top:0;padding-top:0;font-size:.9em">Live Effects let you
+change backgrounds and use Silly Faces during video.</div>
</div>
</div>
-<p style="margin-top:1em;margin-bottom:.75em;"><strong>Live Effects for transforming video</strong></p>
+<p style="margin-top:1em;margin-bottom:.75em;"><strong>Live Effects for transforming
+video</strong></p>
<p>Live Effects is a collection of graphical transformations that add interest
and fun to videos captured in the Camera app. For example, users can
@@ -416,8 +458,10 @@ Google Talk app.</p>
<div style="padding-top:0em;">
<div style="margsin-right:.8em;float:left;width:186px;padding-top:1em;">
<a href="{@docRoot}sdk/images/4.0/screenshot-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/screenshot.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>
-<div style="padding-left:1em;padding-bottom:1.25em;margin-top:0;padding-top:0;font-size:.9em"> Snapping a screenshot.</div>
+<img src="{@docRoot}sdk/images/4.0/screenshot.png" alt="" height="240" width="144"
+style="border:1px solid #ddd;border-radius: 6px;" /></a>
+<div style="padding-bottom:1.25em;margin-top:0;padding-top:0;font-size:.9em"> Snapping a
+screenshot.</div>
</div>
</div>
</div>
@@ -430,17 +474,24 @@ store it locally. Afterward, they can view, edit, and share the screen shot in
Gallery or a similar app.</p>
-<h3 id="cloud" style="color:#172861">Cloud-connected experience</h3>
+<h3 id="cloud" style="color:#258AAF">Cloud-connected experience</h3>
<div style="padding-top:0em;">
-<div style="margin-right:1em;float:right;margin-left:1em;padding-top:1em;margin-bottom:0;padding-bottom:0;width:326px">
+<div
+style="float:right;margin-left:20px;padding-top:1em;margin-bottom:0;padding-bottom:
+0 ; width:326px">
<a href="{@docRoot}sdk/images/4.0/browser-tabs-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/browser-tabs.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>
+<img src="{@docRoot}sdk/images/4.0/browser-tabs.png" alt="" height="240" width="144"
+style="border:1px solid #ddd;border-radius: 6px;" /></a>
<a href="{@docRoot}sdk/images/4.0/browser-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/browser.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>
-<div style="padding-left:1em;padding-bottom:1.25em;margin-top:0;padding-top:0;font-size:.9em"><!--<strong>Figure 3.</strong>-->The Browser tabs menu <em>(left)</em> lets you quickly switch browser tabs. The options menu <em>(right)</em> gives you new ways to manage your browsing experience.</div>
+<img src="{@docRoot}sdk/images/4.0/browser.png" alt="" height="240" width="144" style="border:1px
+solid #ddd;border-radius: 6px;" /></a>
+<div style="padding-bottom:1.25em;margin-top:0;padding-top:0;font-size:.9em"><!--<strong>Figure
+3.</strong>-->The Browser tabs menu <em>(left)</em> lets you quickly switch browser tabs. The
+options menu <em>(right)</em> gives you new ways to manage your browsing experience.</div>
<img src="{@docRoot}sdk/images/4.0/bbench.png" alt="" width="310" />
-<div style="padding-left:1em;padding-bottom:1em;margin-top:0;padding-top:0;font-size:.9em">Benchmark comparisons of Android Browser.</div>
+<div style="padding-bottom:1em;margin-top:0;padding-top:0;font-size:.9em">Benchmark comparisons of
+Android Browser.</div>
</div>
</div>
@@ -509,12 +560,15 @@ screen, then jump into the Email app to compose or reply.</p>
<div style="padding-top:0em;">
<div style="margsin-right:.8em;float:left;width:186px;padding-top:1em;">
<a href="{@docRoot}sdk/images/4.0/beam-lg.png" target="_android">
-<img src="{@docRoot}sdk/images/4.0/beam.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>
-<div style="padding-left:1em;padding-bottom:1em;margin-top:0;padding-top:0;font-size:.9em;padding-right:1.5em;">Android Beam lets users share what they are using with a single tap.</div>
+<img src="{@docRoot}sdk/images/4.0/beam.png" alt="" height="240" width="144" style="border:1px solid
+#ddd;border-radius: 6px;" /></a>
+<div
+style="padding-bottom:1em;margin-top:0;padding-top:0;font-size:.9em;padding-right:1.5em;">Android
+Beam lets users share what they are using with a single tap.</div>
</div>
</div>
-<h3 id="innovation" style="color:#172861">Innovation</h3>
+<h3 id="innovation" style="color:#258AAF">Innovation</h3>
<p>Android is continously driving innovation forward, pushing the boundaries of
communication and sharing with new capabilities and interactions.</p>
@@ -535,10 +589,13 @@ Android Beam to add other types of interactions, such as passing game scores,
initiating a multiplayer game or chat, and more.</p>
<div style="padding-top:0em;">
-<div style="margin-right:1em;float:right;margin-left:1em;margin-top:.5em;margin-bottom:0;padding-bottom:0;width:160px">
+<div
+style="float:right;margin-left:20px;margin-top:.5em;margin-bottom:0;padding-bottom:
+0 ; width:160px">
<a href="{@docRoot}sdk/images/4.0/face-unlock-lg.png" target="_android">
<img src="{@docRoot}sdk/images/4.0/face-unlock.png" alt="" height="240" width="144" style="border:1px solid #ddd;border-radius: 6px;" /></a>
-<div style="padding-left:1em;padding-bottom:1em;margin-top:0;padding-top:0;font-size:.9em">Face recognition lets you unlock your phone with your face.</div>
+<div style="padding-bottom:1em;margin-top:0;padding-top:0;font-size:.9em">Face recognition lets you
+unlock your phone with your face.</div>
</div>
</div>
@@ -593,8 +650,8 @@ consistent design practices, simplified code and resources, and streamlined
development across the range of Android-powered devices.</p>
<div class="sidebox-wrapper">
-<div class="sidebox" style="border-left:1px solid #22a5ca;background-color:#fff;">
- <h3>Key Android 3.x developer features, <br>now for phones too</h3>
+<div class="sidebox">
+ <h3>Key Honeycomb developer features, <br>now for phones too</h3>
<p>Core UI</p>
<ul>
diff --git a/docs/html/sdk/android-4.0.3.jd b/docs/html/about/versions/android-4.0.3.jd
index f6dbee066a6e..b7d4db3c5229 100644
--- a/docs/html/sdk/android-4.0.3.jd
+++ b/docs/html/about/versions/android-4.0.3.jd
@@ -8,13 +8,9 @@ sdk.platform.apiLevel=15
<h2>In this document</h2>
<ol>
- <li><a href="#relnotes">Revisions</a></li>
<li><a href="#api">API Overview</a></li>
<li><a href="#Honeycomb">Previous APIs</a></li>
<li><a href="#api-level">API Level</a></li>
- <li><a href="#apps">Built-in Applications</a></li>
- <li><a href="#locs">Locales</a></li>
- <li><a href="#skins">Emulator Skins</a></li>
</ol>
<h2>Reference</h2>
@@ -34,100 +30,17 @@ Differences Report &raquo;</a> </li>
users and developers, API changes, and various bug fixes.</p>
<p>For developers, the Android {@sdkPlatformVersion} platform is available as a
-downloadable component for the Android SDK. The development platform includes a
-fully compliant Android library and system image as well as a set of emulator
-skins, sample applications, and more. The downloadable platform includes no
-external libraries.</p>
+downloadable component for the Android SDK. The downloadable platform includes
+an Android library and system image, as well as a set of emulator skins and
+more. To get started developing or testing against Android {@sdkPlatformVersion},
+use the Android SDK Manager to download the platform into your SDK.</p>
-<p>To start developing or testing against Android {@sdkPlatformVersion},
-use the Android SDK Manager to download the platform into your SDK. For more
-information, see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
-Components</a>. If you are new to Android, <a
-href="{@docRoot}sdk/index.html">download the SDK Starter Package</a> first.</p>
-
-<p>For a high-level overview of the new user and developer features, see the
-<a href="http://developer.android.com/sdk/android-4.0-highlights.html">Platform
-Highlights</a>.</p>
-
-
-<h2 id="relnotes">Development Platform Revisions</h2>
-
-<p>The sections below provide notes about successive revisions of the Android
-{@sdkPlatformVersion} development platform for the Android SDK, as denoted by
-revision number. To determine what revisions you have installed in your SDK
-environment, refer to the "Installed Packages" listing in the Android SDK
-Manager.</p>
-
-<p class="caution"><strong>Important:</strong> To download the new Android
-4.0.x system components from the Android SDK Manager, you must first update the
-SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not,
-the Android 4.0.x system components will not be available for download.</p>
-
-<div class="toggle-content opened" style="padding-left:1em;">
-
- <p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-opened.png"
-class="toggle-content-img" alt="" />
- Revision 3</a> <em>(March 2012)</em>
- </a></p>
-
- <div class="toggle-content-toggleme" style="padding-left:2em;">
-
- <p>Maintenance update. The system version is 4.0.4.</p>
- <p class="note"><strong>Note:</strong> This system image includes support for emulator
-hardware graphics acceleration when used with SDK Tools r17 or higher.
-(<a href="{@docRoot}guide/developing/devices/emulator.html#accel-graphics">more info</a>)</p>
- <dl>
- <dt>Dependencies:</dt>
- <dd>SDK Tools r17 or higher is required.</dd>
- </dl>
-
- </div>
-</div>
-
-<div class="toggle-content closed" style="padding-left:1em;">
-
- <p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png"
-class="toggle-content-img" alt="" />
- Revision 2</a> <em>(January 2012)</em>
- </a></p>
-
- <div class="toggle-content-toggleme" style="padding-left:2em;">
-
- <p>Maintenance update. The system version is 4.0.3.</p>
- <dl>
- <dt>Dependencies:</dt>
- <dd>SDK Tools r14 or higher is required.</dd>
- </dl>
-
- </div>
-</div>
-
-<div class="toggle-content closed" style="padding-left:1em;">
-
- <p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png"
-class="toggle-content-img" alt="" />
- Revision 1</a> <em>(December 2011)</em>
- </a></p>
-
- <div class="toggle-content-toggleme" style="padding-left:2em;">
-
- <p>Initial release. The system version is 4.0.3.</p>
- <dl>
- <dt>Dependencies:</dt>
- <dd>SDK Tools r14 or higher is required.</dd>
- </dl>
-
- </div>
-</div>
<h2 id="api">API Overview</h2>
<p>The sections below provide a technical overview of new APIs in Android 4.0.3.</p>
-<div class="toggle-content closed" style="padding-left:1em;">
+<div class="toggle-content closed">
<p><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-closed.png"
@@ -386,170 +299,6 @@ higher. Depending on your needs, you might also need to add an
<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code &lt;uses-sdk&gt;}</a>
element.</p>
-<p>For more information, see the <a href="{@docRoot}guide/appendix/api-levels.html">API Levels</a>
+<p>For more information, see the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a>
document. </p>
-
-<h2 id="apps">Built-in Applications</h2>
-
-<p>The system image included in the downloadable platform provides these
-built-in applications:</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>API Demos</li>
-<li>Browser</li>
-<li>Calculator</li>
-<li>Calendar</li>
-<li>Camera</li>
-<li>Clock</li>
-<li>Custom Locale</li>
-<li>Dev Tools</li>
-<li>Downloads</li>
-<li>Email</li>
-<li>Gallery</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<ul>
-<li>Gestures Builder</li>
-<li>Messaging</li>
-<li>Music</li>
-<li>People</li>
-<li>Phone</li>
-<li>Search</li>
-<li>Settings</li>
-<li>Speech Recorder</li>
-<li>Widget Preview</li>
-</ul>
-</td>
-</tr>
-</table>
-
-
-<h2 id="locs" style="margin-top:.75em;">Locales</h2>
-
-<p>The system image included in the downloadable SDK platform provides a variety of built-in
-locales. In some cases, region-specific strings are available for the locales. In other cases, a
-default version of the language is used. The languages that are available in the Android 3.0 system
-image are listed below (with <em>language</em>_<em>country/region</em> locale descriptor).</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>Arabic, Egypt (ar_EG)</li>
-<li>Arabic, Israel (ar_IL)</li>
-<li>Bulgarian, Bulgaria (bg_BG)</li>
-<li>Catalan, Spain (ca_ES)</li>
-<li>Czech, Czech Republic (cs_CZ)</li>
-<li>Danish, Denmark(da_DK)</li>
-<li>German, Austria (de_AT)</li>
-<li>German, Switzerland (de_CH)</li>
-<li>German, Germany (de_DE)</li>
-<li>German, Liechtenstein (de_LI)</li>
-<li>Greek, Greece (el_GR)</li>
-<li>English, Australia (en_AU)</li>
-<li>English, Canada (en_CA)</li>
-<li>English, Britain (en_GB)</li>
-<li>English, Ireland (en_IE)</li>
-<li>English, India (en_IN)</li>
-<li>English, New Zealand (en_NZ)</li>
-<li>English, Singapore(en_SG)</li>
-<li>English, US (en_US)</li>
-<li>English, South Africa (en_ZA)</li>
-<li>Spanish (es_ES)</li>
-<li>Spanish, US (es_US)</li>
-<li>Finnish, Finland (fi_FI)</li>
-<li>French, Belgium (fr_BE)</li>
-<li>French, Canada (fr_CA)</li>
-<li>French, Switzerland (fr_CH)</li>
-<li>French, France (fr_FR)</li>
-<li>Hebrew, Israel (he_IL)</li>
-<li>Hindi, India (hi_IN)</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<li>Croatian, Croatia (hr_HR)</li>
-<li>Hungarian, Hungary (hu_HU)</li>
-<li>Indonesian, Indonesia (id_ID)</li>
-<li>Italian, Switzerland (it_CH)</li>
-<li>Italian, Italy (it_IT)</li>
-<li>Japanese (ja_JP)</li>
-<li>Korean (ko_KR)</li>
-<li>Lithuanian, Lithuania (lt_LT)</li>
-<li>Latvian, Latvia (lv_LV)</li>
-<li>Norwegian bokmål, Norway (nb_NO)</li>
-<li>Dutch, Belgium (nl_BE)</li>
-<li>Dutch, Netherlands (nl_NL)</li>
-<li>Polish (pl_PL)</li>
-<li>Portuguese, Brazil (pt_BR)</li>
-<li>Portuguese, Portugal (pt_PT)</li>
-<li>Romanian, Romania (ro_RO)</li>
-<li>Russian (ru_RU)</li></li>
-<li>Slovak, Slovakia (sk_SK)</li>
-<li>Slovenian, Slovenia (sl_SI)</li>
-<li>Serbian (sr_RS)</li>
-<li>Swedish, Sweden (sv_SE)</li>
-<li>Thai, Thailand (th_TH)</li>
-<li>Tagalog, Philippines (tl_PH)</li>
-<li>Turkish, Turkey (tr_TR)</li>
-<li>Ukrainian, Ukraine (uk_UA)</li>
-<li>Vietnamese, Vietnam (vi_VN)</li>
-<li>Chinese, PRC (zh_CN)</li>
-<li>Chinese, Taiwan (zh_TW)</li>
-</td>
-</tr>
-</table>
-
-<p class="note"><strong>Note:</strong> The Android platform may support more
-locales than are included in the SDK system image. All of the supported locales
-are available in the <a href="http://source.android.com/">Android Open Source
-Project</a>.</p>
-
-<h2 id="skins">Emulator Skins</h2>
-
-<p>The downloadable platform includes the following emulator skins:</p>
-
-<ul>
- <li>
- QVGA (240x320, low density, small screen)
- </li>
- <li>
- WQVGA400 (240x400, low density, normal screen)
- </li>
- <li>
- WQVGA432 (240x432, low density, normal screen)
- </li>
- <li>
- HVGA (320x480, medium density, normal screen)
- </li>
- <li>
- WVGA800 (480x800, high density, normal screen)
- </li>
- <li>
- WVGA854 (480x854 high density, normal screen)
- </li>
- <li>
- WXGA720 (1280x720, extra-high density, normal screen)
- </li>
- <li>
- WSVGA (1024x600, medium density, large screen)
- </li>
- <li>
- WXGA (1280x800, medium density, xlarge screen)
- </li>
-</ul>
-
-<p>To test your application on an emulator that represents the latest Android device, you can create
-an AVD with the new WXGA720 skin (it's an xhdpi, normal screen device). Note that the emulator
-currently doesn't support the new on-screen navigation bar for devices without hardware navigation
-buttons, so when using this skin, you must use keyboard keys <em>Home</em> for the Home button,
-<em>ESC</em> for the Back button, and <em>F2</em> or <em>Page-up</em> for the Menu button.</p>
-
-<p>However, due to performance issues in the emulator when running high-resolution screens such as
-the one for the WXGA720 skin, we recommend that you primarily use the traditional WVGA800 skin
-(hdpi, normal screen) to test your application.</p>
-
diff --git a/docs/html/sdk/android-4.0.jd b/docs/html/about/versions/android-4.0.jd
index e3b13c847cdd..bea07253c87b 100644
--- a/docs/html/sdk/android-4.0.jd
+++ b/docs/html/about/versions/android-4.0.jd
@@ -8,13 +8,9 @@ sdk.platform.apiLevel=14
<h2>In this document</h2>
<ol>
- <li><a href="#relnotes">Revisions</a></li>
<li><a href="#api">API Overview</a></li>
<li><a href="#Honeycomb">Previous APIs</a></li>
<li><a href="#api-level">API Level</a></li>
- <li><a href="#apps">Built-in Applications</a></li>
- <li><a href="#locs">Locales</a></li>
- <li><a href="#skins">Emulator Skins</a></li>
</ol>
<h2>Reference</h2>
@@ -36,80 +32,19 @@ platform release because it brings the extensive set of APIs and Holographic the
to smaller screens. As an app developer, you now have a single platform and unified API framework
that enables you to develop and publish your application with a single APK that provides an
optimized user experience for handsets, tablets, and more, when running the same version of
-Android&mdash;Android 4.0 (API level 14) or greater. </p>
+Android&mdash;Android 4.0 (API level 14) or greater.</p>
-<p>The Android {@sdkPlatformVersion} platform is available as a
-downloadable component for the Android SDK so you can begin developing and testing your
-applications on Android 4.0 with the Android emulator. The downloadable platform includes
+<p>For developers, the Android {@sdkPlatformVersion} platform is available as a
+downloadable component for the Android SDK. The downloadable platform includes
an Android library and system image, as well as a set of emulator skins and
-more. The downloadable platform does not include any external libraries.</p>
-
-<p>To start developing or testing against Android {@sdkPlatformVersion},
-use the Android SDK Manager to download the platform into your SDK. For more
-information, see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
-Components</a>. If you are new to Android, <a
-href="{@docRoot}sdk/index.html">download the SDK Starter Package</a> first.</p>
-
-<p class="note"><strong>Reminder:</strong> If you've already published an
-Android application, please test your application on Android {@sdkPlatformVersion} as
-soon as possible to be sure your application provides the best
-experience possible on the latest Android-powered devices.</p>
-
-<p>For a high-level overview of the new user and developer features in Android 4.0, see the
-<a href="http://developer.android.com/sdk/android-4.0-highlights.html">Platform Highlights</a>.</p>
-
-
-
-<h2 id="relnotes">Revisions</h2>
-
-<p>To determine what revision of the Android {@sdkPlatformVersion} platform you
-have installed, refer to the "Installed Packages" listing in the Android SDK Manager.</p>
-
-<p class="caution"><strong>Important:</strong> To download the new Android
-4.0 system components from the Android SDK Manager, you must first update the
-SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not,
-the Android 4.0 system components will not be available for download.</p>
-
-<div class="toggle-content opened" style="padding-left:1em;">
-
- <p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-opened.png"
-class="toggle-content-img" alt="" />
- Android {@sdkPlatformVersion}, Revision 2</a> <em>(December 2011)</em>
- </a></p>
-
- <div class="toggle-content-toggleme" style="padding-left:2em;">
- <p>Maintenance update. The system version is 4.0.2.</p>
- <dl>
- <dt>Dependencies:</dt>
- <dd>SDK Tools r14 or higher is required.</dd>
- </dl>
- </div>
-</div>
-
-<div class="toggle-content closed" style="padding-left:1em;">
-
- <p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png"
-class="toggle-content-img" alt="" />
- Android {@sdkPlatformVersion}, Revision 1</a> <em>(October 2011)</em>
- </a></p>
-
- <div class="toggle-content-toggleme" style="padding-left:2em;">
- <p>Initial release. The system version is 4.0.1.</p>
- <dl>
- <dt>Dependencies:</dt>
- <dd>SDK Tools r14 or higher is required.</dd>
- </dl>
- </div>
-</div>
-
+more. To get started developing or testing against Android {@sdkPlatformVersion},
+use the Android SDK Manager to download the platform into your SDK.</p>
<h2 id="api">API Overview</h2>
<p>The sections below provide a technical overview of new APIs in Android 4.0.</p>
-<div class="toggle-content closed" style="padding-left:1em;">
+<div class="toggle-content closed">
<p><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-closed.png"
@@ -643,7 +578,7 @@ action to start an activity, with either a URL or a MIME type set according to t
android.nfc.NdefRecord} in the {@link android.nfc.NdefMessage}. For the activity you want to
respond, you can declare intent filters for the URLs or MIME types your app cares about. For more
information about Tag Dispatch see the <a
-href="{@docRoot}guide/topics/nfc/index.html#dispatch">NFC</a> developer guide.</p>
+href="{@docRoot}guide/topics/connectivity/nfc/index.html#dispatch">NFC</a> developer guide.</p>
<p>If you want your {@link android.nfc.NdefMessage} to carry a URI, you can now use the convenience
method {@link android.nfc.NdefRecord#createUri createUri} to construct a new {@link
@@ -671,7 +606,7 @@ application installed, the system launches it; if it’s not installed, Google P
the user to your application in order to install it.</p>
<p>You can read more about Android Beam and other NFC features in the <a
-href="{@docRoot}guide/topics/nfc/nfc.html">NFC Basics</a> developer guide. For some example code
+href="{@docRoot}guide/topics/connectivity/nfc/nfc.html">NFC Basics</a> developer guide. For some example code
using Android Beam, see the <a
href="{@docRoot}resources/samples/AndroidBeamDemo/src/com/example/android/beam/Beam.html">Android
Beam Demo</a>.</p>
@@ -885,7 +820,7 @@ the methods necessary for any given view without extending the {@link android.vi
<p>If you want to maintain compatibility with Android versions prior to 4.0, while also supporting
the new the accessibility APIs, you can do so with the latest version of the <em>v4 support
-library</em> (in <a href="{@docRoot}sdk/compatibility-library.html">Compatibility Package, r4</a>)
+library</em> (in <a href="{@docRoot}tools/extras/support-library.html">Compatibility Package, r4</a>)
using a set of utility classes that provide the new accessibility APIs in a backward-compatible
design.</p>
@@ -1679,7 +1614,7 @@ seemed to work because it made it possible to write buggy code. In Android 4.0,
indirect references in order to detect these bugs.</p>
<p>The ins and outs of JNI local references are described in “Local and Global References" in <a
-href="{@docRoot}guide/practices/design/jni.html">JNI Tips</a>. In Android 4.0, <a
+href="{@docRoot}guide/practices/jni.html">JNI Tips</a>. In Android 4.0, <a
href="http://android-developers.blogspot.com/2011/07/debugging-android-jni-with-checkjni.html">
CheckJNI</a> has been enhanced to detect these errors. Watch the <a
href="http://android-developers.blogspot.com/">Android Developers Blog</a> for an upcoming post
@@ -1714,7 +1649,7 @@ it easier for you to test apps that use {@link android.webkit.WebView}</li>
<ul>
<li>Updated V8 JavaScript compiler for faster performance</li>
<li>Plus other notable enhancements carried over from <a
-href="{@docRoot}sdk/android-3.0.html">Android
+href="{@docRoot}about/versions/android-3.0.html">Android
3.0</a> are now available for handsets:
<ul>
<li>Support for fixed position elements on all pages</li>
@@ -1779,7 +1714,7 @@ on handsets as well:</p>
<ul>
<li>{@link android.app.Fragment}: A framework component that allows you to separate distinct
elements of an activity into self-contained modules that define their own UI and lifecycle. See the
-<a href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a> developer guide.</li>
+<a href="{@docRoot}guide/components/fragments.html">Fragments</a> developer guide.</li>
<li>{@link android.app.ActionBar}: A replacement for the traditional title bar at the top of
the activity window. It includes the application logo in the left corner and provides a new
interface for menu items. See the
@@ -1787,10 +1722,10 @@ interface for menu items. See the
<li>{@link android.content.Loader}: A framework component that facilitates asynchronous
loading of data in combination with UI components to dynamically load data without blocking the
main thread. See the
-<a href="{@docRoot}guide/topics/fundamentals/loaders.html">Loaders</a> developer guide.</li>
+<a href="{@docRoot}guide/components/loaders.html">Loaders</a> developer guide.</li>
<li>System clipboard: Applications can copy and paste data (beyond mere text) to and from
the system-wide clipboard. Clipped data can be plain text, a URI, or an intent. See the
-<a href="{@docRoot}guide/topics/clipboard/copy-paste.html">Copy and Paste</a> developer guide.</li>
+<a href="{@docRoot}guide/topics/text/copy-paste.html">Copy and Paste</a> developer guide.</li>
<li>Drag and drop: A set of APIs built into the view framework that facilitates drag and drop
operations. See the
<a href="{@docRoot}guide/topics/ui/drag-drop.html">Drag and Drop</a> developer guide.</li>
@@ -1829,7 +1764,7 @@ notes for more information.</li>
<li>USB APIs: Powerful new APIs for integrating connected peripherals with
Android applications. The APIs are based on a USB stack and services that are
built into the platform, including support for both USB host and device interactions. See the <a
-href="{@docRoot}guide/topics/usb/index.html">USB Host and Accessory</a> developer guide.</li>
+href="{@docRoot}guide/topics/connectivity/usb/index.html">USB Host and Accessory</a> developer guide.</li>
<li>MTP/PTP APIs: Applications can interact directly with connected cameras and other PTP
devices to receive notifications when devices are attached and removed, manage files and storage on
those devices, and transfer files and metadata to and from them. The MTP API implements the PTP
@@ -1876,7 +1811,7 @@ notes for other new APIs.</li>
-<h2 id="api-level">API Level</h2>
+<h3 id="api-level">API Level</h3>
<p>The Android {@sdkPlatformVersion} API is assigned an integer
identifier&mdash;<strong>{@sdkPlatformApiLevel}</strong>&mdash;that is stored in the system itself.
@@ -1890,170 +1825,5 @@ higher. Depending on your needs, you might also need to add an
<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code &lt;uses-sdk&gt;}</a>
element.</p>
-<p>For more information, see the <a href="{@docRoot}guide/appendix/api-levels.html">API Levels</a>
-document. </p>
-
-
-<h2 id="apps">Built-in Applications</h2>
-
-<p>The system image included in the downloadable platform provides these
-built-in applications:</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>API Demos</li>
-<li>Browser</li>
-<li>Calculator</li>
-<li>Calendar</li>
-<li>Camera</li>
-<li>Clock</li>
-<li>Custom Locale</li>
-<li>Dev Tools</li>
-<li>Downloads</li>
-<li>Email</li>
-<li>Gallery</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<ul>
-<li>Gestures Builder</li>
-<li>Messaging</li>
-<li>Music</li>
-<li>People</li>
-<li>Phone</li>
-<li>Search</li>
-<li>Settings</li>
-<li>Speech Recorder</li>
-<li>Widget Preview</li>
-</ul>
-</td>
-</tr>
-</table>
-
-
-<h2 id="locs" style="margin-top:.75em;">Locales</h2>
-
-<p>The system image included in the downloadable SDK platform provides a variety of built-in
-locales. In some cases, region-specific strings are available for the locales. In other cases, a
-default version of the language is used. The languages that are available in the Android 3.0 system
-image are listed below (with <em>language</em>_<em>country/region</em> locale descriptor).</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>Arabic, Egypt (ar_EG)</li>
-<li>Arabic, Israel (ar_IL)</li>
-<li>Bulgarian, Bulgaria (bg_BG)</li>
-<li>Catalan, Spain (ca_ES)</li>
-<li>Czech, Czech Republic (cs_CZ)</li>
-<li>Danish, Denmark(da_DK)</li>
-<li>German, Austria (de_AT)</li>
-<li>German, Switzerland (de_CH)</li>
-<li>German, Germany (de_DE)</li>
-<li>German, Liechtenstein (de_LI)</li>
-<li>Greek, Greece (el_GR)</li>
-<li>English, Australia (en_AU)</li>
-<li>English, Canada (en_CA)</li>
-<li>English, Britain (en_GB)</li>
-<li>English, Ireland (en_IE)</li>
-<li>English, India (en_IN)</li>
-<li>English, New Zealand (en_NZ)</li>
-<li>English, Singapore(en_SG)</li>
-<li>English, US (en_US)</li>
-<li>English, South Africa (en_ZA)</li>
-<li>Spanish (es_ES)</li>
-<li>Spanish, US (es_US)</li>
-<li>Finnish, Finland (fi_FI)</li>
-<li>French, Belgium (fr_BE)</li>
-<li>French, Canada (fr_CA)</li>
-<li>French, Switzerland (fr_CH)</li>
-<li>French, France (fr_FR)</li>
-<li>Hebrew, Israel (he_IL)</li>
-<li>Hindi, India (hi_IN)</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<li>Croatian, Croatia (hr_HR)</li>
-<li>Hungarian, Hungary (hu_HU)</li>
-<li>Indonesian, Indonesia (id_ID)</li>
-<li>Italian, Switzerland (it_CH)</li>
-<li>Italian, Italy (it_IT)</li>
-<li>Japanese (ja_JP)</li>
-<li>Korean (ko_KR)</li>
-<li>Lithuanian, Lithuania (lt_LT)</li>
-<li>Latvian, Latvia (lv_LV)</li>
-<li>Norwegian bokmål, Norway (nb_NO)</li>
-<li>Dutch, Belgium (nl_BE)</li>
-<li>Dutch, Netherlands (nl_NL)</li>
-<li>Polish (pl_PL)</li>
-<li>Portuguese, Brazil (pt_BR)</li>
-<li>Portuguese, Portugal (pt_PT)</li>
-<li>Romanian, Romania (ro_RO)</li>
-<li>Russian (ru_RU)</li></li>
-<li>Slovak, Slovakia (sk_SK)</li>
-<li>Slovenian, Slovenia (sl_SI)</li>
-<li>Serbian (sr_RS)</li>
-<li>Swedish, Sweden (sv_SE)</li>
-<li>Thai, Thailand (th_TH)</li>
-<li>Tagalog, Philippines (tl_PH)</li>
-<li>Turkish, Turkey (tr_TR)</li>
-<li>Ukrainian, Ukraine (uk_UA)</li>
-<li>Vietnamese, Vietnam (vi_VN)</li>
-<li>Chinese, PRC (zh_CN)</li>
-<li>Chinese, Taiwan (zh_TW)</li>
-</td>
-</tr>
-</table>
-
-<p class="note"><strong>Note:</strong> The Android platform may support more
-locales than are included in the SDK system image. All of the supported locales
-are available in the <a href="http://source.android.com/">Android Open Source
-Project</a>.</p>
-
-<h2 id="skins">Emulator Skins</h2>
-
-<p>The downloadable platform includes the following emulator skins:</p>
-
-<ul>
- <li>
- QVGA (240x320, low density, small screen)
- </li>
- <li>
- WQVGA400 (240x400, low density, normal screen)
- </li>
- <li>
- WQVGA432 (240x432, low density, normal screen)
- </li>
- <li>
- HVGA (320x480, medium density, normal screen)
- </li>
- <li>
- WVGA800 (480x800, high density, normal screen)
- </li>
- <li>
- WVGA854 (480x854 high density, normal screen)
- </li>
- <li>
- WXGA720 (1280x720, extra-high density, normal screen) <span class="new">new</span>
- </li>
- <li>
- WSVGA (1024x600, medium density, large screen) <span class="new">new</span>
- </li>
- <li>
- WXGA (1280x800, medium density, xlarge screen)
- </li>
-</ul>
-
-<p>To test your application on an emulator that represents the latest Android device, you can create
-an AVD with the new WXGA720 skin (it's an xhdpi, normal screen device). Note that the emulator
-currently doesn't support the new on-screen navigation bar for devices without hardware navigation
-buttons, so when using this skin, you must use keyboard keys <em>Home</em> for the Home button,
-<em>ESC</em> for the Back button, and <em>F2</em> or <em>Page-up</em> for the Menu button.</p>
-
-<p>However, due to performance issues in the emulator when running high-resolution screens such as
-the one for the WXGA720 skin, we recommend that you primarily use the traditional WVGA800 skin
-(hdpi, normal screen) to test your application.</p>
-
+<p>For more information, read <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API
+Level?</a></p>
diff --git a/docs/html/guide/appendix/api-levels.jd b/docs/html/about/versions/api-levels.jd
index bc7d83b6db1b..525e2cb5570a 100644
--- a/docs/html/guide/appendix/api-levels.jd
+++ b/docs/html/about/versions/api-levels.jd
@@ -84,73 +84,73 @@ Android platform.</p>
<table>
<tr><th>Platform Version</th><th>API Level</th><th>VERSION_CODE</th><th>Notes</th></tr>
- <tr><td><a href="{@docRoot}sdk/android-4.0.3.html">Android 4.0.3</a></td>
+ <tr><td><a href="{@docRoot}about/versions/android-4.0.3.html">Android 4.0.3</a></td>
<td><a href="{@docRoot}sdk/api_diff/15/changes.html" title="Diff Report">15</a></td>
<td>{@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1}</td>
- <td rowspan="2"><a href="{@docRoot}sdk/android-4.0-highlights.html">Platform
+ <td rowspan="2"><a href="{@docRoot}about/versions/android-4.0-highlights.html">Platform
Highlights</a></td></tr>
- <tr><td><a href="{@docRoot}sdk/android-4.0.html">Android 4.0, 4.0.1, 4.0.2</a></td>
+ <tr><td><a href="{@docRoot}about/versions/android-4.0.html">Android 4.0, 4.0.1, 4.0.2</a></td>
<td><a href="{@docRoot}sdk/api_diff/14/changes.html" title="Diff Report">14</a></td>
<td>{@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH}</td>
</tr>
- <tr><td><a href="{@docRoot}sdk/android-3.2.html">Android 3.2</a></td>
+ <tr><td><a href="{@docRoot}about/versions/android-3.2.html">Android 3.2</a></td>
<td><a href="{@docRoot}sdk/api_diff/13/changes.html" title="Diff Report">13</a></td>
<td>{@link android.os.Build.VERSION_CODES#HONEYCOMB_MR2}</td>
- <td><!-- <a href="{@docRoot}sdk/android-3.2-highlights.html">Platform Highlights</a>--></td></tr>
+ <td><!-- <a href="{@docRoot}about/versions/android-3.2-highlights.html">Platform Highlights</a>--></td></tr>
- <tr><td><a href="{@docRoot}sdk/android-3.1.html">Android 3.1.x</a></td>
+ <tr><td><a href="{@docRoot}about/versions/android-3.1.html">Android 3.1.x</a></td>
<td><a href="{@docRoot}sdk/api_diff/12/changes.html" title="Diff Report">12</a></td>
<td>{@link android.os.Build.VERSION_CODES#HONEYCOMB_MR1}</td>
- <td><a href="{@docRoot}sdk/android-3.1-highlights.html">Platform Highlights</a></td></tr>
+ <td><a href="{@docRoot}about/versions/android-3.1-highlights.html">Platform Highlights</a></td></tr>
- <tr><td><a href="{@docRoot}sdk/android-3.0.html">Android 3.0.x</td>
+ <tr><td><a href="{@docRoot}about/versions/android-3.0.html">Android 3.0.x</td>
<td><a href="{@docRoot}sdk/api_diff/11/changes.html" title="Diff Report">11</a></td>
<td>{@link android.os.Build.VERSION_CODES#HONEYCOMB}</td>
- <td><a href="{@docRoot}sdk/android-3.0-highlights.html">Platform Highlights</a></td></tr>
+ <td><a href="{@docRoot}about/versions/android-3.0-highlights.html">Platform Highlights</a></td></tr>
- <tr><td><a href="{@docRoot}sdk/android-2.3.3.html">Android 2.3.4<br>Android 2.3.3</td>
+ <tr><td><a href="{@docRoot}about/versions/android-2.3.3.html">Android 2.3.4<br>Android 2.3.3</td>
<td><a href="{@docRoot}sdk/api_diff/10/changes.html" title="Diff Report">10</a></td>
<td>{@link android.os.Build.VERSION_CODES#GINGERBREAD_MR1}</td>
- <td rowspan="2"><a href="{@docRoot}sdk/android-2.3-highlights.html">Platform Highlights</a></td></tr>
+ <td rowspan="2"><a href="{@docRoot}about/versions/android-2.3-highlights.html">Platform Highlights</a></td></tr>
- <tr><td><a href="{@docRoot}sdk/android-2.3.html">Android 2.3.2<br>Android 2.3.1<br>Android 2.3</td>
+ <tr><td><a href="{@docRoot}about/versions/android-2.3.html">Android 2.3.2<br>Android 2.3.1<br>Android 2.3</td>
<td><a href="{@docRoot}sdk/api_diff/9/changes.html" title="Diff Report">9</a></td>
<td>{@link android.os.Build.VERSION_CODES#GINGERBREAD}</td>
</tr>
- <tr><td><a href="{@docRoot}sdk/android-2.2.html">Android 2.2.x</td>
+ <tr><td><a href="{@docRoot}about/versions/android-2.2.html">Android 2.2.x</td>
<td ><a href="{@docRoot}sdk/api_diff/8/changes.html" title="Diff Report">8</a></td>
<td>{@link android.os.Build.VERSION_CODES#FROYO}</td>
- <td><a href="{@docRoot}sdk/android-2.2-highlights.html">Platform Highlights</a></td></tr>
+ <td><a href="{@docRoot}about/versions/android-2.2-highlights.html">Platform Highlights</a></td></tr>
- <tr><td><a href="{@docRoot}sdk/android-2.1.html">Android 2.1.x</td>
+ <tr><td><a href="{@docRoot}about/versions/android-2.1.html">Android 2.1.x</td>
<td><a href="{@docRoot}sdk/api_diff/7/changes.html" title="Diff Report">7</a></td>
<td>{@link android.os.Build.VERSION_CODES#ECLAIR_MR1}</td>
- <td rowspan="3" ><a href="{@docRoot}sdk/android-2.0-highlights.html">Platform Highlights</a></td></tr>
+ <td rowspan="3" ><a href="{@docRoot}about/versions/android-2.0-highlights.html">Platform Highlights</a></td></tr>
- <tr><td><a href="{@docRoot}sdk/android-2.0.1.html">Android 2.0.1</td>
+ <tr><td><a href="{@docRoot}about/versions/android-2.0.1.html">Android 2.0.1</td>
<td><a href="{@docRoot}sdk/api_diff/6/changes.html" title="Diff Report">6</a></td>
<td>{@link android.os.Build.VERSION_CODES#ECLAIR_0_1}</td>
</tr>
- <tr><td><a href="{@docRoot}sdk/android-2.0.html">Android 2.0</td>
+ <tr><td><a href="{@docRoot}about/versions/android-2.0.html">Android 2.0</td>
<td><a href="{@docRoot}sdk/api_diff/5/changes.html" title="Diff Report">5</a></td>
<td>{@link android.os.Build.VERSION_CODES#ECLAIR}</td>
</tr>
- <tr><td><a href="{@docRoot}sdk/android-1.6.html">Android 1.6</td>
+ <tr><td><a href="{@docRoot}about/versions/android-1.6.html">Android 1.6</td>
<td><a href="{@docRoot}sdk/api_diff/4/changes.html" title="Diff Report">4</a></td>
<td>{@link android.os.Build.VERSION_CODES#DONUT}</td>
- <td><a href="{@docRoot}sdk/android-1.6-highlights.html">Platform Highlights</a></td></tr>
+ <td><a href="{@docRoot}about/versions/android-1.6-highlights.html">Platform Highlights</a></td></tr>
- <tr><td><a href="{@docRoot}sdk/android-1.5.html">Android 1.5</td>
+ <tr><td><a href="{@docRoot}about/versions/android-1.5.html">Android 1.5</td>
<td><a href="{@docRoot}sdk/api_diff/3/changes.html" title="Diff Report">3</a></td>
<td>{@link android.os.Build.VERSION_CODES#CUPCAKE}</td>
- <td><a href="{@docRoot}sdk/android-1.5-highlights.html">Platform Highlights</a></td></tr>
+ <td><a href="{@docRoot}about/versions/android-1.5-highlights.html">Platform Highlights</a></td></tr>
- <tr><td><a href="{@docRoot}sdk/android-1.1.html">Android 1.1</td>
+ <tr><td><a href="{@docRoot}about/versions/android-1.1.html">Android 1.1</td>
<td>2</td>
<td>{@link android.os.Build.VERSION_CODES#BASE_1_1}</td><td></td></tr>
@@ -360,7 +360,7 @@ Manager</strong>.</p>
<p>To run your application against different platform versions in the emulator,
create an AVD for each platform version that you want to test. For more
information about AVDs, see <a
-href="{@docRoot}guide/developing/devices/index.html">Creating and Managing Virtual Devices</a>. If
+href="{@docRoot}tools/devices/index.html">Creating and Managing Virtual Devices</a>. If
you are using a physical device for testing, ensure that you know the API Level
of the Android platform it runs. See the table at the top of this document for
a list of platform versions and their API Levels. </p>
diff --git a/docs/html/guide/basics/what-is-android.jd b/docs/html/about/versions/index.jd
index 9393fabfc8fb..30826c085a0e 100644
--- a/docs/html/guide/basics/what-is-android.jd
+++ b/docs/html/about/versions/index.jd
@@ -1,4 +1,4 @@
-page.title=What is Android?
+page.title=App Framework
@jd:body
<p>Android is a software stack for mobile devices that includes an operating
diff --git a/docs/html/design/building-blocks/index.jd b/docs/html/design/building-blocks/index.jd
index 52b4915f2020..d915aae51abf 100644
--- a/docs/html/design/building-blocks/index.jd
+++ b/docs/html/design/building-blocks/index.jd
@@ -10,7 +10,7 @@ footer.hide=1
#text-overlay {
position: absolute;
- left: 10px;
+ left: 0;
top: 472px;
width: 450px;
}
diff --git a/docs/html/design/building-blocks/progress.jd b/docs/html/design/building-blocks/progress.jd
index b18853871fce..03fc09c7302c 100644
--- a/docs/html/design/building-blocks/progress.jd
+++ b/docs/html/design/building-blocks/progress.jd
@@ -1,5 +1,4 @@
page.title=Progress and Activity
-header.title=Feedback
@jd:body
<p>When an operation of interest to the user is taking place over a relatively long period of time,
diff --git a/docs/html/design/design_toc.cs b/docs/html/design/design_toc.cs
index 6dd8d610418f..a31fdd322e93 100644
--- a/docs/html/design/design_toc.cs
+++ b/docs/html/design/design_toc.cs
@@ -63,8 +63,4 @@
<div class="nav-section-header empty"><a href="<?cs var:toroot ?>design/downloads/index.html">Downloads</a></div>
</li>
- <li>
- <div id="back-dac-section"><a href="<?cs var:toroot ?>index.html">Developers</a></div>
- </li>
-
</ul> \ No newline at end of file
diff --git a/docs/html/design/index.jd b/docs/html/design/index.jd
index d404aa6e42e2..1e6b40c5876b 100644
--- a/docs/html/design/index.jd
+++ b/docs/html/design/index.jd
@@ -1,4 +1,4 @@
-page.title=
+page.title=Design
header.hide=1
footer.hide=1
@jd:body
@@ -10,7 +10,7 @@ footer.hide=1
#text-overlay {
position: absolute;
- left: 10px;
+ left: 0;
top: 472px;
width: 280px;
}
diff --git a/docs/html/design/media/typography_sizes.png b/docs/html/design/media/typography_sizes.png
index fe6cdcee9464..eda1d996d4a0 100644
--- a/docs/html/design/media/typography_sizes.png
+++ b/docs/html/design/media/typography_sizes.png
Binary files differ
diff --git a/docs/html/design/patterns/index.jd b/docs/html/design/patterns/index.jd
index 732e4dbc60bc..6f88e6d99fd0 100644
--- a/docs/html/design/patterns/index.jd
+++ b/docs/html/design/patterns/index.jd
@@ -10,7 +10,7 @@ footer.hide=1
#text-overlay {
position: absolute;
- left: 10px;
+ left: 0;
top: 492px;
width: 200px;
}
diff --git a/docs/html/design/style/iconography.jd b/docs/html/design/style/iconography.jd
index c4e8bd6acaee..775e45d9fdbb 100644
--- a/docs/html/design/style/iconography.jd
+++ b/docs/html/design/style/iconography.jd
@@ -139,7 +139,7 @@ files for further customization.
<ul>
<li class="no-bullet with-icon tablet">
- <p>Action bar icons for phones and tablets should be <strong>32x32 <acronym title="Density-independent pixels. One dp is one pixel on a 160 dpi screen.">dp</acronym></strong>.</p></li>
+ <p>Action bar icons for phones should be <strong>32x32 <acronym title="Density-independent pixels. One dp is one pixel on a 160 dpi screen.">dp</acronym></strong>.</p></li>
</ul>
</div>
diff --git a/docs/html/design/style/index.jd b/docs/html/design/style/index.jd
index d346aea114e1..74d085b759b0 100644
--- a/docs/html/design/style/index.jd
+++ b/docs/html/design/style/index.jd
@@ -10,7 +10,7 @@ footer.hide=1
#text-overlay {
position: absolute;
- left: 10px;
+ left: 0;
top: 402px;
width: 220px;
}
diff --git a/docs/html/develop/index.jd b/docs/html/develop/index.jd
new file mode 100644
index 000000000000..6830b72cfe84
--- /dev/null
+++ b/docs/html/develop/index.jd
@@ -0,0 +1,366 @@
+fullpage=true
+page.title=Develop
+header.hide=1
+carousel=1
+tabbedList=1
+@jd:body
+
+<style>
+#noplayer-message {
+position:absolute;top:50%;left:0;width:100%;z-index:-1;text-align:center;display:none;
+}
+#player-frame object {z-index:1;}
+</style>
+
+<div id="player-wrapper">
+ <div id="player-frame">
+ <div id="noplayer-message">
+ <!-- busted flash player message -->
+ Your video is supposed to appear here.<br/>
+ Make sure you have the <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash&reg; Player</a>.
+ </div>
+ <div id="player"><!-- Youtube embeds here... actually replaces this div --></div>
+ <a class="close" onclick="$('#player-wrapper').hide()">close video</a>
+ </div>
+</div>
+
+<div class="wrap">
+ <!-- Slideshow -->
+ <div class="slideshow-container slideshow-develop col-16">
+ <a href="" class="slideshow-prev">Prev</a>
+ <a href="" class="slideshow-next">Next</a>
+ <div class="frame">
+ <ul>
+ <li class="item carousel-home">
+ <div class="col-8">
+ <img
+src="http://1.bp.blogspot.com/-6qyjPxTuzv0/T6lde-Oq_fI/AAAAAAAABXc/zle7OFEGP44/s400/fddns%2Bcopy.png"
+class="play no-shadow no-transform" />
+ </div>
+ <div class="content-right col-6">
+ <p class="title-intro">From the blog:</p>
+ <h2>Using DialogFragments</h2>
+ <p>In this post, I'll show how to use DialogFragments with the <a
+href="http://developer.android.com/reference/android/support/v4/app/DialogFragment.html">v4 support
+library</a> (for backward compatibility on pre-Honeycomb devices) to show a simple edit dialog and
+return a result to the calling Activity using an interface.</p>
+ <p><a
+href="http://android-developers.blogspot.com/2012/05/using-dialogfragments.html" class="button">Read
+more</a></p>
+ </div>
+ </li>
+ <li class="item carousel-home">
+ <div class="col-8">
+ <img
+src="http://1.bp.blogspot.com/-6K1kfNOdek8/T72bXvtTSQI/AAAAAAAABmw/kYzmJt0_328/s1600/google-play-subscriptions.png" class="play"></div>
+ <div class="content-right col-6">
+ <p class="title-intro">From the blog:</p>
+ <h2>In-app Subscriptions in Google Play</h2>
+ <p>Starting today, developers can use In-app Billing to sell monthly or annual
+subscriptions from inside of their apps. All subscriptions are auto-renewing, for every app and game
+and every type of subscription product.</p>
+ <p><a class="button"
+href="http://android-developers.blogspot.com/2012/05/in-app-subscriptions-in-google-play.html">Read
+more</a></p>
+ </div>
+ </li>
+ <li class="item carousel-home">
+ <div class="col-8">
+ <img
+src="{@docRoot}images/home/developers_live.png" class="play"></div>
+ <div class="content-right col-6">
+ <h2>Learn what great apps are made of</h2>
+ <p>Every week we host a live broadcast in which we review a collection of apps and games
+ nominated by the creators. It's no-holds-barred and we tell you exactly what is flawed or
+ fantastic in each app and how to make improvements.</p>
+ <p><a href="" class="button" onclick="$('ul#DevelopersLive li:first
+a').click();return false;">Watch the latest review</a></p>
+ </div>
+ </li>
+ <li class="item carousel-home">
+ <div class="col-8">
+ <img style="margin-top:30px;width:300px"
+src="{@docRoot}images/home/ics-android.png" class="play no-shadow no-transform" />
+ </div>
+ <div class="content-right col-6">
+ <h2>Ice Cream Sandwich</h2>
+ <p>Android 4.0 brings handsets and tablets together with a unified
+ design and a set of APIs for you to build a great user experience on all devices.
+ For information about API changes in the latest release (API level 15),
+ read the <a href='{@docRoot}about/versions/android-4.0.3.html'>platform notes</a> and <a
+ href='{@docRoot}sdk/api_diff/15/changes.html'>diff report</a>.</p>
+ <p><a class="button"
+href="{@docRoot}about/versions/android-4.0-highlights.html">Read the highlights</a></p>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <!-- /End slideshow -->
+</div>
+<div class="wrap">
+ <!-- news and feature feed -->
+ <div class="feed col-8" style="margin-left:0">
+ <ul class="feed-nav">
+ <li class="active">DEVELOPER NEWS</li>
+ <li>FEATURED DOCS</li>
+ </ul>
+ <div class="feed-container">
+ <div class="feed-frame">
+ <!-- DEVELOPER NEWS -->
+ <ul>
+ <li><a href="http://android-developers.blogspot.com/2012/04/faster-emulator-with-better-hardware.html">
+ <div class="feed-image" style="background:url('../images/emulator-wvga800l.png') no-repeat 0 0">
+ </div>
+ <h4>A Faster Emulator with Better...</h4>
+ <p>Today we’re thrilled to announce several significant improvements to the emulator, including a dramatic...</p>
+ </a></li>
+ <li><a href="http://android-developers.blogspot.com/2012/04/android-c2dm-client-login-key.html">
+ <div class="feed-image" style="background:url('../images/develop/auth-code.png') no-repeat 0 0">
+ </div>
+ <h4>Android C2DM — Client Login key...</h4>
+ <p>In the upcoming weeks, some of the older Client
+ Login authentication keys will expire. If you generated the token you’re...</p>
+ </a></li>
+ <li><a href="http://android-developers.blogspot.com/2012/04/accessibility-are-you-serving-all-your.html">
+ <div class="feed-image">
+ </div>
+ <h4>Accessibility</h4>
+ <p>We recently published some new resources to help developers make their Android applications more accessible... </p>
+ </a></li>
+ <li><a href="http://android-developers.blogspot.com/2012/04/new-seller-countries-in-google-play.html">
+ <div class="feed-image" style="background:url('http://developer.android.com/images/home/play_logo.png') no-repeat 0 0" >
+ </div>
+ <h4>New Seller Countries in Google Play</h4>
+ <p>Over the past year we’ve been working to expand the list of
+ countries and currencies from which Android developers...</p>
+ </a></li>
+ </ul>
+ <!-- FEATURED DOCS -->
+ <ul>
+ <li><a href="{@docRoot}guide/google/play/billing/index.html">
+ <h4>Google Play In-app Billing</h4>
+ <p>In-app Billing is a Google Play service that lets you sell digital content from inside your applications. You can sell products as standard in-app products (one-time purchase) or with subscriptions (recurring...</p>
+ </a></li>
+ <li><a href="{@docRoot}guide/topics/providers/contacts-provider.html">
+ <h4>Contacts Provider</h4>
+ <p>The Contacts Provider is a powerful and flexible Android component that manages the device's central repository of data about people. You can use it to build powerful social features...</p>
+ </a></li>
+ <li><a href="{@docRoot}training/efficient-downloads/index.html">
+ <h4>Transferring Data Without Draining the Battery</h4>
+ <p>This training class demonstrates the best practices for scheduling and executing downloads using techniques such as caching, polling, and prefetching.</p>
+ </a></li>
+ <li><a href="{@docRoot}training/backward-compatible-ui/index.html">
+ <h4>Creating Backward-Compatible UIs</h4>
+ <p>This training class demonstrates how to use UI components and APIs available in newer versions of Android in a backward-compatible way, ensuring that your application still runs on previous versions...</p>
+ </a></li>
+ </ul>
+ </div>
+ </div>
+ </div> <!-- /news and feature feed -->
+ <!-- video feed -->
+ <div class="feed col-8" style="margin-right:0">
+ <ul class="feed-nav">
+ <li class="active">DEVELOPERS LIVE</li>
+ <li>VIDEO PLAYLISTS</li>
+ </ul>
+ <div class="feed-container">
+ <div class="feed-frame">
+ <ul id="DevelopersLive">
+ </ul>
+ <ul id="VideoPlaylists">
+ </ul>
+ </div>
+ </div>
+ </div>
+ <!-- /video feed -->
+</div>
+
+<br class="clearfix"/>
+ </div>
+
+
+
+
+
+
+
+
+
+
+<script src="//swfobject.googlecode.com/svn/trunk/swfobject/swfobject.js" type="text/javascript"></script>
+<script type="text/javascript">
+
+/* Load a video into the player box.
+ * @param id The YouTube video ID
+ * @param title The video title to display in the player box (character escaped)
+ * @param autoplay Whether to automatically play the video
+ */
+function loadVideo(id, title, autoplay) {
+ swfobject.embedSWF('//www.youtube.com/v/' + id + '&rel=1&border=0&fs=1&autoplay=' +
+ (autoplay?1:0), 'player', '525', '330', '9.0.0', false, false, {allowfullscreen: 'true'});
+ $("#videoPlayerTitle").html("<h2>" + unescape(title) + "</h2>");
+ $("#player-wrapper").show();
+ setTimeout(function(){$('#noplayer-message').show()}, 2000);
+}
+
+/* Draw all videos from a playlist into a 'videoPreviews' list
+ * @param data The feed data returned from the youtube request
+ */
+function renderVideoPlaylists(data) {
+ var MAX_LIST_DESC_LENGTH = 130; // the length at which we will trim the description
+ var MAX_VIDEO_DESC_LENGTH = 100; // the length at which we will trim the description
+ var MAX_LIST_LENGTH = 4; // number of videos to put in the list
+ var feed = data.feed;
+ var entries = feed.entry || [];
+ var playlistId = feed.yt$playlistId.$t;
+
+ var $ulVideos = $('<ul style="display:none"/>');
+ var summary = feed.media$group.media$description != null ? feed.media$group.media$description.$t : feed.subtitle.$t;
+
+ var $liPlaylist = $('<li class="playlist"></li>');
+ var $aPlaylist = $('<a href="" onclick="togglePlaylist(this);return false;"></a>');
+ $liPlaylist.append($aPlaylist);
+ $aPlaylist.append('<h4>' + feed.title.$t + '</h4>');
+
+ var playlistDescription = summary.substr(0, MAX_LIST_DESC_LENGTH);
+ playlistDescription += playlistDescription.length == MAX_LIST_DESC_LENGTH ? "..." : ""; // add ellipsis if we've chopped the description
+ $aPlaylist.append('<p>' + playlistDescription + '</p>');
+
+ // Loop through each entry (each video) and add it to the 'videoPreviews' list
+ var length = feed.entry.length < MAX_LIST_LENGTH ? feed.entry.length : MAX_LIST_LENGTH; // max of 4 videos per list
+ for (var i = 0; i < length; i++) {
+ var entry = entries[i];
+
+ var title = entry.title.$t;
+ var id = entry.media$group.yt$videoid.$t;
+ var thumbUrl = entry.media$group.media$thumbnail[0].url;
+ var fullDescription = entry.media$group.media$description.$t;
+ var playerUrl = entry.media$group.media$content[0].url;
+
+ var shortDescription = fullDescription.substr(0, MAX_VIDEO_DESC_LENGTH);
+ shortDescription += shortDescription.length == MAX_VIDEO_DESC_LENGTH ? "..." : ""; // add ellipsis if we've chopped the description
+
+ var img = $('<img src="' + thumbUrl + '" width="60" height="45"/>');
+ var a = $('<a href="#" onclick="loadVideo(\'' + id + '\',\'' + escape(title) + '\',true); return false;" />');
+ var pShortDescription = $('<p>' + shortDescription + '</p>');
+ var h5Title = "<h5>" + title + "</h5>";
+ var li = $('<li class="playlist-video"/>');
+
+ li.append(a);
+ a.append(img).append(h5Title).append(pShortDescription);
+
+ $ulVideos.append(li);
+
+ // use the first entry's thumbnail for the playlist
+ if (i == 0) {
+ $aPlaylist.prepend('<img src="' + thumbUrl + '" width="120" height="90"/>');
+ }
+ }
+
+ if (feed.entry.length > MAX_LIST_LENGTH) {
+ // add item to go to youtube for playlist
+ $ulVideos.append('<li class="more"><a href="//www.youtube.com/playlist?list=PL' + playlistId + '">More &raquo;</a></li>');
+ }
+
+ $liPlaylist.append($ulVideos);
+ $('#VideoPlaylists').append($liPlaylist);
+}
+
+
+function renderDevelopersLivePlaylist(data) {
+
+ var MAX_DESC_LENGTH = 125; // the length at which we will trim the description
+ var feed = data.feed;
+ var entries = feed.entry || [];
+ var playlistId = feed.yt$playlistId.$t;
+
+ var ul = $('#DevelopersLive');
+
+ // Loop through each entry (each video) and add it to the '#DevelopersLive' list
+ for (var i = 0; i < 4; i++) {
+ var entry = entries[i];
+
+ var title = entry.title.$t;
+ var id = entry.media$group.yt$videoid.$t;
+ var thumbUrl = entry.media$group.media$thumbnail[0].url;
+ var fullDescription = entry.media$group.media$description.$t;
+ var playerUrl = entry.media$group.media$content[0].url;
+ var shortDescription = fullDescription.substr(0, MAX_DESC_LENGTH);
+ shortDescription += shortDescription.length == MAX_DESC_LENGTH ? "..." : ""; // add ellipsis if we've chopped the description
+
+ var img = $('<img src="' + thumbUrl + '" width="120" height="90"/>');
+ var a = $('<a href="#" onclick="loadVideo(\'' + id + '\',\'' + escape(title) + '\',true); return false;" />');
+ var pShortDescription = $('<p>' + shortDescription + '</p>');
+ var h4Title = "<h4>" + title + "</h4>";
+ var li = $('<li/>');
+
+ li.append(a);
+ a.append(img).append(h4Title).append(pShortDescription);
+
+ ul.append(li);
+ }
+}
+
+
+
+/* This 'playlist' object defines the playlist IDs for each tab.
+ * Each name inside 'playlist' corresponds to class names for the tab that the playlists belong to (eg: "googleioTab" and "googleioBox" divs).
+ * Each string in 'ids' is the ID of a YouTube playlist that belongs in the corresponding tab.
+ */
+var playlists = {
+ 'googleio' : {
+ 'ids': ["734A052F802C96B9"]
+ },
+ 'fridayreview' : {
+ 'ids': ["B7B9B23D864A55C3"]
+ },
+ 'officehours' : {
+ 'ids': ["7383D9AADA6E6D55"]
+ },
+ 'about' : {
+ 'ids': ["D7C64411AF40DEA5"]
+ }
+};
+
+/* Request the playlist feeds from YouTube */
+function showVideosPlaylists() {
+ for (var x in playlists) {
+ var ids = playlists[x].ids;
+ for (var i in ids) {
+ var script = "<script type='text/javascript' src='//gdata.youtube.com/feeds/api/playlists/"
+ + ids[i] +
+ "?v=2&alt=json-in-script&max-results=50&callback=renderVideoPlaylists&orderby=published'><\/script>";
+ $("body").append(script);
+ }
+ }
+}
+
+
+/* Request the playlist feeds from YouTube */
+function showDevelopersLivePlaylist() {
+ var playlistId = "B7B9B23D864A55C3"; /* The Friday Review */
+ var script = "<script type='text/javascript' src='//gdata.youtube.com/feeds/api/playlists/"
+ + playlistId +
+ "?v=2&alt=json-in-script&max-results=10&callback=renderDevelopersLivePlaylist&orderby=published'><\/script > ";
+ $("body").append(script);
+}
+
+
+function togglePlaylist(listLink) {
+ var $list = $(listLink).parent();
+ var $ul = $list.find('ul');
+ if ($ul.is(":visible")) {
+ $ul.slideUp(function() {
+ $list.css({'height':'inherit'});
+ });
+ } else {
+ $list.closest('ul').find('li.playlist').find('ul').slideUp();
+ $ul.slideDown();
+ $list.css({'height':'auto'});
+ }
+}
+
+showDevelopersLivePlaylist();
+showVideosPlaylists();
+</script> \ No newline at end of file
diff --git a/docs/html/distribute/distribute_toc.cs b/docs/html/distribute/distribute_toc.cs
new file mode 100644
index 000000000000..bc028e57530f
--- /dev/null
+++ b/docs/html/distribute/distribute_toc.cs
@@ -0,0 +1,112 @@
+<ul id="nav">
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>distribute/index.html">
+ <span class="en">Google Play</span></a>
+ </div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/about/visibility.html">
+ <span class="en">Visibility</a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/about/monetizing.html">
+ <span class="en">Monetizing</a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/about/distribution.html">
+ <span class="en">Distribution</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>distribute/googleplay/publish/index.html">
+ <span class="en">Publishing</span></a>
+ </div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/publish/register.html">
+ <span class="en">Get Started</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/publish/console.html">
+ <span class="en">Developer Console</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/publish/preparing.html">
+ <span class="en">Publishing Checklist</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/strategies/app-quality.html">
+ <span class="en">App Quality</span>
+ </a></li>
+ </ul>
+ </li>
+
+<!-- <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>distribute/googleplay/developer-console.html">
+ <span class="en">The Developer Console</span>
+ </a>
+ </div>
+ <ul>
+ <li class="nav-section"><a href="<?cs var:toroot ?>distribute/googleplay/register.html">
+ <span class="en">Get Started</span></a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/distribution-controls.html">
+ <span class="en">Managing Distribution</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/pricing-billing.html">
+ <span class="en">Pricing and Billing</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/app-data.html">
+ <span class="en">Reviewing App Data</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/advanced-options.html">
+ <span class="en">Advanced Options</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/publishing.html">
+ <span class="en">Publishing and Updating</span>
+ </a></li>
+ </ul>
+ </li> end of Developer Console -->
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>distribute/googleplay/promote/index.html">
+ <span class="en">Promoting</span></a>
+ </div>
+ <ul>
+<!-- <li><a href="<?cs var:toroot ?>distribute/googleplay/promote/product-pages.html">
+ <span class="en">Your Product Pages</a></li>
+-->
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/promote/linking.html">
+ <span class="en">Linking to Your Products</a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/promote/badges.html">
+ <span class="en">Google Play Badges</a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/promote/brand.html">
+ <span class="en">Brand Assets and Guidelines</a></li>
+ </ul>
+ </li>
+
+<!--
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>distribute/googleplay/after.html">
+ <span class="en">After Launch</span></a>
+ </div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/errors.html.html">Reviewing Errors</a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/reviews.html">Tracking User Reviews</a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/supporting-users.html">Supporting Users</a></li>
+ </ul>
+ </li>
+-->
+
+<!--
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>distribute/googleplay/strategies/index.html">
+ <span class="en">Strategies</span></a>
+ </div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/strategies/featuring.html">Featuring</a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/strategies/app-quality.html">App Quality</a></li>
+ </ul>
+ </li>
+-->
+ <li class="nav-section">
+ <div class="nav-section-header empty">
+ <a href="<?cs var:toroot ?>distribute/open.html">
+ <span class="en">Open Distribution</span>
+ </a>
+ </div>
+ </li>
+</ul>
+ \ No newline at end of file
diff --git a/docs/html/distribute/googleplay/about/distribution.jd b/docs/html/distribute/googleplay/about/distribution.jd
new file mode 100644
index 000000000000..291d559888d5
--- /dev/null
+++ b/docs/html/distribute/googleplay/about/distribution.jd
@@ -0,0 +1,127 @@
+page.title=Distribution Control
+page.metaDescription=Reach the users you want, whenever you want.
+
+@jd:body
+
+<p>Deliver your apps to the users you want, on the devices you want, on <em>your</em> schedule. </p>
+
+<h2 id="instant">Instant publishing, instant updates</h2>
+
+<p>On Google Play, you can publish your products to customers instantly. Just
+upload and configure your product in the <span style="font-weight:500;">Google Play Android Developer Console</span>
+and press the Publish button&mdash;your app appears in the store listings within
+hours, not weeks. There are no delays for code or policy reviews, so you keep
+complete control over your release schedule.</p>
+
+<p>Once your app is published, you can update it as often as you want. You can
+change prices, configuration, and distribution options at any time through the
+Google Play Android Developer Console, without needing to update your app
+binary.</p>
+
+<p>Later, as you add features or address code issues, you can publish an updated
+binary at any time. Google Play makes the new version available immediately and
+notifies existing customers that an update is ready for download. To streamline
+the rollout across your customer base, Google Play also lets users accept
+automatic updates of your app, so that your updates are delivered and installed
+s soon as you publish them.</p>
+
+<h2>Reaching the customers you want</h2>
+
+<p>Google Play does more than connect your app with users&mdash;it helps you
+reach the broadest possible distribution across the Android ecosystem, while
+making sure that your app is only available to the audience that you want to
+reach.</p>
+
+<div style="float:right;margin-left:18px;border:1px solid #DDD;margin:1.5em;">
+<img src="{@docRoot}images/gp-dc-countries.png" style="width:400px;padding:4px;margin-bottom:0;">
+</div>
+
+<h3 id="geotargeting">Geographic targeting</h3>
+
+<p>You can use controls in the Google Play Android Developer Console to easily
+manage the geographic distribution of your apps, without any changes in your
+application binary. You can specify which countries and territories you want to
+distribute to, and even which carriers (for some countries). </p>
+
+<p>When users visit the store, Google Play makes sure that they are in one of
+your targeted countries before downloading your app. You can change your country
+and carrier targeting at any time just by saving changes in the Google Play
+Android Developer Console</p>
+
+<div style="float:right;margin-left:18px;border:1px solid #DDD;margin:1.5em;">
+<img src="{@docRoot}images/gp-supported-dev-requirements.png"
+style="width:400px;padding:4px;margin-bottom:0;">
+</div>
+
+<h3 id="captargeting">Capabilities targeting</h3>
+
+<p>Google Play also lets you control distribution according to device features
+or capabilities that your app depends on. There are several types of
+dependencies that the app can define in its manifest, such as hardware features,
+OpenGL texture compression formats, libraries, Android platform versions, and
+others.</p>
+
+<p>When you upload your app, Google Play reads the dependencies and sets up any
+necessary distribution rules. For technical information about declaring
+dependencies, read <a href="{@docRoot}guide/google/play/filters.html">Filters on
+Google Play</a>. </p>
+
+<p>For pinpoint control over distribution, Google Play lets you see all of the
+devices your app is available to based on its dependencies (if any). From the
+Google Play Android Developer Console, you can list the supported devices and
+even exclude specific devices if needed.</p>
+
+<h2 id="stats">Statistics for analyzing installs</h2>
+
+<p>Once you’ve published your app, Google Play makes it easy to see how it’s
+doing. The Google Play Android Developer Console gives you access to a variety
+of anonymized metrics that show your app’s installation performance measured by
+unique users and unique devices, across a variety of different dimensions such
+as country, Android version, device, country, carrier, and app version.</p>
+
+<div style="border:1px solid #DDD;margin:1.5em;margin-left:8%;width:608px">
+<img src="{@docRoot}images/gp-dc-stats-mini.png"
+style="width:600px;padding:4px;margin-bottom:0;">
+</div>
+<p>You can also view your installation data on timeline charts, for all metrics and
+dimensions. At a glance, these charts highlight your app’s installation peaks
+and longer-term trends, which you can correlate to promotions, app improvements,
+or other factors. You can even focus in on data inside a dimension by
+highlighting specific data points (such as individual platform versions or
+languages) on the timeline.</p>
+
+<p>So that you can “take your data with you”, you can download all of your
+installation data as a CSV file for viewing in the business program of your
+choice.</p>
+
+
+<h2 id="advanced">Advanced delivery options</h2>
+
+<p>Google Play offers convenient options for managing how your apps are
+delivered to users.</p>
+
+<p>In most cases, it’s easy to create an app that supports all of your targeted
+screen sizes and platform versions from a single APK. Distributing a single APK
+to all of your users is a highly recommended approach, because it’s the easiest
+way to manage and maintain the app. If you need to deliver a different APK to
+devices, Google Play provides a way to do that. </p>
+
+<p>An option called Multiple APK support lets you create multiple APK packages
+that use the same package name but differ in their OpenGL texture compression
+formats, screen-size support, or Android platform versions supported. You can
+upload all of the APKs to Google Play under a single product listing and Google
+Play selects the best APK to deliver to users, based on the characteristics of
+their devices. </p>
+
+<p>The APK Expansion Files option lets you upload up to two secondary downloads
+for each published APK, including multiple APKs. Each of the two expansion files
+can be up to 2GB each and can contain any type of code or assets. When you
+upload the expansion files, Google Play hosts them for free and handles the
+download of the files as part of the normal APK installation.</p>
+
+<h2 id="licensing">Protecting your App</h2>
+
+<p>To help you protect your application against piracy, Google Play offers a
+licensing service that you can implement in your app. It’s a network-based
+service that lets an application query a trusted Google Play licensing server to
+determine whether the application is licensed to the current device user.</p>
diff --git a/docs/html/distribute/googleplay/about/monetizing.jd b/docs/html/distribute/googleplay/about/monetizing.jd
new file mode 100644
index 000000000000..1e3437b266a2
--- /dev/null
+++ b/docs/html/distribute/googleplay/about/monetizing.jd
@@ -0,0 +1,152 @@
+page.title=Flexible Monetizing and Business Tools
+page.metaDescription=
+
+@jd:body
+
+<div style="float:right;margin-left:18px;padding:1.5em;">
+<img src="{@docRoot}images/gp-details-ww.png" style="width:180px">
+<img src="{@docRoot}images/gp-details-ww-purchase.png" style="width:180px">
+</div>
+
+<p>Sell your app in more than 130 countries. Flexible monetization options with
+in-app purchase, subscriptions, and more. </p>
+
+<h2>Streamlined purchase flow for users</h2>
+
+<p>When users find your app, they can purchase it instantly with a streamlined,
+consistent purchasing process and convenient payment methods.</p>
+
+<h3>Instant purchase from device or web</h3>
+
+<p>Google Play makes it fast and easy for your customers to buy your products,
+whether from a phone, a tablet, or a desktop computer. When users find an app or
+game that they want to buy, they can purchase it in as few as two steps&mdash;one
+to initiate the purchase and another to accept purchase details and permissions
+and complete the transaction.</p>
+
+<p>Google Play's convenient purchase experience is the same familiar process for
+all products everywhere across Google Play&mdash;apps, games, in-app products and
+subscriptions, and other digital content.</p>
+
+<h3 id="cloud-connected-purchase">Cloud-connected</h3>
+
+<p>Purchasing is even more convenient on Google Play because it’s
+cloud-connected. Users can find and purchase your products from anywhere&mdash;from
+their Android phones or using any web browser on any host computer. </p>
+
+<p>When users find an app or game they want to buy, they purchase it and download
+it instantly to their devices over-the-air. Users who sign in to the Google Play web site can also buy apps and games
+and push them instantly to their phones, tablets, or other devices. Google Play
+manages the application download.</p>
+
+<h3 id="payment-methods">Convenient payment options</h3>
+
+<p>Users can purchase your products on Google Play using several convenient
+payment methods&mdash;credit card, Direct Carrier Billing, and Google Play balance.</p>
+
+<p><span style="font-weight:500">Credit card</span> is the most common method of payment. Users can pay using any credit card
+that they’ve registered in Google Play. To make it easy for users to get started,
+registration is offered as a part of initial device setup process.</p>
+
+<div class="sidebox-wrapper" style="float:right;">
+<div class="sidebox">
+<h2>Payment methods on Google Play</h2>
+<ul>
+<li>Credit Card</li>
+<li>Direct Carrier Billing</li>
+</ul>
+</div>
+</div>
+
+<p>Subscribers on many popular carrier networks worldwide can charge purchases
+to their monthly mobile phone bills through <span style="font-weight:500">Direct
+Carrier Billing</span>. This form of payment is convenient and simple and is
+extremely popular in regions where credit cards are less common. More than 75
+million users in key markets around the world can purchase
+your products through Direct Carrier Billing. Many more will get the option in
+the months ahead.</p>
+
+<p>The payment methods available to users worldwide may vary, based on
+location, carrier network, and other factors.</p>
+
+<div style="float:left;margin-right:2em;margin-top:1em;width:220px;">
+<img src="{@docRoot}images/gp-subs.png" style="width:220px">
+</div>
+
+<h2 id="billing-models" style="margin-top:1.5em;">Choice of billing models</h2>
+
+<p>Google Play gives you a choice of billing models to let you monetize your
+products. </p>
+
+<p>You can offer apps to all users for free, or
+you can set an initial price for the app, paid before download. You can also
+sell one-time purchases and auto-renewing subscriptions from inside the app, and
+you can take advantage of AdMob integration to monetize your app through
+targeted advertising.</p>
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+<h2>Billing models on Google Play</h2>
+<ul>
+<li>Free (no charge to download)</li>
+<li>Priced (user charged before download)</li>
+<li>In-App products and subscriptions</li>
+</ul>
+</div>
+</div>
+
+<p>You can combine these billing models in different ways, based on your business
+needs or market conditions. </p>
+
+<p>For example, you can use a freemium or ad-supported model by distributing
+your app for free and selling in-app products or advertising. Alternatively you
+could set a nominal price for your app at download and sell value add-ons,
+gameplay levels, and upgrades as in-app products. The only restriction is that
+free apps must remain free (to download) for the life of the app.</p>
+
+<h2 id="buyer-currency" style="margin-top:1.5em;">Flexible pricing in the currencies of your customers</h2>
+
+<div style="float:right;margin-left:18px;border:1px solid #DDD;">
+<img src="{@docRoot}images/gp-buyer-currency.png" style="width:240px;padding:4px;margin-bottom:0;">
+</div>
+
+<p>Google Play gives you complete control over how you price your products. You
+can set prices in more than 130 countries, for millions of
+users around the world. When users browse your app’s product page or initiate a
+purchase, Google Play shows them the price they will be charged <em>in
+their local currency</em>.</p>
+
+<p>You can set and adjust your prices at any time, in any available currency.
+Your prices in available currencies are independent, so you can adjust one
+price without affecting others. This gives you the ability to run
+short-term promotions and discounts in specific countries and more easily
+manage shifts in exchange rates.</p>
+
+<p>You can set and manage prices for your apps and in-app products from the
+Google Play Android Developer Console.</p>
+
+<h2 id="payouts">Monthly payouts in your local currency</h2>
+
+<p>To sell products in Google Play, all you have to do is register for a Google
+Checkout merchant account and link it to your Google Play Android Developer
+Console account (see <a
+href="{@docRoot}distribute/googleplay/publish/register.html">Get Started with
+Publishing</a> for details). Once you’ve set up your account and published your
+apps, Google Play makes monthly payouts of sales proceeds to your merchant
+account, in your local currency.</p>
+
+<h2 id="reporting">Detailed financial reporting</h2>
+
+<p>When you sell priced apps or in-app products on Google Play, you get a
+variety of financial reports to help you track and project sales, optimize your
+marketing campaigns, and support your customers.</p>
+
+<p>To help you keep up-to-date with the current activity, you can download daily
+reports summarizing recent purchases of your products. The reports include
+estimated sales amounts and include a variety of other data for each
+transaction.</p>
+
+<p>At the close of the month, you can download a complete sales report that
+gives you the final details of all transactions that closed in the month,
+including the payout amounts and other data. Additional financial reports are
+available in your Google Checkout merchant account.</p>
diff --git a/docs/html/distribute/googleplay/about/visibility.jd b/docs/html/distribute/googleplay/about/visibility.jd
new file mode 100644
index 000000000000..2c5dbe522055
--- /dev/null
+++ b/docs/html/distribute/googleplay/about/visibility.jd
@@ -0,0 +1,247 @@
+page.title=Visibility for Your Apps
+page.metaDescription=
+
+@jd:body
+
+<div style="float:right;margin:0px 0px 24px 0px;">
+ <img src="{@docRoot}images/gp-tab.png" style="width:420px" style>
+</div>
+
+<p>A billion downloads a month and growing. Get your apps in front of millions
+of users at Google's scale. </p>
+
+
+<h2 id="reach">Worldwide reach, rapid growth</h2>
+
+<p>Google Play is the premier store for distributing Android apps. It’s
+preinstalled on more than 300 million devices worldwide, a number growing by
+almost a million every day. Android users have downloaded
+more than <strong style="text-wrap:none;">15 billion apps</strong> from Google
+Play, growing at a rate of more than 1 billion per month.</p>
+
+<p>When you publish on Google Play, you put your apps in front of Android's huge
+base of active customers, in more than 130 countries and territories across the
+world. </p>
+
+<p>Google Play is a central part of the Android experience. New users
+personalize their devices with apps, games, and other Google Play content.
+Existing users return regularly to see what's trending and new. Downloading new
+apps is extremely convenient and fast&mdash; Google Play pushes apps to the
+user's devices instantly, over the air. No cable or sync is ever needed.</p>
+
+<div style="float:left;margin:0px 20px 0px 0px;width:374px;">
+<div style="width:378px;padding:2px;">
+<img src="{@docRoot}images/gp-growth-downloads.png" style="width:600px;margin-bottom:0em;">
+</div>
+<p class="image-caption" style="padding:.5em"><span
+style="font-weight:500;">Growth in app consumption</span>: Users download more than
+1 billion apps from Google Play each month.</p>
+</div>
+
+<div>
+<p>Google Play is also a top destination for visitors from the the web. Anyone
+with a browser can explore everything that Google Play has to offer from its <a
+href="http://play.google.com/store">web site</a>. Android users can even buy and
+install the apps they want and Google Play pushes them automatically to their
+devices over the air. </p>
+
+<p>The accessiblility and convenience of the Google Play web
+site give you new ways to drive traffic to your products from online ads, web
+search, cross-linking, and more.</p>
+</div>
+
+ <div style="clear:both;">
+<h2>Built for app discovery</h2>
+
+<p>Google Play is designed to connect users with great apps and games. It
+provides key channels to help your app get noticed and gain traction in the
+marketplace.</p>
+
+<h3 id="ratings">User ratings and reviews</h3>
+
+<p>When you develop a great app, Android users show their appreciation through
+ratings and reviews. They rate your app (out of 5 stars) after downloading it
+and can post a short description of their experience. When other users are
+considering your app, they look at the ratings and reviews as key benchmarks of
+the app’s quality. </p>
+
+ </div>
+
+<p>Your app’s rating is one of the most important factors influencing its
+ranking in the various lists and search results in Google Play. It's also one of
+the key signals that the editorial staff looks for, when curating apps and games
+for promotion in the store.</p>
+
+<div style="border:1px solid #DDD;padding:1px;margin-left:110px;width:504px;">
+<img src="{@docRoot}images/gp-rating-web.png" style="width:500px;padding:0;margin:0;">
+</div>
+
+<h3 id="category" stdle="padding-top:2em;">Category browsing</h3>
+
+<p>When you publish an app in Google Play, you pick the category in which you
+want users to find your app. More than 30 categories are available. Inside each
+category, apps are ranked based on a combination of ratings, reviews, downloads,
+country, and other factors. Many popular categories also start with a collection
+of featured apps selected by the Google Play editorial staff.</p>
+
+<div style="clear:both;margin-top:2em;margin-left:10%;width:560px;">
+<div style="clear:both;margin-top:2em;">
+<img src="{@docRoot}images/gpp-cat-feature280-puzzle.png" style="width:180px">
+<img src="{@docRoot}images/gpp-cat-feature280-photo.png" style="width:180px">
+<img src="{@docRoot}images/gpp-cat-feature280-sports.png" style="width:180px">
+</div>
+<p class="image-caption"><span style="font-weight:500;">Featuring in
+categories</span>: Most app and game categories include a featured list curated
+by the editorial team.</p>
+</div>
+
+<h3 id="search">Search</h3>
+
+<p>Search on Google Play lets users pinpoint an app or game quickly. Search uses
+powerful heuristics to suggest terms as the user types, and it offers direct
+links to apps as suggestions. In results, users find the most relevant, most
+popular apps at the top. </p>
+
+<div style="float:left;margin:12px 24px 0px 0px;">
+<img src="{@docRoot}images/gp-top-new-paid.png" style="width:250px">
+</div>
+
+<h3 id="top-charts" style="padding-top:1em">Top charts and lists</h3>
+
+<p>Top charts keep users in touch with what’s popular and trending with Android
+users, right from the Apps and Games home pages. The charts are generated
+several times each day based on recent download activity, keeping them fresh and
+allowing new apps to move upward in the charts. To make the charts as relevant
+as possible for users across the world, they are also country-specific.</p>
+
+<p>As your apps get traction and build momentum in downloads and ratings,
+they’ll climb one or more of the top charts and gain even more exposure.</p>
+
+<div>
+<table style="width:440px">
+<tr>
+<td style="width:100px">Top Free</td><td>Free apps and games</td></tr>
+<td style="width:140px">Top Paid</td><td>Priced apps and games</td></tr>
+<td>Top New Free</td><td>Less than 30 days old</td></tr>
+<td>Top New Paid</td><td>Less than 30 days old</td></tr>
+<td>Top Grossing</td><td>Gross proceeds, free or priced</td></tr>
+<td>Best Selling</td><td>Popular priced games</td></tr>
+<td>Trending</td><td>New arrivals growing quickly in installs</td>
+</tr>
+</table>
+</div>
+
+<div style="clear:both">
+<h4 id="featured" style="padding-top:2.5em;">Featured, Staff Picks, Collections,
+and Badges</h4>
+
+
+<div style="float:right;margin-left:18px;">
+<img src="{@docRoot}images/gp-apps-home.png" style="width:180px">
+<img src="{@docRoot}images/gp-games-home.png" style="width:180px">
+</div>
+
+<p>The Google Play editorial team is dedicated to bringing the best apps to the
+attention of users. It constantly reviews apps from across Google Play to find
+not only the biggest apps and games, but also the “diamonds in the rough” that
+they want more people to see. </p>
+
+<p>When the team finds great apps and games they use the <em>Featured</em>,
+<em>Staff Picks</em>, and other collections to promote them. Any one of those
+can give your apps dramatically higher visibility and market penetration.</p>
+
+<p>You can’t nominate your app for featuring or pay for a promotional slot,
+because the editorial team wants to show the best apps and give the same chances
+to all developers. However, if you build an app that users love and that looks
+great on Android devices, the editorial team will notice. <!--In some cases,
+they will reach out to you before your app is featured to make sure that your
+app will be at its best during featuring.</p> -->
+</div>
+
+<h4>Featured and Staff Picks</h4>
+
+<p>Each week the the Google Play editorial staff selects a new set of apps to
+promote in its popular <em>Featured</em> and <em>Staff Picks</em> collections.
+</p>
+
+The <em>Featured</em> collections highlight the latest and greatest app and game
+titles available for Android. Category featuring highlights the best and most
+popular apps in the top categories.
+
+<em>Staff Picks</em> collects all recently featured apps and games on Google
+Play. To better reach tablet users, there’s a special <em>Staff Picks</em>
+collection that highlights the best apps for Android tablets.</p>
+
+<div style="float:left;margin-right:18px;">
+<img src="{@docRoot}images/gp-collectibles.png" stydle="width:180px">
+
+</div>
+
+<h4>App collections</h4>
+
+<p>From time to time the editorial staff puts together a collection of apps and
+games based on a theme or seasonal event. The collections are popular with
+customers because they are timely and relevant, and they provide a new way to
+showcase great Android apps to users.</p>
+
+<p>The editorial staff chooses apps for collection promotions in a similar way
+as for featuring&mdash;high-quality apps that show the best of Android on phones
+and tablets. For collections the staff also looks for apps that can make an
+interesting or unique contribution to the collection as a whole. </p>
+
+<h4><img style="margin-right:.25em;margin-bottom:.5em;"
+src="{@docRoot}images/editorschoice_ann.png"> EDITORS' CHOICE</h4>
+
+<p><em>Editors’ Choice</em> is a curated collection of apps that highlights some
+of the very best apps available on Android. These apps are chosen for high
+quality and great UI, long-term popularity, and innovative use of Android
+features.</p>
+
+<p>Apps chosen for <em>Editors’ Choice</em> also receive a badge that is
+displayed wherever the app name is seen in Google Play.</p>
+
+<h4><img style="margin-right:.25em;margin-bottom:.5em;"
+src="{@docRoot}images/topdev_ann.png"> TOP DEVELOPER</h4>
+
+<p>Top Developer is a badge recognizing established, respected developers for
+their commitment to launching high-quality and innovative apps on
+Android. The Google Play editorial staff selects developers awards a Top
+Developer badge from time to time, based on the cumulative work of the
+developer.</p>
+
+<p>The Top Developer badge appears next to the developer name wherever it is
+displayed in Google Play. For a developer, the badge means long-term recognition
+of all of your apps. For users, the badge signifies an additional level of trust
+and confidence in your products.</p>
+
+<h3 id="details">Rich, colorful product pages</h3>
+
+<p>In Google Play, your app’s storefront is its <em>product details page</em>
+&mdash; a rich and colorful page that lets you promote your app, highlight its
+ratings and reviews, and show what your app can do.
+
+<p>Your product details page is the one page where your users come to find out
+everything about your app. When they see your app listed in search results, top
+charts, category listings, and collections, one tap takes them directly to your
+product details page.</p>
+
+<div style="float:right;margin-left:10px;">
+<img src="{@docRoot}images/gp-details-pages-magicpiano.png" style="width:500px">
+</div>
+
+<p>You can manage your product details page through the <span
+style="font-weight:500">Google Play Android Develeper Console</span>, from any
+web browser. Just sign in, upload or update your brand assets, and enter your
+product details in the languages of your markets. </p>
+
+<p>When you publish, Google Play adds your app’s ratings, reviews, links to your
+other products, and more, and makes sure your product details page looks great
+on phones, tablets, or in a web browser.</p>
+
+<p>You can link web users directly to your product details page from outside
+Google Play, such as from your web site, an ad campaign, reviews, social media
+posts, and more. See <a href="{@docRoot}distribute/googleplay/promote/linking.html">Linking
+to Your Products</a> to find out how. </p>
+
+<p>To learn more about how to create your product details page, see
+<a href="{@docRoot}distribute/googleplay/publish/index.html">Publishing on Google Play</a>.</p>
diff --git a/docs/html/community/index.html b/docs/html/distribute/googleplay/index.html
index fb2a0d35bcc1..46a8ce2c3b67 100644
--- a/docs/html/community/index.html
+++ b/docs/html/distribute/googleplay/index.html
@@ -1,10 +1,10 @@
<html>
<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/resources/community-groups.html">
+<meta http-equiv="refresh" content="0;url=http://developer.android.com/distribute/index.html">
<title>Redirecting...</title>
</head>
<body>
<p>You should have been redirected. Please <a
-href="http://developer.android.com/resources/community-groups.html">click here</a>.</p>
+href="http://developer.android.com/distribute/index.html">click here</a>.</p>
</body>
</html> \ No newline at end of file
diff --git a/docs/html/distribute/googleplay/promote/badges.jd b/docs/html/distribute/googleplay/promote/badges.jd
new file mode 100644
index 000000000000..de12e2a962c0
--- /dev/null
+++ b/docs/html/distribute/googleplay/promote/badges.jd
@@ -0,0 +1,203 @@
+page.title=Google Play Badges
+@jd:body
+
+<p>Google Play badges give you an officially branded way of promoting your app to Android users. Use the form below to quickly create badges to link users to your products from web pages, ads, reviews, and more. See <a href="linking.html">Linking to your products</a> for more ways to bring users to your apps.</p>
+
+<p>Input your app's package or your publisher name, choose the style, size, and language, and click "Build my badge". The form will generate code for an embbeded button that links to your app's product page or a list of your apps. </p>
+
+<p>Note that you should not modify the Google Play badges after generating them, including colors, size, text, and logo. See <a href="http://www.android.com/branding.html">Android Brand Guidelines</a> for more information.</p>
+
+<style type="text/css">
+
+form.button-form {
+ margin-top:2em;
+}
+
+/* the label and input elements are blocks that float left in order to
+ keep the left edgets of the input aligned, and IE 6/7 do not fully support "inline-block" */
+label.block {
+ display: block;
+ float: left;
+ width: 100px;
+ padding-right: 10px;
+}
+
+input.text {
+ display: block;
+ float: left;
+ width: 250px;
+}
+
+div.button-row {
+ white-space:nowrap;
+ min-height:80px;
+}
+
+div.button-row input {
+ vertical-align:120%;
+}
+
+#jd-content div.button-row img {
+ margin: 0;
+}
+
+</style>
+
+<script type="text/javascript">
+
+// variables for creating 'try it out' demo button
+var imagePath = "http://www.android.com/images/brand/"
+var linkStart = "<a href=\"http://play.google.com/store/";
+var imageStart = "\">\n"
+ + " <img alt=\"";
+ // leaves opening for the alt text value
+var imageSrc = "\"\n src=\"" + imagePath;
+ // leaves opening for the image file name
+var imageEnd = ".png\" />\n</a>";
+
+// variables for creating code snippet
+var linkStartCode = "&lt;a href=\"http://play.google.com/store/";
+var imageStartCode = "\"&gt;\n"
+ + " &lt;img alt=\"";
+ // leaves opening for the alt text value
+var imageSrcCode = "\"\n src=\"" + imagePath;
+ // leaves opening for the image file name
+var imageEndCode = ".png\" />\n&lt;/a>";
+
+/** Generate the HTML snippet and demo based on form values */
+function buildButton(form) {
+ var selectedValue = $('form input[type=radio]:checked').val();
+ var altText = selectedValue.indexOf("get_it") != -1 ? "Get it on Google Play" : "Android app on Google Play";
+
+ if (form["package"].value != "com.example.android") {
+ $("#preview").show();
+ $("#snippet").show().html(linkStartCode + "apps/details?id=" + form["package"].value
+ + imageStartCode + altText + imageSrcCode
+ + selectedValue + imageEndCode);
+ $("#button-preview").html(linkStart + "apps/details?id=" + form["package"].value
+ + imageStart + altText + imageSrc
+ + selectedValue + imageEnd);
+ } else if (form["publisher"].value != "Example, Inc.") {
+ $("#preview").show();
+ $("#snippet").show().html(linkStartCode + "search?q=pub:" + form["publisher"].value
+ + imageStartCode + altText + imageSrcCode
+ + selectedValue + imageEndCode);
+ $("#button-preview").html(linkStart + "search?q=pub:" + form["publisher"].value
+ + imageStart + altText + imageSrc
+ + selectedValue + imageEnd);
+ } else {
+ alert("Please enter your package name or publisher name");
+ }
+ return false;
+}
+
+/** Listen for Enter key */
+function onTextEntered(event, form, me) {
+ // 13 = enter
+ if (event.keyCode == 13) {
+ buildButton(form);
+ }
+}
+
+/** When input is focused, remove example text and disable other input */
+function onInputFocus(object, example) {
+ if (object.value == example) {
+ $(object).val('').css({'color' : '#000'});
+ }
+ $('input[type="text"]:not(input[name='+object.name+'])',
+ object.parentNode).attr('disabled','true');
+ $('#'+object.name+'-clear').show();
+}
+
+/** When input is blured, restore example text if appropriate and enable other input */
+function onInputBlur(object, example) {
+ if (object.value.length < 1) {
+ $(object).attr('value',example).css({'color':'#ccc'});
+ $('input[type="text"]', object.parentNode).removeAttr('disabled');
+ $('#'+object.name+'-clear').hide();
+ }
+}
+
+/** Clear the form to start over */
+function clearLabel(id, example) {
+ $("#preview").hide();
+ $('#'+id+'').html('').attr('value',example).css({'color':'#ccc'});
+ $('input[type="text"]', $('#'+id+'').parent()).removeAttr('disabled');
+ $('#'+id+'-clear').hide();
+ return false;
+}
+
+/** When the doc is ready, find the inputs and color the input grey if the value is the example
+ text. This is necessary to handle back-navigation, which can auto-fill the form with previous
+ values (and text should not be grey) */
+$(document).ready(function() {
+ $(".button-form input.text").each(function(index) {
+ if ($(this).val() == $(this).attr("default")) {
+ $(this).css("color","#ccc");
+ } else {
+ /* This is necessary to handle back-navigation to the page after form was filled */
+ $('input[type="text"]:not(input[name='+this.name+'])',
+ this.parentNode).attr('disabled','true');
+ $('#'+this.name+'-clear').show();
+ }
+ });
+});
+
+</script>
+
+<form class="button-form">
+ <label class="block" for="package">Package name:</label>
+ <input class="text" type="text" id="package" name="package"
+ value="com.example.android"
+ default="com.example.android"
+ onfocus="onInputFocus(this, 'com.example.android')"
+ onblur="onInputBlur(this, 'com.example.android')"
+ onkeyup="return onTextEntered(event, this.parentNode, this)"/>&nbsp;
+ <a id="package-clear" style="display:none" href="#"
+ onclick="return clearLabel('package','com.example.android');">clear</a>
+ <p style="clear:both;margin:0">&nbsp;<em>or</em></p>
+ <label class="block" style="margin-top:5px" for="publisher">Publisher&nbsp;name:</label>
+ <input class="text" type="text" id="publisher" name="publisher"
+ value="Example, Inc."
+ default="Example, Inc."
+ onfocus="onInputFocus(this, 'Example, Inc.')"
+ onblur="onInputBlur(this, 'Example, Inc.')"
+ onkeyup="return onTextEntered(event, this.parentNode, this)"/>&nbsp;
+ <a id="publisher-clear" style="display:none" href="#"
+ onclick="return clearLabel('publisher','Example, Inc.');">clear</a>
+ <br/><br/>
+
+<div class="button-row">
+ <input type="radio" name="buttonStyle" value="get_it_on_play_logo_small" id="ns" checked="checked" />
+ <label for="ns"><img src="http://www.android.com/images/brand/get_it_on_play_logo_small.png"
+alt="Get it on Google Play (small)" /></label>
+ &nbsp;&nbsp;&nbsp;&nbsp;
+ <input type="radio" name="buttonStyle" value="get_it_on_play_logo_large" id="nm" />
+ <label for="nm"><img src="http://www.android.com/images/brand/get_it_on_play_logo_large.png"
+alt="Get it on Google Play (large)" /></label>
+</div>
+
+<div class="button-row">
+ <input type="radio" name="buttonStyle" value="android_app_on_play_logo_small" id="ws" />
+ <label for="ws"><img src="http://www.android.com/images/brand/android_app_on_play_logo_small.png"
+alt="Android app on Google Play (small)" /></label>
+ &nbsp;&nbsp;&nbsp;&nbsp;
+ <input type="radio" name="buttonStyle" value="android_app_on_play_logo_large" id="wm" />
+ <label for="wm"><img src="http://www.android.com/images/brand/android_app_on_play_logo_large.png"
+alt="Android app on Google Play (large)" /></label>
+</div>
+
+ <input type="button" onclick="return buildButton(this.parentNode)" value="Build my badge"
+style="padding:5px" />
+ <br/>
+</form>
+
+<div id="preview" style="display:none">
+ <p>Copy and paste this HTML into your web site:</p>
+ <textarea id="snippet" cols="100" rows="5" onclick="this.select()"
+style="font-family:monospace;background-color:#efefef;padding:5px;display:none;margin-bottom:1em">
+ </textarea >
+
+<p>Try it out:</p>
+<div id="button-preview" style="margin-top:1em"></div>
+</div>
diff --git a/docs/html/distribute/googleplay/promote/brand.jd b/docs/html/distribute/googleplay/promote/brand.jd
new file mode 100644
index 000000000000..8aafc48fe3dd
--- /dev/null
+++ b/docs/html/distribute/googleplay/promote/brand.jd
@@ -0,0 +1,174 @@
+page.title=Brand Assets, Icons, and Guidelines
+@jd:body
+
+<p>We encourage you to use the Android and Google Play brands in your
+promotional materials. You can use the icons and other assets on this page in
+any way you want, provided that you follow the guidelines described below.</p>
+
+<h2 id="brand-android">Android Brand</h2>
+
+<div>
+ <div style="float:right;width:50%;padding:1.5em;">
+ <img alt="" src="{@docRoot}images/brand/droid.gif">
+ </div>
+
+ <div style="width:45%;">
+ <h4>01/ Android Robot</h4>
+
+ <p> Can be used, reproduced, and modified freely in marketing
+ communications. Our standard color value for print is PMS 376C. Our online hex
+ color is <span id= "android-green">#A4C639</span>.</p>
+
+ <p>When using the Android Robot or any modification of it, proper attribution is
+ required under the terms of the Creative Commons Attribution license. For more
+ details on proper attribution, please see the <a
+ href="{@docRoot}license.html#attribution">Content License</a> document. </p>
+ </div>
+<div>
+
+<div style="clear:both">
+ <div style="float:right;width:50%;padding:1.5em;">
+ <img alt="" src="{@docRoot}images/brand/logo_android.gif">
+ </div>
+
+ <div style="width:45%;">
+ <h4>02/ Android Logo</h4>
+
+ <p>The Android logo may not be used.</p>
+ </div>
+<div>
+
+<div style="clear:both">
+ <div style="float:right;width:50%;padding:1.5em;">
+ <img alt="" src="{@docRoot}images/brand/norad.gif">
+ </div>
+
+ <div style="width:45%;">
+ <h4>03/ Android Custom Typeface</h4>
+
+ <p>The custom typeface may not be used.</p>
+ </div>
+<div>
+
+<div style="clear:both">
+ <div style="float:right;width:50%;padding:1.5em;">
+ <img alt="" src="{@docRoot}images/brand/mediaplayer.gif">
+ </div>
+
+ <div style="width:45%;">
+ <h4>04/ Android in Official Names</h4>
+<p>Any name with 'Android' alone may not be used in a name without permission. Any name
+ with 'Droid' alone may not be used in a name.</p>
+
+ <p>The word 'Android' may be used only as a descriptor, 'for Android'. If used with your
+ logo, 'for Android' needs to be smaller in size than your logo. First instance of this
+ use should be followed by a TM symbol, 'for Android™'.</p>
+
+ <p>If you are not sure you meet these criteria, <a href=
+ "http://services.google.com/permissions/application">please contact us</a>. </p>
+ </div>
+<div>
+
+<div style="clear:both">
+ <div style="float:right;width:50%;padding:1.5em;">
+ <img alt="" src="{@docRoot}images/brand/learnmore.gif">
+ </div>
+
+ <div style="width:45%;">
+ <h4>05/ Android in Messaging</h4>
+ <p>
+ May be used in text as a descriptor, as long as it is followed by a proper generic term
+ (e.g. "Android™ application"). First instance of this use should be followed by a TM
+ symbol.
+ </p>
+ </div>
+<div>
+ <p class="caution"><strong>Note: Any usage of #04 or #05 needs to include footer attribution in your
+ communication:</strong><br /><span style="margin-left:1.5em">
+ "Android is a trademark of Google Inc."</span>
+ </p>
+
+<h2 id="brand-google_play">Google Play Brand</h2>
+
+<div style="clear:both">
+ <div style="float:right;width:50%;padding:1.5em;">
+ <p>
+ <img alt="Google Play logo" src="{@docRoot}images/brand/google_play_logo_450.png">
+ </p>
+ <p>
+ <img alt="Get it on Google Play badge, large" src=
+ "/images/brand/get_it_on_play_logo_large.png"><br>
+ Download: <a href="{@docRoot}images/brand/get_it_on_play_logo_small.png">Small</a> | <a href=
+ "/images/brand/get_it_on_play_logo_large.png">Large</a>
+ </p>
+ <p>
+ <img alt="Android App on Google Play badge, large" src=
+ "/images/brand/android_app_on_play_logo_large.png"><br>
+ Download: <a href="{@docRoot}images/brand/android_app_on_play_logo_small.png">Small</a> |
+ <a href="{@docRoot}images/brand/android_app_on_play_large.png">Large</a>
+ </p>
+ </div>
+
+ <div style="width:45%;">
+ <h4>06/ <em>Get it on Google Play</em> Badge
+ </h4>
+ <p>
+ The "Get it on Google Play" and "Android App on Google Play" logos are badges that you
+ can use on your web site and promotional materials, to point to your products on Google
+ Play.
+ </p>
+ <p>
+ The logos are available in two sizes:
+ </p>
+ <ul>
+ <li>Large: 60(h) x 172(w)</li>
+ </li>
+ <li>Small 45(h) x 129(w)
+ </li>
+ </ul>
+ <p>
+ Guidelines for usage:
+ </p>
+ <ul>
+ <li>Never separate the phrase “Get it on Google Play” or "Android App on Google Play"
+ from the Google Play logo, and do not change the color, proportions, spacing or any
+ other aspect of the logo.
+ </li>
+ </ul>
+ </div>
+
+ <ul>
+ <li>When used online, the badge logo should be used to direct users to:
+ <ul>
+ <li>The Google Play landing page: <br /><span style="margin-left:1em;"><a href=
+ "http://play.google.com/">play.google.com</a></span>
+ </li>
+ <li>The Google Play Apps landing page: <br /><a href="http://play.google.com/store/apps">
+ <span style="margin-left:1em;"> play.google.com/store/apps</a></span>
+ </li>
+ <li>A list of products that include your company name, for example, <br />
+ <span style="margin-left:1em;">http://play.google.com/store/search?q=<em>yourCompanyName</em></span>
+ </li>
+ <li>A list of products published by you, for example,<br />
+ <span style="margin-left:1em;">play.google.com/store/search?q=<em>publisherName</em>M/span>
+ </li>
+ <li>A specific app product details page within Google Play, for example,<br />
+ <span style="margin-left:1em;">play.google.com/store/apps/details?id=<em>packageName</em></span>
+ </li>
+ </ul>
+ </li>
+ <li>When used alongside logos for other application marketplaces, the Google Play logo
+ should be of equal or greater size</li>
+ </ul>
+
+ <p>For details on all the ways that you can link to your product details page in Google Play,
+ see <a href="{@docRoot}distribute/googleplay/promote/linking.html">Linking to your products</a></p>
+
+ <p>For convenience, if you are using the logos online, you can use the
+ <a href="{@docRoot}distribute/googleplay/promote/badges.html">badge generator</a>
+ to create the appropriate markup and link to your apps.</p>
+
+<h2>Other Brands</h2>
+
+<p>Any other brands or icons depicted on this site are <em>not</em> are the property of their
+repective owners and usage is reserved. You must seek the developer for appropriate permission to use them.</p>
diff --git a/docs/html/distribute/googleplay/promote/index.jd b/docs/html/distribute/googleplay/promote/index.jd
new file mode 100644
index 000000000000..68829907fe22
--- /dev/null
+++ b/docs/html/distribute/googleplay/promote/index.jd
@@ -0,0 +1,43 @@
+page.title=Promoting Your Apps
+page.metaDescription=Raise the visibility of your apps in Google Play through deep links and Google Play badges.
+header.hide=0
+footer.hide=0
+@jd:body
+
+<!--
+<style>
+#landing-graphic-container {
+ position: relative;
+}
+
+#text-overlay {
+ position: absolute;
+ left: 0;
+ top: 472px;
+ width: 280px;
+}
+</style>
+
+<div id="landing-graphic-container">
+ <div id="text-overlay">
+ Raise the visibility of your apps with badges and link users to your products on Google Play.
+ <br><br>
+ <a href="{@docRoot}distribute/googleplay/promote/product-pages.html" class="landing-page-link">Your Product Pages</a>
+ </div>
+
+ <a href="{@docRoot}distribute/googleplay/promote/index.html">
+ <img src="{@docRoot}design/media/index_landing_page.png">
+ </a>
+</div> -->
+
+<p>After you publish your app, you can bring Android users to your app's product details page by
+providing links in your social network posts, ad campaigns, app reviews and articles, your
+web site, and more. </p>
+
+<p>You can use the resources in this section to create deep links for your online placements.
+Google Play badges are an especially great way let Android users know that your app is available
+and link them directly to your download page. With the badge generator, they're also easy to make.</p>
+
+
+<p style="margin-top:1.5em;margin-bottom:1.5em;"><a href="{@docRoot}distribute/googleplay/promote/linking.html" class="landing-page-link">Linking to Your Products</a></p>
+
diff --git a/docs/html/distribute/googleplay/promote/linking.jd b/docs/html/distribute/googleplay/promote/linking.jd
new file mode 100644
index 000000000000..4a1b19834f3f
--- /dev/null
+++ b/docs/html/distribute/googleplay/promote/linking.jd
@@ -0,0 +1,213 @@
+page.title=Linking to Your Products
+@jd:body
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+<a href="badges.html">
+ <img alt="Get it on Google Play"
+ src="http://www.android.com/images/brand/get_it_on_play_logo_small.png" />
+</a>
+<p>For a link that includes the Google Play brand icon, check out the <a href="badges.html">Badges</a> page. </p>
+</div>
+</div>
+
+<p>Google Play provides several link formats that let you bring users to your
+products in the way you want, from Android apps, web pages, ads, reviews,
+articles, social media posts, and more.</p>
+
+<p>The link formats let you:</p>
+<ul>
+<li>Link to a specific app's <a href="#OpeningDetails">product details page</a></li>
+<li>Link to a <a href="#OpeningPublisher">list of all of your apps</a>, or</li>
+<li>Link to a <a href="#PerformingSearch">search result</a> of your choice</li>
+<li>Link to a <a href="#OpeningCollection">collection</a> on Google Play</li>
+</ul>
+
+<p>If you are linking from an Android app, you can also control whether the link
+launches the Play Store application or the browser, which takes the user
+to the Google Play web site.</p>
+
+<h2 id="OpeningDetails">Linking to a Product Details Page</h2>
+
+<p>Use the format below to deep-link users directly to a specific app's product
+details page. At the product details page, users can see the app description,
+screenshots, reviews and more, and then install it.</p>
+
+<p>To create the link, you need to know the app's fully qualified <em>package
+name</em>, which is declared in the app's <a
+href="{@docRoot}guide/topics/manifest/manifest-element.html#package">manifest
+file</a>. The package name is also visible in the Developer Console. </p>
+
+<dl>
+<dt><strong>From a web site:</strong></dt>
+<dd>
+<pre>http://play.google.com/store/apps/details?id=&lt;package_name&gt;</pre>
+</dd>
+<dt><strong>From an Android app:</strong></dt>
+<dd>
+<pre>market://details?id=&lt;package_name&gt;</pre>
+</dd>
+</dl>
+
+<p>Here's an example:</p>
+
+<p style="margin-left:1em;"><code><a href="http://play.google.com/store/apps/details?id=com.google.android.apps">http://play.google.com/store/apps/details?id=com.google.android.apps</a></code></p>
+
+<p>For details on how to send the link in an Android app, see <a href="#android-app">Linking from an Android App</a>.</p>
+
+
+
+<h2 id="OpeningPublisher">Linking to a Product List</h2>
+
+<p>Use the format below to link users to a list of apps published by you. The
+product list lets users see all of the apps from a specific publisher, with
+ratings, editorial badges, and an Install button for each. </p>
+
+<p>To create the link, you need to know your <em>publisher name</em>, which is
+available from the Developer Console. </p>
+
+<dl>
+<dt><strong>From a web site:</strong></dt>
+<dd>
+<pre>http://play.google.com/store/search?q=pub:&lt;publisher_name&gt;</pre>
+</dd>
+<dt><strong>From an Android app:</strong></dt>
+<dd>
+<pre>market://search?q=pub:&lt;publisher_name&gt;</pre>
+</dd>
+</dl>
+
+<p>Here's an example:</p>
+
+<p style="margin-left:1em;"><code><a href="http://play.google.com/store/search?q=pub:Google Inc.">http://play.google.com/store/search?q=pub:Google Inc.</a></code></p>
+
+<p>For details on how to send the link in an Android app, see <a href="#android-app">Linking from an Android App</a>.</p>
+
+
+<h2 id="PerformingSearch">Linking to a Search Result</h2>
+
+<p>Use the format below to link users to a search query result on Google Play.
+The search result page shows a list of apps (and optionally other content) that
+match the query, with ratings, badges, and an Install button for each. </p>
+
+<p>To create the link, you just need a search query string. If you want the
+query to search outside of the Google Play Apps listings, you can remove the
+<code>&c=apps</code> part of the link URL.</p>
+
+<dl>
+<dt><strong>From a web site:</strong></dt>
+<dd>
+<pre>http://play.google.com/store/search?q=&lt;search_query&gt;&c=apps</pre>
+</dd>
+<dt><strong>From an Android app:</strong></dt>
+<dd>
+<pre>market://search?q=&lt;seach_query&gt;&c=apps</pre>
+</dd>
+</dl>
+
+<p>Here's an example:</p>
+
+<p style="margin-left:1em;"><code><a href="http://play.google.com/store/search?q=maps&c=apps">http://play.google.com/store/search?q=maps&c=apps</a></code></p>
+
+<p>For details on how to send the link in an Android app, see <a href="#android-app">Linking from an Android App</a>.</p>
+
+
+
+<h2 id="OpeningCollection">Linking to a Collection</h2>
+
+<p>If your app is featured or appears in one of the Google Play Top charts or
+collections, you can use the format below to link users directly to the
+collection. The collection shows a ranked list of apps in the collection, with
+ratings, short descriptions, and an Install button.</p>
+
+<dl>
+<dt><strong>From a web site:</strong></dt>
+<dd>
+<pre>http://play.google.com/store/apps/collection/&lt;collection_name&gt;</pre>
+</dd>
+<dt><strong>From an Android app:</strong></dt>
+<dd>
+<pre>market://apps/collection/&lt;collection_name&gt;</pre>
+</dd>
+</dl>
+
+<p>Here's an example:</p>
+
+<p style="margin-left:1em;"><code><a href="http://play.google.com/store/apps/collection/editors_choice">http://play.google.com/store/apps/collection/editors_choice</a></code></p>
+
+<p>For details on how to send the link in an Android app, see <a href="#android-app">Linking from an Android App</a>.</p>
+
+<p class="table-caption"><strong>Table 1.</strong> Collections on Google Play</a>.</p>
+
+<table>
+<tr>
+<th>Collection</th><th>collection_name</th>
+</tr>
+<tr><td>Staff Picks (Featured)</td><td>featured</td></tr>
+<tr><td>Editor's Choice</td><td>editors_choice</td></tr>
+<tr><td>Top Paid</td><td>topselling_paid</td></tr>
+<tr><td>Top Free</td><td>topselling_free</td></tr>
+<tr><td>Top New Free</td><td>topselling_new_free</td></tr>
+<tr><td>Top New Paid</td><td>topselling_new_paid</td></tr>
+<tr><td>Top Grossing</td><td>topgrossing</td></tr>
+<tr><td>Trending</td><td>movers_shakers</td></tr>
+<tr><td>Best Selling in Games</td><td>topselling_paid_game</td></tr>
+</table>
+
+
+<h2 id="android-app">Linking from an Android App</h2>
+
+<p>There are two general formats for links that are accessible to users on
+Android devices, The two formats trigger slightly different behaviors on the
+device:</p>
+
+<ul>
+<li><code>market://</code> &nbsp;&nbsp; Launches the Play Store app to load the
+target page.</li>
+<li><code>http://</code> &nbsp;&nbsp; Lets the user choose whether to launch the
+Play Store app or the browser to handle the request. If the browser handles the
+request, it loads the target page on the Google Play web site.</li>
+</ul>
+
+<p>In general, you should use <code>http://</code> format for links on web pages
+and <code>market://</code> for links in Android apps.</p>
+
+<p>If you want to link to your products from an Android app, create an {@link
+android.content.Intent} that opens an Google Play URL, as shown in the example
+below.</p>
+
+<pre>
+Intent intent = new Intent(Intent.ACTION_VIEW);
+intent.setData(Uri.parse("market://details?id=com.example.android"));
+startActivity(intent);
+</pre>
+
+
+<h2 id="UriSummary">Summary of URL formats</h2>
+
+<p>The table below provides a summary of the URIs currently supported by the Google Play (both on
+the web and in an Android application), as discussed in the previous sections.</p>
+
+<table>
+<tr>
+<th>For&nbsp;this&nbsp;result</th>
+<th>Web page link</th>
+<th>Android app link</th>
+</tr>
+<tr>
+<td style="width:72px;">Show the product details page for a specific app</td>
+<td><code>http://play.google.com/store/apps/details?id=&lt;package_name&gt;</code>
+<td><code>market://details?id=&lt;package_name&gt;</code></td>
+</tr>
+<tr>
+<td>Show apps by a specific publisher</td>
+<td><nobr><code>http://play.google.com/store/search?q=pub:&lt;publisher_name&gt;</code></nobr></td>
+<td><nobr><code>market://search?q=pub:&lt;publisher_name&gt;</code></nobr></td>
+</tr>
+<tr>
+<td>Search for apps using a general string query.</td>
+<td><code>http://play.google.com/store/search?q=&lt;query&gt;</code></td>
+<td><code>market://search?q=&lt;query&gt;</code></td>
+</tr>
+</table>
+
diff --git a/docs/html/distribute/googleplay/promote/product-pages.jd b/docs/html/distribute/googleplay/promote/product-pages.jd
new file mode 100644
index 000000000000..af5b2d5dc91e
--- /dev/null
+++ b/docs/html/distribute/googleplay/promote/product-pages.jd
@@ -0,0 +1,4 @@
+page.title=Your Product Pages
+@jd:body
+
+<p>Placeholder...</p> \ No newline at end of file
diff --git a/docs/html/distribute/googleplay/publish/console.jd b/docs/html/distribute/googleplay/publish/console.jd
new file mode 100644
index 000000000000..72b97abb7473
--- /dev/null
+++ b/docs/html/distribute/googleplay/publish/console.jd
@@ -0,0 +1,201 @@
+page.title=The Developer Console
+@jd:body
+
+
+<p>Once you've <a
+href="{@docRoot}distribute/googleplay/publish/register.html">registered</a> and
+received verification by email, you can sign in to your Google Play Android
+Developer Console, which will be the home for your app publishing operations and
+tools on Google Play. This sections below introduce a few of the key areas
+you'll find in the Developer Console.</p>
+
+<div style="width:610px;margin-left:">
+<div style="width:610px;border:1px solid #DDD;">
+<img src="{@docRoot}images/gp-dc-home.png" style="width:600px;padding:4px;margin-bottom:0em;">
+</div>
+<p class="image-caption" style="padding:.5em"><span
+style="font-weight:500;">Developer Console home page</span>: Gives you a quick
+overview of your apps, lets you jump to stats, reviews, or product details, or
+upload a new app. </p>
+</div>
+
+<h3 id="profile">Your Developer Profile</h3>
+
+<div style="width:408px;float:right;margin:1.5em;">
+<div style="width:410px;border:1px solid #DDD;">
+<img src="{@docRoot}images/gp-dc-profile.png" style="width:400px;padding:4px;margin-bottom:0em;">
+</div>
+<p class="image-caption" style="padding:.5em"><span
+style="font-weight:500;">Developer profile</span>: Specifies your developer
+identity and contact information, stores your developer key, and more.</p>
+</div>
+
+<p>Your developer profile identifies you to Google Play and to your customers.
+During registration you can provide information for your profile, but you can go
+back at any time to edit the information and change your settings. </p>
+
+<p>Your developer profile contains:</p>
+<ul>
+<li>Your developer name &mdash; the name you want to show users on your product
+details page and elsewhere on Google Play.
+<li>Your developer contact information &mdash; how Google can contact you if
+needed (this information isn't exposed to users.
+<li>Merchant information, in-app billing information.</li>
+<li>Your developer public key for licensing and In-app Billing.</li>
+</ul>
+
+<h3 id="user-accounts">Multiple user accounts</h3>
+
+<p>If you are working with a team, you can set up multiple user accounts to
+access different parts of your Developer Console. The first account registered
+is the <em>account owner</em>, with full access to all parts of the Console. The
+owner can add <em>user accounts</em> and manage what parts of the Console they
+have access to. For example, an owner can grant users access to publishing and
+app configuration, but not access to financial reports. </p>
+
+<h3 id="merchant">Linking your Merchant Account</h3>
+
+<p>If you want to sell apps or in-app products, you can link your Google
+Checkout Merchant account to your developer profile. Google Play uses the linked
+Checkout account for financial and tax identification and monthly payouts of
+sales. </p>
+
+<div style="width:410px;float:right;margin:1.5em;">
+<div style="width:410px;border:1px solid #DDD;">
+<img src="{@docRoot}images/gp-dc-details.png" style="width:400px;padding:4px;margin-bottom:0em;">
+</div>
+<p class="image-caption" style="padding:.5em"><span
+style="font-weight:500;">Product details page</span>: Lets you upload your
+graphic assets, description, support information, and other information to
+create the product details page for a specific app.</p>
+</div>
+
+<h3 id="details">Your product and listing details</h3>
+
+<p>The Developer Console lets you set up a colorful storefront page for your app
+called the <em>product details page</em>. Your product details page is the home
+for your app in Google Play &mdash; it's the page users see on their mobile
+phones or on the web when they want to learn about your app and download it.
+</p>
+
+<p>You can upload custom brand assets, screen shots, and videos to highlight
+what's great about your app, and you can provide a localized description, add
+notes about the latest version, and more. You can update your store listing at
+any time, even if you don’t have a new version of your application.</p>
+
+<h3 id="uploading">Uploading and publishing</h3>
+
+<p>From the Developer Console you can quickly upload a release-ready APK and
+publish it when you're ready. The app is a <em>draft</em> until you publish it,
+at which time Google Play makes your product details page and app available to
+users. You can unpublish the app at any time.</p>
+
+<h3 id="controls">Distribution Controls</h3>
+
+<p>In the Developer Console you can manage what countries and territories the
+app is distributed to and, for some countries, you can choose what carriers you
+want to target.</p>
+
+<p>You can also see the list of devices that your app is currently available to,
+based on any distribution rules declared in its manifest file.</p>
+
+<h3 id="profile">Selling and pricing your Products</h3>
+
+<p>The Developer Console gives you tools to set prices for your apps and in-app
+products. Your app can either be free to download or priced (charged before
+download). </p>
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+<p>See <a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=138294&topic=2365624&ctx=topic">Supported locations for distributing applications</a> for a list of countries where you can distribute or sell your app,</p>
+</div>
+</div>
+
+<ul>
+<li>If you publish your app as free, <span style="font-weight:500;">it must
+remain free</span>. Free apps can be downloaded by any users in Google
+Play.</li>
+<li>If you publish it as priced, you can change it to free, Priced apps can be
+purchased and downloaded only from .</li>
+</ul>
+
+<p>In addition, you can sell in-app products and subscriptions in your app,
+whether it is free or priced. You can set prices separately for priced apps,
+in-app products, and subscriptions.</p>
+
+<p>If you are selling a priced app or in-app products or subscriptions, the
+Developer Console lets you set prices in a large number of different currencies.
+When users around the world visit your product details page, they see the price
+of your app in their own currency. For most countries, the price you set is the
+final price charged to users, inclusive of taxes. </p>
+
+<p>To help you manage your prices, the Developer Console provides an autofill
+capability that uses recent exchange rates to populate the prices in all
+supported currencies. You can change prices for apps and in-app products at any
+time, just by saving changes in the Develoer Console.</p>
+
+<h3>In-app Billing</h3>
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+<h2>In-app Billing</h2>
+<p>For details on how to implement In-app Billing, see the
+<a href="{@docRoot}guide/google/play/billing/index.html">In-app Billing</span></a>
+developer documentation.</p></div></div>
+
+<p><a href="{@docRoot}guide/google/play/billing/index.html">In-app Billing</a> is a Google Play service that lets you monetize your apps in more ways by selling in-app products and subscriptions. In-app products are one-time purchases, while subscriptions are recurring charges on an monthly or annual basis.</p>
+
+<p>From the Developer Console you can create product lists for in-app
+products and subscriptions, set prices, and publish.</p>
+
+<div style="width:410px;float:right;margin:1.5em;">
+<div style="width:410px;border:1px solid #DDD;">
+<img src="{@docRoot}images/gp-dc-reviews.png" style="width:400px;padding:4px;margin-bottom:0em;">
+</div>
+<p class="image-caption" style="padding:.5em"><span style="font-weight:500;">User
+reviews page</span>: Gives you access to user reviews for a specific app.
+You can filter reviews in a number of ways to locate issues more easily
+and support your customers more effectively.</p>
+</div>
+
+<h3>User reviews and error reports</h3>
+
+<p>Google Play makes it easy for users to submit reviews of your app for the
+benefit of other users. The reviews are also extremely important to you, since
+they give you usability feedback, support requests, and important functionality
+issues direct from your customers. </p>
+
+<p>The Developer console also lets you see error reports, with stack trace and
+other data, submitted automatically from Android devices, for debugging and
+improving your app.</p>
+
+<h3>App statistics</h3>
+
+<p>The Developer Console gives you detailed statistics on the install
+performance of your app. </p>
+
+<p>You can view installations of your app measured by unique users, as well as
+by unique devices. For user installations, you can view active installs, total
+installs, and daily installs and uninstalls. For devices, you can see active
+installs as well as daily installs, uninstalls, and upgrades.</p>
+
+<p>You can zoom into the installation numbers along several dimensions,
+including Android platform version, device, country, language, app version, and
+carrier (mobile operator). You can see the installation data for each dimension
+on a timeline charts.</p>
+
+<p>At a glance, these charts highlight your app’s installation peaks and
+longer-term trends, which you can correlate to promotions, app improvements, or
+other factors. You can even focus in on data inside a dimension by adding
+specific points (such as individual platform versions or languages) to the
+timeline.</p>
+
+<div style="width:610px;margin:1.5em;margin-left:0">
+<div style="width:610px;border:1px solid #DDD;">
+<img src="{@docRoot}images/gp-dc-stats.png"
+style="width:600px;padding:4px;margin-bottom:0em;">
+</div>
+<p class="image-caption" style="padding:.5em"><span style="font-weight:500;">App
+installation statistics page</span>: Shows you a variety of statistics about a
+specific app's installation performance over time.</p>
+</div>
diff --git a/docs/html/distribute/googleplay/publish/index.jd b/docs/html/distribute/googleplay/publish/index.jd
new file mode 100644
index 000000000000..5a5eaf23f44e
--- /dev/null
+++ b/docs/html/distribute/googleplay/publish/index.jd
@@ -0,0 +1,23 @@
+page.title=Publishing on Google Play
+header.hide=1
+footer.hide=1
+page.metaDescription=Get started publishing apps on Google Play.
+
+@jd:body
+
+<div style="height:413px;padding-top:50px;">
+ <img src="{@docRoot}images/gp-devconsole-home.png" style="margin-top:0px;">
+</div>
+
+<div style="width:460px;padding-bottom:40px;margin-left:1.5em;">
+ <p>Upload apps, build your product pages, configure prices and
+ distribution, and publish. You can manage all phases of publishing
+ on Google Play through the Developer Console, from any web browser.</p>
+
+<p style="margin-top:1.5em;margin-bottom:1.5em;"><a href="{@docRoot}distribute/googleplay/publish/register.html" class="landing-page-link">Get started</a></p>
+</div>
+
+
+
+
+
diff --git a/docs/html/distribute/googleplay/publish/preparing.jd b/docs/html/distribute/googleplay/publish/preparing.jd
new file mode 100644
index 000000000000..e50d3bfb04d6
--- /dev/null
+++ b/docs/html/distribute/googleplay/publish/preparing.jd
@@ -0,0 +1,570 @@
+page.title=Publishing Checklist for Google Play
+@jd:body
+
+<div id="qv-wrapper"><div id="qv">
+<h2>Checklist:</h2>
+<ol>
+<li><a href="#process">1. Understand the publishing process</a></li>
+<li><a href="#policies">2. Understand Google Play policies</a></li>
+<li><a href="#rating">3. Determine your content rating</a></li>
+<li><a href="#countries">4. Determine country distribution</a></li>
+<li><a href="#size">5. Confirm the app's overall size</a></li>
+<li><a href="#compatibility">6. Confirm app compatibility ranges</a></li>
+<li><a href="#free-priced">7. Decide on free or priced</a></li>
+<li><a href="#inapp-billing">8. Consider In-app Billing</a></li>
+<li><a href="#pricing">9. Set prices for your apps</a></li>
+<li><a href="#localize">10. Start localization</a></li>
+<li><a href="#localize">11. Prepare promotional graphics</a></li>
+<li><a href="#apk">12. Build the release-ready APK</a></li>
+<li><a href="#product-page">13. Complete the product details</a></li>
+<li><a href="#badges">14. Use Google Play badges and links to your promotional campaigns</a></li>
+<li><a href="#final-checks">15. Final checks and publishing</a></li>
+<li><a href="#support">16. Support users after launch</a></li>
+</ol>
+</div></div>
+
+
+<p>Before you publish your app on Google Play and distribute it to users, you
+need to get the app ready, test it, and prepare your promotional materials. </p>
+
+<p>This document helps you understand the publishing process and get ready for a
+successful product launch on Google Play. It summarizes some of the
+tasks you'll need to complete before publishing your app on Google Play, such as
+creating a signed, release-ready APK, understanding the requirements of the app,
+and creating the product page and graphic assets for your app.</p>
+
+<p>The preparation and publishing tasks are numbered to give you a rough idea of
+sequence. However, you can handle the tasks in any sequence that works for you
+or you can skip steps as appropriate.</p>
+
+<p>As you move toward publishing, a variety of support resources are available to
+you. Relevant links are provided in each step.</p>
+
+
+<h2 id="process">1. Understand the publishing process</h2>
+
+<p>Before you begin the steps in this checklist, you should take a moment to
+read and understand the overall publishing workflow and become familiar with how
+the process works. In particular, you or your development team will need to
+prepare your app for release using a process common to all Android apps.
+The <a
+href="{@docRoot}tools/publishing/publishing_overview.html">Publishing
+Workflow</a> documents provide the details on how publishing works and how to
+get an APK ready for release. </p>
+
+<p>Once you are familiar with publishing in general, read this document to
+understand the issues that you should consider when publishing an app on Google
+Play. </p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="{@docRoot}tools/publishing/publishing_overview.html">General Publishing Overview</a></strong> &mdash; Start here for an overview of publishing options for Android apps.</li>
+<li><strong><a href="{@docRoot}tools/publishing/preparing.html">Preparing for Release</a></strong> &mdash; Developer documentation on how to build the signed, release-ready APK. This process is the same for all Android apps. </li>
+<li><strong><a href="{@docRoot}distribute/googleplay/publish/publishing.html">Publishing on Google Play</a></strong> &mdash; Publishing process specific to Android apps being published on Google Play.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+<h2 id="policies">2. Understand Google Play policies and agreements</h2>
+
+<p>Make sure that you understand and follow the Google Play program policies
+that you accepted when registering. Google Play actively enforces the policies
+and any violations can lead to suspension of your app or, for repeated
+violations, termination of your developer account. </p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/topic.py?hl=en&topic=2364761&parent=2365624&ctx=topic">Policy and Best Practices
+</a></strong> &mdash; Help Center document describing various content policies and processes.</li>
+
+</ul>
+</td>
+</tr>
+</table>
+
+<h2 id="rating">3. Determine your app's content rating</h2>
+
+<p>Google Play requires you to set a content rating for your app, which informs
+Google Play users of its maturity level. Before you publish, you should confirm
+what rating level you want to use. The available content rating levels are:</p>
+
+<ul>
+<li>Everyone</li>
+<li>Low maturity</li>
+<li>Medium maturity</li>
+<li>High maturity</li>
+</ul>
+
+<p>On their Android devices, Android users can set the desired maturity level
+for browsing. Google Play then filters apps based on the setting, so the content
+rating you select can affect the app's distribution to users. You can assign (or
+change) the content rating for your app in the Developer Console, so no changes
+are required in your app binary.</p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=188189">Rating your application content for Google Play</a></strong> &mdash; Help Center document describing content ratings levels and how to choose the appropriate one for your app.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+<h2 id="countries">4. Determine country distribution</h2>
+
+<p>Google Play lets you control what countries and territories your app is
+distributed to. For widest reach and the largest potential customer base, you
+would normally want to distribute to all available countries and territories.
+However, because of business needs, app requirements, or launch dependencies,
+you might want to exclude one or more countries from your distribution. </p>
+
+<p>It's important to determine the exact country distribution early, because it
+can affect:</p>
+<ul>
+<li>The need for localized resources in the app</li>
+<li>The need for a localized app description in the Developer Console</li>
+<li>Legal requirements for the app that may be specific to certain
+countries</li>
+<li>Time zone support, local pricing, and so on.</li>
+</ul>
+
+<p>With your country targeting in mind, you should assess what
+your localization needs are, both in your app and in its Google Play listing
+details, and start the work of localization well in advance of your
+launch target date.</p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=138294&topic=2365624&ctx=topic">Supported locations for distributing applications</a></strong> on Google Play.
+.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+<h2 id="size">5. Confirm the app's overall size</h2>
+
+<p>The overall size of your app can affect its design and how you publish it on
+Google Play. Currently, the maximum size for an APK published on Google Play is
+<strong>50 MB</strong>. If your app exceeds that size, or if you want to offer a
+secondary download, you can use <a
+href="{@docRoot}guide/google/play/expansion-files.html">APK Expansion Files</a>,
+which Google Play will host for free on its server infrastructure and
+automatically handle the download to devices.</p>
+
+<ul>
+<li>The maximum size for an APK published on Google Play is 50 MB.</li>
+<li>You can use up to two (2) APK Expansion Files, each up to 2 GB in size, for
+each APK.</li>
+</ul>
+
+<p>Using APK Expansion files is a convenient, cost-effective method of
+distributing large apps. However, the use of APK Expansion Files requires some
+changes in your app binary, so you will need to make those changes before
+creating your release-ready APK.</p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="{@docRoot}guide/google/play/expansion-files.html">APK Expansion Files</a></strong> &mdash; Developer documentation describing APK Expansion Files and how to support them in your app.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+<h2 id="compatibility">6. Confirm the app's platform and screen compatibility ranges</h2>
+
+<p>Before publishing, it's important to make sure that your app is designed to
+run properly on the Android platform versions and device screen sizes that you
+want to target.
+
+<p>From an app-compatibility perspective, Android platform versions are defined
+by <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level</a>. You should
+confirm the minimum version that your app is compatible with (<a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;minSdkVersion&gt;</code></a>),
+as that will affect its distribution to Android
+devices once it is published. </p>
+
+<p>For screen sizes, you should confirm that the app runs properly and looks
+good on the range of screen sizes and densities that you want to support. You
+should confirm the minimum screen-size and density support that your app
+declares (<a
+href="{@docRoot}guide/topics/manifest/supports-screens-element.html"><code>&lt;supports-screens&gt;</code></a>),
+since that can affect its distribution to
+Android devices once it is published. </p>
+
+<p>To get a better understanding of the current device penetration of Android
+platform versions and screen sizes across all Android devices, see the <a
+href="{@docRoot}guide/topics/resources/localization.html">Device Dashboard</a>
+charts.</p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="{@docRoot}guide/topics/resources/localization.html">Device Dashboard</a></strong> &mdash; A chart showing global percentages of devices by Android version, screen size, and level of OpenGL ES support.</li>
+<li><strong><a href="{@docRoot}guide/topics/resources/localization.html">Android API Levels</a></strong> &mdash; A definition of API Levels and a list of which Android platform versions they are associated with. </li>
+</ul>
+</td>
+</tr>
+</table>
+
+<h2 id="free-priced">7. Decide whether your app will be free or priced</h2>
+
+<p>On Google Play, you can publish apps as free to download or priced. Free apps
+can be downloaded by any Android user in Google Play.
+Paid apps can be downloaded only by users who have registered a form of payment
+in Google Play, such as a credit card or Direct Carrier Billing.</p>
+
+<p>Deciding whether you app will be free or paid is important because, on Google
+Play, <strong>free apps must remain free</strong>.</p>
+
+<ul>
+<li>Once you publish your app as a free app, you cannot ever change it to being
+a priced app. However, you can still sell in-app products and
+subscriptions through Google Play's In-app Billing service.</li>
+<li>If you publish your app as a priced app, you <em>can</em> change
+it at any time to being a free app (but cannot then change it back to
+priced). You can also sell in-app products and subscriptions. </li>
+</ul>
+
+<p> If your app is be priced, or if you'll be selling in-app products,
+you need set up a Checkout Merchant Account before you can publish.</p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="{@docRoot}guide/google/play/billing/index.html">In-app Billing</a></strong> &mdash; Developer introduction to Google Play In-app Billing.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+<h2 id="inapp-billing">8. Consider using In-app Billing</h2>
+
+<p>Google Play <a href="{@docRoot}guide/google/play/billing/index.html">In-app
+Billing</a> lets you sell digital content in your applications. You can use the
+service to sell a wide range of content, including downloadable content such as
+media files or photos, and virtual content such as game levels or potions.
+In-app Billing service lets you sell one-time purchases and subscriptions from
+inside your app. This can help you to monetize the app over its installed
+lifetime. </p>
+
+<p>If your are looking for more ways to monetize your app and build engagement,
+you should consider In-app Billing. The service has become very popular with
+both users and developers. To use In-app Billing, you need to make changes to
+your app binary, so you will need to complete and test your implementation
+before creating your release-ready APK.</p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="{@docRoot}guide/google/play/billing/index.html">In-app Billing</a></strong> &mdash; Developer documentation describing In-app Billing and how to support it in your app.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+<h2 id="pricing">9. Set prices for your products</h2>
+
+<p>If your app is priced or you will sell in-app products, Google Play lets you
+set prices for your products in a variety of currencies, for users in markets
+around the world. You can set prices individually in different currencies, so
+you have the flexibility to adjust your price according to market conditions and
+exchange rates. </p>
+
+<p>Before you publish, consider how you will price your products
+and what your prices will be in various currencies. Later, you can set prices
+in all available currencies through the Developer Console.</p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=1169947&topic=15867&ctx=topic">Selling Apps in Multiple Currencies
+</a></strong> &mdash; Help Center document describing how pricing works in Google Play.</li>
+
+<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=138412&topic=15867&ctx=topic">Prices and supported currencies
+</a></strong> &mdash; Help Center document listing supported currencies for pricing your apps.</li>
+
+<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=112622&topic=15867&ctx=topic">Transaction Fees
+</a></strong> &mdash; Help Center document describing transaction fees for priced apps and in-app products.</li>
+
+<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=138000&topic=15867&ctx=topic">Specifying tax rates
+</a></strong> &mdash; Help Center document describing how to set tax rates for different countries. </li>
+
+</ul>
+</td>
+</tr>
+</table>
+
+<h2 id="localize">10. Start localization</h2>
+
+<p>With your country targeting in mind, it's a good idea to assess your localization
+needs and start the work of localizing well in advance of your target
+launch date.</p>
+
+<p>There are at least two aspects of localization to consider:</p>
+
+<ul>
+<li>Localizing the strings, images, and other resources in your app</li>
+<li>Localizing you app's store listing details on Google Play</li>
+</ul>
+
+<p>To get started localizing your app, work with your development team to extract
+any resource or coded strings for translation. Also identify images, icons, or
+other assets that should be language- or locale-specific. Hand these off to
+a translator.</p>
+
+<p>To localize your store listing, first create and finalize your app title, description,
+and promotional text. Collect and send all of these for localization. You can optionally
+translate the "Recent Changes" text for app updates as well.</p>
+
+<p>When your translations are complete, move them into your app resources as needed and test
+that they are loaded properly. Save your app's translated listing details for later,
+when you upload assets and configure your product details.</p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="{@docRoot}guide/topics/resources/localization.html">Localization</a></strong> &mdash; How to supply localized resources in your app.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+<h2 id="graphics">11. Prepare promotional graphics</h2>
+
+<p>When you publish on Google Play, you can supply a variety of high-quality
+graphic assets to showcase your app or brand. After you publish, these appear on
+your product details page, in store listings and search results, and elsewhere.
+These graphic assets are key parts of a successful product details page that
+attracts and engages users, so you should consider having a professional produce
+them for you. Screen shots and videos are also very important, because they show
+what your app looks like, how it's used or played, and what makes it different.
+
+<p>All of your graphic assets should be designed so that they are easy to see
+and highlight your app or brand in a colorful, interesting way. The assets
+should reference the same logo and icon as users will actually find in the All
+Apps launcher once they have downloaded the app. Your graphic assets should also
+fit in well with the graphic assets of other apps published by you, which will
+be also be displayed to users on your product details page. </p>
+
+<p>Because these assets are so important, you should get started on them well in
+advance of your target publishing date. </p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=1078870">Graphic Assets for your Application
+</a></strong> &mdash; Details about the graphic assets you need to upload before publishing.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+<h2 id="apk">12. Build and upload the release-ready APK</h2>
+
+<p>When you are satisfied that your app meets your UI, compatibility, and
+quality requirements, you can build the release-ready version of the app. The
+release-ready APK is what you you will upload to the Developer Console and
+distribute to users.
+
+<p>The process for preparing a release-ready APK is the same for all apps,
+regardless of how they are distributed. Generally the process includes basic code cleanup
+and optimization, building and signing with your release key, and final testing.
+When you are finished preparing your application for release, you'll have a signed
+APK file that you can upload to the Developer Console for distribution to
+users. </p>
+
+<p>For complete details on how to create a release-ready version of your app,
+read <a href="{@docRoot}tools/publishing/preparing.html">Preparing for
+Release</a>.</p>
+
+<p>Once you have the release-ready APK in hand, you can upload it to
+the Developer Console. If necessary, you can replace the APK with a more
+recent version before publishing. </p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="{@docRoot}tools/publishing/preparing.html">Preparing for Release</a></strong> &mdash; Essential information for preparing and packaging your app properly for distribution.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+<h2 id="product-page">13. Complete the app's product details</h2>
+
+<p>On Google Play, your app's product information is shown to users on its
+product details page, the page that users visit to learn more about your app and
+the page from which they will decide to purchase or download your app, on their
+Android devices or on the web.</p>
+
+<p>Google Play gives you a variety of ways to promote your app and engage with
+users on your product details page, from colorful graphics, screenshots, and
+videos to localized descriptions, release details, and links to your other apps.
+As you prepare to publish your app, make sure that you take advantage of all
+that your product details page can offer, making your app as compelling as
+possible to users.</p>
+
+<p>You should begin planning your product page in advance of your target launch
+date, arranging for localized description, high-quality graphic assets,
+screenshots and video, and so on. </p>
+
+<p>As you get near your target publishing date, you should become familiar with
+all the fields, options, and assets associated with the product details configuration
+page in the Developer Console. As you collect the information and assets for the
+page, make sure that you can enter or upload it to the Developer Console, until
+the page is complete and ready for publishing. </p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="{@docRoot}distribute/googleplay/promote/product-pages.html">Your Product Page</a></strong> &mdash; Tips and details on creating your product details page.</li>
+<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=113475&topic=2365760&ctx=topic">Category types
+</a></strong> &mdash; Help Center document listing available categories for apps.</li>
+<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=1078870&topic=2365760&ctx=topic">Graphic Assets for your Application
+</a></strong> &mdash; Help Center document describing the various graphics you can add to your product listing.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+<h2 id="badges">14. Use Google Play badges and links in your promotional
+campaigns</h2>
+
+<p>Google Play badges give you an officially branded way of promoting your app
+to Android users. Use the <a
+href="{@docRoot}distribute/googleplay/promote/badges.html">Google Play Badge
+generator</a> to quickly create badges to link users to your products from web
+pages, ads, reviews, and more. You can also use special <a
+href="{@docRoot}distribute/googleplay/promote/linking.html">link formats</a>
+to link directly to your product details page, to a list of your products, or to
+search results.</p>
+
+<p>To help your app get traction after launch, it's strongly recommended that you support
+launch with a promotional campaign that announces your product through many channels as
+possible, in as many countries as possible. For example, you can promote the launch
+using ad placements, social network or blog posts, video and other media, interviews
+and reviews, or any other channel available.</p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="{@docRoot}distribute/googleplay/promote/badges.html">Google Play Badges</a></strong> &mdash; Generate a badge to bring users to your app in Google Play.</li>
+<li><strong><a href="{@docRoot}distribute/googleplay/promote/linking.html">Linking to Your Products</a></strong> &mdash; Link formats that you can use to bring users to your app in Google Play.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+<h2 id="final-checks">15. Final checks and publishing</h2>
+
+<p>When you think you are ready to publish, sign in to the Developer Console and take a few moments for a few
+final checks:</p>
+
+<p>Make sure that: </p>
+
+<ul>
+<li>Your developer profile has the correct information and is linked to the proper Google Checkout Merchant account (if you are selling products).</li>
+<li>You have the right version of the app uploaded.</li>
+<li>All parts of your Product Details are ready, including all graphic assets, screenshots, video, localized descriptions, and so on. </li>
+<li>You have set your app's pricing to free or priced.</li>
+<li>You have set country (and carrier) targeting and priced your products (if appropriate) in buyer currencies</li>
+<li>"Compatible devices" shows that your app is actually reaching the devices that you are targeting. If not, you should check with your development team on the apps requirements and filtering rules. </li>
+<li>You have provided the correct link to your web site and the correct support email address.</li>
+<li>Your app does not violate content policy guidelines.</li>
+<li>You have acknowledged that your app meets the guidelines for Android content on Google Play and also US export laws. </li>
+</ul>
+
+<p>Your app is now ready to publish!</p>
+
+<p>If you are releasing an update, make sure to read the <a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=113476&topic=2365760&ctx=topic">requirements for publishing updates</a>. </p>
+
+<p>When you are ready, click the <strong>Publish</strong> button in the Developer Console. Within a few hours, your app will become available to users and your product page will be appear in Google Play for browsing, searching, or linking from your promotional campaigns.</p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="http://www.android.com/us/developer-content-policy.html">Google Play Developer Program Policies</a></strong> &mdash; Guidelines for what is acceptable conent in Google Play. Please read and understand the policies before publishing. </li>
+<li><strong><a href="{@docRoot}distribute/googleplay/promote/linking.html">Updates</a></strong> &mdash; Requirements for app updates in Google Play.</li>
+<li><strong><a href="{@docRoot}support.html">Developer Support</a></strong> &mdash; Support resources that you can use to find answers and report issues.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+
+<h2 id="support">16. Support users after launch</h2>
+
+<p>After you publish an app or an app update, it's crucial for you to support
+your customers. Prompt and courteous support can provide a better experience for
+users that results in better ratings and more positive reviews for your
+products. Users are likely to be more engaged with your app and recommend it if
+you are responsive to their needs and feedback. This is especially true after
+publishing if you are using a coordinated promotional campaign.</p>
+
+<p>There are a number of ways that you can keep in touch with users and offer
+them support. The most fundamental is to provide your <em>support email
+address</em> on your product details page. Beyond that, you can provide support
+in any way you choose, such as a forum, mailing list or a Google+ page. The
+Google Play team does provide user support for downloading, installing and
+payments issues, but issues that fall outside of these topics will fall under
+your domain. Examples of issues you can support include: feature requests,
+questions about using the app and questions about compatibility settings. </p>
+
+<p>After publishing, plan to: </p>
+<ul>
+<li>Check your ratings and reviews frequently on your app's product details
+page. Watch for recurring issues that could signal bugs or other issues. </li>
+<li>Be mindful of new Android platform version launches, as compatibility
+settings for your apps might need to be updated.</li>
+<li>Put a link to your support resources on your web site and set up any other
+support such as forums.</li>
+<li>Provide an appropriate support email address on your product details page
+and respond to users when they take the time to email you.</li>
+<li>Beyond the automatic refund window offered by Google Play, be generous with
+your own refund policy, as satisfied users will be more likely to purchase in
+the future. </li>
+<li>Acknowledge and fix issues in your app. It helps to be transparent and
+list known issues on your product details page proactively. </li>
+<li>Publish updates as frequently as you are able, without sacrificing quality
+or annoying users with too-frequent updates. </li>
+<li>With each update, make sure to provide a summary of what's changed. You can
+enter this information in the Developer Console. Users will read it and
+appreciate that you are serious about improving the quality of your app. </li>
+</ul>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=113477&topic=2364761&ctx=topic">Supporting your users
+</a></strong> &mdash; Help Center document describing options for supporting users.</li>
+<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=1153479">In-app Billing</a></strong> &mdash; Help Center document describing how to correctly set up In-app Billing.</li>
+<li><strong><a href="https://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=138001">Issuing Refunds</a></strong> &mdash; -- Help Center document describing how to issue refunds.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+
+
diff --git a/docs/html/distribute/googleplay/publish/register.jd b/docs/html/distribute/googleplay/publish/register.jd
new file mode 100644
index 000000000000..7ca66969e733
--- /dev/null
+++ b/docs/html/distribute/googleplay/publish/register.jd
@@ -0,0 +1,72 @@
+page.title=Get Started with Publishing
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>Help topics</h2>
+<ul>
+ <li><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=113468">Developer Registration</a></li>
+ <li><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=138294&topic=2365624&ctx=topic">Supported Locations for Distributing Apps</a></li>
+ <li><a href="http://support.google.com/googleplay/android-developer/bin/topic.py?hl=en&topic=2364761">Policy and Best Practices</a></li>
+ <li><a href="http://support.google.com/googleplay/android-developer/">Developer Support</a></li>
+</ul>
+
+<h2>Get Started</h2>
+<ol>
+ <li><a href="https://play.google.com/apps/publish/">Google Play Android Developer Console</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>You can set up to start publishing on Google Play in only a few minutes. Here's how you do it: </p>
+
+<ul>
+<li>Register for a Google Play publisher account</li>
+<li>If you will sell apps, set up a Google Checkout Merchant Account</li>
+<li>Explore the Google Play Android Developer Console and learn about the tools for publishing</li>
+</ul>
+
+
+<h3>Register for a publisher account</h3>
+
+<p>The first step is to visit the Google Play Android Developer Console and register for a publisher account.</p>
+
+<p>Here's what you will do during registration: </p>
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+<h2>Tips</h2>
+ <ul>
+ <li>You need a Google account to register. You can create one during the process. </li>
+ <li>If you are an organization, consider registering a new Google account rather than using a personal account.</li>
+ <li>Review the <a href="https://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=138294">developer countries</a> and <a href="https://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=150324">merchant countries</a> where you can distribute and sell apps.</li>
+ </ul>
+</div></div>
+
+
+<ol>
+<li>Visit the Google Play Android Developer Console at <a href="https://play.google.com/apps/publish/">https://play.google.com/apps/publish/</a>.
+<li>Enter basic information about your <strong>developer identity</strong> &mdash; developer name, email address, and so on. You can modify this information later.</li>
+<li>Read and accept the <strong>Developer Distribution Agreement</strong> that applies to your country or region. Note that apps and store listings that you publish on Google Play must comply with the Developer Program Policies and US export law,</li>
+<li>Pay a <strong>$25 USD registration fee</strong> using Google Checkout. If you don't have a Google Checkout account, you can quickly set one up during the process.</li>
+</ol>
+
+<p>When your registration is verified, you’ll be notified at the email address you specified during registration. </p>
+
+<h3>Set up a Google Checkout Merchant account</h3>
+
+<p>If you want to sell products on Google Play &mdash; priced apps, in-app products, or subscriptions &mdash; you will also need to set up a Google Checkout <a href="http://checkout.google.com/sell">Merchant Account</a>. You can do that at any time, but make sure to first review the list of <a href="https://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=150324">merchant countries</a>.</p>
+
+<p>To set up a Merchant account from the Developer Console:</p>
+
+<ol>
+<li><strong>Sign in</strong> to your Google Play Android Developer Console at <a href="https://play.google.com/apps/publish/">https://play.google.com/apps/publish/</a>
+<li>Click on the "<strong>Edit profile</strong>" link.
+<li>Select "<strong>Setup a Merchant Account at Google Checkout</strong>".</li>
+</ol>
+
+<p>This will take you to the Google Checkout site to sign up as a Merchant; you'll need to have information about your business handy to complete this step.</p>
+
+<h3>Explore the Developer Console</h3>
+<p>When your registration is verified, you can sign in to your Android Developer Console, which will be the home for your app publishing operations and tools on Google Play. </p>
diff --git a/docs/html/distribute/googleplay/strategies/app-quality.jd b/docs/html/distribute/googleplay/strategies/app-quality.jd
new file mode 100644
index 000000000000..26d71d751bf0
--- /dev/null
+++ b/docs/html/distribute/googleplay/strategies/app-quality.jd
@@ -0,0 +1,116 @@
+page.title=Improving App Quality
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>Strategies:</h2>
+<ul>
+<li><a href="#listen">Listen to Your Users</a></li>
+<li><a href="#stability">Improve Stability and Eliminate Bugs</a></li>
+<li><a href="#responsiveness">Improve UI Responsiveness</a></li>
+<li><a href="#usability">Improve Usability</a></li>
+<li><a href="#appearance">Professional Appearance and Aesthetics</a></li>
+<li><a href="#features">Deliver the Right Set of Features</a></li>
+<li><a href="#integrate">Integrate with the System and Third-Party Apps</a></li>
+<li><a href="#details">Pay Attention to Details</a></li>
+</ul>
+</div>
+</div>
+
+<p>
+With thousands of new apps being published in Google Play every week, it's important to look for any available way to get the most visibility and the highest ratings possible. One way of improving your app's visibility in the ecosystem is by deploying well-targeted mobile advertising campaigns and cross-app promotions. Another time-tested method of fueling the impression-install-ranking cycle is simply: <em>improve the product</em>!</p>
+<p>
+A better app can go a very long way: a higher quality app will translate to higher user ratings, generally better rankings, more downloads, and higher retention (longer install periods). High-quality apps also have a much higher likelihood of getting some unanticipated positive publicity such as being featured in Google Play or getting social media buzz.</p>
+<p>
+The upside to having a higher-quality app is obvious. However, it's not always clear how to make an app "better". The path to improving app quality isn't always well-lit. The term "quality" &mdash; along with "polish" and "fit and finish" &mdash; aren't always well-defined. Here we'll light the path by looking at some of the key factors in app quality and ways of improving your app along these dimensions.</p>
+
+<h2 id="listen">Listen to Your Users</h2>
+<p>
+Most ways of measuring the "success" of an app are dependent on user behavior. User-related metrics such as number of downloads, daily active installs, retention rates, and so on highlight the importance of users. If you aren't doing so already, it's a good idea to start thinking of your app's quality as it relates to your users.</p>
+<p>
+The most obvious way to listen to users is by reading and addressing comments on your app in Google Play. Although the comments aren't always productive or constructive, some will provide valuable insight on aspects of your app that you may not have consciously considered before. It's important to remember that users have the opportunity to change their ratings and comments about an app as much as they'd like.</p>
+<p>
+One way to reach users and help them address their concerns is to set up your own support and discussion destination(s). There are some great support tools out there that can put you in touch with your users directly such as <a href="http://groups.google.com">Google Groups</a>, <a href="http://discussions.zoho.com/">Zoho Discussions</a>, <a href="http://getsatisfaction.com">getsatisfaction.com</a> and <a href="http://uservoice.com">uservoice.com</a>. Once you get set up with such a tool, make sure to fill in the support link in your Google Play product details page &mdash; users do click through to these.</p>
+<p>
+Another way to better listen to your users is by having a public beta or trusted tester program. It's crucial to have some amount of real user testing before releasing something in Google Play. Fortunately, you can distribute your apps to users outside of Google Play via a website; this website can require a login or be publicly accessible&nbsp;&mdash;&nbsp;it's entirely up to you. Take advantage of this opportunity by offering your next planned update to some early adopters, before submitting to Google Play. You'll be surprised by how many little, yet impactful, improvements can come out of crowd-sourced, real-user testing.</p>
+
+
+<h2 id="stability">Improve Stability and Eliminate Bugs</h2>
+
+<p>
+The effect of overall app stability of ratings and user satisfaction is very well-known and there are many tools and techniques for testing and profiling your app on different devices and user scenarios.</p>
+<p>
+One noteworthy and yet relatively underused tool for catching stability issues such as crashes is the <a href="{@docRoot}tools/help/monkey.html">UI/Application Exerciser Monkey</a> (Monkey). Monkey will send random UI events to your app's activities, allowing you to trigger user flows that can uncover stability problems.</p>
+<p>
+Also, with the Google error-reporting features built into most Android devices, users now have a way to report application crashes to developers. The error reports show up in aggregate in the Google Play Developer Console. Make sure to read these reports often and act on them appropriately.</p>
+<p>
+Last, keep an external bug and feature request tracker and let users know how to find it. This will enable them to engage with the app at a closer level, by following features and bugs that affect them. User frustration with app problems can be effectively managed with diligent issue tracking and communication. Some of the community support tools listed above offer issue tracking features, and if your project is open source, most popular repository hosting sites such as <a href="http://code.google.com/hosting">Google Code</a> and <a href="https://github.com/">GitHub</a> will offer this as well.</p>
+
+<h2 id="responsiveness">Improve UI Responsiveness</h2>
+<p>
+One sure-fire way to lose your users is to give them a slow, unresponsive UI. Research has shown that <a href="http://googleresearch.blogspot.com/2009/06/speed-matters.html">speed matters</a>... for any interface, be it desktop, web, or mobile. In fact, the importance of speed is amplified on mobile devices since users often need their information on the go and in a hurry.</p>
+<p>
+You can improve your apps's UI responsiveness by moving long-running operations off the main thread to worker threads. Android offers built-in debugging facilities such as StrictMode for analyzing your app's performance and activities on the main thread. You can see more recommendations in <a href="http://www.youtube.com/watch?v=c4znvD-7VDA">Writing Zippy Android Apps</a>, a developer session from Google I/O 2010,</p>
+
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+<h2>More resources</h2>
+<ul>
+<li><a href="{@docRoot}design/index.html">Android Design</a></li>
+<li><a href="{@docRoot}guide/practices/performance.html">Designing for Performance</a></li>
+<li><a href="{@docRoot}guide/practices/responsiveness.html">Designing for Responsiveness</a>
+<li><a href="{@docRoot}guide/practices/seamlessness.html">Designing for seamlessness</a>
+</li>
+</ul>
+</div></div>
+<p>
+A great way to improve UI performance is to minimize the complexity of your layouts. If you open up <a href="{@docRoot}tools/help/hierarchy-viewer.html">hierarchyviewer</a> and see that your layouts are more than 5 levels deep, it may be time to simplify your layout. Consider refactoring those deeply nested LinearLayouts into RelativeLayout. The impact of View objects is cumulative &mdash; each one costs about 1 to 2 KB of memory, so large view hierarchies can be a recipe for disaster, causing frequent VM garbage collection passes which block the main (UI) thread. You can learn more in <a href="http://www.youtube.com/watch?v=wDBM6wVEO70">World of ListView</a>, another session at Google I/O.</p>
+<p>
+Lastly, pointed out in the blog post <a href="http://android-developers.blogspot.com/2010/10/traceview-war-story.html">Traceview War Story</a>, tools like <a href="{@docRoot}tools/traceview.html">traceview</code> and <a href="{@docRoot}tools/ddms.html">ddms</a> can be your best friends in improving your app by profiling method calls and monitoring VM memory allocations, respectively.</p>
+
+
+<h2 id="usability">Improve Usability</h2>
+<p>
+In usability and in app design too, you should listen carefully to your users. Ask a handful of real Android device users (friends, family, etc.) to try out your app and observe them as they interact with it. Look for cases where they get confused, are unsure of how to proceed, or are surprised by certain behaviors. Minimize these cases by rethinking some of the interactions in your app, perhaps working in some of the <a href="http://www.youtube.com/watch?v=M1ZBjlCRfz0">user interface patterns</a> the Android UI team discussed at Google I/O.</p>
+<p>
+In the same vein, two problems that can plague some Android user interfaces are small tap targets and excessively small font sizes. These are generally easy to fix and can make a big impact on usability and user satisfaction. As a general rule, optimize for ease of use and legibility, while minimizing, or at least carefully balancing, information density.</p>
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+<h2>More resources</h2>
+<ul>
+As you are designing or evaluating your app's UI, make sure to read and become familiar with the <a href="{@docRoot}design/index.html">Android Design</a> guidelines. Included are many examples of UI patterns, styles, and building blocks, as well as tools for the design process.</li>
+</ul>
+</div></div>
+
+<p>
+Another way to incrementally improve usability, based on real-world data, is to implement <a href="http://code.google.com/mobile/analytics/docs/">Analytics</a> throughout your app to log usage of particular sections. Consider demoting infrequently used sections to the overflow menu in the <a href="{@docRoot}design/patterns/actionbar.html">Action bar</a>, or removing them altogether. For often-used sections and UI elements, make sure they're immediately obvious and easily accessible in your app's UI so that users can get to them quickly.</p>
+<p>
+Lastly, usability is an extensive and well-documented subject, with close ties to interface design, cognitive science, and other disciplines.</p>
+
+<h2 id="appearance">Professional Appearance and Aesthetics</h2>
+<p>
+There's no substitute for a real user interface designer&nbsp;&mdash;&nbsp;ideally one who's well-versed in mobile and Android, and ideally handy with both interaction and visual design. One popular venue to post openings for designers is <a href="http://jobs.smashingmagazine.com">jobs.smashingmagazine.com</a>, and leveraging social connections on Twitter and LinkedIn can surface great talent.</p>
+<p>
+If you don't have the luxury of working with a UI designer, there are some ways in which you can improve your app's appearance yourself. First, get familiar with Adobe Photoshop, Adobe Fireworks, or some other raster image editing tool. Mastering the art of the pixel in these apps takes time, but honing this skill can help build polish across your interface designs. Also, master the resources framework by studying <a href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=core/res/res;h=a3562fe1af94134486a8a899f02a9c2f7986c8dd;hb=master">the framework UI</a> assets and layouts and reading through the new <a href="{@docRoot}guide/components/resources/available-resources.html">resources documentation</a>. Techniques such as 9-patches and resource directory qualifiers are somewhat unique to Android, and are crucial in building flexible yet aesthetic UIs.</p>
+<p>
+Before you get too far in designing your app and writing the code, make sure to visit the Android Design site and learn about the vision, the building blocks, and the tools of designing beautiful and inspiring user interfaces.</p>
+
+<h2 id="features">Deliver the Right Set of Features</h2>
+<p>
+Having the <em>right</em> set of features in your app is important. It's often easy to fall into the trap of feature-creep, building as much functionality into your app as possible. Providing instant gratification by immediately showing the most important or relevant information is crucial on mobile devices. Providing too much information can be as frustrating (or even more so) than not providing enough of it.</p>
+<p>
+Again, listen to your users by collecting and responding to feature requests. Be careful, though, to take feature requests with a grain of salt. Requests can be very useful in aggregate, to get a sense of what kinds of functionality you should be working on, but not every feature request needs to be implemented.</p>
+
+<h2 id="integrate">Integrate with the System and Third-Party apps</h2>
+<p>
+A great way to deliver a delightful user experience is to integrate tightly with the operating system. Features like <a href="{@docRoot}guide/topics/appwidgets/index.html">Home screen widgets</a>, <a href={@docRoot}design/patterns/notifications.html">rich notifications</a>, <a href="{@docRoot}guide/topics/search/index.html">global search integration</a>, and {@link android.widget.QuickContactBadge Quick Contacts} are fairly low-hanging fruit in this regard. </p>
+
+<p>For some app categories, basic features like home screen widgets are par for the course. Not including them is a sure-fire way to tarnish an otherwise positive user experience. Some apps can achieve even tighter OS integration with Android's contacts, accounts, and sync APIs. </p>
+<p>
+Third-party integrations can provide even more user delight and give the user a feeling of device cohesiveness. It's also a really nice way of adding functionality to your app without writing any extra code (by leveraging other apps' functionalities). For example, if you're creating a camera app, you can allow users to edit their photos in <a href=" http://mobile.photoshop.com/android/">Photoshop Express</a> before saving them to their collection, if they have that third-party application installed. More information on this subject is available in the class, <a href="{@docRoot}training/basics/intents/index.html">Interacting with Other Apps</a>.</p>
+
+<h2 id="details">Pay Attention to Details</h2>
+<p>
+One particular detail to pay close attention to is your app's icon quality and consistency. Make sure your app icons (especially your launcher icon) are crisp and pixel-perfect at all resolutions, and follow the <a href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">icon guidelines</a> as much as possible. If you're having trouble or don't have the resources to design the icons yourself, consider using the new <a href="http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html">Android Asset Studio</a> tool to generate a set.</p>
diff --git a/docs/html/distribute/googleplay/strategies/featuring.jd b/docs/html/distribute/googleplay/strategies/featuring.jd
new file mode 100644
index 000000000000..4c4e67e1dc4f
--- /dev/null
+++ b/docs/html/distribute/googleplay/strategies/featuring.jd
@@ -0,0 +1,4 @@
+page.title=Preparing for Featuring
+@jd:body
+
+<p>Placeholder...</p> \ No newline at end of file
diff --git a/docs/html/distribute/googleplay/strategies/index.jd b/docs/html/distribute/googleplay/strategies/index.jd
new file mode 100644
index 000000000000..3794bbfcac2a
--- /dev/null
+++ b/docs/html/distribute/googleplay/strategies/index.jd
@@ -0,0 +1,33 @@
+page.title=Success Strategies
+page.metaDescription=
+header.hide=1
+footer.hide=1
+
+@jd:body
+
+
+
+<style>
+#landing-graphic-container {
+ position: relative;
+}
+
+#text-overlay {
+ position: absolute;
+ left: 0;
+ top: 472px;
+ width: 280px;
+}
+</style>
+
+<div id="landing-graphic-container">
+ <div id="text-overlay">
+ Strategies for building ratings, improving reviews, monetizing, and more.
+ <br><br>
+ <a href="/distribute/googleplay/promote/product-pages.html" class="landing-page-link">Preparing for Featuring</a>
+ </div>
+
+ <a href="{@docRoot}distribute/googleplay/promote/index.html">
+ <img src="{@docRoot}design/media/index_landing_page.png">
+ </a>
+</div> \ No newline at end of file
diff --git a/docs/html/distribute/index.jd b/docs/html/distribute/index.jd
new file mode 100644
index 000000000000..ffdeb2f26706
--- /dev/null
+++ b/docs/html/distribute/index.jd
@@ -0,0 +1,39 @@
+page.title=Distribute Apps
+header.hide=1
+
+@jd:body
+
+
+
+ <div class="marquee">
+
+ <div continer>
+
+ <div class="madin-img" style="position:absolute;margin-left:42px;margin-top:76px;">
+ <img src="/images/home/google-play.png">
+ </div>
+ <div class="copy" style="position:relative;left:480px;width:360;">
+ <h1>Introducing Google Play</h1>
+ <p>The most visited store in the world for Android apps. Cloud-connected and always synced, it's never been easier for users to find and download your apps.</p>
+
+ <p><a class="landing-page-link" href="http://youtu.be/g5SzWc8-X0M">Watch a video</a></p>
+ </div> </div>
+</div>
+<div class="distribute-features col-13" style="clear:both;margin-top:246px;">
+ <ul>
+ <li><h5>Growth Engine</h5>
+ A billion downloads a month and growing. Get your apps in front of millions of users at Google's scale.<br />
+ <a href="{@docRoot}distribute/googleplay/about/visibility.html">Read More ›</a>
+ <li><h5>Build Your Business</h5> Sell your app in over 130 countries. Flexible monetization options with in-app purchase, subscriptions, and more. <br />
+ <a href="{@docRoot}distribute/googleplay/about/monetizing.html">Read More ›</a></li>
+ <li class="last"><h5>Distribution Control</h5> Deliver your apps to the users you want, on the devices you want, on <em>your</em> schedule. <br />
+ <a href="{@docRoot}distribute/googleplay/about/distribution.html">Read More ›</a></li>
+ </ul>
+</div>
+
+
+
+
+
+
+
diff --git a/docs/html/distribute/open.jd b/docs/html/distribute/open.jd
new file mode 100644
index 000000000000..edcfc9c8afe2
--- /dev/null
+++ b/docs/html/distribute/open.jd
@@ -0,0 +1,107 @@
+page.title=Open Distribution
+@jd:body
+
+<p>As an open platform, Android offers choice. You
+distribute your Android apps to users in any way you want, using any
+distribution approach or combination of approaches that meets your needs.
+From publishing in an app marketplace to serving your apps from a web site or
+emailing them directly users, you are never locked into any
+particular distribution platform.</p>
+
+<p>The process for building and packaging your app for distribution is the same,
+regardless of how you will distribute your app. This saves you time and lets you
+automate parts of the process as needed. You can read <a
+href="{@docRoot}tools/publishing/preparing.html">Preparing
+for Release</a> for more information.</p>
+
+<p>The sections below highlight some of the alternatives for distributing
+your apps to users.</p>
+
+<h2 id="publishing-marketplace">Distributing through an App Marketplace</h2>
+
+<p>Usually, to reach the broadest possible audience, you would distribute your
+apps through a marketplace, such as Google Play.</p>
+
+<p>Google Play is the premier marketplace for Android apps and is particularly
+useful if you want to distribute your applications to a large global audience.
+However, you can distribute your apps through any app marketplace you want or
+you can use multiple marketplaces.</p>
+
+<h2 id="publishing-email">Distributing your application through email</h2>
+
+<div class="figure" style="width:246px">
+ <img src="{@docRoot}images/publishing/publishing_via_email.png"
+ alt="Screenshot showing the graphical user interface users see when you send them an app"
+ style="width:240px;" />
+ <p class="img-caption">
+ <strong>Figure 1.</strong> Users can simply click <strong>Install</strong> when you send them
+ an application via email.
+ </p>
+</div>
+
+<p>The easiest and quickest way to release your application is to send it to users through
+email. To do this, you prepare your application for release and then attach it to an email
+and send it to a user. When users open your email message on their Android-powered device,
+the Android system will recognize the APK and display an <strong>Install Now</strong>
+button in the email message (see figure 1). Users can install your application by touching the
+button.</p>
+
+<p class="note"><strong>Note:</strong> The <strong>Install Now</strong> button
+shown in Figure 1 appears only if users have configured their device to allow
+installation from <a href="#unknown-sources">unknown sources</a> and have opened your
+email with the native Gmail application.</p>
+
+<p>Distributing applications through email is convenient if you are sending your application to
+only a few trusted users, but it provides few protections from piracy and unauthorized
+distribution; that is, anyone you send your application to can simply forward it to someone else.</p>
+
+<h2 id="publishing-website">Distributing through a web site</h2>
+
+<p>If you do not want to release your app on a marketplace like Google Play, you
+can make the app available for download on your own website or server, including
+on a private or enterprise server. To do this, you must first prepare your
+application for release in the normal way. Then all you need to do is host the
+release-ready APK file on your website and provide a download link to users.
+</p>
+
+<p>When users browse to the download link from their Android-powered devices,
+the file is downloaded and Android system automatically starts installing it on
+the device. However, the installation process will start automatically only if
+users have configured their Settings to allow the installation of apps from
+<a href="#unknown-sources">unknown sources</a>.</p>
+
+<p>Although it is relatively easy to release your application on your own
+website, it can be inefficient. For example, if you want to monetize your
+application you will have to process and track all financial transactions
+yourself and you will not be able to use Google Play's <a
+href="{@docRoot}guide/google/play/billing/index.html">In-app Billing service</a>
+to sell in-app products. In addition, you will not be able to use the <a
+href="{@docRoot}guide/google/play/licensing/index.html">Licensing service</a> to
+help prevent unauthorized installation and use of your application.</p>
+
+
+<h2 id="unknown-sources">User Opt-In for Apps from Unknown Sources</h2>
+
+<div class="figure" style="width:246px;margin-top:0;">
+ <img src="{@docRoot}images/publishing/publishing_unknown_sources_sm.png"
+ alt="Screenshot showing the setting for accepting download and install of
+ apps from unknown sources." style="width:240px;" />
+ <p class="img-caption">
+ <strong>Figure 2.</strong> Users must enable the <strong>Unknown sources</strong>
+ setting before they can install apps not downloaded from Google Play.
+ </p>
+</div>
+
+<p>Android protects users from inadvertent download and install of apps from
+locations other than Google Play (which is trusted). It blocks such installs
+until the user opts-in <strong>Unknown sources</strong> in
+Settings&nbsp;<strong>&gt;</strong>&nbsp;Security, shown in Figure 2. To allow
+the installation of applications from other sources, users need to enable the
+Unknown sources setting on their devices, and they need to make this
+configuration change <em>before</em> they download your application to their
+devices.</p>
+
+<p class="note">Note that some network providers do not allow users to install
+applications from unknown sources.</p>
+
+
diff --git a/docs/html/favicon-a.ico b/docs/html/favicon-a.ico
new file mode 100644
index 000000000000..d8884b792b29
--- /dev/null
+++ b/docs/html/favicon-a.ico
Binary files differ
diff --git a/docs/html/favicon.ico b/docs/html/favicon.ico
index d8884b792b29..c1076aab60a3 100644
--- a/docs/html/favicon.ico
+++ b/docs/html/favicon.ico
Binary files differ
diff --git a/docs/html/guide/appendix/g-app-intents.jd b/docs/html/guide/appendix/g-app-intents.jd
index df9d29bd72ff..10ec01e038f9 100644
--- a/docs/html/guide/appendix/g-app-intents.jd
+++ b/docs/html/guide/appendix/g-app-intents.jd
@@ -4,7 +4,7 @@ page.title=Intents List: Invoking Google Applications on Android Devices
<div class="sidebox-wrapper">
<div class="sidebox">
For more information about intents, see the <a
-href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a>.
+href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a>.
</div>
</div>
diff --git a/docs/html/guide/appendix/glossary.jd b/docs/html/guide/appendix/glossary.jd
index 06fdef286dac..94cb0f08433b 100644
--- a/docs/html/guide/appendix/glossary.jd
+++ b/docs/html/guide/appendix/glossary.jd
@@ -42,7 +42,7 @@ page.title=Glossary
SDK. It provides tools to browse the device, copy tools on the device, and
forward ports for debugging. If you are developing in Eclipse using the
ADT Plugin, adb is integrated into your development environment. See
- <a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a>
+ <a href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a>
for more information. </dd>
<dt id="application">Application</dt>
@@ -91,7 +91,7 @@ page.title=Glossary
with the SDK. It provides screen capture, log dump, and process
examination capabilities. If you are developing in Eclipse using the ADT
Plugin, DDMS is integrated into your development environment. See <a
- href="{@docRoot}guide/developing/debugging/ddms.html">Using DDMS</a> to learn more about the program.</dd>
+ href="{@docRoot}tools/debugging/ddms.html">Using DDMS</a> to learn more about the program.</dd>
<dt id="dialog">Dialog</dt> <dd> A floating window that that acts as a lightweight
form. A dialog can have button controls only and is intended to perform a
@@ -131,7 +131,7 @@ page.title=Glossary
is responsible for resolving the best-available receiver for each Intent,
based on the criteria supplied in the Intent and the Intent Filters
defined by other applications. For more information, see <a
- href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and
+ href="{@docRoot}guide/components/intents-filters.html">Intents and
Intent Filters</a>.
<p>Related: <a href="#intentfilter">Intent Filter</a>, <a
href="#broadcastreceiver">Broadcast Receiver</a>.</p></dd>
@@ -145,7 +145,7 @@ page.title=Glossary
available intent filters in all applications and passes the Intent to the
application/activity that best matches the Intent and criteria. For more
information, see <a
- href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and
+ href="{@docRoot}guide/components/intents-filters.html">Intents and
Intent Filters</a>.
<p>Related: <a href="#intent">Intent</a>, <a
href="#broadcastreceiver">Broadcast Receiver</a>.</p></dd>
diff --git a/docs/html/guide/appendix/install-location.jd b/docs/html/guide/appendix/install-location.jd
index 63a3817e7c9f..19c4b3900ef1 100644
--- a/docs/html/guide/appendix/install-location.jd
+++ b/docs/html/guide/appendix/install-location.jd
@@ -174,7 +174,7 @@ external storage, it can never receive this broadcast.</dd>
<dt>Copy Protection</dt>
<dd>Your application cannot be installed to a device's SD card if it uses Google Play's
Copy Protection feature. However, if you use Google Play's
- <a href="{@docRoot}guide/market/licensing.html">Application Licensing</a> instead, your
+ <a href="{@docRoot}guide/google/play/licensing.html">Application Licensing</a> instead, your
application <em>can</em> be installed to internal or external storage, including SD cards.</dd>
</dl>
@@ -198,7 +198,7 @@ applications that should allow installation on external storage, because games d
provide additional services when inactive. When external storage becomes unavailable and a game
process is killed, there should be no visible effect when the storage becomes available again and
the user restarts the game (assuming that the game properly saved its state during the normal
-<a href="{@docRoot}guide/topics/fundamentals/activities.html#Lifecycle">Activity lifecycle</a>).</p>
+<a href="{@docRoot}guide/components/activities.html#Lifecycle">Activity lifecycle</a>).</p>
<p>If your application requires several megabytes for the APK file, you should
carefully consider whether to enable the application to install on the external storage so that
diff --git a/docs/html/guide/appendix/media-formats.jd b/docs/html/guide/appendix/media-formats.jd
index 137f13811d11..93e813662249 100644
--- a/docs/html/guide/appendix/media-formats.jd
+++ b/docs/html/guide/appendix/media-formats.jd
@@ -268,9 +268,9 @@ no dither applied for 24-bit.
<thead>
<tr>
<th>&nbsp;</th>
- <th style="background-color:#f3f3f3;font-weight:normal"><acronym title="Standard definition">SD</a> (Low quality)</th>
- <th style="background-color:#f3f3f3;font-weight:normal"><acronym title="Standard definition">SD</a> (High quality)</th>
- <th style="background-color:#f3f3f3;font-weight:normal"><acronym title="High definition">HD</a> (Not available on all devices)</th>
+ <th><acronym title="Standard definition">SD</a> (Low quality)</th>
+ <th><acronym title="Standard definition">SD</a> (High quality)</th>
+ <th><acronym title="High definition">HD</a> (Not available on all devices)</th>
</tr>
</thead>
<tbody>
diff --git a/docs/html/guide/topics/fundamentals/activities.jd b/docs/html/guide/components/activities.jd
index b79136cbb8c0..36f651f04c03 100644
--- a/docs/html/guide/topics/fundamentals/activities.jd
+++ b/docs/html/guide/components/activities.jd
@@ -40,8 +40,7 @@ page.title=Activities
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}resources/tutorials/hello-world.html">Hello World Tutorial</a></li>
- <li><a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back
+ <li><a href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks and Back
Stack</a></li>
</ol>
@@ -65,7 +64,7 @@ in a stack (the "back stack"). When a new activity starts, it is pushed onto the
takes user focus. The back stack abides to the basic "last in, first out" stack mechanism,
so, when the user is done with the current activity and presses the <em>Back</em> button, it
is popped from the stack (and destroyed) and the previous activity resumes. (The back stack is
-discussed more in the <a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks
+discussed more in the <a href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks
and Back Stack</a> document.)</p>
<p>When an activity is stopped because a new activity starts, it is notified of this change in state
@@ -224,7 +223,7 @@ href="{@docRoot}guide/topics/manifest/data-element.html">{@code
respond.</p>
<p>For more information about how your activities can respond to intents, see the <a
-href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a>
+href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a>
document.</p>
@@ -329,7 +328,7 @@ the <a
href="{@docRoot}guide/topics/providers/content-providers.html">Content Providers</a> document.</p>
<p>For more information about using intents, see the <a
-href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent
+href="{@docRoot}guide/components/intents-filters.html">Intents and Intent
Filters</a> document.</p>
@@ -602,7 +601,7 @@ from the time {@link android.app.Activity#onPause onPause()} returns to the time
definition in table 1 might still be killed by the system&mdash;but that would happen only in
extreme circumstances when there is no other recourse. When an activity might be killed is
discussed more in the <a
-href="{@docRoot}guide/topics/fundamentals/processes-and-threads.html">Processes and
+href="{@docRoot}guide/components/processes-and-threads.html">Processes and
Threading</a> document.</p>
@@ -772,6 +771,6 @@ android.app.Activity#onStop onStop()}.</p>
<p>For more information about how Android maintains a history of activities and
enables user multitasking, continue with the <b><a
-href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back
+href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks and Back
Stack</a></b> document.</p>
--> \ No newline at end of file
diff --git a/docs/html/guide/topics/fundamentals/bound-services.jd b/docs/html/guide/components/bound-services.jd
index ec7d7230d90e..b6a251286c05 100644
--- a/docs/html/guide/topics/fundamentals/bound-services.jd
+++ b/docs/html/guide/components/bound-services.jd
@@ -42,7 +42,7 @@ perform interprocess communication</li>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/topics/fundamentals/services.html">Services</a></li>
+ <li><a href="{@docRoot}guide/components/services.html">Services</a></li>
</ol>
</div>
@@ -54,7 +54,7 @@ application component and does not run in the background indefinitely.</p>
<p>This document shows you how to create a bound service, including how to bind
to the service from other application components. However, you should also refer to the <a
-href="{@docRoot}guide/topics/fundamentals/services.html">Services</a> document for additional
+href="{@docRoot}guide/components/services.html">Services</a> document for additional
information about services in general, such as how to deliver notifications from a service, set
the service to run in the foreground, and more.</p>
@@ -71,7 +71,7 @@ clients can use to interact with the service.</p>
<div class="sidebox">
<h3>Binding to a Started Service</h3>
-<p>As discussed in the <a href="{@docRoot}guide/topics/fundamentals/services.html">Services</a>
+<p>As discussed in the <a href="{@docRoot}guide/components/services.html">Services</a>
document, you can create a service that is both started and bound. That is, the service can be
started by calling {@link android.content.Context#startService startService()}, which allows the
service to run indefinitely, and also allow a client to bind to the service by calling {@link
@@ -170,7 +170,7 @@ can then extend within your service.</p>
create a bound service, because it may require multithreading capabilities and
can result in a more complicated implementation. As such, AIDL is not suitable for most applications
and this document does not discuss how to use it for your service. If you're certain that you need
-to use AIDL directly, see the <a href="{@docRoot}guide/developing/tools/aidl.html">AIDL</a>
+to use AIDL directly, see the <a href="{@docRoot}tools/aidl.html">AIDL</a>
document.</p>
@@ -341,7 +341,7 @@ service, which must then handle multi-threading.</p>
<p>For most applications, the service doesn't need to perform multi-threading, so using a {@link
android.os.Messenger} allows the service to handle one call at a time. If it's important
that your service be multi-threaded, then you should use <a
-href="{@docRoot}guide/developing/tools/aidl.html">AIDL</a> to define your interface.</p>
+href="{@docRoot}tools/aidl.html">AIDL</a> to define your interface.</p>
</div>
</div>
@@ -625,7 +625,7 @@ multiple activities in your application bind to the same service and there is a
two of those activities, the service may be destroyed and recreated as the current activity unbinds
(during pause) before the next one binds (during resume). (This activity transition for how
activities coordinate their lifecycles is described in the <a
-href="{@docRoot}guide/topics/fundamentals/activities.html#CoordinatingActivities">Activities</a>
+href="{@docRoot}guide/components/activities.html#CoordinatingActivities">Activities</a>
document.)</p>
</ul>
@@ -668,7 +668,7 @@ onRebind()} returns void, but the client still receives the {@link android.os.IB
Below, figure 1 illustrates the logic for this kind of lifecycle.</p>
<p>For more information about the lifecycle of an started service, see the <a
-href="{@docRoot}guide/topics/fundamentals/services.html#Lifecycle">Services</a> document.</p>
+href="{@docRoot}guide/components/services.html#Lifecycle">Services</a> document.</p>
diff --git a/docs/html/guide/topics/fundamentals/fragments.jd b/docs/html/guide/components/fragments.jd
index 2a223946726f..938e0ab02ea6 100644
--- a/docs/html/guide/topics/fundamentals/fragments.jd
+++ b/docs/html/guide/components/fragments.jd
@@ -73,7 +73,7 @@ you can reuse in different activities).</p>
affected by the host activity's lifecycle. For example, when the activity is paused, so are all
fragments in it, and when the activity is destroyed, so are all fragments. However, while an
activity is running (it is in the <em>resumed</em> <a
-href="{@docRoot}guide/topics/fundamentals/activities.html#Lifecycle">lifecycle state</a>), you can
+href="{@docRoot}guide/components/activities.html#Lifecycle">lifecycle state</a>), you can
manipulate each fragment independently, such as add or remove them. When you perform such a
fragment transaction, you can also add it to a back stack that's managed by the
activity&mdash;each back stack entry in the activity is a record of the fragment transaction that
@@ -499,7 +499,7 @@ usually not necessary unless the transaction is a dependency for jobs in other t
<p class="caution"><strong>Caution:</strong> You can commit a transaction using {@link
android.app.FragmentTransaction#commit commit()} only prior to the activity <a
-href="{@docRoot}guide/topics/fundamentals/activities.html#SavingActivityState">saving its
+href="{@docRoot}guide/components/activities.html#SavingActivityState">saving its
state</a> (when the user leaves the activity). If you attempt to commit after that point, an
exception will be thrown. This is because the state after the commit can be lost if the activity
needs to be restored. For situations in which its okay that you lose the commit, use {@link
@@ -690,14 +690,14 @@ either {@link android.app.Fragment#onCreate onCreate()}, {@link
android.app.Fragment#onCreateView onCreateView()}, or {@link
android.app.Fragment#onActivityCreated onActivityCreated()}. For more information about saving
state, see the <a
-href="{@docRoot}guide/topics/fundamentals/activities.html#SavingActivityState">Activities</a>
+href="{@docRoot}guide/components/activities.html#SavingActivityState">Activities</a>
document.</p>
<p>The most significant difference in lifecycle between an activity and a fragment is how one is
stored in its respective back stack. An activity is placed into a back stack of activities
that's managed by the system when it's stopped, by default (so that the user can navigate back
to it with the <em>Back</em> button, as discussed in <a
-href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a>).
+href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks and Back Stack</a>).
However, a fragment is placed into a back stack managed by the host activity only when you
explicitly request that the instance be saved by calling {@link
android.app.FragmentTransaction#addToBackStack(String) addToBackStack()} during a transaction that
@@ -705,7 +705,7 @@ removes the fragment.</p>
<p>Otherwise, managing the fragment lifecycle is very similar to managing the activity
lifecycle. So, the same practices for <a
-href="{@docRoot}guide/topics/fundamentals/activities.html#Lifecycle">managing the activity
+href="{@docRoot}guide/components/activities.html#Lifecycle">managing the activity
lifecycle</a> also apply to fragments. What you also need to understand, though, is how the life
of the activity affects the life of the fragment.</p>
diff --git a/docs/html/guide/topics/fundamentals.jd b/docs/html/guide/components/fundamentals.jd
index a86d905ad2ce..1717782129b4 100644
--- a/docs/html/guide/topics/fundamentals.jd
+++ b/docs/html/guide/components/fundamentals.jd
@@ -123,7 +123,7 @@ activities (if the email application allows it). For example, a camera applicati
activity in the email application that composes new mail, in order for the user to share a picture.
<p>An activity is implemented as a subclass of {@link android.app.Activity} and you can learn more
-about it in the <a href="{@docRoot}guide/topics/fundamentals/activities.html">Activities</a>
+about it in the <a href="{@docRoot}guide/components/activities.html">Activities</a>
developer guide.</p>
</dd>
@@ -138,7 +138,7 @@ blocking user interaction with an activity. Another component, such as an activi
service and let it run or bind to it in order to interact with it.
<p>A service is implemented as a subclass of {@link android.app.Service} and you can learn more
-about it in the <a href="{@docRoot}guide/topics/fundamentals/services.html">Services</a> developer
+about it in the <a href="{@docRoot}guide/components/services.html">Services</a> developer
guide.</p>
</dd>
@@ -262,11 +262,11 @@ android.content.ContentProvider#query query()} on a {@link android.content.Conte
</ul>
<p>For more information about using intents, see the <a
-href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and
+href="{@docRoot}guide/components/intents-filters.html">Intents and
Intent Filters</a> document. More information about activating specific components is also provided
in the following documents: <a
-href="{@docRoot}guide/topics/fundamentals/activities.html">Activities</a>, <a
-href="{@docRoot}guide/topics/fundamentals/services.html">Services</a>, {@link
+href="{@docRoot}guide/components/activities.html">Activities</a>, <a
+href="{@docRoot}guide/components/services.html">Services</a>, {@link
android.content.BroadcastReceiver} and <a
href="{@docRoot}guide/topics/providers/content-providers.html">Content Providers</a>.</p>
@@ -283,7 +283,7 @@ such as:</p>
<ul>
<li>Identify any user permissions the application requires, such as Internet access or
read-access to the user's contacts.</li>
- <li>Declare the minimum <a href="{@docRoot}guide/appendix/api-levels.html">API Level</a>
+ <li>Declare the minimum <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Level</a>
required by the application, based on which APIs the application uses.</li>
<li>Declare hardware and software features used or required by the application, such as a camera,
bluetooth services, or a multitouch screen.</li>
@@ -380,7 +380,7 @@ activity and launches it when you invoke the intent with {@link android.app.Acti
startActivity()}.</p>
<p>For more about creating intent filters, see the <a
-href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a> document.
+href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a> document.
</p>
@@ -396,7 +396,7 @@ them, but external services such as Google Play do read them in order to provide
for users when they search for applications from their device.</p>
<p>For example, if your application requires a camera and uses APIs introduced in Android 2.1 (<a
-href="{@docRoot}guide/appendix/api-levels.html">API Level</a> 7), you should declare these as
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Level</a> 7), you should declare these as
requirements in your manifest file. That way, devices that do <em>not</em> have a camera and have an
Android version <em>lower</em> than 2.1 cannot install your application from Google Play.</p>
@@ -450,7 +450,7 @@ element.</dd>
such as Android 1.6 or Android 2.3. Each successive version often includes additional APIs not
available in the previous version. In order to indicate which set of APIs are available, each
platform version specifies an <a
-href="{@docRoot}guide/appendix/api-levels.html">API Level</a> (for example, Android 1.0 is API Level
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Level</a> (for example, Android 1.0 is API Level
1 and Android 2.3 is API Level 9). If you use any APIs that were added to the platform after
version 1.0, you should declare the minimum API Level in which those APIs were introduced using the
<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code &lt;uses-sdk&gt;}</a>
@@ -463,7 +463,7 @@ applications are available on each device. As such, your application should be a
devices that meet all your application requirements.</p>
<p>For more information about how Google Play filters applications based on these (and other)
-requirements, see the <a href="{@docRoot}guide/appendix/market-filters.html">Filters on Google Play</a>
+requirements, see the <a href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a>
document.</p>
@@ -514,5 +514,5 @@ href="{@docRoot}guide/topics/resources/index.html">Application Resources</a> dev
<p>For a close look at implementing activities&mdash;the components your users use to
interact with your application&mdash;continue with the <b><a
-href="{@docRoot}guide/topics/fundamentals/activities.html">Activities</a></b> document.</p>
+href="{@docRoot}guide/components/activities.html">Activities</a></b> document.</p>
-->
diff --git a/docs/html/guide/components/index.jd b/docs/html/guide/components/index.jd
new file mode 100644
index 000000000000..87bae53bf22a
--- /dev/null
+++ b/docs/html/guide/components/index.jd
@@ -0,0 +1,56 @@
+page.title=App Components
+page.landing=true
+page.landing.intro=Android's application framework lets you create extremely rich and innovative apps using a set of reusable components. This section explains how Android apps work and how you use components to build them.
+page.landing.image=images/develop/app_components.png
+
+@jd:body
+
+<div class="landing-docs">
+
+ <div class="col-6">
+ <h3>Blog Articles</h3>
+
+ <a href="http://android-developers.blogspot.com/2012/05/using-dialogfragments.html">
+ <h4>Using DialogFragments</h4>
+ <p>In this post, I’ll show how to use DialogFragments with the v4 support library (for backward compatibility on pre-Honeycomb devices) to show a simple edit dialog and return a result to the calling Activity using an interface.</p>
+ </a>
+
+ <a href="http://android-developers.blogspot.com/2011/03/fragments-for-all.html">
+ <h4>Fragments For All</h4>
+ <p>Today we’ve released a static library that exposes the same Fragments API (as well as the new LoaderManager and a few other classes) so that applications compatible with Android 1.6 or later can use fragments to create tablet-compatible user interfaces. </p>
+ </a>
+
+ <a
+href="http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html">
+ <h4>Multithreading for Performance</h4>
+ <p>A good practice in creating responsive applications is to make sure your main UI thread
+does the minimum amount of work. Any potentially long task that may hang your application should be
+handled in a different thread.</p>
+ </a>
+ </div>
+
+ <div class="col-6">
+ <h3>Training</h3>
+
+ <a href="http://developer.android.com/training/basics/activity-lifecycle/index.html">
+ <h4>Managing the Activity Lifecycle</h4>
+ <p>This class explains important lifecycle callback methods that each Activity
+ instance receives and how you can use them so your activity does what the user expects and does not consume system
+ resources when your activity doesn't need them.</p>
+ </a>
+
+ <a href="http://developer.android.com/training/basics/fragments/index.html">
+ <h4>Building a Dynamic UI with Fragments</h4>
+ <p>This class shows you how to create a dynamic user experience with fragments and optimize
+your app's user experience for devices with different screen sizes, all while continuing to support
+devices running versions as old as Android 1.6.</p>
+ </a>
+
+ <a href="http://developer.android.com/training/sharing/index.html">
+ <h4>Sharing Content</h4>
+ <p>This class covers some common ways you can send and receive content between
+ applications using Intent APIs and the ActionProvider object.</p>
+ </a>
+ </div>
+
+</div>
diff --git a/docs/html/guide/topics/intents/intents-filters.jd b/docs/html/guide/components/intents-filters.jd
index 3ad3c9374a81..3ad3c9374a81 100644
--- a/docs/html/guide/topics/intents/intents-filters.jd
+++ b/docs/html/guide/components/intents-filters.jd
diff --git a/docs/html/guide/topics/fundamentals/loaders.jd b/docs/html/guide/components/loaders.jd
index ddd513b2a2c5..ddd513b2a2c5 100644
--- a/docs/html/guide/topics/fundamentals/loaders.jd
+++ b/docs/html/guide/components/loaders.jd
diff --git a/docs/html/guide/topics/fundamentals/processes-and-threads.jd b/docs/html/guide/components/processes-and-threads.jd
index 814d34edac4c..07a2667dc73f 100644
--- a/docs/html/guide/topics/fundamentals/processes-and-threads.jd
+++ b/docs/html/guide/components/processes-and-threads.jd
@@ -30,12 +30,11 @@ down the user interface</li>
</div>
</div>
-<p>When an application component starts and the process that should host that thread is not already
+<p>When an application component starts and the application does not have any other components
running, the Android system starts a new Linux process for the application with a single thread of
execution. By default, all components of the same application run in the same process and thread
(called the "main" thread). If an application component starts and there already exists a process
-for that application (because another component from the application exists or Android has been
-able to retain its previous process cached in the background), then the component is
+for that application (because another component from the application exists), then the component is
started within that process and uses the same thread of execution. However, you can arrange for
different components in your application to run in separate processes, and you can create additional
threads for any process.</p>
@@ -87,10 +86,7 @@ components running in the process and the state of those components. Processes
importance are eliminated first, then those with the next lowest importance, and so on, as necessary
to recover system resources.</p>
-<p>The exact mapping of processes to importance and the management of these processes is
-an implementation detail of the platform that changes over time. Broadly speaking, there
-are five levels in the current implementation that are of most relevance to application
-developers. The following list presents these different
+<p>There are five levels in the importance hierarchy. The following list presents the different
types of processes in order of importance (the first process is <em>most important</em> and is
<em>killed last</em>):</p>
@@ -104,15 +100,18 @@ types of processes in order of importance (the first process is <em>most importa
android.app.Activity}'s {@link android.app.Activity#onResume onResume()} method has been
called).</li>
+ <li>It hosts a {@link android.app.Service} that's bound to the activity that the user is
+interacting with.</li>
+
+ <li>It hosts a {@link android.app.Service} that's running "in the foreground"&mdash;the
+service has called {@link android.app.Service#startForeground startForeground()}.
+
<li>It hosts a {@link android.app.Service} that's executing one of its lifecycle
callbacks ({@link android.app.Service#onCreate onCreate()}, {@link android.app.Service#onStart
onStart()}, or {@link android.app.Service#onDestroy onDestroy()}).</li>
<li>It hosts a {@link android.content.BroadcastReceiver} that's executing its {@link
android.content.BroadcastReceiver#onReceive onReceive()} method.</li>
-
- <li>Another foreground process has a dependency on this one: either bound
- to a Service in this process, or using a Content Provider of the process.</li>
</ul>
<p>Generally, only a few foreground processes exist at any given time. They are killed only as
@@ -131,79 +130,43 @@ visible to the user (its {@link android.app.Activity#onPause onPause()} method h
This might occur, for example, if the foreground activity started a dialog, which allows the
previous activity to be seen behind it.</li>
- <li>Another visible process has a dependency on this one: either bound
- to a Service in this process, or using a Content Provider of the process.</li>
+ <li>It hosts a {@link android.app.Service} that's bound to a visible (or foreground)
+activity.</li>
</ul>
<p>A visible process is considered extremely important and will not be killed unless doing so
is required to keep all foreground processes running. </p>
</li>
- <li><b>Perceptible process</b>
- <p>A process that doesn't have any foreground or visible components, but is still
- doing something that is directly perceptible by the user. A classic example of such
- a process would be one doing background music playback. The main way applications
- get into this state is through {@link android.app.Service#startForeground} or because
- another perceptible process has a dependency on one of its services or content
- providers. In addition, as of {@link android.os.Build.VERSION_CODES#HONEYCOMB},
- processes can go into this state when {@link android.app.Activity#onStop
- Activity.onStop()} is executing, allowing the process to continue executing
- critical code after no longer being visible to the user but before going
- fully into the background.</p>
-
- <p>Like visible processes, a perceptible process is considered extremely important
- and will not be killed unless doing so is required to keep all foreground and
- visible processes running. </p>
- </li>
-
<li><b>Service process</b>
<p>A process that is running a service that has been started with the {@link
-android.content.Context#startService startService()} method and does not fall into any of the
+android.content.Context#startService startService()} method and does not fall into either of the two
higher categories. Although service processes are not directly tied to anything the user sees, they
-are generally doing things that the user cares about (such as downloading a file the user has requested),
-so the system keeps them running unless there's not enough memory to retain them along with all
-foreground and visible processes. </p>
-
- <p>Even though Android tries to keep these processes running, it is considered normal
- operation for them to temporarily be killed to support the needs of more important
- processes. For example, if the user opens a very heavy-weight web page that needs
- most of the device's RAM, background services may be temporarily killed to satisfy
- those needs. Services in these processes thus must be prepared to deal gracefully
- with being killed while doing their work and later restarted.</p>
-
- <p>In recent implementations of Android, there are actually a number of sub-divisions
- in this area for processes that Android considers more important to the user and so
- would like to try harder to keep around. For example, the process hosting the current
- home app is generally kept in this area so that the user will not see long delays in
- returning home because that process has been killed.</p>
+are generally doing things that the user cares about (such as playing music in the background or
+downloading data on the network), so the system keeps them running unless there's not enough memory
+to retain them along with all foreground and visible processes. </p>
</li>
- <li><b>Background (cached) process</b>
- <p>The final importance level is for processes that are not of current significance.
- This is basically any process that does not fall into one of the previous levels.
- These processes have no direct impact on the user experience, and the system can kill
- them at any time to reclaim memory for the other more important processes.
- This includes everything from processes holding running activity objects that are not currently
- visible to the user (the activity's {@link android.app.Activity#onStop onStop()}
- method has been called) to processes that have no active code at all but may be
- useful to keep around in case they are needed in the near future.</p>
-
- <p>Usually there are many background processes being maintained, so they are kept
- in an LRU list to allow older processes to be killed before more recent ones. This
- helps reduce the frequency that new processes need to be creating, facilitating things
- like more rapid switching between the applications the user has recently visited.
- However, processes in this state must deal correctly with being killed and later
- restarted when needed. For example, if an activity implements its lifecycle methods
+ <li><b>Background process</b>
+ <p>A process holding an activity that's not currently visible to the user (the activity's
+{@link android.app.Activity#onStop onStop()} method has been called). These processes have no direct
+impact on the user experience, and the system can kill them at any time to reclaim memory for a
+foreground,
+visible, or service process. Usually there are many background processes running, so they are kept
+in an LRU (least recently used) list to ensure that the process with the activity that was most
+recently seen by the user is the last to be killed. If an activity implements its lifecycle methods
correctly, and saves its current state, killing its process will not have a visible effect on
the user experience, because when the user navigates back to the activity, the activity restores
all of its visible state. See the <a
-href="{@docRoot}guide/topics/fundamentals/activities.html#SavingActivityState">Activities</a>
+href="{@docRoot}guide/components/activities.html#SavingActivityState">Activities</a>
document for information about saving and restoring state.</p>
+ </li>
- <p>Android may also employ other additional policies for killing background processes. For
- example, there are typically restrictions on a maximum number of such processes to
- keep around, and limits on the amount of time they can spend holding wake locks
- or consuming CPU power until they will be removed.</p>
+ <li><b>Empty process</b>
+ <p>A process that doesn't hold any active application components. The only reason to keep this
+kind of process alive is for caching purposes, to improve startup time the next time a component
+needs to run in it. The system often kills these processes in order to balance overall system
+resources between process caches and the underlying kernel caches.</p>
</li>
</ol>
@@ -213,48 +176,23 @@ components currently active in the process. For example, if a process hosts a s
activity, the process is ranked as a visible process, not a service process.</p>
<p>In addition, a process's ranking might be increased because other processes are dependent on
-it&mdash;a process that is serving another process can not generally be ranked lower than the process it is
+it&mdash;a process that is serving another process can never be ranked lower than the process it is
serving. For example, if a content provider in process A is serving a client in process B, or if a
-service in process A has been bound to by a client in process B, process A is always considered at least
+service in process A is bound to a component in process B, process A is always considered at least
as important as process B.</p>
<p>Because a process running a service is ranked higher than a process with background activities,
-an activity that initiates a long-running operation may sometimes start a <a
-href="{@docRoot}guide/topics/fundamentals/services.html">service</a> for that operation, rather than
-simply create a worker thread&mdash;but only when the operation is a specific task that needs
-to be accomplished regardless of whether the user returns to the application.
+an activity that initiates a long-running operation might do well to start a <a
+href="{@docRoot}guide/components/services.html">service</a> for that operation, rather than
+simply create a worker thread&mdash;particularly if the operation will likely outlast the activity.
For example, an activity that's uploading a picture to a web site should start a service to perform
the upload so that the upload can continue in the background even if the user leaves the activity.
Using a service guarantees that the operation will have at least "service process" priority,
-regardless of what happens to the activity. This is not however an approach that should always
-be used. It would not be appropriate when simply downloading the data for a web page, since
-that can easily be restarted later if the user returns to the web browser. Allowing
-such a process to be in the background (instead of running a service) gives Android better
-information about how to manage that process in relation to others.
-
- <p>For a similar reason, broadcast receivers will often employ services rather than
- simply put time-consuming operations in a thread.</p>
-
- <p>Some command line tools are available to help you understand how Android is managing
- its processes. The most common command is <code>adb shell dumpsys activity</code>
- which provides a summary of various key state, including at the end a list of the
- process states, one per line (plus an optional second line for any key dependency
- on that process), ordered from higher importance to lowest. The exact
- contents of these lines has changed across different versions of Android, but the
- typical state for one process in the list would be:</p>
- <pre>
-Proc # 2: adj=prcp /F trm= 0 848:com.google.android.inputmethod.latin/u0a32 (service)
- com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME<=Proc{417:system/1000}
-</pre>
+regardless of what happens to the activity. This is the same reason that broadcast receivers should
+employ services rather than simply put time-consuming operations in a thread.</p>
+
- <p>This is a perceptible process (adj=prcp) that is running with the foreground
- scheduling class (/F), and has not recently been told to trim any memory
- (trm= 0). Its process id is 848; its name is com.google.android.inputmethod.latin;
- its Linux uid is u0a32 (10032), and the key state contributing to its current
- importance level is a service.</p>
- <p>The second line provides the name of the service that is important, because another
- process has a dependency on it (here the system process).</p>
<h2 id="Threads">Threads</h2>
@@ -283,7 +221,7 @@ database queries will block the whole UI. When the thread is blocked, no events
including drawing events. From the user's perspective, the
application appears to hang. Even worse, if the UI thread is blocked for more than a few seconds
(about 5 seconds currently) the user is presented with the infamous "<a
-href="http://developer.android.com/guide/practices/design/responsiveness.html">application not
+href="http://developer.android.com/guide/practices/responsiveness.html">application not
responding</a>" (ANR) dialog. The user might then decide to quit your application and uninstall it
if they are unhappy.</p>
@@ -436,7 +374,7 @@ href="http://code.google.com/p/shelves/">Shelves</a> sample application.</p>
therefore must be written to be thread-safe. </p>
<p>This is primarily true for methods that can be called remotely&mdash;such as methods in a <a
-href="{@docRoot}guide/topics/fundamentals/bound-services.html">bound service</a>. When a call on a
+href="{@docRoot}guide/components/bound-services.html">bound service</a>. When a call on a
method implemented in an {@link android.os.IBinder} originates in the same process in which the
{@link android.os.IBinder IBinder} is running, the method is executed in the caller's thread.
However, when the call originates in another process, the method is executed in a thread chosen from
@@ -474,7 +412,7 @@ transactions, so you can focus on defining and implementing the RPC programming
<p>To perform IPC, your application must bind to a service, using {@link
android.content.Context#bindService bindService()}. For more information, see the <a
-href="{@docRoot}guide/topics/fundamentals/services.html">Services</a> developer guide.</p>
+href="{@docRoot}guide/components/services.html">Services</a> developer guide.</p>
<!--
@@ -482,5 +420,5 @@ href="{@docRoot}guide/topics/fundamentals/services.html">Services</a> developer
<p>For information about how to perform work in the background for an indefinite period of time
(without a user interface), continue with the <b><a
-href="{@docRoot}guide/topics/fundamentals/services.html">Services</a></b> document.</p>
+href="{@docRoot}guide/components/services.html">Services</a></b> document.</p>
-->
diff --git a/docs/html/guide/topics/fundamentals/services.jd b/docs/html/guide/components/services.jd
index 9c38897671c9..ba5e1f03b277 100644
--- a/docs/html/guide/topics/fundamentals/services.jd
+++ b/docs/html/guide/components/services.jd
@@ -58,7 +58,7 @@ perform interprocess communication</li>
<h2>See also</h2>
<ol>
-<li><a href="{@docRoot}guide/topics/fundamentals/bound-services.html">Bound Services</a></li>
+<li><a href="{@docRoot}guide/components/bound-services.html">Bound Services</a></li>
</ol>
</div>
@@ -128,7 +128,7 @@ a thread in {@link android.app.Activity#onCreate onCreate()}, start running it i
android.app.Activity#onStart onStart()}, then stop it in {@link android.app.Activity#onStop
onStop()}. Also consider using {@link android.os.AsyncTask} or {@link android.os.HandlerThread},
instead of the traditional {@link java.lang.Thread} class. See the <a
-href="{@docRoot}guide/topics/fundamentals/processes-and-threads.html#Threads">Processes and
+href="{@docRoot}guide/components/processes-and-threads.html#Threads">Processes and
Threading</a> document for more information about threads.</p>
<p>Remember that if you do use a service, it still runs in your application's main thread by
default, so you should still create a new thread within the service if it performs intensive or
@@ -190,7 +190,7 @@ by the system. If the system kills your service, it restarts it as soon as resou
available again (though this also depends on the value you return from {@link
android.app.Service#onStartCommand onStartCommand()}, as discussed later). For more information
about when the system might destroy a service, see the <a
-href="{@docRoot}guide/topics/fundamentals/processes-and-threads.html">Processes and Threading</a>
+href="{@docRoot}guide/components/processes-and-threads.html">Processes and Threading</a>
document.</p>
<p>In the following sections, you'll see how you can create each type of service and how to use
@@ -252,7 +252,7 @@ attribute and set it to {@code "false"}. This is effective even if your service
filters.</p>
<p>For more information about creating intent filters for your service, see the <a
-href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a>
+href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a>
document.</p>
@@ -643,7 +643,7 @@ there are no clients bound to the service, the system destroys the service.</p>
<p>There are multiple ways to implement a bound service and the implementation is more
complicated than a started service, so the bound service discussion appears in a separate
document about <a
-href="{@docRoot}guide/topics/fundamentals/bound-services.html">Bound Services</a>.</p>
+href="{@docRoot}guide/components/bound-services.html">Bound Services</a>.</p>
@@ -857,10 +857,10 @@ can still receive a call to {@link android.app.Service#onBind onBind()} (when a
{@link android.content.Context#bindService bindService()}).</p>
<p>For more information about creating a service that provides binding, see the <a
-href="{@docRoot}guide/topics/fundamentals/bound-services.html">Bound Services</a> document,
+href="{@docRoot}guide/components/bound-services.html">Bound Services</a> document,
which includes more information about the {@link android.app.Service#onRebind onRebind()}
callback method in the section about <a
-href="{@docRoot}guide/topics/fundamentals/bound-services.html#Lifecycle">Managing the Lifecycle of
+href="{@docRoot}guide/components/bound-services.html#Lifecycle">Managing the Lifecycle of
a Bound Service</a>.</p>
diff --git a/docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd b/docs/html/guide/components/tasks-and-back-stack.jd
index 0880614ae646..8b7041cef826 100644
--- a/docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd
+++ b/docs/html/guide/components/tasks-and-back-stack.jd
@@ -29,14 +29,13 @@ to perform other tasks without losing their work</li>
<h2>Articles</h2>
<ol>
- <li><a href="{@docRoot}resources/articles/multitasking-android-way.html">Multitasking the Android Way</a></li>
+ <li><a href="http://android-developers.blogspot.com/2010/04/multitasking-android-way.html">Multitasking the Android Way</a></li>
</ol>
<h2>See also</h2>
<ol>
<li><a href="{@docRoot}design/patterns/navigation.html">Android Design:
Navigation</a></li>
- <li><a href="{@docRoot}videos/index.html#v=fL6gSd4ugSI">Application Lifecycle video</a></li>
<li><a
href="{@docRoot}guide/topics/manifest/activity-element.html">{@code &lt;activity&gt;} manifest
element</a></li>
@@ -46,7 +45,7 @@ element</a></li>
<p>An application usually contains multiple <a
-href="{@docRoot}guide/topics/fundamentals/activities.html">activities</a>. Each activity
+href="{@docRoot}guide/components/activities.html">activities</a>. Each activity
should be designed around a specific kind of action the user can perform and can start other
activities. For example, an email application might have one activity to show a list of new email.
When the user selects an email, a new activity opens to view that email.</p>
@@ -210,7 +209,7 @@ android.app.Activity#onSaveInstanceState onSaveInstanceState()} callback
methods in your activity.</p>
<p>For more information about how to save your activity state, see the <a
-href="{@docRoot}guide/topics/fundamentals/activities.html#SavingActivityState">Activities</a>
+href="{@docRoot}guide/components/activities.html#SavingActivityState">Activities</a>
document.</p>
@@ -591,6 +590,6 @@ href="#Clearing">Clearing the stack</a>).</p>
<p>For more information about how to use intents to
activate other application components and publish the intents to which your components
respond, continue with the <b><a
-href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent
+href="{@docRoot}guide/components/intents-filters.html">Intents and Intent
Filters</a></b> document.</p>
-->
diff --git a/docs/html/guide/developing/eclipse-adt.html b/docs/html/guide/developing/eclipse-adt.html
deleted file mode 100644
index 879a35635ba7..000000000000
--- a/docs/html/guide/developing/eclipse-adt.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/guide/developing/projects/projects-eclipse.html">
-<title>Redirecting...</title>
-</head>
-<body>
-<p>You should be redirected. Please <a
-href="http://developer.android.com/guide/developing/projects/projects-eclipse.html">click here</a>.</p>
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/guide/developing/other-ide.html b/docs/html/guide/developing/other-ide.html
deleted file mode 100644
index 41dba0529b19..000000000000
--- a/docs/html/guide/developing/other-ide.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/guide/developing/projects/projects-cmdline.html">
-<title>Redirecting...</title>
-</head>
-<body>
-<p>You should be redirected. Please <a
-href="http://developer.android.com/guide/developing/projects/projects-cmdline.html">click here</a>.</p>
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/guide/developing/testing/index.jd b/docs/html/guide/developing/testing/index.jd
deleted file mode 100644
index 8a0895989182..000000000000
--- a/docs/html/guide/developing/testing/index.jd
+++ /dev/null
@@ -1,36 +0,0 @@
-page.title=Testing
-@jd:body
-<p>
- Android includes powerful tools for setting up and running test applications.
- Whether you are working in Eclipse with ADT or working from the command line, these tools
- help you set up and run your tests within an emulator or the device you are targeting.
- The documents listed below explain how to work with the tools in your development environment.
-</p>
-<p>
- If you aren't yet familiar with the Android testing framework, please read the topic
- <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Fundamentals</a>
- before you get started.
- For a step-by-step introduction to Android testing, try the <a
- href="{@docRoot}resources/tutorials/testing/helloandroid_test.html">Hello, Testing</a>
- tutorial, which introduces basic testing concepts and procedures.
- For a more advanced tutorial, try <a
- href="{@docRoot}resources/tutorials/testing/activity_test.html">Activity Testing</a>,
- which guides you through a more complex testing scenario.
-</p>
-<dl>
- <dt><a href="testing_eclipse.html">Testing from Eclipse, with ADT</a></dt>
- <dd>
- The ADT plugin lets you quickly set up and manage test projects directly in
- the Eclipse UI. Once you have written your tests, you can build and run them and
- then see the results in the Eclipse JUnit view. You can also use the SDK command-line
- tools to execute your tests if needed.
- </dd>
- <dt><a href="testing_otheride.html">Testing from Other IDEs</a></dt>
- <dd>
- The SDK command-line tools provide the same capabilities as the ADT plugin. You can
- use them to set up and manage test projects, build your test application,
- run your tests, and see the results. You use
- the <code>android</code> tool to create and manage test projects, the Ant build system
- to compile them, and the <code>adb</code> tool to install and run them.
- </dd>
-</dl>
diff --git a/docs/html/guide/developing/tools/aapt.html b/docs/html/guide/developing/tools/aapt.html
deleted file mode 100644
index e66a2019e494..000000000000
--- a/docs/html/guide/developing/tools/aapt.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/guide/developing/building/index.html#detailed-build">
-<title>Redirecting...</title>
-</head>
-<body>
-<p>You should be redirected. Please <a
-href="http://developer.android.com/guide/developing/building/index.html#detailed-build">click here</a>.</p>
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/guide/google/index.jd b/docs/html/guide/google/index.jd
new file mode 100644
index 000000000000..95c2816b416e
--- /dev/null
+++ b/docs/html/guide/google/index.jd
@@ -0,0 +1,97 @@
+page.title=Google Services
+footer.hide=1
+@jd:body
+
+
+ <p>Google offers a variety of services that help you build new revenue streams, enhance your app's capabilities, manage distribution and payloads, and track usage and installs. Many of the services use static libraries that you download through the Android SDK Manager and build into your app. Others are configurable directly from Google Play Android Developer Console.</p>
+
+ <p>The sections below highlight some of the Google Services and link you to more information about how to use them in your Android app. </p>
+
+
+<h2 id="monetization">Monetize Your App</h2>
+
+<div class="vspace size-1">&nbsp;</div>
+<div class="layout-content-row">
+
+ <div class="layout-content-col span-4">
+ <h4>In-App Billing</h4>
+ <p>Keep your users engaged by offering in-app purchases and subscriptions directly in your app.
+ </p>
+ <a href="{@docRoot}guide/google/play/billing/index.html">Learn more &raquo;</a>
+ </div>
+
+ <div class="layout-content-col span-4">
+ <h4>Google AdMob Ads</h4>
+ <p>Generate more revenue from your app by
+ displaying ads from multiple ad networks.</p>
+ <a href="https://developers.google.com/mobile-ads-sdk/docs/android/fundamentals">Learn more &raquo;</a>
+ </div>
+
+ <div class="layout-content-col span-4">
+ <h4>Application Licensing</h4>
+ <p>Protect your revenue streams and integrate policies for usage into your app.</p>
+ <a href="{@docRoot}guide/google/play/licensing/index.html">Learn more &raquo;</a>
+ </div>
+
+</div>
+
+<h2 id="integration">Manage App Distribution</h2>
+
+<div class="vspace size-1">&nbsp;</div>
+
+<div class="layout-content-row">
+
+<div class="layout-content-col span-4">
+
+<h4>Google Play Filters</h4>
+<p>Make sure your app gets to the right users by
+declaring the hardware and software features needed by your app.</p>
+<a href="{@docRoot}guide/google/play/filters.html">Learn more &raquo;</a>
+</div>
+
+ <div class="layout-content-col span-4">
+<h4>Multiple APK Support</h4>
+<p>Distribute different APKs based on a variety of properties such as platform version, screen size, and GLES texture compression support.</p>
+<a href="{@docRoot}guide/google/play/publishing/multiple-apks.html">Learn more &raquo;</a>
+</div>
+
+ <div class="layout-content-col span-4">
+
+<h4>APK Expansion files</h4>
+<p>Take load off of your servers and utilize APK expansion files
+to deliver up to 4 GB of assets for your Android app, free.</p>
+
+<a href="{@docRoot}guide/google/play/expansion-files.html">Learn more &raquo;</a>
+</div>
+
+</div>
+
+<h2 id="integration">Enhance Your App's Capabilities</h2>
+
+<div class="vspace size-1">&nbsp;</div>
+
+<div class="layout-content-row">
+
+<div class="layout-content-col span-4">
+ <h4>Android Cloud-to-Device Messaging </h4>
+ <p>Notify your apps of events with push messages that are lightweight
+ and battery-saving.</p>
+ <a href="https://developers.google.com/android/c2dm/">Learn more &raquo;</a>
+</div>
+
+<div class="layout-content-col span-4">
+ <h4>Google Maps</h4>
+ <p> The Google Maps library for Android lets you add powerful mapping and geo-location capabilities to your app.</p>
+ <a href="https://developers.google.com/maps/documentation/android/">Learn more &raquo;</a>
+</div>
+</div>
+
+
+<h2 id="integration">Track Performance with Analytics</h2>
+<p>Google Analytics gives you powerful insights into how users find your apps
+ and how they use them. <br />Start integrating analytics to measure
+ your app's success.</p>
+
+
+<div style="margin-bottom:1.5em;"><a href="https://developers.google.com/analytics/devguides/collection/android/">Learn more &raquo;</a></div>
+ \ No newline at end of file
diff --git a/docs/html/guide/google/play/billing/billing_about.html b/docs/html/guide/google/play/billing/billing_about.html
new file mode 100644
index 000000000000..9f41fa62e344
--- /dev/null
+++ b/docs/html/guide/google/play/billing/billing_about.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+<meta http-equiv="refresh"
+content="0;url=http://developer.android.com/guide/google/play/billing/index.html">
+<title>Redirecting...</title>
+</head>
+<body>
+<p>You should be redirected. Please <a
+href="http://developer.android.com/guide/google/play/billing/index.html">click
+here</a>.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/docs/html/guide/market/billing/billing_admin.jd b/docs/html/guide/google/play/billing/billing_admin.jd
index 0f869ab78795..cb288a5381d5 100755
--- a/docs/html/guide/market/billing/billing_admin.jd
+++ b/docs/html/guide/google/play/billing/billing_admin.jd
@@ -15,20 +15,20 @@ parent.link=index.html
</ol>
<h2>Downloads</h2>
<ol>
- <li><a href="{@docRoot}guide/market/billing/billing_integrate.html#billing-download">Sample
+ <li><a href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-download">Sample
Application</a></li>
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/market/billing/billing_overview.html">Overview of In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_overview.html">Overview of In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_integrate.html">Implementing In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_integrate.html">Implementing In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_best_practices.html">Security and
+ <li><a href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and
Design</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_testing.html">Testing In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_testing.html">Testing In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_reference.html">In-app Billing
+ <li><a href="{@docRoot}guide/google/play/billing/billing_reference.html">In-app Billing
Reference</a></li>
</ol>
</div>
@@ -39,13 +39,13 @@ few administrative tasks, including setting up and maintaining your product list
site, registering test accounts, and handling refunds when necessary.</p>
<p>You must have a Google Play publisher account to register test accounts. And you must have a
-Google Checkout merchant account to create a product list and issue refunds to your users. If you
+Google Wallet merchant account to create a product list and issue refunds to your users. If you
already have a publisher account on Google Play, you can use your existing account. You do not
need to register for a new account to support in-app billing. If you do not have a publisher
account, you can register as a Google Play developer and set up a publisher account at the
Google Play <a href="http://play.google.com/apps/publish">publisher site</a>. If you do not have a
-Google Checkout merchant account, you can register for one at the <a
-href="http://checkout.google.com">Google Checkout site</a>.</p>
+Google Wallet merchant account, you can register for one at the <a
+href="http://checkout.google.com">Google Wallet site</a>.</p>
<h2 id="billing-list-setup">Creating a Product List</h2>
@@ -56,7 +56,7 @@ items that are listed in another application's product list.</p>
<p>You can access an application's product list by clicking the <strong>In-App Products</strong>
link that appears under each of the applications that are listed for your publisher account (see
-figure 1). The <strong>In-App Products</strong> link appears only if you have a Google Checkout
+figure 1). The <strong>In-App Products</strong> link appears only if you have a Google Wallet
merchant account and an application's manifest includes the <code>com.android.vending.BILLING</code>
permission.</p>
@@ -66,7 +66,8 @@ permission.</p>
<strong>In-App Products</strong> link.
</p>
-<p>A product list contains information about the items you are selling, such as a product id,
+<p>A product list specifies items you are selling in an application &mdash; in-app products,
+subscriptions, or a combination of both. For each item, the product list contains information such as a product id,
product description, and price (see figure 2). The product list stores only metadata about the items
you are selling in your application. It does not store any digital content. You are responsible for
storing and delivering the digital content that you sell in your applications.</p>
@@ -77,17 +78,17 @@ storing and delivering the digital content that you sell in your applications.</
</p>
<p>You can create a product list for any published application or any draft application that's been
-uploaded and saved to the Google Play site. However, you must have a Google Checkout merchant
+uploaded and saved to the Google Play site. However, you must have a Google Wallet merchant
account and the application's manifest must include the <code>com.android.vending.BILLING</code>
permission. If an application's manifest does not include this permission, you will be able to edit
existing items in the product list but you will not be able to add new items to the list. For more
information about this permission, see
-<a href="{@docRoot}guide/market/billing/billing_integrate.html#billing-permission">Updating Your
+<a href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-permission">Updating Your
Application's Manifest</a>.</p>
<p>In addition, an application package can have only one product list. If you create a product
list for an application, and you use the <a
-href="{@docRoot}guide/market/publishing/multiple-apks.html">multiple APK feature</a> to distribute
+href="{@docRoot}guide/google/play/publishing/multiple-apks.html">multiple APK feature</a> to distribute
more than one APK for that application, the product list applies to all APK versions that are
associated with the application listing. You cannot create individual product lists for each APK if
you are using the multiple APK feature.</p>
@@ -99,6 +100,8 @@ application has only a few in-app items or you are adding only a few items to a
product list for testing purposes. The CSV file method is useful if your application has a large
number of in-app items.</p>
+<p class="note"><strong>Note:</strong> Batch upload of product lists containing subscriptions is not yet supported.</p>
+
<h3 id="billing-form-add">Adding items one at a time to a product list</h3>
<p>To add an item to a product list using the In-app Products UI, follow these steps:</p>
@@ -129,8 +132,8 @@ number of in-app items.</p>
a product ID.</p>
</li>
<li><strong>Purchase Type</strong>
- <p>The purchase type can be <strong>Managed per user account</strong> or <strong>
- Unmanaged</strong>. You can never change an item's purchase type after you set it. For more
+ <p>The purchase type can be <strong>Managed per user account</strong>, <strong>Unmanaged</strong>,
+ or <strong>Subscription</strong>. You can never change an item's purchase type after you set it. For more
information, see <a href="#billing-purchase-type">Choosing a purchase type</a> later in this
document.</p>
</li>
@@ -140,7 +143,7 @@ number of in-app items.</p>
<strong>Published</strong> and the item's application must be published on Google Play.</p>
<p class="note"><strong>Note:</strong> This is not true for test accounts. An item is visible to
a test account if the application is not published and the item is published. See <a
- href="{@docRoot}guide/market/billing/billing_testing.html#billing-testing-real">Testing In-app
+ href="{@docRoot}guide/google/play/billing/billing_testing.html#billing-testing-real">Testing In-app
Billing</a> for more information.</p>
</li>
<li><strong>Language</strong>
@@ -171,6 +174,7 @@ number of in-app items.</p>
<p>To specify prices in other currencies, you can manually enter the price for each
currency or you can click <strong>Auto Fill</strong> and let Google Play do a one-time
conversion from your home currency to the currencies you are targeting (see figure 4).</p>
+ <p>For subscription items, note that you can not change the item's price once you have published it. </p>
</li>
</ul>
<img src="{@docRoot}images/billing_list_form_2.png" height="1226" id="figure4" />
@@ -193,7 +197,16 @@ or modify product IDs after you save them.</p>
<p>To add a batch of items to a product list using a CSV file, you first need to create your CSV
file. The data values that you specify in the CSV file represent the same data values you specify
manually through the In-app Products UI (see <a href="#billing-form-add">Adding items one at a time
-to a product list</a>). The CSV file uses commas (,) and semi-colons (;) to separate data values.
+to a product list</a>).
+
+<p>If you are importing and exporting CSV files with in-app products, please
+keep tax-inclusive pricing in mind. If you use auto-fill, you can provide a
+tax-exclusive default price and tax-inclusive prices will be auto-filled. If you
+do not use auto-fill, prices you provide must include tax.</p>
+
+<p class="note"><strong>Note:</strong> Batch upload of product lists containing subscriptions is not yet supported.</p>
+
+The CSV file uses commas (,) and semi-colons (;) to separate data values.
Commas are used to separate primary data values, and semi-colons are used to separate subvalues. For
example, the syntax for the CSV file is as follows:</p>
@@ -419,17 +432,17 @@ times.</p>
<p>In-app billing does not allow users to send a refund request to Google Play. Refunds for
in-app purchases must be directed to you (the application developer). You can then process the
-refund through your Google Checkout merchant account. When you do this, Google Play receives a
-refund notification from Google Checkout, and Google Play sends a refund message to your
+refund through your Google Wallet merchant account. When you do this, Google Play receives a
+refund notification from Google Wallet, and Google Play sends a refund message to your
application. For more information, see <a
-href="{@docRoot}guide/market/billing/billing_overview.html#billing-action-notify">Handling
+href="{@docRoot}guide/google/play/billing/billing_overview.html#billing-action-notify">Handling
IN_APP_NOTIFY messages</a> and <a
href="http://www.google.com/support/androidmarket/bin/answer.py?answer=1153485">In-app Billing
Pricing</a>.</p>
-<p class="caution"><strong>Important:</strong> You cannot use the Google Checkout API to issue
+<p class="caution"><strong>Important:</strong> You cannot use the Google Wallet API to issue
refunds or cancel in-app billing transactions. You must do this manually through your Google
-Checkout merchant account. However, you can use the Google Checkout API to retrieve order
+Wallet merchant account. However, you can use the Google Wallet API to retrieve order
information.</p>
<h2 id="billing-testing-setup">Setting Up Test Accounts</h2>
diff --git a/docs/html/guide/market/billing/billing_best_practices.jd b/docs/html/guide/google/play/billing/billing_best_practices.jd
index e100ce581303..49d2a299f5da 100755
--- a/docs/html/guide/market/billing/billing_best_practices.jd
+++ b/docs/html/guide/google/play/billing/billing_best_practices.jd
@@ -11,20 +11,20 @@ parent.link=index.html
</ol>
<h2>Downloads</h2>
<ol>
- <li><a href="{@docRoot}guide/market/billing/billing_integrate.html#billing-download">Sample
+ <li><a href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-download">Sample
Application</a></li>
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/market/billing/billing_overview.html">Overview of In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_overview.html">Overview of In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_integrate.html">Implementing In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_integrate.html">Implementing In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_testing.html">Testing In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_testing.html">Testing In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_admin.html">Administering In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_admin.html">Administering In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_reference.html">In-app Billing
+ <li><a href="{@docRoot}guide/google/play/billing/billing_reference.html">In-app Billing
Reference</a></li>
</ol>
</div>
@@ -58,7 +58,7 @@ sure to encrypt the content and use a device-specific encryption key.</p>
<p>You should obfuscate your in-app billing code so it is difficult for an attacker to reverse
engineer security protocols and other application components. At a minimum, we recommend that you
run an obfuscation tool like <a
-href="http://developer.android.com/guide/developing/tools/proguard.html">Proguard</a> on your
+href="http://developer.android.com/tools/proguard.html">Proguard</a> on your
code.</p>
<p>In addition to running an obfuscation program, we recommend that you use the following techniques
to obfuscate your in-app billing code.</p>
diff --git a/docs/html/guide/market/billing/billing_integrate.jd b/docs/html/guide/google/play/billing/billing_integrate.jd
index 4b3650fcc6d5..2d1582eebb34 100755
--- a/docs/html/guide/market/billing/billing_integrate.jd
+++ b/docs/html/guide/google/play/billing/billing_integrate.jd
@@ -21,15 +21,15 @@ parent.link=index.html
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/market/billing/billing_overview.html">Overview of In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_overview.html">Overview of In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_best_practices.html">Security and
+ <li><a href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and
Design</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_testing.html">Testing In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_testing.html">Testing In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_admin.html">Administering In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_admin.html">Administering In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_reference.html">In-app Billing
+ <li><a href="{@docRoot}guide/google/play/billing/billing_reference.html">In-app Billing
Reference</a></li>
</ol>
</div>
@@ -41,8 +41,8 @@ you implement in-app billing by stepping through the primary implementation task
billing sample application as an example.</p>
<p>Before you implement in-app billing in your own application, be sure that you read <a
-href="{@docRoot}guide/market/billing/billing_overview.html">Overview of In-app Billing</a> and <a
-href="{@docRoot}guide/market/billing/billing_best_practices.html">Security and Design</a>. These
+href="{@docRoot}guide/google/play/billing/billing_overview.html">Overview of In-app Billing</a> and <a
+href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and Design</a>. These
documents provide background information that will make it easier for you to implement in-app
billing.</p>
@@ -214,7 +214,7 @@ following:</p>
</li>
<li><strong>Build the sample application in release mode and sign it.</strong>
<p>To learn how to build and sign applications, see <a
- href="{@docRoot}guide/developing/building/index.html">Building and Running</a>.</p>
+ href="{@docRoot}tools/building/index.html">Building and Running</a>.</p>
</li>
</ol>
@@ -238,11 +238,11 @@ how to do this.</p>
your product list so that <code>sword_001</code> has a purchase type of "Managed per user
account" and <code>potion_001</code> has a purchase type of "Unmanaged" so you can see how these
two purchase types behave. To learn how to set up a product list, see <a
- href="{@docRoot}guide/market/billing/billing_admin.html#billing-list-setup">Creating a Product
+ href="{@docRoot}guide/google/play/billing/billing_admin.html#billing-list-setup">Creating a Product
List</a>.</p>
<p class="note"><strong>Note:</strong> You must publish the items in your product
list (<code>sword_001</code> and <code>potion_001</code>) even though you are not publishing the
- sample application. Also, you must have a Google Checkout Merchant account to add items to the
+ sample application. Also, you must have a Google Wallet Merchant account to add items to the
sample application's product list.</p>
</li>
</ol>
@@ -255,10 +255,10 @@ onto a device to run it. To run the sample application, do the following:</p>
<ol>
<li><strong>Make sure you have at least one test account registered under your Google Play
publisher account.</strong>
- <p>You cannot purchase items from yourself (Google Checkout prohibits this), so you need to
+ <p>You cannot purchase items from yourself (Google Wallet prohibits this), so you need to
create at least one test account that you can use to purchase items in the sample application.
To learn how to set up a test account, see <a
- href="{@docRoot}guide/market/billing/billing_testing.html#billing-testing-setup">Setting up Test
+ href="{@docRoot}guide/google/play/billing/billing_testing.html#billing-testing-setup">Setting up Test
Accounts</a>.</p>
</li>
<li><strong>Verify that your device is running a supported version of the Google Play
@@ -274,12 +274,12 @@ onto a device to run it. To run the sample application, do the following:</p>
<p>Even though you uploaded the application to Google Play, the application is not published,
so you cannot download it from Google Play to a device. Instead, you must install the
application onto your device. To learn how to install an application onto a device, see <a
- href="{@docRoot}guide/developing/building/building-cmdline.html#RunningOnDevice">Running on a
+ href="{@docRoot}tools/building/building-cmdline.html#RunningOnDevice">Running on a
device</a>.</p>
</li>
<li><strong>Make one of your test accounts the primary account on your device.</strong>
<p>The primary account on your device must be one of the <a
- href="{@docRoot}guide/market/billing/billing_admin.html#billing-testing-setup">test accounts</a>
+ href="{@docRoot}guide/google/play/billing/billing_admin.html#billing-testing-setup">test accounts</a>
that you registered on the Google Play publisher site. If the primary account on your device is not a
test account, you must do a factory reset of the device and then sign in with one of your test
accounts. To perform a factory reset, do the following:</p>
@@ -294,7 +294,7 @@ onto a device to run it. To run the sample application, do the following:</p>
</li>
<li><strong>Run the application and purchase the sword or the potion.</strong>
<p>When you use a test account to purchase items, the test account is billed through Google
- Checkout and your Google Checkout Merchant account receives a payout for the purchase.
+ Wallet and your Google Wallet Merchant account receives a payout for the purchase.
Therefore, you may want to refund purchases that are made with test accounts, otherwise the
purchases will show up as actual payouts to your merchant account.</p>
</ol>
@@ -466,7 +466,7 @@ indicates the item being purchased, and another identifies your application. The
code. However, this is not the complete purchase response; the complete response is delivered with
an asynchronous broadcast intent. For more information about the various Bundle keys that are
supported by the <code>MarketBillingService</code>, see <a
-href="{@docRoot}guide/market/billing/billing_reference.html#billing-interface">In-app Billing
+href="{@docRoot}guide/google/play/billing/billing_reference.html#billing-interface">In-app Billing
Service Interface</a>.</p>
<p>You can use the <code>sendBillingRequest()</code> method to send five types of billing requests.
@@ -475,14 +475,14 @@ key can have the following five values:</p>
<ul>
<li><code>CHECK_BILLING_SUPPORTED</code>&mdash;verifies that the Google Play application
- supports in-app billing.</li>
+ supports in-app billing and the version of the In-app Billing API available.</li>
<li><code>REQUEST_PURCHASE</code>&mdash;sends a purchase request for an in-app item.</li>
<li><code>GET_PURCHASE_INFORMATION</code>&mdash;retrieves transaction information for a purchase
or refund.</li>
<li><code>CONFIRM_NOTIFICATIONS</code>&mdash;acknowledges that you received the transaction
information for a purchase or refund.</li>
<li><code>RESTORE_TRANSACTIONS</code>&mdash;retrieves a user's transaction history for <a
- href="{@docRoot}guide/market/billing/billing_admin.html#billing-purchase-type">managed
+ href="{@docRoot}guide/google/play/billing/billing_admin.html#billing-purchase-type">managed
purchases</a>.</li>
</ul>
@@ -511,8 +511,8 @@ application's main thread.</p>
<h4>Verifying that in-app billing is supported (CHECK_BILLING_SUPPPORTED)</h4>
<p>The following code sample shows how to verify whether the Google Play application supports
-in-app billing. In the sample, <code>mService</code> is an instance of the
-<code>MarketBillingService</code> interface.</p>
+in-app billing and confirm what version of the API it supports. In the sample, <code>mService</code>
+is an instance of the <code>MarketBillingService</code> interface.</p>
<pre>
/**
@@ -523,13 +523,19 @@ in-app billing. In the sample, <code>mService</code> is an instance of the
// Do something with this response.
}
</pre>
+
<p>The <code>makeRequestBundle()</code> method constructs an initial Bundle, which contains the
three keys that are required for all requests: <code>BILLING_REQUEST</code>,
-<code>API_VERSION</code>, and <code>PACKAGE_NAME</code>. The request returns a synchronous {@link
+<code>API_VERSION</code>, and <code>PACKAGE_NAME</code>. If you are offering subscriptions in
+your app, set the API_VERSION key to a value of "2", to confirm that In-app Billing v2 is
+available. For an examnple, see
+<a href="{@docRoot}guide/google/play/billing/billing_subscriptions.html#version">Subscriptions</a>.</p>
+
+<p>The <code>CHECK_BILLING_SUPPORTED</code> request returns a synchronous {@link
android.os.Bundle} response, which contains only a single key: <code>RESPONSE_CODE</code>. The
<code>RESPONSE_CODE</code> key can have the following values:</p>
<ul>
- <li><code>RESULT_OK</code>&mdash;in-app billing is supported.</li>
+ <li><code>RESULT_OK</code>&mdash;the spedified version of in-app billing is supported.</li>
<li><code>RESULT_BILLING_UNAVAILABLE</code>&mdash;in-app billing is not available because the API
version you specified is not recognized or the user is not eligible to make in-app purchases (for
example, the user resides in a country that prohibits in-app purchases).</li>
@@ -571,7 +577,7 @@ Help topic.</p>
<p>You must specify four keys in the request {@link android.os.Bundle}. The following code sample
shows how to set these keys and make a purchase request for a single in-app item. In the sample,
<code>mProductId</code> is the Google Play product ID of an in-app item (which is listed in the
-application's <a href="{@docRoot}guide/market/billing/billing_admin.html#billing-list-setup">product
+application's <a href="{@docRoot}guide/google/play/billing/billing_admin.html#billing-list-setup">product
list</a>), and <code>mService</code> is an instance of the <code>MarketBillingService</code>
interface.</p>
@@ -581,6 +587,8 @@ interface.</p>
*/
Bundle request = makeRequestBundle("REQUEST_PURCHASE");
request.putString(ITEM_ID, mProductId);
+ // Request is for a standard in-app product
+ request.putString(ITEM_TYPE, "inapp");
// Note that the developer payload is optional.
if (mDeveloperPayload != null) {
request.putString(DEVELOPER_PAYLOAD, mDeveloperPayload);
@@ -664,7 +672,7 @@ use to retrieve the transaction details for the <code>REQUEST_PURCHASE</code> re
<p class="note"><strong>Note:</strong> The Google Play application also sends
an <code>IN_APP_NOTIFY</code> for refunds. For more information, see <a
-href="{@docRoot}guide/market/billing/billing_overview.html#billing-action-notify">Handling
+href="{@docRoot}guide/google/play/billing/billing_overview.html#billing-action-notify">Handling
IN_APP_NOTIFY messages</a>.</p>
<p>Because the purchase process is not instantaneous and can take several seconds (or more), you
@@ -847,7 +855,7 @@ android.content.BroadcastReceiver}. To see an example of how you can send and re
messages, see the <code>BillingReceiver.java</code> and <code>BillingService.java</code> files in
the sample application. You can use these samples as a basis for your own implementation. However,
if you use any of the code from the sample application, be sure you follow the guidelines in <a
-href="{@docRoot}guide/market/billing/billing_best_practices.html">Security and Design</a>.</p>
+href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and Design</a>.</p>
<h2 id="billing-broadcast-receiver">Creating a BroadcastReceiver</h2>
@@ -860,19 +868,19 @@ android.content.BroadcastReceiver} that can handle the following intents:</p>
<p>This broadcast intent contains a Google Play response code, and is sent after you make an
in-app billing request. For more information about the response codes that are sent with this
response, see <a
- href="{@docRoot}guide/market/billing/billing_reference.html#billing-codes">Google Play Response
+ href="{@docRoot}guide/google/play/billing/billing_reference.html#billing-codes">Google Play Response
Codes for In-app Billing</a>.</p>
</li>
<li>com.android.vending.billing.IN_APP_NOTIFY
<p>This response indicates that a purchase has changed state, which means a purchase succeeded,
was canceled, or was refunded. For more information about notification messages, see <a
- href="{@docRoot}guide/market/billing/billing_reference.html#billing-intents">In-app Billing
+ href="{@docRoot}guide/google/play/billing/billing_reference.html#billing-intents">In-app Billing
Broadcast Intents</a></p>
</li>
<li>com.android.vending.billing.PURCHASE_STATE_CHANGED
<p>This broadcast intent contains detailed information about one or more transactions. For more
information about purchase state messages, see <a
- href="{@docRoot}guide/market/billing/billing_reference.html#billing-intents">In-app Billing
+ href="{@docRoot}guide/google/play/billing/billing_reference.html#billing-intents">In-app Billing
Broadcast Intents</a></p>
</li>
</ul>
@@ -981,7 +989,7 @@ local service (discussed in the next section). The <code>BillingReceiver.java</c
sample application shows you how to do this. You can use this sample as a basis for your own {@link
android.content.BroadcastReceiver}. However, if you use any of the code from the sample application,
be sure you follow the guidelines that are discussed in <a
-href="{@docRoot}guide/market/billing/billing_best_practices.html">Security and Design </a>.</p>
+href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and Design </a>.</p>
<h2 id="billing-signatures">Verifying Signatures and Nonces</h2>
@@ -1020,7 +1028,7 @@ code shows some simple methods you can use to do this.</p>
<code>PURCHASE_STATE_CHANGED</code> broadcast intent. The <code>Security.java</code> file in the
sample application shows you how to do this. If you use this file as a basis for your own security
implementation, be sure to follow the guidelines in <a
-href="{@docRoot}guide/market/billing/billing_best_practices.html">Security and Design</a> and
+href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and Design</a> and
obfuscate your code.</p>
<p>You will need to use your Google Play public key to perform the signature verification. The
@@ -1067,7 +1075,7 @@ sample application provides an example database (PurchaseDatabase.java); however
database has been simplified for clarity and does not exhibit the security best practices that we
recommend. If you have a remote server, we recommend that you store purchase information on your
server instead of in a local database on a device. For more information about security best
-practices, see <a href="{@docRoot}guide/market/billing/billing_best_practices.html">Security and
+practices, see <a href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and
Design</a>.</p>
<p class="note"><strong>Note</strong>: If you store any purchase information on a device, be sure to
diff --git a/docs/html/guide/market/billing/billing_overview.jd b/docs/html/guide/google/play/billing/billing_overview.jd
index b59381140eca..280b3cf3143e 100755
--- a/docs/html/guide/market/billing/billing_overview.jd
+++ b/docs/html/guide/google/play/billing/billing_overview.jd
@@ -7,6 +7,7 @@ parent.link=index.html
<div id="qv">
<h2>In this document</h2>
<ol>
+ <li><a href="#billing-types">Product and Purchase Types</a></li>
<li><a href="#billing-arch">In-app Billing Architecture</a></li>
<li><a href="#billing-msgs">In-app Billing Messages</a></li>
<ol>
@@ -20,19 +21,19 @@ parent.link=index.html
</ol>
<h2>Downloads</h2>
<ol>
- <li><a href="{@docRoot}guide/market/billing/billing_integrate.html#billing-download">Sample
+ <li><a href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-download">Sample
Application</a></li>
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/market/billing/billing_integrate.html">Implementing In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_integrate.html">Implementing In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_best_practices.html">Security and
+ <li><a href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and
Design</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_testing.html">Testing In-app Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_admin.html">Administering In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_testing.html">Testing In-app Billing</a></li>
+ <li><a href="{@docRoot}guide/google/play/billing/billing_admin.html">Administering In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_reference.html">In-app Billing
+ <li><a href="{@docRoot}guide/google/play/billing/billing_reference.html">In-app Billing
Reference</a></li>
</ol>
</div>
@@ -47,15 +48,57 @@ order number, the order date and time, and the price paid. At no point does your
handle any financial transactions; that role is provided by Google Play's in-app billing
service.</p>
+<h2 id="billing-types">Product and Purchase Types</h2>
+
+<p>In-app Billing supports different product types and purchase types to give you flexibility in how you monetize your app. In all cases, you define your products using the Google Play Developer Console, including product type, purchase type, SKU, price, description, and so on. For more information, see <a href="billing_admin.html">Administering In-app Billing</a>.</p>
+
+<h3 id="producttypes">Product Types</h3>
+
+<p>With In-app Billing, you can sell two types of products &mdash; <em>in-app products</em> and <em>subscriptions</em>. The billing characteristics of the two types are very different, but the In-app Billing API lets you handle the two product types in your app using the same communication model, data structures, and user interactions, as described later in this document.</p>
+
+<ul>
+<li><em>In-app products</em> &mdash; Items that a user would purchase one-at-a-time. For example, typical in-app products would let users purchase digital content, unlock functionality in an app, pay for one-time charges, or add almost anything to the application experience. Unlike with priced applications, once the user has purchased an in-app product there is no refund window. Users desiring refunds must contact the developer directly.
+
+<p>In-app products can be sold using either the "managed per user account" or "unmanaged" purchase type. In-app products are always explicitly associated with one and only one app. That is, one app cannot purchase an in-app product published for another app, even if they are from the same developer. In-app products are supported in all versions of In-app Billing.</p></li>
+
+<li><em>Subscriptions</em> &mdash; Items that are sold with a developer-specified, recurring billing interval. When a user purchases a subscription, Google Play and its payment processor automatically bill the user's account at the specified interval and price, charging the amount to the original payment method. Once the user purchases a subscription, Google Play continues billing the account indefinitely, without requiring approval or action from the user. The user can cancel the subscription at any time.
+
+<p>Subscriptions can only be sold using the "managed per user account" purchase type. As with in-app products, once the user has purchased an in-app product there is no refund window. Users desiring refunds must contact the developer directly. For more information about subscriptions and how to sell them in your apps, see the <a href="billing-subscriptions.html">Subscriptions</a> document.</p></li>
+</ul>
+
+<h3 id="purchasetypes">Purchase Types</h3>
+
+<p>In-app Billing offers two purchase types that you can use when selling in-app products, "managed per user account" and "unmanaged". The purchase type controls how Google Play handles and tracks purchases for the products. </p>
+
+<ul>
+<li><em>Managed per user account</em> &mdash; Items that can be purchased only once per user account on Google Play. When a user purchases an item that uses the "managed per user account" purchase type, Google Play permanently stores the transaction information for each item on a per-user basis. This enables you to later query Google Play to restore the state of the items a specific user has purchased. If a user attempts to purchase a managed item that has already been purchased, Google Play prevents the user from purchasing the item again and displays an "Item already purchased" error.
+
+<p>The "managed per user account" purchase type is useful if you are selling items such as game levels or application features. These items are not transient and usually need to be restored whenever a user reinstalls your application, wipes the data on their device, or installs your application on a new device.</p>
+
+<li><em>Unmanaged</em> &mdash; Items that do not have their transaction information stored on Google Play. This means that you cannot later query Google Play to retrieve transaction information for those items. For "unmanaged" purchases, you are responsible for managing the transaction information. Also, Google Play does not attempt to prevent the user from purchasing an item multiple times if it uses the "unmanaged" purchase type. It's up to you to control how many times an unmanaged item can be purchased.</p>
+
+<p>The "unmanaged" purchase type is useful if you are selling consumable items, such as fuel or magic spells. These items are consumed within your application and are usually purchased multiple times.</p></li>
+</ul>
+
<h2 id="billing-arch">In-app Billing Architecture</h2>
-<p>In-app billing uses an asynchronous message loop to convey billing requests and billing responses
-between your application and the Google Play server. In practice, your application never directly
-communicates with the Google Play server (see figure 1). Instead, your application sends billing
-requests to the Google Play application over interprocess communication (IPC) and receives
-purchase responses from the Google Play application in the form of asynchronous broadcast
-intents. Your application does not manage any network connections between itself and the Google
-Play server or use any special APIs from the Android platform.</p>
+<p>Your app accesses the In-app Billing service using an API that is exposed by
+the Google Play app installed on the device. The Google Play app then uses an
+asynchronous message loop to convey billing requests and responses between your
+application and the Google Play server. In practice, your application never
+directly communicates with the Google Play server (see figure 1). Instead, your
+application sends billing requests to the Google Play application over
+interprocess communication (IPC) and receives purchase responses from the Google
+Play application in the form of asynchronous broadcast intents. Your application
+does not manage any network connections between itself and the Google Play
+server or use any special APIs from the Android platform.</p>
+
+<div class="figure" style="width:440px">
+<img src="{@docRoot}images/billing_arch.png" alt="" height="582" />
+<p class="img-caption">
+ <strong>Figure 1.</strong> Your application sends and receives billing messages through the
+ Google Play application, which handles all communication with the Google Play server.</p>
+</div>
<p>Some in-app billing implementations may also use a private remote server to deliver content or
validate transactions, but a remote server is not required to implement in-app billing. A remote
@@ -66,13 +109,6 @@ verification. Although you can handle all security-related tasks in your applica
those tasks on a remote server is recommended because it helps make your application less vulnerable
to security attacks.</p>
-<div class="figure" style="width:440px">
-<img src="{@docRoot}images/billing_arch.png" alt="" height="582" />
-<p class="img-caption">
- <strong>Figure 1.</strong> Your application sends and receives billing messages through the
- Google Play application, which handles all communication with the Google Play server.</p>
-</div>
-
<p>A typical in-app billing implementation relies on three components:</p>
<ul>
<li>A {@link android.app.Service} (named <code>BillingService</code> in the sample application),
@@ -118,17 +154,17 @@ messaging that takes place between your application and the Google Play applicat
<p>Your application sends in-app billing requests by invoking a single IPC method
(<code>sendBillingRequest()</code>), which is exposed by the <code>MarketBillingService</code>
interface. This interface is defined in an <a
-href="{@docRoot}guide/developing/tools/aidl.html">Android Interface Definition Language</a> file
+href="{@docRoot}tools/aidl.html">Android Interface Definition Language</a> file
(<code>IMarketBillingService.aidl</code>). You can <a
-href="{@docRoot}guide/market/billing/billing_integrate.html#billing-download">download</a> this AIDL
+href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-download">download</a> this AIDL
file with the in-app billing sample application.</p>
<p>The <code>sendBillingRequest()</code> method has a single {@link android.os.Bundle} parameter.
The Bundle that you deliver must include several key-value pairs that specify various parameters for
-the request, such as the type of billing request you are making, the item that is being purchased,
-and the application that is making the request. For more information about the Bundle keys that are
-sent with a request, see <a
-href="{@docRoot}guide/market/billing/billing_reference.html#billing-interface">In-app Billing
+the request, such as the type of billing request you are making, the item that is being purchased and
+its type, and the application that is making the request. For more information about the Bundle keys
+that are sent with a request, see <a
+href="{@docRoot}guide/google/play/billing/billing_reference.html#billing-interface">In-app Billing
Service Interface</a>.
<p>One of the most important keys that every request Bundle must have is the
@@ -162,8 +198,10 @@ requests:</p>
</li>
<li><code>RESTORE_TRANSACTIONS</code>
<p>This request retrieves a user's transaction status for <a
- href="{@docRoot}guide/market/billing/billing_admin.html#billing-purchase-type">managed
- purchases</a>. You should send this request only when you need to retrieve a user's transaction
+ href="{@docRoot}guide/google/play/billing/billing_admin.html#billing-purchase-type">managed
+ purchases</a> and <a
+ href="{@docRoot}guide/google/play/billing/billing_admin.html#billing-purchase-type">subscriptions</a>.
+ You should send this request only when you need to retrieve a user's transaction
status, which is usually only when your application is reinstalled or installed for the first
time on a device.</p>
</li>
@@ -202,7 +240,7 @@ include the following:</p>
request. This response is <em>not</em> used to report any purchase state changes (such as refund
or purchase information). For more information about the response codes that are sent with this
response, see <a
- href="{@docRoot}guide/market/billing/billing_reference.html#billing-codes">Server Response Codes
+ href="{@docRoot}guide/google/play/billing/billing_reference.html#billing-codes">Server Response Codes
for In-app Billing</a>.</p>
</li>
<li><code>com.android.vending.billing.IN_APP_NOTIFY</code>
@@ -223,22 +261,22 @@ include the following:</p>
<p>The JSON string that is returned with the <code>PURCHASE_STATE_CHANGED</code> intent provides
your application with the details of one or more billing transactions. An example of this JSON
-string is shown below:</p>
-<pre class="no-pretty-print" style="color:black">
-{ "nonce" : 1836535032137741465,
+string for a subscription item is shown below:</p>
+<pre class="no-pretty-print" style="color:black">{ "nonce" : 1836535032137741465,
"orders" :
- { "notificationId" : "android.test.purchased",
- "orderId" : "transactionId.android.test.purchased",
- "packageName" : "com.example.dungeons",
- "productId" : "android.test.purchased",
- "developerPayload" : "bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ",
- "purchaseTime" : 1290114783411,
- "purchaseState" : 0 }
+ [{ "notificationId" : "android.test.purchased",
+ "orderId" : "transactionId.android.test.purchased",
+ "packageName" : "com.example.dungeons",
+ "productId" : "android.test.purchased",
+ "developerPayload" : "bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ",
+ "purchaseTime" : 1290114783411,
+ "purchaseState" : 0,
+ "purchaseToken" : "rojeslcdyyiapnqcynkjyyjh" }]
}
</pre>
<p>For more information about the fields in this JSON string, see <a
-href="{@docRoot}guide/market/billing/billing_reference.html#billing-intents">In-app Billing
+href="{@docRoot}guide/google/play/billing/billing_reference.html#billing-intents">In-app Billing
Broadcast Intents</a>.</p>
<h3 id="billing-message-sequence">Messaging sequence</h3>
@@ -396,11 +434,11 @@ application can handle this message the same way it handles the response from an
application-initiated <code>REQUEST_PURCHASE</code> message, so that ultimately your application
receives a <code>PURCHASE_STATE_CHANGED</code> broadcast intent message that includes information
about the item that has been purchased. This applies only to items that have their <a
-href="{@docRoot}guide/market/billing/billing_admin.html#billing-purchase-type">purchase type</a> set
+href="{@docRoot}guide/google/play/billing/billing_admin.html#billing-purchase-type">purchase type</a> set
to "managed per user account."</p>
<p>In the second case, your application can receive an <code>IN_APP_NOTIFY</code> broadcast intent
-when Google Play receives a refund notification from Google Checkout. In this case, Google
+when Google Play receives a refund notification from Google Wallet. In this case, Google
Play sends an <code>IN_APP_NOTIFY</code> message to your application. Your application can handle
this message the same way it handles responses from an application-initiated
<code>REQUEST_PURCHASE</code> message so that ultimately your application receives a
@@ -409,9 +447,9 @@ refunded. The refund information is included in the JSON string that accompanies
<code>PURCHASE_STATE_CHANGED</code> broadcast intent. Also, the <code>purchaseState</code> field in
the JSON string is set to 2.</p>
-<p class="caution"><strong>Important:</strong> You cannot use the Google Checkout API to
+<p class="caution"><strong>Important:</strong> You cannot use the Google Wallet API to
issue refunds or cancel in-app billing transactions. You must do this manually through your
-Google Checkout merchant account. However, you can use the Google Checkout API to retrieve order
+Google Wallet merchant account. However, you can use the Google Wallet API to retrieve order
information.</p>
<h2 id="billing-security">Security Controls</h2>
@@ -439,7 +477,7 @@ application. When your application receives the JSON string, you need to verify
the signature of the JSON string.</p>
<p>For more information about best practices for security and design, see <a
-href="{@docRoot}guide/market/billing/billing_best_practices.html">Security and Design</a>.</p>
+href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and Design</a>.</p>
<h2 id="billing-limitations">In-app Billing Requirements and Limitations</h2>
@@ -449,10 +487,10 @@ limitations.</p>
<ul>
<li>In-app billing can be implemented only in applications that you publish through Google
Play.</li>
- <li>You must have a Google Checkout Merchant account to use Google Play In-app Billing.</li>
- <li>If your device is running Android 3.0, in-app billing requires version 5.0.12 (or higher) of
- the MyApps application. If your device is running any other version of Android, in-app billing
- requires version 2.3.4 (or higher) of the Google Play application.</li>
+ <li>You must have a Google Wallet Merchant account to use Google Play In-app Billing.</li>
+ <li>In-app billing requires version 2.3.4 (or higher) of the Android Market application.
+ To support subscriptions, version 3.5 or higher of the Google Play app is required. On devices
+ running Android 3.0, version 5.0.12 (or higher) of the MyApps application is required.</li>
<li>An application can use in-app billing only if the device is running Android 1.6 (API level 4)
or higher.</li>
<li>You can use in-app billing to sell only digital content. You cannot use in-app billing to sell
@@ -465,5 +503,5 @@ limitations.</p>
</ul>
<p>For more information about in-app billing requirements, see <a
-href="http://market.android.com/support/bin/answer.py?answer=1153481">In-App Billing Availability
-and Policies</a>.</p>
+href="https://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=1153481">In-App
+Billing Availability and Policies</a>.</p>
diff --git a/docs/html/guide/market/billing/billing_reference.jd b/docs/html/guide/google/play/billing/billing_reference.jd
index e8cf2ee86ec9..f8c69678bb50 100755
--- a/docs/html/guide/market/billing/billing_reference.jd
+++ b/docs/html/guide/google/play/billing/billing_reference.jd
@@ -10,24 +10,25 @@ parent.link=index.html
<li><a href="#billing-codes">Server Response Codes for In-app Billing</a></li>
<li><a href="#billing-interface">In-app Billing Service Interface</a></li>
<li><a href="#billing-intents">In-app Billing Broadcast Intents</a></li>
-
+ <li><a href="#other-intents">Other Broadcast Intents</a></li>
+ <li><a href="#billing-versions">In-app Billing API Versions</a></li>
</ol>
<h2>Downloads</h2>
<ol>
- <li><a href="{@docRoot}guide/market/billing/billing_integrate.html#billing-download">Sample
+ <li><a href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-download">Sample
Application</a></li>
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/market/billing/billing_overview.html">Overview of In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_overview.html">Overview of In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_integrate.html">Implementing In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_integrate.html">Implementing In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_best_practices.html">Security and
+ <li><a href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and
Design</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_testing.html">Testing In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_testing.html">Testing In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_admin.html">Administering In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_admin.html">Administering In-app
Billing</a></li>
</ol>
</div>
@@ -39,9 +40,11 @@ parent.link=index.html
<li><a href="#billing-codes">Google Play Server Response Codes for In-app Billing</a></li>
<li><a href="#billing-interface">In-app Billing Interface Parameters</a></li>
<li><a href="#billing-intents">In-app Billing Broadcast Intents</a></li>
+ <li><a href="#other-intents">Other Intents</a></li>
+ <li><a href="#billing-versions">In-app Billing API Versions</a></li>
</ul>
-<h2 id="billing-codes">Google Play Server Response Codes for In-app Billing</h2>
+<h2 id="billing-codes">Server Response Codes for In-app Billing</h2>
<p>The following table lists all of the server response codes that are sent from Google Play to
your application. Google Play sends these response codes asynchronously as
@@ -102,7 +105,7 @@ codes returned by Google Play.</p>
<td><code>RESULT_ERROR</code></td>
<td>6</td>
<td>Indicates an unexpected server error. For example, this error is triggered if you try to
-purchase an item from yourself, which is not allowed by Google Checkout.</td>
+purchase an item from yourself, which is not allowed by Google Wallet.</td>
</tr>
</table>
@@ -111,7 +114,7 @@ purchase an item from yourself, which is not allowed by Google Checkout.</td>
<p>The following section describes the interface for Google Play's in-app billing service. The
interface is defined in the <code>IMarketBillingService.aidl</code> file, which is included with the
in-app billing <a
-href="{@docRoot}guide/market/billing/billing_integrate.html#billing-download">sample
+href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-download">sample
application</a>.</p>
<p>The interface consists of a single request method <code>sendBillingRequest()</code>. This method
takes a single {@link android.os.Bundle} parameter. The Bundle parameter includes several key-value
@@ -142,10 +145,13 @@ pairs, which are summarized in table 2.</p>
<tr>
<td><code>API_VERSION</code></td>
<td><code>int</code></td>
- <td>1</td>
+ <td> <ul>
+ <li><code>"2"</code> [<a href="#version_2">details</a>]</li>
+ <li><code>"1"</code> [<a href="#version_1">details</a>]</li>
+ </ul></td>
<td>Yes</td>
- <td>The version of Google Play's in-app billing service you are using. The current version is
- 1.</td>
+ <td>The version of Google Play's in-app billing service you want to use. The current version is
+ 2.</td>
</tr>
<tr>
<td><code>PACKAGE_NAME</code></td>
@@ -227,7 +233,7 @@ pairs, which are summarized in table 2.</p>
</li>
<li><code>RESTORE_TRANSACTIONS</code>
<p>This request retrieves a user's transaction status for managed purchases (see <a
- href="{@docRoot}guide/market/billing/billing_admin.html#billing-purchase-type">Choosing a
+ href="{@docRoot}guide/google/play/billing/billing_admin.html#billing-purchase-type">Choosing a
Purchase Type</a> for more information). You should send this message only when you need to
retrieve a user's transaction status, which is usually only when your application is reinstalled
or installed for the first time on a device.</p>
@@ -298,7 +304,7 @@ each in-app billing request type.</p>
Play application. These broadcast intents inform your application about in-app billing actions
that have occurred. Your application must implement a {@link android.content.BroadcastReceiver} to
receive these broadcast intents, such as the <code>BillingReceiver</code> that's shown in the in-app
-billing <a href="{@docRoot}guide/market/billing/billing_integrate.html#billing-download">sample
+billing <a href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-download">sample
application</a>.</p>
<h4>com.android.vending.billing.RESPONSE_CODE</h4>
@@ -388,7 +394,7 @@ a <code>PURCHASE_STATE_CHANGED</code> intent.</p>
</tr>
<tr>
<td>orderId</td>
- <td>A unique order identifier for the transaction. This corresponds to the Google Checkout Order
+ <td>A unique order identifier for the transaction. This corresponds to the Google Wallet Order
ID.</td>
</tr>
<tr>
@@ -407,8 +413,15 @@ a <code>PURCHASE_STATE_CHANGED</code> intent.</p>
<tr>
<td>purchaseState</td>
- <td>The purchase state of the order. Possible values are 0 (purchased), 1 (canceled), or 2
- (refunded).</td>
+ <td>The purchase state of the order. Possible values are 0 (purchased), 1 (canceled), 2
+ (refunded), or 3 (expired, for subscription purchases only).</td>
+</tr>
+<tr>
+ <td>purchaseToken</td>
+ <td>A token that uniquely identifies a subscription purchase for a given item and user pair.
+ You can use the token to specify the subscription when querying for subscription validity.
+
+ <p><br><em>Supported only in In-app Billing API version 2 and higher.</em></p></td>
</tr>
<tr>
<td>developerPayload</td>
@@ -416,3 +429,63 @@ a <code>PURCHASE_STATE_CHANGED</code> intent.</p>
specify a value for this field when you make a <code>REQUEST_PURCHASE</code> request.</td>
</tr>
</table>
+
+<!--<h2 id="other-intents">Other Intents</h2>
+
+<p>The following Intents related to In-app Billing may be useful in your
+implemention. </p> -->
+
+<h2 id="http-api">HTTP API for verification and cancelation</h2>
+
+<p>Google Play offers an HTTP-based API that you can use to remotely query the
+validity of a specific subscription at any time or cancel a subscription. The
+API is designed to be used from your backend servers as a way of securely
+managing subscriptions, as well as extending and integrating subscriptions with
+other services. See <a
+href="{@docRoot}guide/google/play/billing/billing_subscriptions.html#play-dev-api">
+Google Play Android Developer API</a> for more information.</p>
+
+<h2 id="billing-versions">In-app Billing API Versions</h2>
+
+<p>The In-app Billing API is versioned, with each version offering
+additional features to your app. At run time, your app can query the Google Play app to determine
+what version of the API it supports and what features are available. Typically, the Google Play app
+will be updated and will support the latest version of the API. For a summary of versions see
+<a href="{@docRoot}guide/google/play/billing/billing_reference.html#billing-versions">In-app Billing
+API Versions</a>.</p>
+
+<p>The sections below list the supported versions of the In-app Billing API.
+Versions are specified in the <code>API_VERSION</code> key of the Bundle object
+passed in the <code>sendBillingRequest()</code>, which is defined in the defined
+in the <code>IMarketBillingService.aidl</code> file, which is included with the
+in-app billing <a
+href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-download">
+sample application</a>. For more information, see <a
+href="#billing-interface">In-app Billing Service Interface</a>.</p>
+<h3 id="version_2">In-app Billing version 2</h3>
+
+<p><em>May 2012</em></p>
+
+<ul>
+<li>Adds support for subscriptions.
+ <ul>
+ <li>Adds a new supported string value, "2", for the <code>API_VERSION</code> key
+ of the Bundle object passed in the <code>sendBillingRequest()</code>.</li>
+ <li>Adds a new JSON field, <code>purchaseToken</code>, to the
+ <code>orders</code> list returned in a <code>PURCHASE_STATE_CHANGED</code>
+ intent. </li>
+ <li>Adds a new <code>purchaseState</code> value, <code>3</code> (expired), to the
+ <code>orders</code> list returned in a <code>PURCHASE_STATE_CHANGED</code>
+ intent. The value indicates that a subscription has expired and is no longer valid.</li>
+<li>Requires Google Play (Play Store) version 3.5 or higher.</li>
+</ul>
+
+<h3 id="version_1">In-app Billing version 1</h3>
+
+<p><em>March 2011</em></p>
+
+<ul>
+<li>Initial release.</li>
+<li>Requires Google Play/Android Market 2.3.4 or higher.</li>
+</ul>
+
diff --git a/docs/html/guide/google/play/billing/billing_subscriptions.jd b/docs/html/guide/google/play/billing/billing_subscriptions.jd
new file mode 100755
index 000000000000..3cf97777dea8
--- /dev/null
+++ b/docs/html/guide/google/play/billing/billing_subscriptions.jd
@@ -0,0 +1,859 @@
+page.title=Subscriptions
+parent.title=In-app Billing
+parent.link=index.html
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#overview">Overview of Subscriptions</a>
+ <!--<ol>
+ <li><a href="#publishing">Subscription publishing and unpublishing</a></li>
+ <li><a href="#pricing">Subscription pricing</a></li>
+ <li><a href="#user-billing">User billing</a></li>
+ <li><a href="#cancellation">Subscription cancellation</a></li>
+ <li><a href="#uninstallation">App uninstallation</a></li>
+ <li><a href="#refunds">Refunds</a></li>
+ <li><a href="#payment">Payment processing and policies</a></li>
+ <li><a href="#requirements">System requirements for subscriptions</a></li>
+ <li><a href="#compatibility">Compatibility considerations</a></li>
+ </ol> -->
+ </li>
+ <li><a href="#implementing">Implementing Subscriptions</a>
+ <!-- <ol>
+ <li><a href="#sample">Sample application</a></li>
+ <li><a href="#model">Application model</a></li>
+ <li><a href="#token">Purchase token</a></li>
+ <li><a href="#version">Checking the In-app Billing API version</a></li>
+ <li><a href="purchase">Requesting purchase of a subscription</a></li>
+ <li><a href="#restore">Restoring transactions</a></li>
+ <li><a href="#validity">Checking subscription validity</a></li>
+ <li><a href="#viewstatus">Launching your product page to let the user cancel or view status</a></li>
+ <li><a href="#purchase-state-changes">Recurring billing and changes in purchase state</a></li>
+ <li><a href="modifying">Modifying your app for subscriptions</a></li>
+ </ol> -->
+ </li>
+ <li><a href="#administering">Administering Subscriptions</a></li>
+
+ <li><a href="#play-dev-api">Google Play Android Developer API</a>
+ <!-- <ol>
+ <li><a href="#using">Using the API</a></li>
+ <li><a href="#quota">Quota</a></li>
+ <li><a href="#auth">Authorization</a></li>
+ <li><a href="#practices">Using the API efficiently</a></li>
+ </ol> -->
+ </li>
+</ol>
+ <h2>Downloads</h2>
+ <ol>
+ <li><a href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-download">Sample Application</a></li>
+ </ol>
+ <h2>See also</h2>
+ <ol>
+ <li><a href="{@docRoot}guide/google/play/billing/billing_overview.html">Overview of In-app
+ Billing</a></li>
+ <li><a href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and
+ Design</a></li>
+ <li><a href="{@docRoot}guide/google/play/billing/billing_testing.html">Testing In-app
+ Billing</a></li>
+ <li><a href="{@docRoot}guide/google/play/billing/billing_admin.html">Administering In-app
+ Billing</a></li>
+ <li><a href="{@docRoot}guide/google/play/billing/billing_reference.html">In-app Billing
+ Reference</a></li>
+ </ol>
+</div>
+</div>
+
+<p>Subscriptions let you sell content, services, or features in your app with
+automated, recurring billing. Adding support for subscriptions is
+straightforward and you can easily adapt an existing In-app Billing
+implementation to sell subscriptions. </p>
+
+<p>If you have already implemented In-app Billing for one-time purchase
+products, you will find that you can add support for subscriptions with minimal
+impact on your code. If you are new to In-app Billing, you can implement
+subscriptions using the standard communication model, data structures, and user
+interactions as for other in-app products.subscriptions. Because the
+implementation of subscriptions follows the same path as for other in-app
+products, details are provided outside of this document, starting with the <a
+href="{@docRoot}guide/google/play/billing/billing_overview.html">In-app Billing
+Overview</a>. </p>
+
+<p>This document is focused on highlighting implementation details that are
+specific to subscriptions, along with some strategies for the associated billing
+and business models.</p>
+
+<h2 id="overview">Overview of Subscriptions</h2>
+
+<p>A <em>subscription</em> is a new product type offered in In-app Billing that lets you
+sell content, services, or features to users from inside your app with recurring
+monthly or annual billing. You can sell subscriptions to almost any type of
+digital content, from any type of app or game.</p>
+
+<p>As with other in-app products, you configure and publish subscriptions using
+the Developer Console and then sell them from inside apps installed on an
+Android-powered devices. In the Developer console, you create subscription
+products and add them to a product list, setting a price for each, choosing a
+billing interval of monthly or annually, and then publishing. In your apps, it’s
+straightforward to add support for subscription purchases. The implementation
+extends the standard In-app Billing API to support a new product type but uses
+the same communication model, data structures, and user interactions as for
+other in-app products.</p>
+
+<p>When users purchase subscriptions in your apps, Google Play handles all
+checkout details so your apps never have to directly process any financial
+transactions. Google Play processes all payments for subscriptions through
+Google Wallet, just as it does for standard in-app products and app purchases.
+This ensures a consistent and familiar purchase flow for your users.</p>
+
+<img src="{@docRoot}images/billing_subscription_flow.png" style="border:4px solid ddd;">
+
+
+<p>After users have purchase subscriptions, they can view the subscriptions and
+cancel them, if necessary, from the My Apps screen in the Play Store app or
+from the app's product details page in the Play Store app.</p>
+
+<!--<img src="{@docRoot}images/billing_subscription_cancel.png" style="border:4px solid ddd;">-->
+
+<p>Once users have purchased a subscription through In-app Billing, you can
+easily give them extended access to additional content on your web site (or
+other service) through the use of a server-side API provided for In-app Billing.
+The server-side API lets you validate the status of a subscription when users
+sign into your other services. For more information about the API, see <a
+href="#play-dev-api">Google Play Android Developer API</a>, below. </p>
+
+<p>You can also build on your existing external subscriber base from inside your
+Android apps. If you sell subscriptions on a web site, for example, you can add
+your own business logic to your Android app to determine whether the user has
+already purchased a subscription elsewhere, then allow access to your content if
+so or offer a subscription purchase from Google Play if not.</p>
+
+<p>With the flexibility of In-app Billing, you can even implement your own
+solution for sharing subscriptions across as many different apps or products as
+you want. For example, you could sell a subscription that gives a subscriber
+access to an entire collection of apps, games, or other content for a monthly or
+annual fee. To implement this solution, you could add your own business logic to
+your app to determine whether the user has already purchased a given
+subscription and if so, allow access to your content. </p>
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+ <h2>Subscriptions at a glance</h2>
+ <ul>
+ <li>Subscriptions let you sell products with automated, recurring billing</li>
+ <li>You can set up subscriptions with either monthly or annual billing</li>
+ <li>You can sell multiple subscription items in an app with various billing
+ intervals or prices, such as for promotions</li>
+ <li>Users purchase your subscriptions from inside your apps, rather than
+ directly from Google Play</li>
+ <li>Users manage their purchased subscriptions from the My Apps screen in
+ the Play Store app</li>
+ <li>Google Play uses the original form of payment for recurring billing</li>
+ <li>If a user cancels a subscription, Google Play considers the subscription valid
+ until the end of the current billing cycle. The user continues to enjoy the content
+ for the rest of the cycle and is not granted a refund.</li>
+ </ul>
+</div>
+</div>
+
+<p>In general the same basic policies and terms apply to subscriptions as to
+standard in-app products, however there are some differences. For complete
+information about the current policies and terms, please read the <a
+href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en
+&answer=140504">policies document</a>.</p>
+
+
+<h3 id="publishing">Subscription publishing and unpublishing</h3>
+
+<p>To sell a subscription in an app, you use the tools in the Developer Console
+to set up a product list for the app and then create and configure a new
+subscription. In the subscription, you set the price and billing interval and
+define a subscription ID, title, and description. When you are ready, you can
+then publish the subscription in the app product list.</p>
+
+<p>In the product list, you can add subscriptions, in-app products, or both. You
+can add multiple subscriptions that give access to different content or
+services, or you can add multiple subscriptions that give access to the same
+content but for different intervals or different prices, such as for a
+promotion. For example, a news outlet might decide to offer both monthly and
+annual subscriptions to the same content, with annual having a discount. You can
+also offer in-app purchase equivalents for subscription products, to ensure that
+your content is available to users of older devices that do not support
+subscriptions.</p>
+
+<p>After you add a subscription or in-app product to the product list, you must
+publish the product before Google Play can make it available for purchase. Note
+that you must also publish the app itself before Google Play will make the
+products available for purchase inside the app. </p>
+
+<p class="caution"><strong>Important:</strong> At this time, the capability to
+unpublish a subscription is not available. Support for unpublishing a
+subscription is coming to the Developer Console in the weeks ahead, so this is a
+temporary limitation. In the short term, instead of unpublishing,
+you can remove the subscription product from the product list offered in your
+app to prevent users from seeing or purchasing it.</p>
+
+<h3 id="pricing">Subscription pricing</h3>
+
+<p>When you create a subscription in the Developer Console, you can set a price
+for it in any available currencies. Each subscription must have a non-zero
+price. You can price multiple subscriptions for the same content differently
+&mdash; for example you could offer a discount on an annual subscription
+relative to the monthly equivalent. </p>
+
+<p class="caution"><strong>Important:</strong> At this time, once you publish a
+subscription product, you cannot change its price in any currency. Support for
+changing the price of published subscriptions is coming to the Developer Console
+in the weeks ahead. In the short term, you can work around this limitation by
+publishing a new subscription product ID at a new price, then offer it in your
+app instead of the original product. Users who have already purchased will
+continue to be charged at the original price, but new users will be charged at
+the new price.</p>
+
+<h3 id="user-billing">User billing</h3>
+
+<p>You can sell subscription products with automated recurring billing at
+either of two intervals:</p>
+
+<ul>
+ <li>Monthly &mdash; Google Play bills the customer’s Google Wallet account at
+ the time of purchase and monthly subsequent to the purchase date (exact billing
+ intervals can vary slightly over time)</li>
+ <li>Annually &mdash; Google Play bills the customer's Google Wallet account at
+ the time of purchase and again on the same date in subsequent years.</li>
+</ul>
+
+<p>Billing continues indefinitely at the interval and price specified for the
+subscription. At each subscription renewal, Google Play charges the user account
+automatically, then notifies the user of the charges afterward by email. Billing
+cycles will always match subscription cycles, based on the purchase date.</p>
+
+<p>Over the life of a subscription, the form of payment billed remains the same
+&mdash; Google Play always bills the same form of payment (such as credit card,
+Direct Carrier Billing) that was originally used to purchase the
+subscription.</p>
+
+<p>When the subscription payment is approved by Google Wallet, Google Play
+provides a purchase token back to the purchasing app through the In-app Billing
+API. For details, see <a href="#token">Purchase token</a>, below. Your apps can
+store the token locally or pass it to your backend servers, which can then use
+it to validate or cancel the subscription remotely using the <a
+href="#play-dev-api">Google Play Android Developer API</a>.</p>
+
+<p>In the case of billing errors, such as could happen if the customer’s credit
+card becomes invalid, Google Play notifies your app of the change in purchase
+state.</p>
+
+<p>As a best practice, we recommend that your app includes business logic to
+notify your backend servers of subscription purchases, tokens, and any billing
+errors that may occur. Your backend servers can use the server-side API to query
+and update your records and follow up with customers directly, if needed.</p>
+
+<h3 id="cancellation">Subscription cancellation</h3>
+
+<p>Users can view the status of all of their subscriptions and cancel them if
+necessary from the My Apps screen in the Play Store app. Currently, the In-app
+Billing API does not provide support for canceling subscriptions direct from
+inside the purchasing app, although your app can broadcast an Intent to launch
+the Play Store app directly to the My Apps screen.</p>
+
+<p>When the user cancels a subscription, Google Play does not offer a refund for
+the current billing cycle. Instead, it allows the user to have access to the
+cancelled subscription until the end of the current billing cycle, at which time
+it terminates the subscription. For example, if a user purchases a monthly
+subscription and cancels it on the 15th day of the cycle, Google Play will
+consider the subscription valid until the end of the 30th day (or other day,
+depending on the month).</p>
+
+<p>In some cases, the user may contact you directly to request cancellation of a
+subscription. In this and similar cases, you can use the server-side API to
+query and directly cancel the user’s subscription from your servers.
+
+<p class="caution"><strong>Important:</strong> In all cases, you must continue
+to offer the content that your subscribers have purchased through their
+subscriptions, for as long any users are able to access it. That is, you must
+not remove any subscriber’s content while any user still has an active
+subscription to it, even if that subscription will terminate at the end of the
+current billing cycle. Removing content that a subscriber is entitled to access
+will result in penalties. Please see the <a
+href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=140504">policies document</a> for more information. </p>
+
+<h3 id="uninstall">App uninstallation</h3>
+
+<p>When the user uninstalls an app that includes purchased subscriptions, the Play Store app will notify the user that there are active subscriptions. If the user chooses to continue with the uninstalltion, the app is removed and the subscriptions remain active and recurring billing continues. The user can return to cancel the associated subscriptions at any time in the My Apps screen of the Play Store app. If the user chooses to cancel the uninstallation, the app and subscriptions remain as they were.</p>
+
+<h3 id="refunds">Refunds</h3>
+
+<p>As with other in-app products, Google Play does not provide a refund window
+for subscription purchases. For example, users who purchase an app can ask for a
+refund from Google Play within a 15-minute window. With subscriptions, Google
+Play does not provide a refund window, so users will need to contact you
+directly to request a refund.
+
+<p>If you receive requests for refunds, you can use the server-side API to
+cancel the subscription or verify that it is already cancelled. However, keep in
+mind that Google Play considers cancelled subscriptions valid until the end of
+their current billing cycles, so even if you grant a refund and cancel the
+subscription, the user will still have access to the content.
+
+<p class="note"><strong>Note:</strong> Partial refunds for canceled
+subscriptions are not available at this time.</p>
+
+<h3 id="payment">Payment processing and policies</h3>
+
+<p>In general, the terms of Google Play allow you to sell in-app subscriptions
+only through the standard payment processor, Google Wallet. For purchases of any
+subscription products, just as for other in-app products and apps, the
+transaction fee for subscriptions, just as for other in-app purchases, is the
+same as the transaction fee for application purchases (30%).</p>
+
+<p>Apps published on Google Play that are selling subscriptions must use In-app
+Billing to handle the transaction and may not provide links to a purchase flow
+outside of the app and Google Play (such as to a web site).</p>
+
+<p>For complete details about terms and policies, see the <a
+href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=140504">policies
+document</a>.</p>
+
+<h3 id="requirements">System requirements for subscriptions</h3>
+
+<p>In-app purchases of subscriptions are supported only on devices that meet
+these minimum requirements:</p>
+
+<ul>
+ <li>Must run Android 2.2 or higher</li>
+ <li>Google Play Store app, version 3.5 or higher, must be installed</li>
+</ul>
+
+<p>Google Play 3.5 and later versions include support for the In-app Billing
+v2 API or higher, which is needed to support handling of subscription
+products.</p>
+
+<h3 id="compatibility">Compatibility considerations</h3>
+
+<p>As noted in the previous section, support for subscriptions is available only
+on devices that meet the system requirements. Not all devices will receive or
+install Google Play 3.5, so not all users who install your apps will have access
+to the In-app Billing API and subscriptions.</p>
+
+<p>If you are targeting older devices that run Android 2.1 or earlier, we
+recommend that you offer those users an alternative way buy the content that is
+available through subscriptions. For example, you could create standard in-app
+products (one-time purchases) that give access to similar content as your
+subscriptions, possibly for a longer interval such as a year. </p>
+
+
+<h2 id="implementing">Implementing Subscriptions</h2>
+
+<p>Subscriptions are a standard In-app Billing product type. If you have already
+implemented In-app Billing for one-time purchase products, you will find that
+adding support for subscriptions is straightforward, with minimal impact on your
+code. If you are new to In-app Billing, you can implement subscriptions using
+the standard communication model, data structures, and user interactions as for
+other in-app products.subscriptions. </p>
+
+<p>The full implementation details for In-app Billing are provided outside of
+this document, starting with the <a
+href="{@docRoot}guide/google/play/billing/billing_overview.html">In-app Billing
+Overview</a>. This document is focused on highlighting implementation details
+that are specific to subscriptions, along with some strategies for the
+associated billing and business models.</p>
+
+
+<h3 id="sample">Sample application</h3>
+
+<p>To help you get started with your In-app Billing implementation and
+subscriptions, an updated version of the In-app Billing sample app is available.
+You can download the sample app from the Android SDK repository using the
+Android SDK Manager. For details, see <a
+href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-download">
+Downloading the Sample Application</a>.</p>
+
+<h3 id="model">Application model</h3>
+
+<p>With subscriptions, your app uses the standard In-app Billing application
+model, sending billing requests to the Play Store application over interprocess
+communication (IPC) and receiving purchase responses from the Play Store app in
+the form of asynchronous broadcast intents. Your application does not manage any
+network connections between itself and the Google Play server or use any special
+APIs from the Android platform.</p>
+
+<p>Your app also uses the standard In-app Billing components &mdash; a billing
+Service for sending requests, a BroadcastReceiver for receiving the responses,
+and a security component for verifying that the response was sent by Google
+Play. Also recommended are a response Handler for processing notifications,
+errors, and status messages, and an observer for sending callbacks to your
+application as needed. All of these components and their interactions are
+described in full in the <a
+href="{@docRoot}guide/google/play/billing/billing_overview.html">In-app Billing
+Overview</a> and related documents.</p>
+
+<p>To initiate different types of billing communication with Google Play, your
+app will use the standard set of in-app billing requests and receive the same
+responses. Inside the requests and responses are two new fields described below.
+</p>
+
+<h3 id="token">Purchase token</h3>
+
+<p>Central to the end-to-end architecture for subscriptions is the purchase
+token, a string value that uniquely identifies (and associates) a user ID and a
+subscription ID. Google Play generates the purchase token when the user
+completes the purchase of a subscription product (and payment is approved by
+Google Wallet) and then sends it to the purchasing app on the device through the
+In-app Billing API. </p>
+
+<p>At the conclusion of a <code>PURCHASE_REQUEST</code> message flow, your app
+can retrieve the purchase token and other transaction details by initiating a
+<code>GET_PURCHASE_INFORMATION</code> request. The Bundle returned by the call
+contains an JSON array of order objects. In the order corresponding to the
+subscription purchase, the token is available in the <code>purchaseToken</code>
+field. </p>
+
+<p>An example of a JSON order object that includes a subscription purchase token
+is shown below. </p>
+
+<pre class="no-pretty-print" style="color:black">{ "nonce" : 1836535032137741465,
+ "orders" :
+ [{ "notificationId" : "android.test.purchased",
+ "orderId" : "transactionId.android.test.purchased",
+ "packageName" : "com.example.dungeons",
+ "productId" : "android.test.purchased",
+ "developerPayload" : "bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ",
+ "purchaseTime" : 1290114783411,
+ "purchaseState" : 0,
+ "purchaseToken" : "rojeslcdyyiapnqcynkjyyjh" }]
+}
+</pre>
+
+<p>After receiving a purchase token, your apps can store the token locally or
+pass it to your backend servers, which can then use it to query the billing
+status or cancel the subscription remotely. If your app will store the token
+locally, please read the <a
+href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and
+Design</a> document for best practices for maintaining the security of your
+data.</p>
+
+<h3 id="version">Checking the In-app Billing API version</h3>
+
+<p>Subscriptions support is available only in versions of Google Play that
+support the In-app Billing v2 API (Google Play 3.5 and higher). For your app,
+an essential first step at launch is to check whether the version of Google Play
+installed on the device supports the In-app Billing v2 API and
+subscriptions.</p>
+
+<p>To do this, create a CHECK_BILLING_SUPPORTED request Bundle that includes the
+required key-value pairs, together with</p>
+
+<ul>
+ <li>The <code>API_VERSION</code> key, assigning a value of 2.</li>
+ <li>The <code>BILLING_REQUEST_ITEM_TYPE</code> key, assigning a value of “subs”</li>
+</ul>
+
+<p>Send the request using <code>sendBillingRequest(Bundle)</code> and receive
+the response Bundle. You can extract the response from the
+<code>BILLING_RESPONSE_RESPONSE_CODE</code> key of the response. RESULT_OK
+indicates that subscriptions are supported.</p>
+
+<p>The sample app declares constants for the accepted
+<code>BILLING_REQUEST_ITEM_TYPE</code> values (from Consts.java):</p>
+
+<pre class="pretty-print"> // These are the types supported in the IAB v2
+ public static final String ITEM_TYPE_INAPP = "inapp";
+ public static final String ITEM_TYPE_SUBSCRIPTION = "subs";
+</pre>
+
+<p>It sets up a convenience method for building the request bundle (from BillingService.java):</p>
+
+<pre class="pretty-print"> protected Bundle makeRequestBundle(String method) {
+ Bundle request = new Bundle();
+ request.putString(Consts.BILLING_REQUEST_METHOD, method);
+ request.putInt(Consts.BILLING_REQUEST_<code>API_VERSION</code>, 2);
+ request.putString(Consts.BILLING_REQUEST_PACKAGE_NAME, getPackageName());
+ return request;
+ }
+</pre>
+
+<p>Here’s an example of how to test support for In-App Billing v2 and subscriptions
+(from BillingService.java):</p>
+
+<pre class="pretty-print"> /**
+ * Wrapper class that checks if in-app billing is supported.
+ */
+ class CheckBillingSupported extends BillingRequest {
+ public String mProductType = null;
+ public CheckBillingSupported() {
+ // This object is never created as a side effect of starting this
+ // service so we pass -1 as the startId to indicate that we should
+ // not stop this service after executing this request.
+ super(-1);
+ }
+
+ public CheckBillingSupported(String type) {
+ super(-1);
+ mProductType = type;
+ }
+
+ &#64;Override
+ protected long run() throws RemoteException {
+ Bundle request = makeRequestBundle("CHECK_BILLING_SUPPORTED");
+ if (mProductType != null) {
+ request.putString(Consts.<code>BILLING_REQUEST_ITEM_TYPE</code>, mProductType);
+ }
+ Bundle response = mService.sendBillingRequest(request);
+ int responseCode = response.getInt(Consts.<code>BILLING_RESPONSE_RESPONSE_CODE</code>);
+ if (Consts.DEBUG) {
+ Log.i(TAG, "CheckBillingSupported response code: " +
+ ResponseCode.valueOf(responseCode));
+ }
+ boolean billingSupported = (responseCode == ResponseCode.RESULT_OK.ordinal());
+ ResponseHandler.checkBillingSupportedResponse(billingSupported, mProductType);
+ return Consts.BILLING_RESPONSE_INVALID_REQUEST_ID;
+ }
+ }
+</pre>
+
+<h3 id="purchase">Requesting a subscription purchase</h3>
+
+<p>Once you’ve checked the API version as described above and determined that
+subscriptions are supported, you can present subscription products to the user
+for purchase. When the user has selected a subscription product and initiated a
+purchase, your app handles the purchase just as it would for other in-app
+products &mdash; by sending a REQUEST_PURCHASE request. You can then launch
+Google Play to display the checkout user interface and handle the financial
+transaction..
+
+<p>The REQUEST_PURCHASE includes a Bundle containing the item details, as
+described in the <a
+href="{@docRoot}guide/google/play/billing/billing_overview.html">In-app Billing
+Overview</a>. For a subscription, the Bundle must also specify:</p>
+
+<ul>
+ <li>The <code>ITEM_ID</code> key, with a value that specifies a valid, published
+ subscription product.</li>
+ <li>The <code>ITEM_TYPE</code> key, with a value of “subs”
+ (<code>ITEM_TYPE_SUBSCRIPTION</code> in the sample app). If the request does not
+ specify the subscription's <code>ITEM_TYPE</code>, Google Play attempts to
+ handle the request as a standard in-app purchase (one-time purchase).</li>
+</ul>
+
+<p>Google Play synchronously returns a response bundle that includes
+<code>RESPONSE_CODE</code>, <code>PURCHASE_INTENT</code>, and
+<code>REQUEST_ID</code>. Your app uses the <code>PURCHASE_INTENT</code> to
+launch the checkout UI and the message flow proceeds exactly as described in <a
+href="{@docRoot}guide/google/play/billing/billing_overview.html#billing-message-
+sequence">Messaging sequence</a>.</p>
+
+<p>Here’s how the sample app initiates a purchase for a subscription, where
+<code>mProductType</code> is <code>ITEM_TYPE_SUBSCRIPTION</code> (from
+BillingService.java).</p>
+
+<pre class="pretty-print"> /**
+ * Wrapper class that requests a purchase.
+ */
+ class RequestPurchase extends BillingRequest {
+ public final String mProductId;
+ public final String mDeveloperPayload;
+ public final String mProductType;
+
+. . .
+
+ &#64;Override
+ protected long run() throws RemoteException {
+ Bundle request = makeRequestBundle("REQUEST_PURCHASE");
+ request.putString(Consts.BILLING_REQUEST_ITEM_ID, mProductId);
+ request.putString(Consts.<code>BILLING_REQUEST_ITEM_TYPE</code>, mProductType);
+ // Note that the developer payload is optional.
+ if (mDeveloperPayload != null) {
+ request.putString(Consts.BILLING_REQUEST_DEVELOPER_PAYLOAD, mDeveloperPayload);
+ }
+ Bundle response = mService.sendBillingRequest(request);
+ PendingIntent pendingIntent
+ = response.getParcelable(Consts.BILLING_RESPONSE_PURCHASE_INTENT);
+ if (pendingIntent == null) {
+ Log.e(TAG, "Error with requestPurchase");
+ return Consts.BILLING_RESPONSE_INVALID_REQUEST_ID;
+ }
+
+ Intent intent = new Intent();
+ ResponseHandler.buyPageIntentResponse(pendingIntent, intent);
+ return response.getLong(Consts.BILLING_RESPONSE_REQUEST_ID,
+ Consts.BILLING_RESPONSE_INVALID_REQUEST_ID);
+ }
+
+ &#64;Override
+ protected void responseCodeReceived(ResponseCode responseCode) {
+ ResponseHandler.responseCodeReceived(BillingService.this, this, responseCode);
+ }
+ }
+</pre>
+
+<h3 id="restoring">Restoring transactions</h3>
+
+<p>Subscriptions always use the <em>managed by user account</em> purchase type,
+so that you can restore a record of subscription transactions on the device when
+needed. When a user installs your app onto a new device, or when the user
+uninstalls/reinstalls the app on the original device, your app should restore
+the subscriptions that the user has purchased.</p>
+
+<p>The process for restoring subscriptions transactions is the same as described
+in <a
+href="{@docRoot}guide/google/play/billing/billing_overview.html#billing-message-
+sequence">Messaging sequence</a>. Your app sends a
+<code>RESTORE_TRANSACTIONS</code> request to Google Play. Google Play sends two
+broadcast intents as asynchronous responses &mdash; a <code>RESPONSE_CODE</code>
+intent and a <code>PURCHASE_STATE_CHANGED</code> intent.</p>
+
+<p>The <code>PURCHASE_STATE_CHANGED</code> intent contains a notification ID
+that your app can use to retrieve the purchase details, including the purchase
+token, by sending a standard <code>GET_PURCHASE_INFORMATION</code> request. The
+<code>Bundle</code> returned in the call includes an JSON array of order objects
+corresponding to subscription (and in-app product) purchases that you can
+restore locally.</p>
+
+<p>Your app can store the restored purchase state and other transaction details
+in the way that best meets your needs. Your app can use it later to check the
+subscription validity, although please read the <a
+href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and
+Design</a> document for best practices for maintaining the security of your
+data.</p>
+
+<h3 id="validity">Checking subscription validity</h3>
+
+<p>Subscriptions are time-bound purchases that require successful billing
+recurrences over time to remain valid. Your app should check the validity of
+purchased subscriptions at launch or prior to granting access to subscriber
+content.</p>
+
+<p>With In-app Billing, you validate a subscription by keeping track of its
+purchase state, such as purchased or cancelled, and then checking the state
+whenever needed. Google Play provides two ways to let you know when the purchase
+state of a subscription changes:</p>
+
+<ul>
+ <li><em>In-app Billing Notifications</em>. Google Play pushes a notification
+ to your app whenever the purchase state of a subscription changes. Your app can
+ store the most recent purchase state for a given purchase token and then check
+ that state at run time, as needed.</li>
+ <li><em>Google Play Android Developer API</em>. You can use this HTTP-based
+ API to poll Google Play for the current purchase state of a subscription. You
+ can store the purchased state for each <code>purchaseToken</code> on your
+ backend servers. For more information, see <a href="#play-dev-api">Google Play
+ Android Developer API</a>, below.</li>
+</ul>
+
+<p>For most use-cases, especially those where backend servers are already keeping
+track of subscribed users, implementing a combination of both methods is the
+recommended approach. A typical implementation might work like this:</p>
+
+<ul>
+ <li>When the user successfully purchases a new subscription, your app notifies a
+ backend server, which stores the purchase token, user name, and other
+ information in a secure location.</li>
+ <li>Since your app cannot know the expiration date, your server can poll Google
+ Play to get the expiration and store it with the purchase token and other
+ data.</li>
+ <li>Because your server now knows the expiration date, it does not need to poll
+ Google Play again until after the expiration date, at which time it can confirm
+ that the subscription was not cancelled.</li>
+ <li>On the client side, your app can continue to update the server whenever the
+ purchase state changes, storing the state locally.</li>
+</ul>
+
+<p>If you are using both notifications and the Google Play Android Developer API to validate subscriptions, we recommend the following:</p>
+
+<ul>
+ <li>If your app wants to check validity but you can’t reach your server (or
+you don’t have a server), use the latest purchase state received by
+notification.</li>
+ <li>If you have a server and it’s reachable, always give preference to the
+purchase state obtained from your server over the state received in
+notifications.</li>
+</ul>
+
+<p>If necessary, you can also use a <code>RESTORE_TRANSACTIONS</code> request to retrieve a record of all managed and in-app products purchased by the user, which you can then store locally. However, using <code>RESTORE_TRANSACTIONS</code> on a regular basis is not recommended because of performance impacts.</p>
+
+<p>Regardless of the approach you choose, your app should check subscriptions
+and validity at launch, such as prior to accessing subscriber content, game
+levels, and so on.</p>
+
+<p class="table-caption"><strong>Table 1.</strong> Summary of purchaseState
+values for subscription purchases, as received with a
+<code>PURCHASE_STATE_CHANGED</code> intent.</p>
+
+<table>
+<tr>
+<th>State</th><th>purchaseState Value</th><th>Comments</th>
+</tr>
+<tr>
+<td>Purchased successfully</td><td><code>0</code></td><td>Sent at original purchase only (not at recurring billing cycles).</td></tr>
+<td>Cancelled</td><td><code>1</code></td><td>Sent at original purchase only if the purchase has failed for some reason. </td></tr>
+<td>Refunded</td><td><code>2</code></td><td>The purchase was refunded.</code></td></tr>
+<td>Subscription expired</td><td><code>3</code></td><td>Sent if a subscription expires because of non-payment or user cancelation.</td></tr>
+</table>
+
+
+<h3 id="viewstatus">Launching your product page to let the user cancel or view subscriptions</h3>
+
+<p>In-app Billing does not currently provide an API to let users directly view or cancel
+subscriptions from within the purchasing app. Instead, users can launch the Play
+Store app on their devices and go to the My Apps screen to manage subscriptions. In My Apps,
+users can see a list of their subscriptions organized by application. Tapping one of the
+subscriptions loads the app's product page, from which users can see active subscriptions
+and billing status and cancel subscriptions as needed.</p>
+
+<p>To make it easier for users to find and manage their subscriptions from inside your app,
+we recommend that you offer a "View My Subscriptions" or "Manage Subscriptions" option in
+your UI that directly loads your app's product page in the Play Store app.</p>
+
+<p>To do this, create an intent with the <a
+href="{@docRoot}reference/android/content/Intent.html#ACTION_VIEW">ACTION_VIEW</a>
+action and include the <code>market://</code> URI (rather than the <code>http://</code>
+URI) of your app's details page. Here’s an example:</p>
+
+<pre style="pretty-print">Intent intent = new Intent(Intent.ACTION_VIEW);
+intent.setData(Uri.parse("market://details?id=com.example.app"));
+startActivity(intent);</pre>
+
+<p>For more information, see
+ <a href="{@docRoot}distribute/googleplay/promote/linking.html">Linking to Your Products</a>.</p>
+
+<h3 id="purchase-state-changes">Recurring billing and changes in purchase state</h3>
+
+<p>Google Play notifies your app when the user completes the purchase of a
+subscription, but the purchase state does not change over time, provided that
+recurring billing takes place successfully. Google Play does not notify your app
+of a purchase state change <em>until the subscription expires because of
+non-payment or user cancellation</em>. </p>
+
+<p>Over the life of a subscription, your app does not need to initiate any
+recurring billing events &mdash; those are all handled by Google Play and they
+are transparent to your application if billing is successful.</p>
+
+<h3 id="modifying">Modifying your app for subscriptions</h3>
+
+<p>For subscriptions, you make the same types of modifications to your app as
+are described in <a
+href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-implement">
+Modifying your Application Code</a>.</p>
+
+<p>Note that, in your UI that lets users view and select subscriptions for
+purchase, you should add logic to check for purchased subscriptions and validate
+them. Your UI should not present subscriptions if the user has already purchased
+them.</p>
+
+<h2 id="administering">Administering Subscriptions</h2>
+
+<p>To create and manage subscriptions, you use the tools in the Developer
+Console, just as for other in-app products.</p>
+
+<p>At the Developer Console, you can configure these attributes for each
+subscription product:</p>
+
+<ul>
+<li>Purchase Type: always set to “subscription”</li>
+<li>Subscription ID: An identifier for the subscription</li>
+<li>Publishing State: Unpublished/Published</li>
+<li>Language: The default language for displaying the subscription</li>
+<li>Title: The title of the subscription product</li>
+<li>Description: Details that tell the user about the subscription</li>
+<li>Price: USD price of subscription per recurrence</li>
+<li>Recurrence: monthly or yearly</li>
+<li>Additional currency pricing (can be auto-filled)</li>
+</ul>
+
+<p>For details, please see <a href="{@docRoot}guide/google/play/billing/billing_admin.html">Administering
+In-app Billing</a>.</p>
+
+
+<h2 id="play-dev-api">Google Play Android Developer API</h2>
+
+<p>Google Play offers an HTTP-based API that you can use to remotely query the
+validity of a specific subscription at any time or cancel a subscription. The
+API is designed to be used from your backend servers as a way of securely
+managing subscriptions, as well as extending and integrating subscriptions with
+other services.</p>
+
+<h3 id="using">Using the API</h3>
+
+<p>To use the API, you must first register a project at the <a
+href="https://code.google.com/apis/console">Google APIs Console</a> and receive
+a Client ID and shared secret that your app will present when calling the
+Google Play Android Developer API. All calls to the API are authenticated with
+OAuth 2.0.</p>
+
+<p>Once your app is registered, you can access the API directly, using standard
+HTTP methods to retrieve and manipulate resources, or you can use the Google
+APIs Client Libraries, which are extended to support the API.</p>
+
+<p>The Google Play Android Developer API is built on a RESTful design that uses
+HTTP and JSON, so any standard web stack can send requests and parse the
+responses. However, if you don’t want to send HTTP requests and parse responses
+manually, you can access the API using the client libraries, which provide
+better language integration, improved security, and support for making calls
+that require user authorization.</p>
+
+<p>For more information about the API and how to access it through the Google
+APIs Client Libraries, see the documentation at:</p>
+
+<p style="margin-left:1.5em;"><a
+href="https://developers.google.com/android-publisher/v1/">https://developers.
+google.com/android-publisher/v1/</a></p>
+
+<h3 id="quota">Quota</h3>
+
+<p>Applications using the Google Play Android Developer API are limited to an
+initial courtesy usage quota of <strong>15000 requests per day</strong> (per
+application). This should provide enough access for normal
+subscription-validation needs, assuming that you follow the recommendation in
+this section.</p>
+
+<p>If you need to request a higher limit for your application, please use the
+“Request more” link in the <a
+href="https://code.google.com/apis/console/#:quotas">Google APIs Console</a>.
+Also, please read the section below on design best practices for minimizing your
+use of the API.</p>
+
+<h3 id="auth">Authorization</h3>
+
+<p>Calls to the Google Play Android Developer API require authorization. Google
+uses the OAuth 2.0 protocol to allow authorized applications to access user
+data. To learn more, see <a
+href="https://developers.google.com/android-publisher/authorization">Authorization</a>
+in the Google Play Android Developer API documentation.</p>
+
+<h3 id="practices">Using the API efficiently</h3>
+
+<p>Access to the Google Play Android Developer API is regulated to help ensure a
+high-performance environment for all applications that use it. While you can
+request a higher daily quota for your application, we highly recommend that you
+minimize your access using the technique(s) below. </p>
+
+<ul>
+ <li><em>Store subscription expiry on your servers</em> &mdash; your servers
+ should use the Google Play Android Developer API to query the expiration date
+ for new subscription tokens, then store the expiration date locally. This allows
+ you to check the status of subscriptions only at or after the expiration (see
+ below). </li>
+ <li><em>Cache expiration and purchaseState</em> &mdash; If your app contacts
+ your backend servers at runtime to verify subscription validity, your server
+ should cache the expiration and purchaseState to ensure the fastest possible
+ response (and best experience) for the user.</li>
+ <li><em>Query for subscription status only at expiration</em> &mdash; Once your
+ server has retrieved the expiration date of subscription tokens, it should not
+ query the Google Play servers for the subscription status again until the
+ subscription is reaching or has passed the expiration date. Typically, your
+ servers would run a batch query each day to check the status of
+ <em>expiring</em> subscriptions, then update the database. Note that:
+ <ul>
+ <li>Your servers should not query all subscriptions every day</li>
+ <li>Your servers should never query subscription status dynamically, based on
+ individual requests from your Android application. </li>
+ </ul>
+ </li>
+</ul>
+
+<p>By following those general guidelines, your implementation will offer the
+best possible performance for users and minimize use of the Google Play Android
+Developer API.</p>
+
diff --git a/docs/html/guide/market/billing/billing_testing.jd b/docs/html/guide/google/play/billing/billing_testing.jd
index 77aa3edc51f7..e2d4a014cbbf 100755
--- a/docs/html/guide/market/billing/billing_testing.jd
+++ b/docs/html/guide/google/play/billing/billing_testing.jd
@@ -13,20 +13,20 @@ parent.link=index.html
</ol>
<h2>Downloads</h2>
<ol>
- <li><a href="{@docRoot}guide/market/billing/billing_integrate.html#billing-download">Sample
+ <li><a href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-download">Sample
Application</a></li>
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/market/billing/billing_overview.html">Overview of In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_overview.html">Overview of In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_integrate.html">Implementing In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_integrate.html">Implementing In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_best_practices.html">Security and
+ <li><a href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and
Design</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_admin.html">Administering In-app
+ <li><a href="{@docRoot}guide/google/play/billing/billing_admin.html">Administering In-app
Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_reference.html">In-app Billing
+ <li><a href="{@docRoot}guide/google/play/billing/billing_reference.html">In-app Billing
Reference</a></li>
</ol>
</div>
@@ -42,7 +42,7 @@ must run a standard version of the Android 1.6 or later platform (API level 4 or
the most current version of the Google Play application installed. If a device is not running the
most current Google Play application, your application won't be able to send in-app billing
requests to Google Play. For general information about how to set up a device for use in
-developing Android applications, see <a href="{@docRoot}guide/developing/device.html">Using Hardware
+developing Android applications, see <a href="{@docRoot}tools/device.html">Using Hardware
Devices</a>.</p>
<p>The following section shows you how to set up and use the in-app billing test tools.</p>
@@ -62,7 +62,7 @@ product ID android.test.purchased.</p>
<img src="{@docRoot}images/billing_test_flow.png" height="381" id="figure1" />
<p class="img-caption">
- <strong>Figure 1.</strong> Checkout flow for the special reserved item android.test.purchased.
+ <strong>Figure 1.</strong> Wallet flow for the special reserved item android.test.purchased.
</p>
<p>You do not need to list the reserved products in your application's product list. Google Play
@@ -91,10 +91,10 @@ reserved product IDs.</p>
<p>When you make an in-app billing request with this product ID, Google Play responds as
though the purchase was refunded. Refunds cannot be initiated through Google Play's in-app
billing service. Refunds must be initiated by you (the merchant). After you process a refund
- request through your Google Checkout account, a refund message is sent to your application by
- Google Play. This occurs only when Google Play gets notification from Google Checkout that
+ request through your Google Wallet account, a refund message is sent to your application by
+ Google Play. This occurs only when Google Play gets notification from Google Wallet that
a refund has been made. For more information about refunds, see <a
- href="{@docRoot}guide/market/billing/billing_overview.html#billing-action-notify">Handling
+ href="{@docRoot}guide/google/play/billing/billing_overview.html#billing-action-notify">Handling
IN_APP_NOTIFY messages</a> and <a
href="http://www.google.com/support/androidmarket/bin/answer.py?answer=1153485">In-app Billing
Pricing</a>.</p>
@@ -108,7 +108,7 @@ reserved product IDs.</p>
<p>In some cases, the reserved items may return signed static responses, which lets you test
signature verification in your application. To test signature verification with the special reserved
product IDs, you may need to set up <a
-href="{@docRoot}guide/market/billing/billing_admin.html#billing-testing-setup">test accounts</a> or
+href="{@docRoot}guide/google/play/billing/billing_admin.html#billing-testing-setup">test accounts</a> or
upload your application as a unpublished draft application. Table 1 shows you the conditions under
which static responses are signed.</p>
@@ -178,7 +178,7 @@ application's product list you use one of the reserved product IDs.</p>
<p>You cannot use the emulator to test in-app billing; you must install your application on a
device to test in-app billing.</p>
<p>To learn how to install an application on a device, see <a
- href="{@docRoot}guide/developing/building/building-cmdline.html#RunningOnDevice">Running on a
+ href="{@docRoot}tools/building/building-cmdline.html#RunningOnDevice">Running on a
device</a>.</p>
</li>
<li><strong>Sign in to your device with your developer account.</strong>
@@ -216,16 +216,16 @@ testing.</p>
<p>To test your in-app billing implementation with actual in-app purchases, you will need to
register at least one test account on the Google Play publisher site. You cannot use your
-developer account to test the complete in-app purchase process because Google Checkout does not let
+developer account to test the complete in-app purchase process because Google Wallet does not let
you buy items from yourself. If you have not set up test accounts before, see <a
-href="{@docRoot}guide/market/billing/billing_admin.html#billing-testing-setup">Setting up test
+href="{@docRoot}guide/google/play/billing/billing_admin.html#billing-testing-setup">Setting up test
accounts</a>.</p>
<p>Also, a test account can purchase an item in your product list only if the item is published. The
application does not need to be published, but the item does need to be published.</p>
-<p>When you use a test account to purchase items, the test account is billed through Google Checkout
-and your Google Checkout Merchant account receives a payout for the purchase. Therefore, you may
+<p>When you use a test account to purchase items, the test account is billed through Google Wallet
+and your Google Wallet Merchant account receives a payout for the purchase. Therefore, you may
want to refund purchases that are made with test accounts, otherwise the purchases will show up as
actual payouts to your merchant account.</p>
@@ -243,20 +243,20 @@ actual payouts to your merchant account.</p>
</li>
<li><strong>Add items to the application's product list.</strong>
<p>Make sure that you publish the items (the application can remain unpublished). See <a
- href="{@docRoot}guide/market/billing/billing_admin.html#billing-catalog">Creating a product
+ href="{@docRoot}guide/google/play/billing/billing_admin.html#billing-catalog">Creating a product
list</a> to learn how to do this.</p>
</li>
<li><strong>Install your application on an Android-powered device.</strong>
<p>You cannot use the emulator to test in-app billing; you must install your application on a
device to test in-app billing.</p>
<p>To learn how to install an application on a device, see <a
- href="{@docRoot}guide/developing/building/building-cmdline.html#RunningOnDevice">Running on a
+ href="{@docRoot}tools/building/building-cmdline.html#RunningOnDevice">Running on a
device</a>.</p>
</li>
<li><strong>Make one of your test accounts the primary account on your device.</strong>
<p>To perform end-to-end testing of in-app billing, the primary account on your device must be
one of the <a
- href="{@docRoot}guide/market/billing/billing_admin.html#billing-testing-setup">test accounts</a>
+ href="{@docRoot}guide/google/play/billing/billing_admin.html#billing-testing-setup">test accounts</a>
that you registered on the Google Play site. If the primary account on your device is not a
test account, you must do a factory reset of the device and then sign in with one of your test
accounts. To perform a factory reset, do the following:</p>
@@ -286,8 +286,8 @@ do a factory reset, making sure you log on with your primary account first.</p>
<p>When you are finished testing your in-app billing implementation, you are ready to
publish your application on Google Play. You can follow the normal steps for <a
-href="{@docRoot}guide/publishing/preparing.html">preparing</a>, <a
-href="{@docRoot}guide/publishing/app-signing.html">signing</a>, and <a
-href="{@docRoot}guide/publishing/publishing.html">publishing your application</a>.
+href="{@docRoot}tools/publishing/preparing.html">preparing</a>, <a
+href="{@docRoot}tools/publishing/app-signing.html">signing</a>, and <a
+href="{@docRoot}distribute/googleplay/publish/preparing.html">publishing on Google Play</a>.
</p>
diff --git a/docs/html/guide/google/play/billing/index.jd b/docs/html/guide/google/play/billing/index.jd
new file mode 100755
index 000000000000..a33b19961f13
--- /dev/null
+++ b/docs/html/guide/google/play/billing/index.jd
@@ -0,0 +1,116 @@
+page.title=In-app Billing
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+ <h2>Topics</h2>
+ <ol>
+ <li><a href="{@docRoot}guide/google/play/billing/billing_overview.html">Overview of In-app
+ Billing</a></li>
+ <li><a href="{@docRoot}guide/google/play/billing/billing_integrate.html">Implementing In-app
+ Billing</a></li>
+ <li><a href="{@docRoot}guide/google/play/billing/billing_subscriptions.html">Subscriptions</a></li>
+ <li><a href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and
+ Design</a></li> <li><a href="{@docRoot}guide/google/play/billing/billing_testing.html">Testing In-app
+ Billing</a></li>
+ <li><a href="{@docRoot}guide/google/play/billing/billing_admin.html">Administering In-app
+ Billing</a></li>
+ </ol>
+ <h2>Reference</h2>
+ <ol>
+ <li><a href="{@docRoot}guide/google/play/billing/billing_reference.html">In-app Billing
+ Reference</a></li>
+ </ol>
+ <h2>Downloads</h2>
+ <ol>
+ <li><a href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-download">Sample
+ Application</a></li>
+ </ol>
+</div>
+</div>
+
+<p>In-app Billing is a Google Play service that lets you sell digital content from inside
+your applications. You can use the service to sell a wide range of content, including downloadable
+content such as media files or photos, virtual content such as game levels or potions, premium services
+and features, and more. You can use In-app Billing to sell products as</p>
+
+<ul>
+<li>Standard in-app products (one-time billing), or</li>
+<li>Subscriptions, (recurring, automated billing)</li>
+</ul>
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+ <h2>Support for subscriptions <span class="new">New!</span></h2>
+ <p>In-app Billing now lets you sell subscriptions in your apps, as well as standard in-app products.
+ For details on how to sell subscriptions to content, services, and features, see the
+ <a href="{@docRoot}guide/google/play/billing/billing_subscriptions.html">Subscriptions</a> documentation.</p>
+</div>
+</div>
+
+<p>When you use the in-app billing service to sell an item,
+whether it's an in-app product or a subscription, Google Play
+handles all checkout details so your application never has to directly process
+any financial transactions. Google Play uses the same checkout backend service as
+is used for application purchases, so your users experience a consistent and
+familiar purchase flow (see figure 1). Also, the transaction fee for in-app
+purchases is the same as the transaction fee for application purchases
+(30%).</p>
+
+<p>Any application that you publish through Google Play can implement In-app Billing. No special
+account or registration is required other than an Android Market publisher account and a Google
+Wallet Merchant account. Also, because the service uses no dedicated framework APIs, you can add
+in-app billing to any application that uses a minimum API level of 4 or higher.</p>
+
+<p>To help you integrate in-app billing into your application, the Android SDK
+provides a sample application that demonstrates how to sell standard in-app
+products and subscriptions from inside an app. The sample contains examples of
+billing-related classes you can use to implement in-app billing in your
+application. It also contains examples of the database, user interface, and
+business logic you might use to implement in-app billing.</p>
+
+<p class="caution"><strong>Important</strong>: Although the sample application is a working example
+of how you can implement in-app billing, we <em>strongly recommend</em> that you modify and
+obfuscate the sample code before you use it in a production application. For more information, see
+<a href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security and Design</a>.</p>
+
+<img src="{@docRoot}images/billing_checkout_flow.png" height="382" id="figure1" />
+<p class="img-caption">
+ <strong>Figure 1.</strong> Applications initiate in-app billing requests through their own UI
+ (first screen). Google Play responds to the request by providing the checkout user interface
+ (middle screen). When checkout is complete, the application resumes.
+</p>
+
+<p>To learn more about Google Play's in-app billing service and start integrating it into your
+applications, read the following documents:</p>
+
+<dl>
+ <dt><strong><a href="{@docRoot}guide/google/play/billing/billing_overview.html">Overview of In-app
+ Billing</a></strong></dt>
+ <dd>Learn how the service works and what a typical in-app billing implementation looks
+ like.</dd>
+ <dt><strong><a href="{@docRoot}guide/google/play/billing/billing_integrate.html">Implementing
+ In-app Billing</a></strong></dt>
+ <dd>Use this step-by-step guide to start incorporating in-app billing into your
+ application. The instructions apply to both one-time and subscription purchases.</dd>
+
+ <dt><strong><a href="{@docRoot}guide/google/play/billing/billing_subscriptions.html">Subscriptions</a></strong></dt>
+ <dd>Learn how subscriptions work and how to implement support for them in your app.</dd>
+ <dt><strong><a href="{@docRoot}guide/google/play/billing/billing_best_practices.html">Security
+ and Design</a></strong></dt>
+ <dd>Review these best practices to help ensure that your in-app billing implementation is
+ secure and well designed.</dd>
+ <dt><strong><a href="{@docRoot}guide/google/play/billing/billing_testing.html">Testing In-app
+ Billing</a></strong></dt>
+ <dd>Understand how the in-app billing test tools work and learn how to test your in-app billing
+ implementation.</dd>
+ <dt><strong><a href="{@docRoot}guide/google/play/billing/billing_admin.html">Administering
+ In-app Billing</a></strong></dt>
+ <dd>Learn how to set up your product list, register test accounts, and handle refunds.</dd>
+ <dt><strong><a href="{@docRoot}guide/google/play/billing/billing_reference.html">In-app Billing
+ Reference</a></strong></dt>
+ <dd>Get detailed information about Google Play response codes and the in-app billing
+ interface.</dd>
+</dl>
+
diff --git a/docs/html/guide/market/expansion-files.jd b/docs/html/guide/google/play/expansion-files.jd
index 36b8f9ca043e..62ca1e2572f8 100644
--- a/docs/html/guide/market/expansion-files.jd
+++ b/docs/html/guide/google/play/expansion-files.jd
@@ -52,8 +52,8 @@ page.title=APK Expansion Files
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/market/licensing/index.html">Application Licensing</a></li>
- <li><a href="{@docRoot}guide/market/publishing/multiple-apks.html">Multiple
+ <li><a href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a></li>
+ <li><a href="{@docRoot}guide/google/play/publishing/multiple-apks.html">Multiple
APK Support</a></li>
</ol>
</div>
@@ -215,7 +215,7 @@ already saved on the device.
<li>If yes, your app is ready to go.</li>
<li>If no, your app must download the expansion files over HTTP from Google Play. Your app
must send a request to the Google Play client using the Google Play's <a
-href="{@docRoot}guide/market/licensing/index.html">Application Licensing</a> service, which
+href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a> service, which
responds with the name, file size, and URL for each expansion file. With this information, you then
download the files and save them to the proper <a href="#StorageLocation">storage location</a>.</li>
</ol>
@@ -242,7 +242,7 @@ application:</p>
Space is precious and you should keep your total application size as small as possible. If your app
uses more than 50MB in order to provide multiple versions of your graphic assets for multiple screen
densities, consider instead publishing <a
-href="{@docRoot}guide/market/publishing/multiple-apks.html">multiple APKs</a> in which each APK
+href="{@docRoot}guide/google/play/publishing/multiple-apks.html">multiple APKs</a> in which each APK
contains only the assets required for the screens that it targets.</li>
<li>Determine which application resources to separate from your APK and package them in a
file to use as the main expansion file.
@@ -259,7 +259,7 @@ Library</a>.</p>
</li>
<li>Add logic to your application's main activity that checks whether the expansion files
are on the device upon start-up. If the files are not on the device, use Google Play's <a
-href="{@docRoot}guide/market/licensing/index.html">Application Licensing</a> service to request URLs
+href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a> service to request URLs
for the expansion files, then download and save them.
<p>To greatly reduce the amount of code you must write and ensure a good user experience
during the download, we recommend you use the <a href="AboutLibraries">Downloader
@@ -292,16 +292,16 @@ provide the URLs for your expansion files if the application was installed by ot
provides for each file is unique for every download and each one expires shortly after it is given
to your application.</li>
<li>If you update your application with a new APK or upload <a
-href="{@docRoot}guide/market/publishing/multiple-apks.html">multiple APKs</a> for the same
+href="{@docRoot}guide/google/play/publishing/multiple-apks.html">multiple APKs</a> for the same
application, you can select expansion files that you've uploaded for a previous APK. <strong>The
expansion file's name does not change</strong>&mdash;it retains the version received by the APK to
which the file was originally associated.</li>
<li>If you use expansion files in combination with <a
-href="{@docRoot}guide/market/publishing/multiple-apks.html">multiple APKs</a> in order to
+href="{@docRoot}guide/google/play/publishing/multiple-apks.html">multiple APKs</a> in order to
provide different expansion files for different devices, you still must upload separate APKs
for each device in order to provide a unique <a
href="{@docRoot}guide/topics/manifest/manifest-element.html#vcode">{@code versionCode}</a>
-value and declare different <a href="{@docRoot}guide/appendix/market-filters.html">filters</a> for
+value and declare different <a href="{@docRoot}guide/google/play/filters.html">filters</a> for
each APK.</li>
<li>You cannot issue an update to your application by changing the expansion files
alone&mdash;<strong>you must upload a new APK</strong> to update your app. If your changes only
@@ -333,7 +333,7 @@ time it installs or updates the APK. This way, the expansion files are available
application launches for the first time. However, in some cases your app must download the
expansion files itself by requesting them from a URL provided to you in a response
from Google Play's <a
-href="{@docRoot}guide/market/licensing/index.html">Application Licensing</a> service.</p>
+href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a> service.</p>
<p>The basic logic you need to download your expansion files is the following:</p>
@@ -346,7 +346,7 @@ href="#StorageLocation">shared storage location</a> (in the
<li>If the expansion files are <em>not</em> there:
<ol>
<li>Perform a request using Google Play's <a
-href="{@docRoot}guide/market/licensing/index.html">Application Licensing</a> to get your
+href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a> to get your
app's expansion file names, sizes, and URLs.</li>
<li>Use the URLs provided by Google Play to download the expansion files and save
the expansion files. You <strong>must</strong> save the files to the <a
@@ -365,7 +365,7 @@ your application.</p>
<p>If your application is free (not a paid app), then you probably haven't used the <a
-href="{@docRoot}guide/market/licensing/index.html">Application Licensing</a> service. It's primarily
+href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a> service. It's primarily
designed for you to enforce
licensing policies for your application and ensure that the user has the right to
use your app (he or she rightfully paid for it on Google Play). In order to facilitate the
@@ -409,7 +409,7 @@ download your expansion files. The information in the following sections explain
the library into your application.</p>
<p>If you'd rather develop your own solution to download the expansion files using the Google
-Play URLs, you must follow the <a href="{@docRoot}guide/market/licensing/index.html">Application
+Play URLs, you must follow the <a href="{@docRoot}guide/google/play/licensing/index.html">Application
Licensing</a> documentation to perform a license request, then retrieve the expansion file names,
sizes, and URLs from the response extras. You should use the <a href="#ExpansionPolicy">{@code
APKExpansionPolicy}</a> class (included in the License Verification Library) as your licensing
@@ -447,7 +447,7 @@ receives updates about the download progress.</li>
download two packages from the SDK Manager and add the appropriate libraries to your
application.</p>
-<p>First, open the <a href="{@docRoot}sdk/adding-components.html">Android SDK Manager</a>, expand
+<p>First, open the <a href="{@docRoot}sdk/exploring.html">Android SDK Manager</a>, expand
<em>Extras</em> and download:</p>
<ul>
<li><em>Google Market Licensing package</em></li>
@@ -571,11 +571,11 @@ DownloaderService} class and override three methods to provide specific applicat
<dt>{@code getPublicKey()}</dt>
<dd>This must return a string that is the Base64-encoded RSA public key for your publisher
account, available from the profile page on the Developer Console (see <a
-href="{@docRoot}guide/market/licensing/setting-up.html">Setting Up for Licensing</a>).</dd>
+href="{@docRoot}guide/google/play/licensing/setting-up.html">Setting Up for Licensing</a>).</dd>
<dt>{@code getSALT()}</dt>
<dd>This must return an array of random bytes that the licensing {@code Policy} uses to
create an <a
-href="{@docRoot}guide/market/licensing/adding-licensing.html#impl-Obfuscator">{@code
+href="{@docRoot}guide/google/play/licensing/adding-licensing.html#impl-Obfuscator">{@code
Obfuscator}</a>. The salt ensures that your obfuscated {@link android.content.SharedPreferences}
file in which your licensing data is saved will be unique and non-discoverable.</dd>
<dt>{@code getAlarmReceiverClassName()}</dt>
@@ -924,7 +924,7 @@ expansion files:</p>
<p>For more information about how to use the {@code APKExpansionPolicy} when you're <em>not</em>
using the <a
href="#AboutLibraries">Downloader Library</a>, see the documentation for <a
-href="{@docRoot}guide/market/licensing/adding-licensing.html">Adding Licensing to Your App</a>,
+href="{@docRoot}guide/google/play/licensing/adding-licensing.html">Adding Licensing to Your App</a>,
which explains how to implement a license policy such as this one.</p>
@@ -1200,7 +1200,7 @@ finalize these details before publishing your application.
the application as a draft, such that your application is not published for Google Play users,
but the expansion files are available for you to test the download process.</p></li>
<li>Install the application on your test device using the Eclipse tools or <a
-href="{@docRoot}guide/developing/tools/adb.html">{@code adb}</a>.</li>
+href="{@docRoot}tools/help/adb.html">{@code adb}</a>.</li>
<li>Launch the app.</li>
</ol>
diff --git a/docs/html/guide/appendix/market-filters.jd b/docs/html/guide/google/play/filters.jd
index 3e502d7d5f19..3db9cb634d06 100644
--- a/docs/html/guide/appendix/market-filters.jd
+++ b/docs/html/guide/google/play/filters.jd
@@ -400,7 +400,7 @@ country (as determined by SIM carrier) in which paid apps are available.</p></td
<td valign="top">Native Platform</td> <td valign="top"><p>An application that includes native
libraries that target a specific platform (ARM EABI v7 or x86, for example) are
visible only on devices that support that platform. For details about the NDK and using
- native libraries, see <a href="{@docRoot}sdk/ndk/index.html#overview">What is the
+ native libraries, see <a href="{@docRoot}tools/sdk/ndk/index.html#overview">What is the
Android NDK?</a></p> </tr> <tr>
<td valign="top">Copy-Protected Applications</td> <td valign="top"><p>To
copy protect an application, set copy protection to "On" when you configure publishing
@@ -451,4 +451,4 @@ requires that you follow specific rules within your filters and that you pay ext
version codes for each APK to ensure proper update paths for each configuration.</p>
<p>If you need more information about how to publish multiple APKs on Google Play, read <a
-href="{@docRoot}guide/market/publishing/multiple-apks.html">Multiple APK Support</a>.</p>
+href="{@docRoot}guide/google/play/publishing/multiple-apks.html">Multiple APK Support</a>.</p>
diff --git a/docs/html/guide/google/play/index.jd b/docs/html/guide/google/play/index.jd
new file mode 100644
index 000000000000..b11bcdca8001
--- /dev/null
+++ b/docs/html/guide/google/play/index.jd
@@ -0,0 +1,16 @@
+page.title=Google Play APIs
+page.landing=1
+page.landing.intro=When you ditribute your Android app using Google Play you have the opportunity to enhance your app's capabilities with services such as in-app billing and control your app distribution with advanced device filtering.
+@jd:body
+
+
+<div class="distribute-features col-13">
+ <ul>
+ <li><h5>Monetize with in-app billing</h5>Lorem ipsum dolor sit amet, soldum
+consectetur adipiscing elit. <a href="#">Learn more &raquo;</a></li>
+ <li><h5>Control your app distribution</h5>Lorem ipsum dolor sit amet, soldum consectetur
+adipiscing elit. <a href="#">Learn more &raquo;</a></li>
+ <li class="last"><h5>Protect from piracy</h5>Lorem ipsum dolor sit amet, soldum
+consectetur adipiscing elit. <a href="#">Learn more &raquo;</a></li>
+ </ul>
+</div> \ No newline at end of file
diff --git a/docs/html/guide/market/licensing/adding-licensing.jd b/docs/html/guide/google/play/licensing/adding-licensing.jd
index d4dd008bcf7c..49375c206b67 100644
--- a/docs/html/guide/market/licensing/adding-licensing.jd
+++ b/docs/html/guide/google/play/licensing/adding-licensing.jd
@@ -72,11 +72,11 @@ most applications).</li>
<p>The sections below describe these tasks. When you are done with the
integration, you should be able to compile your application successfully and you
can begin testing, as described in <a
-href="{@docRoot}guide/market/licensing/setting-up.html#test-env">Setting Up the Test
+href="{@docRoot}guide/google/play/licensing/setting-up.html#test-env">Setting Up the Test
Environment</a>.</p>
<p>For an overview of the full set of source files included in the LVL, see <a
-href="{@docRoot}guide/market/licensing/licensing-reference.html#lvl-summary">Summary of LVL Classes
+href="{@docRoot}guide/google/play/licensing/licensing-reference.html#lvl-summary">Summary of LVL Classes
and Interfaces</a>.</p>
@@ -224,7 +224,7 @@ in local persistent storage.</li>
cached response is valid, rather than making a request to the licensing server.
Setting the response validity according to the server-provided <code>VT</code>
extra is highly recommended. See <a
-href="{@docRoot}guide/market/licensing/licensing-reference.html#extras">Server Response Extras</a>
+href="{@docRoot}guide/google/play/licensing/licensing-reference.html#extras">Server Response Extras</a>
for more information.</li>
<li>Uses an exponential backoff period, if retrying any requests the result in
errors. Note that the Google Play client automatically retries failed
@@ -247,7 +247,7 @@ server-provided settings is straightforward and making use of them is highly
recommended. See the ServerManagedPolicy implementation for an example of how to
extract and use the extras. For a list of server settings and information about
how to use them, see <a
-href="{@docRoot}guide/market/licensing/licensing-reference.html#extras">Server Response
+href="{@docRoot}guide/google/play/licensing/licensing-reference.html#extras">Server Response
Extras</a>.</p>
<h3 id="ServerManagedPolicy">ServerManagedPolicy</h3>
@@ -261,7 +261,7 @@ settings to the responses, to help the application manage licensing effectively.
</p>
<p style="margin-top:.5em;">See <a
-href="{@docRoot}guide/market/licensing/licensing-reference.html#extras">Server Response Extras</a>
+href="{@docRoot}guide/google/play/licensing/licensing-reference.html#extras">Server Response Extras</a>
for
a list of settings and <code>ServerManagedPolicy.java</code> for information
about how a {@code Policy} can use the extras.</p>
@@ -294,7 +294,7 @@ retry count, among others. ServerManagedPolicy extracts the values from the
license response in its <code>processServerResponse()</code> method and checks
them in its <code>allowAccess()</code> method. For a list of the server-provided
settings used by ServerManagedPolicy, see <a
-href="{@docRoot}guide/market/licensing/licensing-reference.html#extras">Server Response
+href="{@docRoot}guide/google/play/licensing/licensing-reference.html#extras">Server Response
Extras</a>.</p>
<p>For convenience, best performance, and the benefit of using license settings
@@ -650,8 +650,7 @@ new license check if the <code>reason</code> supplied is {@code Policy.RETRY}. <
deep-links the user to the application's details page on Google Play, from which the
use can purchase the application. For more information on how to set up such
links, see <a
-href="{@docRoot}guide/publishing/publishing.html#marketintent">Linking to your apps
-on Google Play</a>. </li>
+href="{@docRoot}distribute/googleplay/promote/linking.html">Linking to Your Products</a>. </li>
<li>Display a Toast notification that indicates that the features of the
application are limited because it is not licensed. </li>
</ul>
@@ -698,9 +697,9 @@ private class MyLicenseCheckerCallback implements LicenseCheckerCallback {
<p>Additionally, you should implement the <code>applicationError()</code>
method, which the LVL calls to let your application handle errors that are not
retryable. For a list of such errors, see <a
-href="{@docRoot}guide/market/licensing/licensing-reference.html#server-response-codes">Server
+href="{@docRoot}guide/google/play/licensing/licensing-reference.html#server-response-codes">Server
Response Codes</a> in the <a
-href="guide/market/licensing/licensing-reference.html">Licensing Reference</a>. You can implement
+href="guide/google/play/licensing/licensing-reference.html">Licensing Reference</a>. You can implement
the method in any way needed. In most cases, the
method should log the error code and call <code>dontAllow()</code>.</p>
@@ -999,9 +998,9 @@ Play Licensing. </p>
<p>When you are finished testing your license implementation, you are ready to
publish the application on Google Play. Follow the normal steps to <a
-href="{@docRoot}guide/publishing/preparing.html">prepare</a>, <a
-href="{@docRoot}guide/publishing/app-signing.html">sign</a>, and then <a
-href="{@docRoot}guide/publishing/publishing.html">publish the application</a>.
+href="{@docRoot}tools/publishing/preparing.html">prepare</a>, <a
+href="{@docRoot}tools/publishing/app-signing.html">sign</a>, and then <a
+href="{@docRoot}distribute/googleplay/publish/preparing.html">publish the application</a>.
</p>
<h3>Removing Copy Protection</h3>
diff --git a/docs/html/guide/market/licensing/index.jd b/docs/html/guide/google/play/licensing/index.jd
index 1f15303e4e8e..d393738bac17 100644
--- a/docs/html/guide/market/licensing/index.jd
+++ b/docs/html/guide/google/play/licensing/index.jd
@@ -31,25 +31,25 @@ on Google Play. However, any application (including free apps) may use the licen
to initiate the download of an APK expansion file. In which case, the request that your application
sends to the licensing service is not to check whether the user paid for the app, but to request the
URL of the expansion files. For information about downloading expansion files for your application,
-read the guide to <a href="{@docRoot}guide/market/expansion-files.html">APK Expansion Files</a>.</p>
+read the guide to <a href="{@docRoot}guide/google/play/expansion-files.html">APK Expansion Files</a>.</p>
<p>To learn more about Google Play's application licensing service and start integrating it into
your applications, read the following documents:</p>
<dl>
- <dt><strong><a href="{@docRoot}guide/market/licensing/overview.html">Licensing
+ <dt><strong><a href="{@docRoot}guide/google/play/licensing/overview.html">Licensing
Overview</a></strong></dt>
<dd>Describes how the service works and what a typical licensing implementation looks
like.</dd>
- <dt><strong><a href="{@docRoot}guide/market/licensing/setting-up.html">Setting Up for
+ <dt><strong><a href="{@docRoot}guide/google/play/licensing/setting-up.html">Setting Up for
Licensing</a></strong></dt>
<dd>Explains how to set up your Google Play account, development environment, and
testing environment in order to add licensing to your app.</dd>
- <dt><strong><a href="{@docRoot}guide/market/licensing/adding-licensing.html">Adding
+ <dt><strong><a href="{@docRoot}guide/google/play/licensing/adding-licensing.html">Adding
Licensing to Your App</a></strong></dt>
<dd>Provides a step-by-step guide to add licensing verification to your application.</dd>
- <dt><strong><a href="{@docRoot}guide/market/licensing/licensing-reference.html">Licensing
+ <dt><strong><a href="{@docRoot}guide/google/play/licensing/licensing-reference.html">Licensing
Reference</a></strong></dt>
<dd>Provides detailed information about the licensing library's classes and the service response
codes.</dd>
diff --git a/docs/html/guide/market/licensing/licensing-reference.jd b/docs/html/guide/google/play/licensing/licensing-reference.jd
index 0a7e03331b8e..d3d522460ee3 100644
--- a/docs/html/guide/market/licensing/licensing-reference.jd
+++ b/docs/html/guide/google/play/licensing/licensing-reference.jd
@@ -230,7 +230,7 @@ implementation.</p>
</table>
<p class="note"><strong>Note:</strong> As documented in <a
-href="{@docRoot}guide/market/licensing/setting-up.html#test-env">
+href="{@docRoot}guide/google/play/licensing/setting-up.html#test-env">
Setting Up The Testing Environment</a>, the response code can be manually
overridden for the application developer and any registered test users via the
Google Play publisher site.
@@ -251,13 +251,13 @@ testing purposes.</p>
period and provide other information, The licensing server includes several pieces of
information in the license responses. Specifically, the service provides recommended values for the
application's license validity period, retry grace period, maximum allowable retry count, and other
-settings. If your application uses <a href="{@docRoot}guide/market/expansion-files.html">APK
+settings. If your application uses <a href="{@docRoot}guide/google/play/expansion-files.html">APK
expansion files</a>, the response also includes the file names, sizes, and URLs. The server appends
the settings as key-value pairs in the license response "extras" field. </p>
<p>Any {@code Policy} implementation can extract the extras settings from the license
response and use them as needed. The LVL default {@code Policy} implementation, <a
-href="{@docRoot}guide/market/licensing/adding-licensing.html#ServerManagedPolicy">{@code
+href="{@docRoot}guide/google/play/licensing/adding-licensing.html#ServerManagedPolicy">{@code
ServerManagedPolicy}</a>, serves as a working
implementation and an illustration of how to obtain, store, and use the
settings. </p>
diff --git a/docs/html/guide/market/licensing/overview.jd b/docs/html/guide/google/play/licensing/overview.jd
index e7e23f877dad..467a3a2c151c 100644
--- a/docs/html/guide/market/licensing/overview.jd
+++ b/docs/html/guide/google/play/licensing/overview.jd
@@ -206,7 +206,7 @@ secure.</li>
functions when run on a device that does not offer Google Play.</li>
<li>You can implement licensing controls for a free app, but only if you're using the service to
provide <a
-href="{@docRoot}guide/market/expansion-files.html">APK expansion files</a>.</li>
+href="{@docRoot}guide/google/play/expansion-files.html">APK expansion files</a>.</li>
</ul>
@@ -237,7 +237,7 @@ across all compatible devices, locked or unlocked, that run Android 1.5 or
higher version of the platform.</p>
<p>To begin adding application licensing to your application, continue to <a
-href="{@docRoot}guide/market/licensing/setting-up.html">Setting Up for Licensing</a>.</p>
+href="{@docRoot}guide/google/play/licensing/setting-up.html">Setting Up for Licensing</a>.</p>
diff --git a/docs/html/guide/market/licensing/setting-up.jd b/docs/html/guide/google/play/licensing/setting-up.jd
index 0de7819b0108..80a44192c754 100644
--- a/docs/html/guide/market/licensing/setting-up.jd
+++ b/docs/html/guide/google/play/licensing/setting-up.jd
@@ -46,7 +46,7 @@ href="http://play.google.com/apps/publish">http://play.google.com/apps/publish</
</p>
<p>For more information, see <a
-href="{@docRoot}guide/publishing/publishing.html">Publishing on Google Play</a>.</p>
+href="{@docRoot}distribute/googleplay/publish/register.html">Get Started with Publishing</a>.</p>
<p>If you already have a publisher account on Google Play, use your existing
account to set up licensing.</p>
@@ -102,7 +102,7 @@ responses, see <a href="#test-env">Setting Up a Testing Environment</a>, below.
</ol>
<p>The sections below describe these tasks. When you are done with setup,
-you can begin <a href="{@docRoot}guide/market/licensing/adding-licensing.html">Adding
+you can begin <a href="{@docRoot}guide/google/play/licensing/adding-licensing.html">Adding
Licensing to Your App</a>.</p>
<p>To get started, you need to set up a proper runtime environment on which
@@ -146,7 +146,7 @@ be able to communicate with the Google Play licensing server. </p>
<p>For general information about how to set up a device for use in developing
Android applications, see <a
-href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a>.</p>
+href="{@docRoot}tools/device.html">Using Hardware Devices</a>.</p>
<h4 id="runtime-emulator">Running on an Android emulator</h4>
@@ -199,7 +199,7 @@ Android Virtual Devices.</li>
</ol>
<p>If you are not familiar with AVDs or how to use them, see <a
-href="{@docRoot}guide/developing/devices/index.html">Managing Virtual Devices</a>.</p>
+href="{@docRoot}tools/devices/index.html">Managing Virtual Devices</a>.</p>
<h4 id="project-update">Updating your project configuration</h4>
@@ -266,7 +266,7 @@ the LVL library project and the example application into these directories: </p>
application)</p>
<p>If you aren't familiar with how to download packess into your SDK, see the
-<a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>
+<a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a>
document. </p>
@@ -306,7 +306,7 @@ version of the LVL.</p>
share its code and resources across multiple applications. </p>
<p style="margin-top:.5em;">If you aren't familiar with library projects or how
-to use them, see <a href="{@docRoot}guide/developing/projects/index.html#LibraryProjects">
+to use them, see <a href="{@docRoot}tools/projects/index.html#LibraryProjects">
Managing Projects</a>.
</p>
</div>
@@ -345,7 +345,7 @@ no further configuration is needed. </p>
<p>For more information about how to create an application project or work with
library projects in Eclipse, see <a
-href="{@docRoot}guide/developing/projects/projects-eclipse.html">Managing Projects from
+href="{@docRoot}tools/projects/projects-eclipse.html">Managing Projects from
Eclipse with ADT</a>.</p>
@@ -358,7 +358,7 @@ LVL's <code>library/src/com</code> directory into your application's
<p>If you add the LVL sources directly to your application, you can skip the
next section and start working with the library, as described in <a
-href="{@docRoot}guide/market/licensing/adding-licensing.html">Adding
+href="{@docRoot}guide/google/play/licensing/adding-licensing.html">Adding
Licensing to Your App</a>.</p>
@@ -379,7 +379,7 @@ haven't done that already, do it now before continuing. </p>
Select the "Android" properties group and click <strong>Add</strong>, then
choose the LVL library project (com_android_vending_licensing) and click
<strong>OK</strong>. For more information, see
-<a href="{@docRoot}guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject">
+<a href="{@docRoot}tools/projects/projects-eclipse.html#SettingUpLibraryProject">
Managing Projects from Eclipse with ADT</a></p>.
@@ -407,7 +407,7 @@ properties, including the reference to the library project:</p>
</pre>
<p>For more information about working with library projects,
-see <a href="{@docRoot}guide/developing/projects/projects-cmdline.html#SettingUpLibraryProject">
+see <a href="{@docRoot}tools/projects/projects-cmdline.html#SettingUpLibraryProject">
Setting up a Library Project</a>.</p>
@@ -483,9 +483,9 @@ test in your application.</p>
<p>In general, you should make sure to test your application's licensing
implementation with every response code available in the Test Response menu.
For a description of the codes, see <a
-href="{@docRoot}guide/market/licensing/licensing-reference.html#server-response-codes">Server
+href="{@docRoot}guide/google/play/licensing/licensing-reference.html#server-response-codes">Server
Response Codes</a> in the <a
-href="{@docRoot}guide/market/licensing/licensing-reference.html">Licensing Reference</a>.</p>
+href="{@docRoot}guide/google/play/licensing/licensing-reference.html">Licensing Reference</a>.</p>
<img src="{@docRoot}images/licensing_test_response.png" alt=""/>
<p class="img-caption"><strong>Figure 4.</strong> The Licensing
@@ -506,7 +506,7 @@ sign using either your publisher account or one of the test accounts that you
have set up. For more information about test accounts, see the next section.</p>
<p>See <a
-href="{@docRoot}guide/market/licensing/licensing-reference.html#server-response-codes">Server
+href="{@docRoot}guide/google/play/licensing/licensing-reference.html#server-response-codes">Server
Response Codes</a> for a list of
test responses available and their meanings. </p>
@@ -695,7 +695,7 @@ publisher account or test account each time you wipe data when restarting the
emulator.</p>
<p>Once you've completed the setup procedures, continue to <a
-href="{@docRoot}guide/market/licensing/adding-licensing.html">Adding Licensing to Your App</a>.</p>
+href="{@docRoot}guide/google/play/licensing/adding-licensing.html">Adding Licensing to Your App</a>.</p>
diff --git a/docs/html/guide/market/publishing/multiple-apks.jd b/docs/html/guide/google/play/publishing/multiple-apks.jd
index e7cfa33dac95..e41817e4520d 100644
--- a/docs/html/guide/market/publishing/multiple-apks.jd
+++ b/docs/html/guide/google/play/publishing/multiple-apks.jd
@@ -45,11 +45,11 @@ support all desired devices with a single APK</li>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/appendix/market-filters.html">Filters on Google Play</a></li>
+ <li><a href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a></li>
<li><a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a></li>
- <li><a href="{@docRoot}sdk/compatibility-library.html">Compatibility
+ <li><a href="{@docRoot}tools/extras/support-library.html">Compatibility
Package</a></li>
- <li><a href="{@docRoot}guide/appendix/api-levels.html">Android API Levels</a></li>
+ <li><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">Android API Levels</a></li>
</ol>
</div>
@@ -192,7 +192,7 @@ following sections describe more about how it works.</p>
<h3 id="SupportedFilters">Supported filters</h3>
<p>Which devices receive each APK is determined by <a
-href="{@docRoot}guide/appendix/market-filters.html">Google Play filters</a> that are specified by
+href="{@docRoot}guide/google/play/filters.html">Google Play filters</a> that are specified by
elements in the manifest file of each APK. However, Google Play allows you to publish multiple
APKs only when each APK uses filters to support a variation of the following
device characteristics:</p>
@@ -286,7 +286,7 @@ higher, as per the previous note).</li>
</ul>
<p>Other manifest elements that enable <a
-href="{@docRoot}guide/appendix/market-filters.html">Google Play filters</a>&mdash;but are not
+href="{@docRoot}guide/google/play/filters.html">Google Play filters</a>&mdash;but are not
listed above&mdash;are still applied for each APK as usual. However, Google Play does not allow
you to publish multiple APKs based on variations of them. Thus, you cannot publish
multiple APKs if the above listed filters are the same for each APK (but the APKs differ based on
@@ -402,7 +402,7 @@ as textures&mdash;based on the build configuration.)</p>
<p class="note"><strong>Tip:</strong> One way to avoid duplicating large portions of your
application code is to use a <a
-href="{@docRoot}guide/developing/projects/index.html#LibraryProjects">library project</a>. A library
+href="{@docRoot}tools/projects/index.html#LibraryProjects">library project</a>. A library
project holds shared code and resources, which you can include in your actual application
projects.</p>
@@ -523,7 +523,7 @@ APK&mdash;by using only one APK, you can simply increase the version code with e
be done.</p> </li>
<li><strong>You need to manage only a single code base.</strong>
<p>Although you can use a <a
-href="{@docRoot}guide/developing/projects/index.html#LibraryProjects">library project</a>
+href="{@docRoot}tools/projects/index.html#LibraryProjects">library project</a>
to share code between multiple Android projects, it's still likely that you'll reproduce some code
across each project and this could become difficult to manage, especially when resolving
bugs.</p></li>
@@ -600,8 +600,8 @@ different screen sizes.</p>
href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a>.</p>
<p>Additionally, you should consider using a support library from the <a
-href="{@docRoot}sdk/compatibility-library.html">Compatibility Package</a> so that you can add <a
-href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a> to your activity designs
+href="{@docRoot}tools/extras/support-library.html">Compatibility Package</a> so that you can add <a
+href="{@docRoot}guide/components/fragments.html">Fragments</a> to your activity designs
when running on larger screens such as tablets.</p>
@@ -612,14 +612,14 @@ when running on larger screens such as tablets.</p>
only APIs available in the lowest reasonable version. For example, your application may not require
APIs newer than Android 2.1 (API Level 7), which makes an application available to
over 95% of Android-powered devices (as indicated by the <a
-href="{@docRoot}resources/dashboard/platform-versions.html">Platform Versions</a> dashboard).</p>
+href="{@docRoot}about/dashboards/index.html">Platform Versions</a> dashboard).</p>
<p>By using a support library from the <a
-href="{@docRoot}sdk/compatibility-library.html">Compatibility Package</a>, you can also use APIs
+href="{@docRoot}tools/extras/support-library.html">Compatibility Package</a>, you can also use APIs
from some of the latest versions (such as Android 3.0) while
still supporting versions as low as Android 1.6. The support library includes APIs for <a
-href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a>, <a
-href="{@docRoot}guide/topics/fundamentals/loaders.html">Loaders</a>, and more. Using the fragment
+href="{@docRoot}guide/components/fragments.html">Fragments</a>, <a
+href="{@docRoot}guide/components/loaders.html">Loaders</a>, and more. Using the fragment
APIs is particularly valuable so that you can optimize your user interface for large devices such as
tablets.</p>
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index 62d18aee3f9a..44b977e327dd 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -5,236 +5,80 @@
Below are template spans for adding localized doc titles. Please ensure that
localized titles are added in the language order specified below.
?>
-<ul>
-
- <li>
- <span class="heading">
- <span class="en">Android Basics</span>
- <span class="de" style="display:none">Einführung in Android</span>
- <span class="es" style="display:none">Información básica sobre Android</span>
- <span class="fr" style="display:none">Présentation d'Android</span>
- <span class="it" style="display:none">Nozioni di base su Android</span>
- <span class="ja" style="display:none">Android の基本</span>
- <span class="zh-CN" style="display:none">Android 基础知识</span>
- <span class="zh-TW" style="display:none">Android 簡介</span>
- </span>
- <ul>
- <li><a href="<?cs var:toroot ?>guide/basics/what-is-android.html">
- <span class="en">What Is Android?</span>
- <span class="de" style="display:none">Was ist Android?</span>
- <span class="es" style="display:none">¿Qué es Android?</span>
- <span class="fr" style="display:none">Qu'est-ce qu'Android&nbsp;?</span>
- <span class="it" style="display:none">Che cos'è Android?</span>
- <span class="ja" style="display:none">Android とは</span>
- <span class="zh-CN" style="display:none">Android 是什么?</span>
- <span class="zh-TW" style="display:none">什麼是 Android?</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/fundamentals.html">
- <span class="en">Application Fundamentals</span>
- <span class="de" style="display:none">Anwendungsgrundlagen</span>
- <span class="es" style="display:none">Fundamentos de las aplicaciones</span>
- <span class="fr" style="display:none">Principes de base des applications</span>
- <span class="it" style="display:none">Concetti fondamentali sulle applicazioni</span>
- <span class="ja" style="display:none">開発の基礎</span>
- <span class="zh-CN" style="display:none">应用程序基础</span>
- <span class="zh-TW" style="display:none">應用程式基本原理</span>
- </a></li>
-
- <!-- <li><a style="color:gray;">The Android SDK</a></li> -->
- <!-- <li><a style="color:gray;">Walkthrough for Developers</a></li> -->
- <!-- quick overview of what it's like to develop on Android -->
- </ul>
- </li>
-
- <li>
- <span class="heading">
- <span class="en">Framework Topics</span>
- <span class="de" style="display:none">Framework-Themen</span>
- <span class="es" style="display:none">Temas sobre el framework</span>
- <span class="fr" style="display:none">Thèmes relatifs au framework</span>
- <span class="it" style="display:none">Argomenti relativi al framework</span>
- <span class="ja" style="display:none">フレームワーク トピック</span>
- <span class="zh-CN" style="display:none">框架主题</span>
- <span class="zh-TW" style="display:none">架構主題</span>
- </span>
+<ul id="nav">
+ <!-- Walkthrough for Developers -- quick overview of what it's like to develop on Android -->
+ <!--<li style="color:red">Overview</li> -->
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/components/index.html">
+ <span class="en">App Components</span>
+ </a></div>
<ul>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/fundamentals/activities.html">
- <span class="en">Activities</span>
- </a></div>
+ <li><a href="<?cs var:toroot ?>guide/components/fundamentals.html">
+ <span class="en">App Fundamentals</span></a>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/components/activities.html">
+ <span class="en">Activities</span>
+ </a></div>
<ul>
- <li><a href="<?cs var:toroot ?>guide/topics/fundamentals/fragments.html">
- <span class="en">Fragments</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/fundamentals/loaders.html">
- <span class="en">Loaders</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/fundamentals/tasks-and-back-stack.html">
- <span class="en">Tasks and Back Stack</span></a></li>
+ <li><a href="<?cs var:toroot ?>guide/components/fragments.html">
+ <span class="en">Fragments</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/components/loaders.html">
+ <span class="en">Loaders</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/components/tasks-and-back-stack.html">
+ <span class="en">Tasks and Back Stack</span>
+ </a></li>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/fundamentals/services.html">
- <span class="en">Services</span>
- </a></div>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/components/services.html">
+ <span class="en">Services</span>
+ </a></div>
<ul>
- <li><a href="<?cs var:toroot ?>guide/topics/fundamentals/bound-services.html">
- <span class="en">Bound Services</span>
- </a></li>
+ <li><a href="<?cs var:toroot ?>guide/components/bound-services.html">
+ <span class="en">Bound Services</span>
+ </a></li>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/providers/content-providers.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/providers/content-providers.html">
<span class="en">Content Providers</span>
</a></div>
- <ul>
- <li>
- <a href="<?cs var:toroot ?>guide/topics/providers/content-provider-basics.html">
- <span class="en">Content Provider Basics<span
-class="new">&nbsp;new!</span></span>
- </a>
- </li>
- <li>
- <a href="<?cs var:toroot ?>guide/topics/providers/content-provider-creating.html">
- <span class="en">Creating a Content Provider<span
-class="new">&nbsp;new!</span></span>
- </a>
- </li>
- <li>
- <a href="<?cs var:toroot ?>guide/topics/providers/calendar-provider.html">
- <span class="en">Calendar Provider<span class="new">&nbsp;new!</span></span>
- </a>
- </li>
- </ul>
- </li>
- <li><a href="<?cs var:toroot ?>guide/topics/intents/intents-filters.html">
- <span class="en">Intents and Intent Filters</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/fundamentals/processes-and-threads.html">
- <span class="en">Processes and Threads</span>
- </a></li>
- </ul>
-
-
- <ul>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/ui/index.html">
- <span class="en">User Interface</span>
- </a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/declaring-layout.html">
- <span class="en">XML Layouts</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/ui-events.html">
- <span class="en">Input Events</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/menus.html">
- <span class="en">Menus<span class="new">&nbsp;new!</span></span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/actionbar.html">
- <span class="en">Action Bar</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/dialogs.html">
- <span class="en">Dialogs</span>
- </a></li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/ui/notifiers/index.html">
- <span class="en">Notifications</span>
- </a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/notifiers/toasts.html">
- <span class="en">Toast Notifications</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/notifiers/notifications.html">
- <span class="en">Status Bar Notifications</span>
- </a></li>
- </ul>
- </li>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/drag-drop.html">
- <span class="en">Drag and Drop</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/themes.html">
- <span class="en">Styles and Themes</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/custom-components.html">
- <span class="en">Custom Components</span>
- </a></li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/ui/accessibility/index.html">
- <span class="en">Accessibility<span class="new">&nbsp;new!</span></span>
- </a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/accessibility/apps.html">
- <span class="en">Making Applications Accessible</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/accessibility/services.html">
- <span class="en">Building Accessibility Services</span>
- </a></li>
- </ul>
- </li>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/binding.html">
- <span class="en">Binding to Data with AdapterView</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/layout-objects.html">
- <span class="en">Common Layout Objects</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/ui/how-android-draws.html">
- <span class="en">How Android Draws Views</span>
- </a></li>
- </ul>
- </li><!-- end of User Interface -->
-
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/resources/index.html">
- <span class="en">Application Resources</span>
- </a></div>
<ul>
- <li><a href="<?cs var:toroot ?>guide/topics/resources/providing-resources.html">
- <span class="en">Providing Resources</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/resources/accessing-resources.html">
- <span class="en">Accessing Resources</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/resources/runtime-changes.html">
- <span class="en">Handling Runtime Changes</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/resources/localization.html">
- <span class="en">Localization</span>
- </a></li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/resources/available-resources.html">
- <span class="en">Resource Types</span>
- </a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>guide/topics/resources/animation-resource.html">Animation</a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/resources/color-list-resource.html">Color State List</a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/resources/drawable-resource.html">Drawable</a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/resources/layout-resource.html">Layout</a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/resources/menu-resource.html">Menu</a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/resources/string-resource.html">String</a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/resources/style-resource.html">Style</a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/resources/more-resources.html">More Types</a></li>
- </ul>
- </li><!-- end of resource types -->
+ <li><a href="<?cs var:toroot ?>guide/topics/providers/content-provider-basics.html">
+ <span class="en">Content Provider Basics</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/providers/content-provider-creating.html">
+ <span class="en">Creating a Content Provider</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/providers/calendar-provider.html">
+ <span class="en">Calendar Provider</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/providers/contacts-provider.html">
+ <span class="en">Contacts Provider</span>
+ </a></li>
</ul>
- </li><!-- end of app resources -->
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/data/data-storage.html">
- <span class="en">Data Storage</span>
- </a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>guide/topics/data/backup.html">
- <span class="en">Data Backup</span>
- </a>
- </li>
- </ul>
</li>
- <li><a href="<?cs var:toroot ?>guide/topics/security/security.html">
- <span class="en">Security and Permissions</span>
+ <li><a href="<?cs var:toroot ?>guide/components/intents-filters.html">
+ <span class="en">Intents and Intent Filters</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/components/processes-and-threads.html">
+ <span class="en">Processes and Threads</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>guide/topics/security/permissions.html">
+ <span class="en">Permissions</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>guide/topics/appwidgets/index.html">
+ <span class="en">App Widgets</span>
</a></li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/manifest/manifest-intro.html">
- <span class="en">The AndroidManifest.xml File</span>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/manifest/manifest-intro.html">
+ <span class="en">Android Manifest</span>
</a></div>
<ul>
<li><a href="<?cs var:toroot ?>guide/topics/manifest/action-element.html">&lt;action&gt;</a></li>
@@ -264,86 +108,260 @@ class="new">&nbsp;new!</span></span>
<li><a href="<?cs var:toroot ?>guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a></li>
<li><a href="<?cs var:toroot ?>guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk&gt;</a></li>
</ul>
- </li><!-- end of the manifest file -->
+ </li><!-- end of the manifest file -->
+
</ul>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/ui/index.html">
+ <span class="en">User Interface</span>
+ </a></div>
<ul>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/graphics/index.html">
- <span class="en">Graphics</span>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/overview.html">
+ <span class="en">Overview</span>
+ </a></li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/ui/declaring-layout.html">
+ <span class="en">Layouts</span>
</a></div>
<ul>
- <li><a href="<?cs var:toroot ?>guide/topics/graphics/2d-graphics.html">
- <span class="en">Canvas and Drawables</span></a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/graphics/hardware-accel.html">
- <span class="en">Hardware Acceleration</span></a>
- </li>
- <li><a href="<?cs var:toroot ?>guide/topics/graphics/opengl.html">
- <span class="en">OpenGL</span>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/layout/linear.html">
+ <span class="en">Linear Layout</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/layout/relative.html">
+ <span class="en">Relative Layout</span>
+ </a></li>
+ <!--
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/layout/grid.html">
+ <span class="en">Grid Layout</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/layout/tabs.html">
+ <span class="en">Tab Layout</span>
+ </a></li>
+ -->
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/layout/listview.html">
+ <span class="en">List View</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/layout/gridview.html">
+ <span class="en">Grid View</span>
</a></li>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/graphics/animation.html">
- <span class="en">Animation</span>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/ui/controls.html">
+ <span class="en">Input Controls</span>
</a></div>
<ul>
- <li><a href="<?cs var:toroot ?>guide/topics/graphics/prop-animation.html">
- <span class="en">Property Animation</span></a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/graphics/view-animation.html">
- <span class="en">View Animation</span></a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/graphics/drawable-animation.html">
- <span class="en">Drawable Animation</span></a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/controls/button.html">
+ <span class="en">Buttons</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/controls/text.html">
+ <span class="en">Text Fields</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/controls/checkbox.html">
+ <span class="en">Checkboxes</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/controls/radiobutton.html">
+ <span class="en">Radio Buttons</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/controls/togglebutton.html">
+ <span class="en">Toggle Buttons</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/controls/spinner.html">
+ <span class="en">Spinners</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/controls/pickers.html">
+ <span class="en">Pickers</span>
+ </a></li>
+<!--
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/controls/progress.html">
+ <span class="en">Seek and Progress Bars</span>
+ </a></li>
+-->
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/renderscript/index.html">
- <span class="en">Renderscript</span></a>
- </div>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/ui-events.html">
+ <span class="en">Input Events</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/menus.html">
+ <span class="en">Menus</span></span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/dialogs.html">
+ <span class="en">Dialogs</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/actionbar.html">
+ <span class="en">Action Bar</span>
+ </a></li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/ui/notifiers/index.html">
+ <span class="en">Notifications</span>
+ </a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/notifiers/toasts.html">
+ <span class="en">Toast Notifications</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/notifiers/notifications.html">
+ <span class="en">Status Notifications</span>
+ </a></li>
+ </ul>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/search/index.html">
+ <span class="en">Search</span>
+ </a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>guide/topics/search/search-dialog.html">Creating a Search Interface</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/search/adding-recent-query-suggestions.html">Adding Recent Query Suggestions</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/search/adding-custom-suggestions.html">Adding Custom Suggestions</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/search/searchable-config.html">Searchable Configuration</a></li>
+ </ul>
+ </li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/drag-drop.html">
+ <span class="en">Drag and Drop</span>
+ </a></li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/ui/accessibility/index.html">
+ <span class="en">Accessibility</span>
+ </a></div>
<ul>
- <li><a href="<?cs var:toroot ?>guide/topics/renderscript/graphics.html">
- <span class="en">Graphics</span>
- </a>
- </li>
- <li><a href="<?cs var:toroot ?>guide/topics/renderscript/compute.html">
- <span class="en">Compute</span>
- </a>
- </li>
- <li><a href="<?cs var:toroot ?>guide/topics/renderscript/reference.html">
- <span class="en">Runtime API Reference</span>
- </a>
- </li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/accessibility/apps.html">
+ <span class="en">Making Applications Accessible</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/accessibility/services.html">
+ <span class="en">Building Accessibility Services</span>
+ </a></li>
</ul>
</li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/themes.html">
+ <span class="en">Styles and Themes</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/ui/custom-components.html">
+ <span class="en">Custom Components</span>
+ </a></li>
+ </ul>
+ </li><!-- end of User Interface -->
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/resources/index.html">
+ <span class="en">App Resources</span>
+ </a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>guide/topics/resources/overview.html">
+ <span class="en">Overview</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/resources/providing-resources.html">
+ <span class="en">Providing Resources</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/resources/accessing-resources.html">
+ <span class="en">Accessing Resources</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/resources/runtime-changes.html">
+ <span class="en">Handling Runtime Changes</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/resources/localization.html">
+ <span class="en">Localization</span>
+ </a></li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/resources/available-resources.html">
+ <span class="en">Resource Types</span>
+ </a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>guide/topics/resources/animation-resource.html">Animation</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/resources/color-list-resource.html">Color State List</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/resources/drawable-resource.html">Drawable</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/resources/layout-resource.html">Layout</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/resources/menu-resource.html">Menu</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/resources/string-resource.html">String</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/resources/style-resource.html">Style</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/resources/more-resources.html">More Types</a></li>
+ </ul>
+ </li><!-- end of resource types -->
+ </ul>
+ </li><!-- end of app resources -->
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/graphics/index.html">
+ <span class="en">Animation and Graphics</span>
+ </a></div>
+ <ul>
+ <li class="nav-section">
+ <li><a href="<?cs var:toroot ?>guide/topics/graphics/overview.html">
+ <span class="en">Overview</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/graphics/prop-animation.html">
+ <span class="en">Property Animation</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/graphics/view-animation.html">
+ <span class="en">View Animation</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/graphics/drawable-animation.html">
+ <span class="en">Drawable Animation</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/graphics/2d-graphics.html">
+ <span class="en">Canvas and Drawables</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/graphics/opengl.html">
+ <span class="en">OpenGL</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/graphics/hardware-accel.html">
+ <span class="en">Hardware Acceleration</span>
+ </a></li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/graphics/renderscript/index.html">
+ <span class="en">Renderscript</span>
+ </a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>guide/topics/graphics/renderscript/graphics.html">
+ <span class="en">Graphics</span></a>
+ </li>
+ <li><a href="<?cs var:toroot ?>guide/topics/graphics/renderscript/compute.html">
+ <span class="en">Compute</span></a>
+ </li>
+ <li><a href="<?cs var:toroot ?>guide/topics/graphics/renderscript/reference.html">
+ <span class="en">Runtime API Reference</span></a>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </li><!-- end of graphics and animation-->
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/media/index.html">
- <span class="en">Multimedia and Camera</span>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/media/index.html">
+ <span class="en">Media and Camera</span>
</a></div>
<ul>
<li><a href="<?cs var:toroot ?>guide/topics/media/mediaplayer.html">
<span class="en">Media Playback</span></a>
</li>
+ <li><a href="<?cs var:toroot ?>guide/appendix/media-formats.html">
+ <span class="en">Supported Media Formats</span></a>
+ </li>
+ <li><a href="<?cs var:toroot ?>guide/topics/media/audio-capture.html">
+ <span class="en">Audio Capture</span></a>
+ </li>
<li><a href="<?cs var:toroot ?>guide/topics/media/jetplayer.html">
<span class="en">JetPlayer</span></a>
</li>
<li><a href="<?cs var:toroot ?>guide/topics/media/camera.html">
<span class="en">Camera</span></a>
</li>
- <li><a href="<?cs var:toroot ?>guide/topics/media/audio-capture.html">
- <span class="en">Audio Capture</span></a>
- </li>
</ul>
- </li>
- <li>
- <a href="<?cs var:toroot ?>guide/topics/clipboard/copy-paste.html">
- <span class="en">Copy and Paste</span>
- </a></li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/sensors/index.html">
- <span class="en">Sensors</span>
+ </li><!-- end of media and camera -->
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/sensors/index.html">
+ <span class="en">Location and Sensors</span>
</a></div>
<ul>
+ <li><a href="<?cs var:toroot ?>guide/topics/location/index.html">
+ <span class="en">Location and Maps</span>
+ </a>
+ <li><a href="<?cs var:toroot ?>guide/topics/location/strategies.html">
+ <span class="en">Location Strategies</span>
+ </a></li>
<li><a href="<?cs var:toroot ?>guide/topics/sensors/sensors_overview.html">
<span class="en">Sensors Overview</span>
</a></li>
@@ -357,415 +375,127 @@ class="new">&nbsp;new!</span></span>
<span class="en">Environment Sensors</span>
</a></li>
</ul>
- </li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/topics/location/index.html">
- <span class="en">Location and Maps</span>
+ </li><!-- end of location and sensors -->
+
+
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/connectivity/index.html">
+ <span class="en">Connectivity</span>
</a></div>
<ul>
- <li><a href="<?cs var:toroot ?>guide/topics/location/obtaining-user-location.html">
- <span class="en">Obtaining User Location</span>
- </a></li>
- </ul>
- </li>
- <!--<li class="toggle-list">
- <div><a style="color:gray;">Wireless Controls</a></div>
- <ul>
- <li><a style="color:gray;">Wi-Fi</a></li>
- </ul>
- </li> -->
- <!--<li><a style="color:gray;">Localization</a></li> -->
- <li><a href="<?cs var:toroot ?>guide/topics/appwidgets/index.html">
- <span class="en">App Widgets</span></a>
- </li>
- <li><a href="<?cs var:toroot?>guide/topics/wireless/bluetooth.html">
- <span class="en">Bluetooth</span></a>
+ <li><a href="<?cs var:toroot?>guide/topics/connectivity/bluetooth.html">
+ <span class="en">Bluetooth</span>
+ </a>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot?>guide/topics/nfc/index.html">
- <span class="en">Near Field Communication</span></a>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot?>guide/topics/connectivity/nfc/index.html">
+ <span class="en">NFC</span></a>
</div>
<ul>
- <li><a href="<?cs var:toroot ?>guide/topics/nfc/nfc.html">NFC Basics</a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/nfc/advanced-nfc.html">Advanced NFC</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/connectivity/nfc/nfc.html">NFC Basics</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/connectivity/nfc/advanced-nfc.html">Advanced NFC</a></li>
</ul>
</li>
- <li><a href="<?cs var:toroot?>guide/topics/wireless/wifip2p.html">
+ <li><a href="<?cs var:toroot?>guide/topics/connectivity/wifip2p.html">
<span class="en">Wi-Fi Direct</span></a>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot?>guide/topics/usb/index.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot?>guide/topics/connectivity/usb/index.html">
<span class="en">USB</span></a>
</div>
<ul>
- <li><a href="<?cs var:toroot ?>guide/topics/usb/accessory.html">Accessory</a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/usb/host.html">Host</a></li>
- <li><a href="<?cs var:toroot ?>guide/topics/usb/adk.html">Open Accessory Dev Kit</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/connectivity/usb/accessory.html">Accessory</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/connectivity/usb/host.html">Host</a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/connectivity/usb/adk.html">Open Accessory Dev Kit</a></li>
</ul>
- </li>
-
- <li><a href="<?cs var:toroot?>guide/topics/network/sip.html">
- <span class="en">Session Initiation Protocol</span>
- </a></li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot?>guide/topics/search/index.html">
- <span class="en">Search</span>
- </a></div>
- <ul>
- <li><a href="<?cs var:toroot?>guide/topics/search/search-dialog.html">Creating a Search Interface</a></li>
- <li><a href="<?cs var:toroot?>guide/topics/search/adding-recent-query-suggestions.html">Adding Recent Query Suggestions</a></li>
- <li><a href="<?cs var:toroot?>guide/topics/search/adding-custom-suggestions.html">Adding Custom Suggestions</a></li>
- <li><a href="<?cs var:toroot?>guide/topics/search/searchable-config.html">Searchable Configuration</a></li>
- </ul>
- </li>
- <li><a href="<?cs var:toroot?>guide/topics/admin/device-admin.html">
- <span class="en">Device Administration</span></a>
- </li>
- <li class="toggle-list">
- <div>
- <a href="<?cs var:toroot?>guide/topics/testing/index.html">
- <span class="en">Testing</span>
- </a>
- </div>
- <ul>
- <li>
- <a href="<?cs var:toroot?>guide/topics/testing/testing_android.html">
- <span class="en">Testing Fundamentals</span></a>
- </li>
- <li>
- <a href="<?cs var:toroot?>guide/topics/testing/activity_testing.html">
- <span class="en">Activity Testing</span></a>
- </li>
- <li>
- <a href="<?cs var:toroot?>guide/topics/testing/contentprovider_testing.html">
- <span class="en">Content Provider Testing</span></a>
- </li>
- <li>
- <a href="<?cs var:toroot?>guide/topics/testing/service_testing.html">
- <span class="en">Service Testing</span></a>
- </li>
- <li>
- <a href="<?cs var:toroot ?>guide/topics/testing/what_to_test.html">
- <span class="en">What To Test</span></a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
-
- <li>
- <h2>
- <span class="en">Google Play Topics</span>
- </h2>
- <ul>
- <li><a href="<?cs var:toroot ?>guide/publishing/publishing.html">
- <span class="en">Publishing on Google Play</span>
- </a></li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/market/licensing/index.html">
- <span class="en">Application Licensing</span></a>
- </div>
- <ul>
- <li><a href="<?cs var:toroot?>guide/market/licensing/overview.html">
- <span class="en">Licensing Overview</span></a>
- </li>
- <li><a href="<?cs var:toroot?>guide/market/licensing/setting-up.html">
- <span class="en">Setting Up for Licensing</span></a>
- </li>
- <li><a href="<?cs var:toroot?>guide/market/licensing/adding-licensing.html">
- <span class="en">Adding Licensing to Your App</span></a>
- </li>
- <li><a href="<?cs var:toroot?>guide/market/licensing/licensing-reference.html">
- <span class="en">Licensing Reference</span></a>
- </li>
- </ul>
- </li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot?>guide/market/billing/index.html">
- <span class="en">In-app Billing</span></a>
- </div>
- <ul>
- <li><a href="<?cs var:toroot?>guide/market/billing/billing_overview.html">
- <span class="en">In-app Billing Overview</span></a>
- </li>
- <li><a href="<?cs var:toroot?>guide/market/billing/billing_integrate.html">
- <span class="en">Implementing In-app Billing</span></a>
- </li>
- <li><a href="<?cs var:toroot?>guide/market/billing/billing_best_practices.html">
- <span class="en">Security and Design</span></a>
- </li>
- <li><a href="<?cs var:toroot?>guide/market/billing/billing_testing.html">
- <span class="en">Testing In-app Billing</span></a>
- </li>
- <li><a href="<?cs var:toroot?>guide/market/billing/billing_admin.html">
- <span class="en">Administering In-app Billing</span></a>
- </li>
- <li><a href="<?cs var:toroot?>guide/market/billing/billing_reference.html">
- <span class="en">In-app Billing Reference</span></a>
- </li>
- </ul>
- </li>
- <li><a href="<?cs var:toroot ?>guide/appendix/market-filters.html">
- <span class="en">Filters on Google Play</span></a>
- </li>
- <li><a href="<?cs var:toroot ?>guide/market/publishing/multiple-apks.html">
- <span class="en">Multiple APK Support</span></a>
- </li>
- <li><a href="<?cs var:toroot ?>guide/market/expansion-files.html">
- <span class="en">APK Expansion Files<span class="new">&nbsp;new!</span></span></a>
- </li>
- </ul>
- </li>
-
-
- <li>
- <span class="heading">
- <span class="en">Developing</span>
- <span class="de" style="display:none">Entwicklung</span>
- <span class="es" style="display:none">Desarrollo</span>
- <span class="fr" style="display:none">Développement</span>
- <span class="it" style="display:none">Sviluppo</span>
- <span class="ja" style="display:none">開発</span>
- <span class="zh-CN" style="display:none">开发</span>
- <span class="zh-TW" style="display:none">開發</span>
- </span>
- <ul>
- <!--<li><a href="">Developing for Android</a></li>
- signing, upgrading, selecting a package name, select device profile, touch, trackball, dpad available, etc. -->
- <li>
- <a href="<?cs var:toroot ?>guide/developing/index.html">
- <span class="en">Introduction</span></a>
- </li>
-
- <li class="toggle-list">
- <div>
- <a href="<?cs var:toroot ?>guide/developing/devices/index.html">
- <span class="en">Managing Virtual Devices</span>
- </a>
- </div>
- <ul>
- <li>
- <a href="<?cs var:toroot ?>guide/developing/devices/managing-avds.html">
- <span class="en">With AVD Manager</span>
- </a>
- </li>
- <li>
- <a href="<?cs var:toroot ?>guide/developing/devices/managing-avds-cmdline.html">
- <span class="en">From the Command Line</span>
- </a>
- </li>
- <li>
- <a href="<?cs var:toroot ?>guide/developing/devices/emulator.html">
- <span class="en">Using the Android Emulator</span>
- </a>
- </li>
- </ul>
- </li>
- <li>
- <a href="<?cs var:toroot ?>guide/developing/device.html">
- <span class="en">Using Hardware Devices</span>
- </a>
- </li>
-
- <li class="toggle-list">
- <div>
- <a href="<?cs var:toroot ?>guide/developing/projects/index.html">
- <span class="en">Managing Projects</span>
+ </li>
+ <li><a href="<?cs var:toroot?>guide/topics/connectivity/sip.html">
+ <span class="en">SIP</span>
</a>
- </div>
+ </li>
+
+ </ul>
+ </li><!-- end of connectivity -->
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/text/index.html">
+ <span class="en">Text and Input</span>
+ </a></div>
<ul>
- <li>
- <a href="<?cs var:toroot ?>guide/developing/projects/projects-eclipse.html">
- <span class="en">From Eclipse with ADT</span>
- </a>
- </li>
- <li>
- <a href="<?cs var:toroot ?>guide/developing/projects/projects-cmdline.html">
- <span class="en">From the Command Line</span>
- </a>
- </li>
+ <li><a href="<?cs var:toroot ?>guide/topics/text/copy-paste.html">
+ <span class="en">Copy and Paste</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/text/creating-input-method.html">
+ <span class="en">Creating an IME</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/text/spell-checker-framework.html">
+ <span class="en">Spelling Checker</span>
+ </a></li>
</ul>
- </li>
-
- <li class="toggle-list">
- <div>
- <a href="<?cs var:toroot ?>guide/developing/building/index.html">
- <span class="en">Building and Running</span>
- </a>
- </div>
- <ul>
- <li><a href="<?cs var:toroot ?>guide/developing/building/building-eclipse.html">
- <span class="en">From Eclipse with ADT</span>
+ </li><!-- end of text and input -->
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/data/index.html">
+ <span class="en">Data Storage</span>
+ </a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>guide/topics/data/data-storage.html">
+ <span class="en">Storage Options</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/topics/data/backup.html">
+ <span class="en">Data Backup</span>
</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/building/building-cmdline.html">
- <span class="en">From the Command Line</span></a></li>
- </ul>
- </li>
-
- <li class="toggle-list">
- <div>
- <a href="<?cs var:toroot ?>guide/developing/debugging/index.html">
- <span class="en">Debugging</span>
- </a>
- </div>
- <ul>
- <li>
- <a href="<?cs var:toroot ?>guide/developing/debugging/debugging-projects.html">
- <span class="en">From Eclipse with ADT</span>
- </a>
- </li>
- <li>
- <a href="<?cs var:toroot ?>guide/developing/debugging/debugging-projects-cmdline.html">
- <span class="en">From Other IDEs</span>
- </a>
- </li>
- <li>
- <a href="<?cs var:toroot ?>guide/developing/debugging/ddms.html">
- <span class="en">Using DDMS</span>
- </a>
- </li>
- <li>
- <a href="<?cs var:toroot ?>guide/developing/debugging/debugging-log.html">
- <span class="en">Reading and Writing Logs</span>
- </a>
- </li>
- <li>
- <a href="<?cs var:toroot ?>guide/developing/debugging/debugging-ui.html">
- <span class="en">Debugging and Profiling UIs</span>
- </a>
- </li>
- <li>
- <a href="<?cs var:toroot ?>guide/developing/debugging/debugging-tracing.html">
- <span class="en">Profiling with Traceview and dmtracedump</span>
- </a>
- </li>
- <li>
- <a href="<?cs var:toroot ?>guide/developing/debugging/debugging-devtools.html">
- <span class="en">Using the Dev Tools App</span>
- </a>
- </li>
- </ul>
- </li>
+ <li><a href="<?cs var:toroot ?>guide/topics/data/install-location.html">
+ <span class="en">App Install Location</span>
+ </a></li>
+ </ul>
+ </li><!-- end of data storage -->
- <li class="toggle-list">
- <div>
- <a href="<?cs var:toroot ?>guide/developing/testing/index.html">
- <span class="en">Testing</span>
- </a>
- </div>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot?>guide/topics/admin/index.html">
+ <span class="en">Administration</span>
+ </a></div>
<ul>
<li>
- <a href="<?cs var:toroot ?>guide/developing/testing/testing_eclipse.html">
- <span class="en">From Eclipse with ADT</span>
- </a>
+ <a href="<?cs var:toroot?>guide/topics/admin/device-admin.html">
+ <span class="en">Device Policies</span></a>
</li>
-
+ <!--
<li>
- <a href="<?cs var:toroot ?>guide/developing/testing/testing_otheride.html">
- <span class="en">From Other IDEs</span>
- </a>
+ <a href="<?cs var:toroot?>guide/topics/admin/keychain.html">
+ <span class="en">Certificate Store</span></a>
</li>
+ -->
</ul>
- </li>
-
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/developing/tools/index.html">
- <span class="en">Tools</span>
- </a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/adb.html">adb</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/adt.html">ADT</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/android.html">android</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/bmgr.html">bmgr</a>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/dmtracedump.html">dmtracedump</a></li>
- <li><a href="<?cs var:toroot?>guide/developing/tools/draw9patch.html">Draw
- 9-Patch</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/emulator.html">Emulator</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/etc1tool.html">etc1tool</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/hierarchy-viewer.html">Hierarchy Viewer</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/hprof-conv.html">hprof-conv</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/layoutopt.html">layoutopt</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/logcat.html">logcat</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/mksdcard.html">mksdcard</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/monkey.html">Monkey</a></li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/developing/tools/monkeyrunner_concepts.html">
- <span class="en">monkeyrunner</span>
- </a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/MonkeyDevice.html">
- <span class="en">MonkeyDevice</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/MonkeyImage.html">
- <span class="en">MonkeyImage</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/MonkeyRunner.html">
- <span class="en">MonkeyRunner</span>
- </a></li>
- </ul>
- </li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/proguard.html">ProGuard</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/adb.html#sqlite">sqlite3</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/traceview.html">Traceview</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/zipalign.html">zipalign</a></li>
- </ul>
- </li>
- </ul>
- </li>
-
- <li>
- <span class="heading">
- <span class="en">Publishing</span>
- <span class="de" style="display:none">Veröffentlichung</span>
- <span class="es" style="display:none">Publicación</span>
- <span class="fr" style="display:none">Publication</span>
- <span class="it" style="display:none">Pubblicazione</span>
- <span class="ja" style="display:none">公開</span>
- <span class="zh-CN" style="display:none">发布</span>
- <span class="zh-TW" style="display:none">發佈</span>
- </span>
+ </li><!-- end of administration -->
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/webapps/index.html">
+ <span class="en">Web Apps</span>
+ </a></div>
<ul>
- <li><a href="<?cs var:toroot ?>guide/publishing/publishing_overview.html">
- <span class="en">Publishing Overview</span>
+ <li><a href="<?cs var:toroot ?>guide/webapps/overview.html">
+ <span class="en">Overview</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/webapps/targeting.html">
+ <span class="en">Targeting Screens from Web Apps</span>
</a></li>
- <li><a href="<?cs var:toroot ?>guide/publishing/preparing.html">
- <span class="en">Preparing for Release</span>
- <span class="de" style="display:none">Vorbereitung auf die Veröffentlichung</span>
- <span class="es" style="display:none">Publicación de aplicaciones</span>
- <span class="fr" style="display:none">Préparation à la publication</span>
- <span class="it" style="display:none">Preparativi per la pubblicazione</span>
- <span class="ja" style="display:none">公開の準備</span>
- <span class="zh-CN" style="display:none">准备发布</span>
- <span class="zh-TW" style="display:none">準備發佈</span>
+ <li><a href="<?cs var:toroot ?>guide/webapps/webview.html">
+ <span class="en">Building Web Apps in WebView</span>
</a></li>
- <li><a href="<?cs var:toroot ?>guide/publishing/app-signing.html">
- <span class="en">Signing Your Applications</span>
- <span class="de" style="display:none">Signieren Ihrer Anwendungen</span>
- <span class="es" style="display:none">Firma de aplicaciones</span>
- <span class="fr" style="display:none">Attribution de votre signature <br />à vos
-applications</span>
- <span class="it" style="display:none">Firma delle applicazioni</span>
- <span class="ja" style="display:none">アプリケーションへの署名</span>
- <span class="zh-CN" style="display:none">应用程序签名</span>
- <span class="zh-TW" style="display:none">簽署應用程式</span>
+ <li><a href="<?cs var:toroot ?>guide/webapps/debugging.html">
+ <span class="en">Debugging Web Apps</span>
</a></li>
- <li><a href="<?cs var:toroot ?>guide/publishing/versioning.html">
- <span class="en">Versioning Your Applications</span>
- <span class="de" style="display:none">Versionsverwaltung für Ihre <br
-/>Anwendungen</span>
- <span class="es" style="display:none">Versiones de las aplicaciones</span>
- <span class="fr" style="display:none">Attribution d'une version à vos
-applications</span>
- <span class="it" style="display:none">Controllo versioni delle applicazioni</span>
- <span class="ja" style="display:none">アプリケーションのバージョニング</span>
- <span class="zh-CN" style="display:none">应用程序版本控制</span>
- <span class="zh-TW" style="display:none">應用程式版本設定</span>
+ <li><a href="<?cs var:toroot ?>guide/webapps/best-practices.html">
+ <span class="en">Best Practices for Web Apps</span>
</a></li>
</ul>
- </li>
-
- <li>
- <span class="heading">
+ </li><!-- end of web apps -->
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/practices/index.html">
<span class="en">Best Practices</span>
<span class="de" style="display:none">Bewährte Verfahren</span>
<span class="es" style="display:none">Prácticas recomendadas</span>
@@ -774,13 +504,13 @@ applications</span>
<span class="ja" style="display:none">ベスト プラクティス</span>
<span class="zh-CN" style="display:none">最佳实践</span>
<span class="zh-TW" style="display:none">最佳實務</span>
- </span>
+ </div></a>
<ul>
<li><a href="<?cs var:toroot ?>guide/practices/compatibility.html">
<span class="en">Compatibility</span>
</a></li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/practices/screens_support.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/practices/screens_support.html">
<span class="en">Supporting Multiple Screens</span>
</a></div>
<ul>
@@ -790,21 +520,114 @@ applications</span>
<li><a href="<?cs var:toroot ?>guide/practices/screen-compat-mode.html">
<span class="en">Screen Compatibility Mode</span>
</a></li>
- <li><a href="<?cs var:toroot ?>guide/practices/screens-support-1.5.html">
+ <!--<li><a href="<?cs var:toroot ?>guide/practices/screens-support-1.5.html">
<span class="en">Strategies for Android 1.5</span>
- </a></li>
+ </a></li> -->
</ul>
</li>
<li><a href="<?cs var:toroot ?>guide/practices/tablets-and-handsets.html">
<span class="en">Supporting Tablets and Handsets</span>
</a></li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/practices/ui_guidelines/index.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/practices/performance.html">
+ <span class="en">Designing for Performance</span>
+ </a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>guide/practices/jni.html">
+ <span class="en">JNI Tips</span>
+ </a></li>
+ </ul>
+ </li>
+ <li><a href="<?cs var:toroot ?>guide/practices/responsiveness.html">
+ <span class="en">Designing for Responsiveness</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/practices/seamlessness.html">
+ <span class="en">Designing for Seamlessness</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>guide/practices/security.html">
+ <span class="en">Designing for Security</span>
+ </a></li>
+
+ </ul>
+ </li>
+
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/google/index.html">
+ <span class="en">Google Services</span>
+ </a></div>
+ <ul>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot?>guide/google/play/billing/index.html">
+ <span class="en">In-app Billing</span></a>
+ </div>
+ <ul>
+ <li><a href="<?cs var:toroot?>guide/google/play/billing/billing_overview.html">
+ <span class="en">In-app Billing Overview</span></a>
+ </li>
+ <li><a href="<?cs var:toroot?>guide/google/play/billing/billing_integrate.html">
+ <span class="en">Implementing In-app Billing</span></a>
+ </li>
+ <li><a href="<?cs var:toroot?>guide/google/play/billing/billing_subscriptions.html">
+ <span class="en">Subscriptions</span></a>
+ </li>
+ <li><a href="<?cs var:toroot?>guide/google/play/billing/billing_best_practices.html">
+ <span class="en">Security and Design</span></a>
+ </li>
+ <li><a href="<?cs var:toroot?>guide/google/play/billing/billing_testing.html">
+ <span class="en">Testing In-app Billing</span></a>
+ </li>
+ <li><a href="<?cs var:toroot?>guide/google/play/billing/billing_admin.html">
+ <span class="en">Administering In-app Billing</span></a>
+ </li>
+ <li><a href="<?cs var:toroot?>guide/google/play/billing/billing_reference.html">
+ <span class="en">In-app Billing Reference</span></a>
+ </li>
+ </ul>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/google/play/licensing/index.html">
+ <span class="en">Application Licensing</span></a>
+ </div>
+ <ul>
+ <li><a href="<?cs var:toroot?>guide/google/play/licensing/overview.html">
+ <span class="en">Licensing Overview</span></a>
+ </li>
+ <li><a href="<?cs var:toroot?>guide/google/play/licensing/setting-up.html">
+ <span class="en">Setting Up for Licensing</span></a>
+ </li>
+ <li><a href="<?cs var:toroot?>guide/google/play/licensing/adding-licensing.html">
+ <span class="en">Adding Licensing to Your App</span></a>
+ </li>
+ <li><a href="<?cs var:toroot?>guide/google/play/licensing/licensing-reference.html">
+ <span class="en">Licensing Reference</span></a>
+ </li>
+ </ul>
+ </li>
+ <li><a href="<?cs var:toroot ?>guide/google/play/filters.html">
+ <span class="en">Filters on Google Play</span></a>
+ </li>
+ <li><a href="<?cs var:toroot ?>guide/google/play/publishing/multiple-apks.html">
+ <span class="en">Multiple APK Support</span></a>
+ </li>
+ <li><a href="<?cs var:toroot ?>guide/google/play/expansion-files.html">
+ <span class="en">APK Expansion Files</span></a>
+ </li>
+
+ </ul>
+ </li><!-- end Google Play -->
+
+
+
+ <!-- this needs to move
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/practices/ui_guidelines/index.html">
<span class="en">UI Guidelines</span>
</a></div>
<ul>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/practices/ui_guidelines/icon_design.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/practices/ui_guidelines/icon_design.html">
<span class="en">Icon Design</span>
</a></div>
<ul>
@@ -831,94 +654,47 @@ applications</span>
</a></li>
</ul>
</li>
- <li><a href="<?cs var:toroot ?>guide/practices/ui_guidelines/widget_design.html">
+ <li><div><a href="<?cs var:toroot ?>guide/practices/ui_guidelines/widget_design.html">
<span class="en">App Widget Design</span>
- </a></li>
- </ul>
- </li>
- </ul>
- <ul>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>guide/practices/design/performance.html">
- <span class="en">Designing for Performance</span>
- </a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>guide/practices/design/jni.html">
- <span class="en">JNI Tips</span>
- </a></li>
+ </a></div>
+ </li>
</ul>
- </li>
- <li><a href="<?cs var:toroot ?>guide/practices/design/responsiveness.html">
- <span class="en">Designing for Responsiveness</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/practices/design/seamlessness.html">
- <span class="en">Designing for Seamlessness</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/practices/security.html">
- <span class="en">Designing for Security</span></a>
- </li>
- </ul>
- </li>
-
- <li>
- <span class="heading">
- <span class="en">Web Applications</span>
- </span>
- <ul>
- <li><a href="<?cs var:toroot ?>guide/webapps/index.html">
- <span class="en">Web Apps Overview</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/webapps/targeting.html">
- <span class="en">Targeting Screens from Web Apps</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/webapps/webview.html">
- <span class="en">Building Web Apps in WebView</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/webapps/debugging.html">
- <span class="en">Debugging Web Apps</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/webapps/best-practices.html">
- <span class="en">Best Practices for Web Apps</span>
- </a></li>
- </ul>
- </li>
-
- <li>
- <span class="heading">
- <span class="en">Appendix</span>
- <span class="de" style="display:none">Anhang</span>
- <span class="es" style="display:none">Apéndice</span>
- <span class="fr" style="display:none">Annexes</span>
- <span class="it" style="display:none">Appendice</span>
- <span class="ja" style="display:none">付録</span>
- <span class="zh-CN" style="display:none">附录</span>
- <span class="zh-TW" style="display:none">附錄</span>
- </span>
+ </li>
+ </ul> -->
+
+<!-- Remove
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/appendix/index.html">
+ <span class="en">Appendix</span>
+ <span class="de" style="display:none">Anhang</span>
+ <span class="es" style="display:none">Apéndice</span>
+ <span class="fr" style="display:none">Annexes</span>
+ <span class="it" style="display:none">Appendice</span>
+ <span class="ja" style="display:none">付録</span>
+ <span class="zh-CN" style="display:none">附录</span>
+ <span class="zh-TW" style="display:none">附錄</span>
+ </a></div>
<ul>
- <li><a href="<?cs var:toroot ?>guide/appendix/api-levels.html">
- <span class="en">Android API Levels</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/appendix/install-location.html">
- <span class="en">App Install Location</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>guide/appendix/media-formats.html">
- <span class="en">Supported Media Formats</span>
- </a></li>
<li><a href="<?cs var:toroot ?>guide/appendix/g-app-intents.html">
<span class="en">Intents List: Google Apps</span>
</a></li>
- <li><a href="<?cs var:toroot ?>guide/developing/tools/aidl.html">AIDL</a></li>
+
+
<li><a href="<?cs var:toroot ?>guide/appendix/glossary.html">
<span class="en">Glossary</span>
</a></li>
</ul>
</li>
+</li>
+-->
</ul>
+
<script type="text/javascript">
<!--
buildToggleLists();
changeNavLang(getLangPref());
//-->
</script>
+
diff --git a/docs/html/guide/index.jd b/docs/html/guide/index.jd
index 8378472ec62f..fea7027d3684 100644
--- a/docs/html/guide/index.jd
+++ b/docs/html/guide/index.jd
@@ -1,88 +1,56 @@
-page.title=The Developer's Guide
-@jd:body
-
-<p>
-Welcome to the <i>Android Dev Guide</i>! The Dev Guide provides
-a practical introduction to developing applications for Android and documentation about major
-platform features. It explores the concepts behind Android, the framework for
-constructing an application, and the tools for developing,
-testing, and publishing software for the platform.
-</p>
-
-<p>
-The Dev Guide holds most of the documentation for the Android
-platform, except for reference material on the framework API.
-For API specifications, go to the
-<a href="{@docRoot}reference/packages.html">Reference</a>.
-</p>
-
-<p>
-As you can see in the panel on the left, the Dev Guide is
-divided into several sections:
-<p>
-
-<dl>
-<dt><b>Android Basics</b></dt>
-<dd>An initial orientation to Android &mdash; what it is,
-what it offers, and how your application fits in.</dd>
-
-<dt><b>Framework Topics</b></dt>
-<dd>Discussions of particular parts of the Android framework
-and API. For an introduction to the framework, begin with
-<a href="{@docRoot}guide/topics/fundamentals.html">Application
-Fundamentals</a>. Then explore other topics &mdash; from
-designing a user interface and setting up resources to storing
-data and using permissions &mdash; as needed.</dd>
-
-<dt><b>Google Play Topics</b></dt>
-<dd>Documentation for topics that concern publishing and monetizing applications on Google Play,
-such as how to enforce licensing policies and implement in-app billing.</dd>
-
-<dt><b>Developing</b></dt>
-<dd>Directions for using Android's development and debugging tools,
-and for testing the results.</dd>
+page.title=App Components
+page.landing=true
+page.landing.intro=Android's application framework lets you create extremely rich and innovative apps using a set of reusable components. This section explains how Android apps work and how you use components to build them.
+page.landing.image=images/ui/ui_index.png
-<dt><b>Publishing</b></dt>
-<dd>Instructions on how to prepare your application for deployment
-and how to publish it when it's ready.</dd>
-
-<dt><b>Best Practices</b></dt>
-<dd>Recommendations on preferred techniques for writing
-applications that perform efficiently and work well for the
-user.</dd>
-
-<dt><b>Web Applications</b></dt>
-<dd>Documentation about how to create web applications that work seamlessly on Android-powered
-devices and create Android applications that embed web-based content.</dd>
-
-<dt><b>Appendix</b></dt>
-<dd>Reference information and specifications, as well as FAQs,
-a glossary of terms, and other information.</dd>
-</dl>
-
-<p>
-The first step in programming for Android is downloading the SDK
-(software development kit). For instructions and information, visit the <a
-href="{@docRoot}sdk/index.html">SDK</a> tab.
-</p>
-
-<p>
-After you have the SDK, begin by looking through the Dev Guide.
-If you want to start by getting a quick look at some code, the
-<a href="{@docRoot}resources/tutorials/hello-world.html">Hello World</a>
-tutorial walks you through a standard "Hello, World" application to introduce some basics of an
-Android application. The
-<a href="{@docRoot}guide/topics/fundamentals.html">Application
-Fundamentals</a> document is a good place to start learning the basics about the application
-framework.
-</p>
-
-
-<p>
-For additional help, consider joining one or more of the Android
-discussion groups. Go to the
-<a href="{@docRoot}resources/community-groups.html">Developer Forums</a> page
-for more information.
-</p>
+@jd:body
-<p>To return to this page later, just click the "Dev Guide" tab while any Dev Guide page is loaded. </p> \ No newline at end of file
+<div class="landing-docs">
+
+ <div class="col-6">
+ <h3>Blog Articles</h3>
+
+ <a href="http://android-developers.blogspot.com/2012/05/using-dialogfragments.html">
+ <h4>Using DialogFragments</h4>
+ <p>In this post, I’ll show how to use DialogFragments with the v4 support library (for backward compatibility on pre-Honeycomb devices) to show a simple edit dialog and return a result to the calling Activity using an interface.</p>
+ </a>
+
+ <a href="http://android-developers.blogspot.com/2011/03/fragments-for-all.html">
+ <h4>Fragments For All</h4>
+ <p>Today we’ve released a static library that exposes the same Fragments API (as well as the new LoaderManager and a few other classes) so that applications compatible with Android 1.6 or later can use fragments to create tablet-compatible user interfaces. </p>
+ </a>
+
+ <a
+href="http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html">
+ <h4>Multithreading for Performance</h4>
+ <p>A good practice in creating responsive applications is to make sure your main UI thread
+does the minimum amount of work. Any potentially long task that may hang your application should be
+handled in a different thread.</p>
+ </a>
+ </div>
+
+ <div class="col-6">
+ <h3>Training</h3>
+
+ <a href="http://developer.android.com/training/basics/activity-lifecycle/index.html">
+ <h4>Managing the Activity Lifecycle</h4>
+ <p>This class explains important lifecycle callback methods that each Activity
+ instance receives and how you can use them so your activity does what the user expects and does not consume system
+ resources when your activity doesn't need them.</p>
+ </a>
+
+ <a href="http://developer.android.com/training/basics/fragments/index.html">
+ <h4>Building a Dynamic UI with Fragments</h4>
+ <p>This class shows you how to create a dynamic user experience with fragments and optimize
+your app's user experience for devices with different screen sizes, all while continuing to support
+devices running versions as old as Android 1.6.</p>
+ </a>
+
+ <a href="http://developer.android.com/training/sharing/index.html">
+ <h4>Sharing Content</h4>
+ <p>This class covers some common ways you can send and receive content between
+ applications using Intent APIs and the ActionProvider object.</p>
+ </a>
+ </div>
+
+</div> \ No newline at end of file
diff --git a/docs/html/guide/market/billing/billing_about.html b/docs/html/guide/market/billing/billing_about.html
deleted file mode 100644
index d8395df3bb67..000000000000
--- a/docs/html/guide/market/billing/billing_about.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh"
-content="0;url=http://developer.android.com/guide/market/billing/index.html">
-<title>Redirecting...</title>
-</head>
-<body>
-<p>You should be redirected. Please <a
-href="http://developer.android.com/guide/market/billing/index.html">click
-here</a>.</p>
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/guide/market/billing/index.jd b/docs/html/guide/market/billing/index.jd
deleted file mode 100755
index 036761f4e099..000000000000
--- a/docs/html/guide/market/billing/index.jd
+++ /dev/null
@@ -1,94 +0,0 @@
-page.title=In-app Billing
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-
- <h2>Topics</h2>
- <ol>
- <li><a href="{@docRoot}guide/market/billing/billing_overview.html">Overview of In-app
- Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_integrate.html">Implementing In-app
- Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_best_practices.html">Security and
- Design</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_testing.html">Testing In-app
- Billing</a></li>
- <li><a href="{@docRoot}guide/market/billing/billing_admin.html">Administering In-app
- Billing</a></li>
- </ol>
- <h2>Reference</h2>
- <ol>
- <li><a href="{@docRoot}guide/market/billing/billing_reference.html">In-app Billing
- Reference</a></li>
- </ol>
- <h2>Downloads</h2>
- <ol>
- <li><a href="{@docRoot}guide/market/billing/billing_integrate.html#billing-download">Sample
- Application</a></li>
- </ol>
-</div>
-</div>
-
-<p>Google Play In-app Billing is a Google Play service that lets you sell digital content in
-your applications. You can use the service to sell a wide range of content, including downloadable
-content such as media files or photos, and virtual content such as game levels or potions.</p>
-
-<p>When you use Google Play's in-app billing service to sell an item, Google Play handles all
-checkout details so your application never has to directly process any financial transactions.
-Google Play uses the same checkout service that is used for application purchases, so your users
-experience a consistent and familiar purchase flow (see figure 1). Also, the transaction fee for
-in-app purchases is the same as the transaction fee for application purchases (30%).</p>
-
-<p>Any application that you publish through Google Play can implement in-app billing. No special
-account or registration is required other than a Google Play app publisher account and a Google
-Checkout Merchant account. Also, because the service uses no dedicated framework APIs, you can add
-in-app billing to any application that uses a minimum API level of 4 or higher.</p>
-
-<p>To help you integrate in-app billing into your application, the Android SDK provides a sample
-application that demonstrates a simple implementation of in-app billing. The sample application
-contains examples of billing-related classes you can use to implement in-app billing in your
-application. It also contains examples of the database, user interface, and business logic you might
-use to implement in-app billing.</p>
-
-<p class="caution"><strong>Important</strong>: Although the sample application is a working example
-of how you can implement in-app billing, we <em>strongly recommend</em> that you modify and
-obfuscate the sample code before you use it in a production application. For more information, see
-<a href="{@docRoot}guide/market/billing/billing_best_practices.html">Security and Design</a>.</p>
-
-<img src="{@docRoot}images/billing_checkout_flow.png" height="382" id="figure1" />
-<p class="img-caption">
- <strong>Figure 1.</strong> Applications initiate in-app billing requests through their own UI
- (first screen). Google Play responds to the request by providing the checkout user interface
- (middle screen). When checkout is complete, the application resumes.
-</p>
-
-<p>To learn more about Google Play's in-app billing service and start integrating it into your
-applications, read the following documents:</p>
-
-<dl>
- <dt><strong><a href="{@docRoot}guide/market/billing/billing_overview.html">Overview of In-app
- Billing</a></strong></dt>
- <dd>Learn how the service works and what a typical in-app billing implementation looks
- like.</dd>
- <dt><strong><a href="{@docRoot}guide/market/billing/billing_integrate.html">Implementing
- In-app Billing</a></strong></dt>
- <dd>Use this step-by-step guide to start incorporating in-app billing into your
- application.</dd>
- <dt><strong><a href="{@docRoot}guide/market/billing/billing_best_practices.html">Security
- and Design</a></strong></dt>
- <dd>Review these best practices to help ensure that your in-app billing implementation is
- secure and well designed.</dd>
- <dt><strong><a href="{@docRoot}guide/market/billing/billing_testing.html">Testing In-app
- Billing</a></strong></dt>
- <dd>Understand how the in-app billing test tools work and learn how to test your in-app billing
- implementation.</dd>
- <dt><strong><a href="{@docRoot}guide/market/billing/billing_admin.html">Administering
- In-app Billing</a></strong></dt>
- <dd>Learn how to set up your product list, register test accounts, and handle refunds.</dd>
- <dt><strong><a href="{@docRoot}guide/market/billing/billing_reference.html">In-app Billing
- Reference</a></strong></dt>
- <dd>Get detailed information about Google Play response codes and the in-app billing
- interface.</dd>
-</dl>
-
diff --git a/docs/html/guide/practices/design/accessibility.html b/docs/html/guide/practices/app-design/accessibility.html
index 0fa7b3213dd9..0fa7b3213dd9 100644
--- a/docs/html/guide/practices/design/accessibility.html
+++ b/docs/html/guide/practices/app-design/accessibility.html
diff --git a/docs/html/guide/practices/design/index.jd b/docs/html/guide/practices/app-design/index.jd
index a818831e43e7..a818831e43e7 100644
--- a/docs/html/guide/practices/design/index.jd
+++ b/docs/html/guide/practices/app-design/index.jd
diff --git a/docs/html/guide/practices/design/jni.jd b/docs/html/guide/practices/app-design/jni.jd
index ddfa0e3991f5..ddfa0e3991f5 100644
--- a/docs/html/guide/practices/design/jni.jd
+++ b/docs/html/guide/practices/app-design/jni.jd
diff --git a/docs/html/guide/practices/design/performance.jd b/docs/html/guide/practices/app-design/performance.jd
index dd9b55407edd..078999becc39 100644
--- a/docs/html/guide/practices/design/performance.jd
+++ b/docs/html/guide/practices/app-design/performance.jd
@@ -379,7 +379,7 @@ code compiled for the ARM in the Nexus One won't run on the ARM in the G1.</p>
that you want to port to Android, not for "speeding up" parts of a Java app.</p>
<p>If you do need to use native code, you should read our
-<a href="{@docRoot}guide/practices/design/jni.html">JNI Tips</a>.</p>
+<a href="{@docRoot}guide/practices/jni.html">JNI Tips</a>.</p>
<p>(See also <em>Effective Java</em> item 54.)</p>
@@ -402,7 +402,7 @@ managed to optimize all your code away). We highly recommend you use Caliper
to run your own microbenchmarks.</p>
<p>You may also find
-<a href="{@docRoot}guide/developing/debugging/debugging-tracing.html">Traceview</a> useful
+<a href="{@docRoot}tools/debugging/debugging-tracing.html">Traceview</a> useful
for profiling, but it's important to realize that it currently disables the JIT,
which may cause it to misattribute time to code that the JIT may be able to win
back. It's especially important after making changes suggested by Traceview
diff --git a/docs/html/guide/practices/design/responsiveness.jd b/docs/html/guide/practices/app-design/responsiveness.jd
index a00e3aa65114..a00e3aa65114 100644
--- a/docs/html/guide/practices/design/responsiveness.jd
+++ b/docs/html/guide/practices/app-design/responsiveness.jd
diff --git a/docs/html/guide/practices/design/seamlessness.jd b/docs/html/guide/practices/app-design/seamlessness.jd
index 6c734264c1a9..ec6b7fdff73c 100644
--- a/docs/html/guide/practices/design/seamlessness.jd
+++ b/docs/html/guide/practices/app-design/seamlessness.jd
@@ -210,7 +210,7 @@ network connection. That's almost guaranteed to be much faster than a cell
network, so you'll want to change the settings on the emulator that simulate
slower network speeds. You can do this in Eclipse, in the "Emulator Settings"
tab of your launch configuration or via a <a
-href="{@docRoot}guide/developing/tools/emulator.html#netspeed">command-line
+href="{@docRoot}tools/help/emulator.html#netspeed">command-line
option</a> when starting the emulator.</p>
<h2 id="keyboard">Don't Assume Touchscreen or Keyboard</h2>
diff --git a/docs/html/guide/practices/compatibility.jd b/docs/html/guide/practices/compatibility.jd
index 5e514c4444c1..a2284bd03133 100644
--- a/docs/html/guide/practices/compatibility.jd
+++ b/docs/html/guide/practices/compatibility.jd
@@ -7,7 +7,7 @@ page.title=Android Compatibility
<h2>See also</h2>
<ol>
<li><a
-href="{@docRoot}guide/appendix/market-filters.html">Filtering on Google Play</a></li>
+href="{@docRoot}guide/google/play/filters.html">Filtering on Google Play</a></li>
<li><a
href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResources">Providing Alternative Resources</a></li>
<li><a
@@ -54,7 +54,7 @@ but the single most important characteristic of a compatible device is the
ability to install and correctly run an Android <code>.apk</code> file.</p>
<p>There is exactly one Android API for each <a
-href="{@docRoot}guide/appendix/api-levels.html">API level</a>, and it’s the same
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level</a>, and it’s the same
API no matter what kind of device it’s installed on. No parts of the API are
optional, and you never have to worry about parts of the API missing on some
devices. Every compatible Android device your app will land on will include
@@ -119,7 +119,7 @@ device.
<p style="margin-top:1em;">For information about other filters that you can
use to control the availability of your apps, see the
-<a href="{@docRoot}guide/appendix/market-filters.html">Filters on Google Play</a>
+<a href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a>
document.</p>
</div>
</div>
diff --git a/docs/html/guide/practices/index.html b/docs/html/guide/practices/index.html
deleted file mode 100644
index 4881acf44581..000000000000
--- a/docs/html/guide/practices/index.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=../index.html">
-</head>
-<body>
-<a href="../index.html">click here</a> if you are not redirected.
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/guide/practices/index.jd b/docs/html/guide/practices/index.jd
new file mode 100644
index 000000000000..e218b505159a
--- /dev/null
+++ b/docs/html/guide/practices/index.jd
@@ -0,0 +1,52 @@
+page.title=Best Practices
+page.landing=true
+page.landing.intro=Design and build apps the right way. Learn how to create apps that look great and perform well on as many devices as possible, from phones to tablets and more.
+page.landing.image=
+
+@jd:body
+
+<div class="landing-docs">
+
+ <div class="col-12">
+ <h3>Blog Articles</h3>
+
+ <a href="android-developers.blogspot.com/2010/10/improving-app-quality.html">
+ <h4>Improving App Quality</h4>
+ <p>One way of improving your app’s visibility in the ecosystem is by deploying well-targeted
+mobile advertising campaigns and cross-app promotions. However, there’s another time-tested method
+of fueling the impression-install-ranking cycle: improve the product!</p>
+ </a>
+
+ <a href="http://android-developers.blogspot.com/2012/01/say-goodbye-to-menu-button.html">
+ <h4>Say Goodbye to the Menu Button</h4>
+ <p>As Ice Cream Sandwich rolls out to more devices, it?s important that you begin to migrate
+your designs to the action bar in order to promote a consistent Android user experience.</p>
+ </a>
+
+ <a href="android-developers.blogspot.com/2011/07/new-tools-for-managing-screen-sizes.html">
+ <h4>New Tools For Managing Screen Sizes</h4>
+ <p>Android 3.2 includes new tools for supporting devices with a wide range of screen sizes.
+One important result is better support for a new size of screen; what is typically called a “7-inch”
+tablet. This release also offers several new APIs to simplify developers’ work in adjusting to
+different screen sizes.</p>
+ </a>
+
+ <a href="android-developers.blogspot.com/2011/03/identifying-app-installations.html">
+ <h4>Identifying App Installations</h4>
+ <p>It is very common, and perfectly reasonable, for a developer to want to track individual
+installations of their apps. It sounds plausible just to call TelephonyManager.getDeviceId() and use
+that value to identify the installation. There are problems with this</p>
+ </a>
+
+ <a
+href="http://android-developers.blogspot.com/2011/11/making-android-games-that-play-nice.html">
+ <h4>Making Android Games that Play Nice</h4>
+ <p>Making a game on Android is easy. Making a <em>great</em> game for a mobile, multitasking,
+often multi-core, multi-purpose system like Android is trickier. Even the best developers frequently
+make mistakes in the way they interact with the Android system and with other applications</p>
+ </a>
+
+ </div>
+
+
+</div> \ No newline at end of file
diff --git a/docs/html/guide/practices/jni.jd b/docs/html/guide/practices/jni.jd
new file mode 100644
index 000000000000..ddfa0e3991f5
--- /dev/null
+++ b/docs/html/guide/practices/jni.jd
@@ -0,0 +1,719 @@
+page.title=JNI Tips
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+ <li><a href="#JavaVM_and_JNIEnv">JavaVM and JNIEnv</a></li>
+ <li><a href="#threads">Threads</a></li>
+ <li><a href="#jclass_jmethodID_and_jfieldID">jclass, jmethodID, and jfieldID</a></li>
+ <li><a href="#local_and_global_references">Local and Global References</a></li>
+ <li><a href="#UTF_8_and_UTF_16_strings">UTF-8 and UTF-16 Strings</a></li>
+ <li><a href="#arrays">Primitive Arrays</a></li>
+ <li><a href="#region_calls">Region Calls</a></li>
+ <li><a href="#exceptions">Exceptions</a></li>
+ <li><a href="#extended_checking">Extended Checking</a> </li>
+ <li><a href="#native_libraries">Native Libraries</a></li>
+ <li><a href="#64_bit">64-bit Considerations</a></li>
+ <li><a href="#unsupported">Unsupported Features/Backwards Compatibility</a></li>
+ <li><a href="#faq_ULE">FAQ: Why do I get <code>UnsatisfiedLinkError</code></a></li>
+ <li><a href="#faq_FindClass">FAQ: Why didn't <code>FindClass</code> find my class?</a></li>
+ <li><a href="#faq_sharing">FAQ: How do I share raw data with native code?</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>JNI is the Java Native Interface. It defines a way for managed code
+(written in the Java programming language) to interact with native
+code (written in C/C++). It's vendor-neutral, has support for loading code from
+dynamic shared libraries, and while cumbersome at times is reasonably efficient.</p>
+
+<p>You really should read through the
+<a href="http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/jniTOC.html">JNI spec for J2SE 6</a>
+to get a sense for how JNI works and what features are available. Some
+aspects of the interface aren't immediately obvious on
+first reading, so you may find the next few sections handy.
+There's a more detailed <a href="http://java.sun.com/docs/books/jni/html/jniTOC.html">JNI Programmer's Guide and Specification</a>.</p>
+
+
+<a name="JavaVM_and_JNIEnv" id="JavaVM_and_JNIEnv"></a>
+<h2>JavaVM and JNIEnv</h2>
+
+<p>JNI defines two key data structures, "JavaVM" and "JNIEnv". Both of these are essentially
+pointers to pointers to function tables. (In the C++ version, they're classes with a
+pointer to a function table and a member function for each JNI function that indirects through
+the table.) The JavaVM provides the "invocation interface" functions,
+which allow you to create and destroy a JavaVM. In theory you can have multiple JavaVMs per process,
+but Android only allows one.</p>
+
+<p>The JNIEnv provides most of the JNI functions. Your native functions all receive a JNIEnv as
+the first argument.</p>
+
+<p>The JNIEnv is used for thread-local storage. For this reason, <strong>you cannot share a JNIEnv between threads</strong>.
+If a piece of code has no other way to get its JNIEnv, you should share
+the JavaVM, and use <code>GetEnv</code> to discover the thread's JNIEnv. (Assuming it has one; see <code>AttachCurrentThread</code> below.)</p>
+
+<p>The C declarations of JNIEnv and JavaVM are different from the C++
+declarations. The <code>"jni.h"</code> include file provides different typedefs
+depending on whether it's included into C or C++. For this reason it's a bad idea to
+include JNIEnv arguments in header files included by both languages. (Put another way: if your
+header file requires <code>#ifdef __cplusplus</code>, you may have to do some extra work if anything in
+that header refers to JNIEnv.)</p>
+
+<a name="threads" id="threads"></a>
+<h2>Threads</h2>
+
+<p>All threads are Linux threads, scheduled by the kernel. They're usually
+started from managed code (using <code>Thread.start</code>),
+but they can also be created elsewhere and then attached to the JavaVM. For
+example, a thread started with <code>pthread_create</code> can be attached
+with the JNI <code>AttachCurrentThread</code> or
+<code>AttachCurrentThreadAsDaemon</code> functions. Until a thread is
+attached, it has no JNIEnv, and <strong>cannot make JNI calls</strong>.</p>
+
+<p>Attaching a natively-created thread causes a <code>java.lang.Thread</code>
+object to be constructed and added to the "main" <code>ThreadGroup</code>,
+making it visible to the debugger. Calling <code>AttachCurrentThread</code>
+on an already-attached thread is a no-op.</p>
+
+<p>Android does not suspend threads executing native code. If
+garbage collection is in progress, or the debugger has issued a suspend
+request, Android will pause the thread the next time it makes a JNI call.</p>
+
+<p>Threads attached through JNI <strong>must call
+<code>DetachCurrentThread</code> before they exit</strong>.
+If coding this directly is awkward, in Android 2.0 (Eclair) and higher you
+can use <code>pthread_key_create</code> to define a destructor
+function that will be called before the thread exits, and
+call <code>DetachCurrentThread</code> from there. (Use that
+key with <code>pthread_setspecific</code> to store the JNIEnv in
+thread-local-storage; that way it'll be passed into your destructor as
+the argument.)</p>
+
+
+<a name="jclass_jmethodID_and_jfieldID" id="jclass_jmethodID_and_jfieldID"></a>
+<h2>jclass, jmethodID, and jfieldID</h2>
+
+<p>If you want to access an object's field from native code, you would do the following:</p>
+
+<ul>
+<li> Get the class object reference for the class with <code>FindClass</code></li>
+<li> Get the field ID for the field with <code>GetFieldID</code></li>
+<li> Get the contents of the field with something appropriate, such as
+<code>GetIntField</code></li>
+</ul>
+
+<p>Similarly, to call a method, you'd first get a class object reference and then a method ID. The IDs are often just
+pointers to internal runtime data structures. Looking them up may require several string
+comparisons, but once you have them the actual call to get the field or invoke the method
+is very quick.</p>
+
+<p>If performance is important, it's useful to look the values up once and cache the results
+in your native code. Because there is a limit of one JavaVM per process, it's reasonable
+to store this data in a static local structure.</p>
+
+<p>The class references, field IDs, and method IDs are guaranteed valid until the class is unloaded. Classes
+are only unloaded if all classes associated with a ClassLoader can be garbage collected,
+which is rare but will not be impossible in Android. Note however that
+the <code>jclass</code>
+is a class reference and <strong>must be protected</strong> with a call
+to <code>NewGlobalRef</code> (see the next section).</p>
+
+<p>If you would like to cache the IDs when a class is loaded, and automatically re-cache them
+if the class is ever unloaded and reloaded, the correct way to initialize
+the IDs is to add a piece of code that looks like this to the appropriate class:</p>
+
+<pre> /*
+ * We use a class initializer to allow the native code to cache some
+ * field offsets. This native function looks up and caches interesting
+ * class/field/method IDs. Throws on failure.
+ */
+ private static native void nativeInit();
+
+ static {
+ nativeInit();
+ }</pre>
+
+<p>Create a <code>nativeClassInit</code> method in your C/C++ code that performs the ID lookups. The code
+will be executed once, when the class is initialized. If the class is ever unloaded and
+then reloaded, it will be executed again.</p>
+
+<a name="local_and_global_references" id="local_and_global_references"></a>
+<h2>Local and Global References</h2>
+
+<p>Every argument passed to a native method, and almost every object returned
+by a JNI function is a "local reference". This means that it's valid for the
+duration of the current native method in the current thread.
+<strong>Even if the object itself continues to live on after the native method
+returns, the reference is not valid.</strong>
+<p>This applies to all sub-classes of <code>jobject</code>, including
+<code>jclass</code>, <code>jstring</code>, and <code>jarray</code>.
+(The runtime will warn you about most reference mis-uses when extended JNI
+checks are enabled.)</p>
+<p>The only way to get non-local references is via the functions
+<code>NewGlobalRef</code> and <code>NewWeakGlobalRef</code>.
+
+<p>If you want to hold on to a reference for a longer period, you must use
+a "global" reference. The <code>NewGlobalRef</code> function takes the
+local reference as an argument and returns a global one.
+The global reference is guaranteed to be valid until you call
+<code>DeleteGlobalRef</code>.</p>
+
+<p>This pattern is commonly used when caching a jclass returned
+from <code>FindClass</code>, e.g.:</p>
+<pre>jclass localClass = env-&gt;FindClass("MyClass");
+jclass globalClass = reinterpret_cast&lt;jclass&gt;(env-&gt;NewGlobalRef(localClass));</pre>
+
+<p>All JNI methods accept both local and global references as arguments.
+It's possible for references to the same object to have different values.
+For example, the return values from consecutive calls to
+<code>NewGlobalRef</code> on the same object may be different.
+<strong>To see if two references refer to the same object,
+you must use the <code>IsSameObject</code> function.</strong> Never compare
+references with <code>==</code> in native code.</p>
+
+<p>One consequence of this is that you
+<strong>must not assume object references are constant or unique</strong>
+in native code. The 32-bit value representing an object may be different
+from one invocation of a method to the next, and it's possible that two
+different objects could have the same 32-bit value on consecutive calls. Do
+not use <code>jobject</code> values as keys.</p>
+
+<p>Programmers are required to "not excessively allocate" local references. In practical terms this means
+that if you're creating large numbers of local references, perhaps while running through an array of
+objects, you should free them manually with
+<code>DeleteLocalRef</code> instead of letting JNI do it for you. The
+implementation is only required to reserve slots for
+16 local references, so if you need more than that you should either delete as you go or use
+<code>EnsureLocalCapacity</code>/<code>PushLocalFrame</code> to reserve more.</p>
+
+<p>Note that <code>jfieldID</code>s and <code>jmethodID</code>s are opaque
+types, not object references, and should not be passed to
+<code>NewGlobalRef</code>. The raw data
+pointers returned by functions like <code>GetStringUTFChars</code>
+and <code>GetByteArrayElements</code> are also not objects. (They may be passed
+between threads, and are valid until the matching Release call.)</p>
+
+<p>One unusual case deserves separate mention. If you attach a native
+thread with <code>AttachCurrentThread</code>, the code you are running will
+never automatically free local references until the thread detaches. Any local
+references you create will have to be deleted manually. In general, any native
+code that creates local references in a loop probably needs to do some manual
+deletion.</p>
+
+<a name="UTF_8_and_UTF_16_strings" id="UTF_8_and_UTF_16_strings"></a>
+<h2>UTF-8 and UTF-16 Strings</h2>
+
+<p>The Java programming language uses UTF-16. For convenience, JNI provides methods that work with <a href="http://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8">Modified UTF-8</a> as well. The
+modified encoding is useful for C code because it encodes \u0000 as 0xc0 0x80 instead of 0x00.
+The nice thing about this is that you can count on having C-style zero-terminated strings,
+suitable for use with standard libc string functions. The down side is that you cannot pass
+arbitrary UTF-8 data to JNI and expect it to work correctly.</p>
+
+<p>If possible, it's usually faster to operate with UTF-16 strings. Android
+currently does not require a copy in <code>GetStringChars</code>, whereas
+<code>GetStringUTFChars</code> requires an allocation and a conversion to
+UTF-8. Note that
+<strong>UTF-16 strings are not zero-terminated</strong>, and \u0000 is allowed,
+so you need to hang on to the string length as well as
+the jchar pointer.</p>
+
+<p><strong>Don't forget to <code>Release</code> the strings you <code>Get</code></strong>. The
+string functions return <code>jchar*</code> or <code>jbyte*</code>, which
+are C-style pointers to primitive data rather than local references. They
+are guaranteed valid until <code>Release</code> is called, which means they are not
+released when the native method returns.</p>
+
+<p><strong>Data passed to NewStringUTF must be in Modified UTF-8 format</strong>. A
+common mistake is reading character data from a file or network stream
+and handing it to <code>NewStringUTF</code> without filtering it.
+Unless you know the data is 7-bit ASCII, you need to strip out high-ASCII
+characters or convert them to proper Modified UTF-8 form. If you don't,
+the UTF-16 conversion will likely not be what you expect. The extended
+JNI checks will scan strings and warn you about invalid data, but they
+won't catch everything.</p>
+
+<a name="arrays" id="arrays"></a>
+<h2>Primitive Arrays</h2>
+
+<p>JNI provides functions for accessing the contents of array objects.
+While arrays of objects must be accessed one entry at a time, arrays of
+primitives can be read and written directly as if they were declared in C.</p>
+
+<p>To make the interface as efficient as possible without constraining
+the VM implementation, the <code>Get&lt;PrimitiveType&gt;ArrayElements</code>
+family of calls allows the runtime to either return a pointer to the actual elements, or
+allocate some memory and make a copy. Either way, the raw pointer returned
+is guaranteed to be valid until the corresponding <code>Release</code> call
+is issued (which implies that, if the data wasn't copied, the array object
+will be pinned down and can't be relocated as part of compacting the heap).
+<strong>You must <code>Release</code> every array you <code>Get</code>.</strong> Also, if the <code>Get</code>
+call fails, you must ensure that your code doesn't try to <code>Release</code> a NULL
+pointer later.</p>
+
+<p>You can determine whether or not the data was copied by passing in a
+non-NULL pointer for the <code>isCopy</code> argument. This is rarely
+useful.</p>
+
+<p>The <code>Release</code> call takes a <code>mode</code> argument that can
+have one of three values. The actions performed by the runtime depend upon
+whether it returned a pointer to the actual data or a copy of it:</p>
+
+<ul>
+ <li><code>0</code>
+ <ul>
+ <li>Actual: the array object is un-pinned.
+ <li>Copy: data is copied back. The buffer with the copy is freed.
+ </ul>
+ <li><code>JNI_COMMIT</code>
+ <ul>
+ <li>Actual: does nothing.
+ <li>Copy: data is copied back. The buffer with the copy
+ <strong>is not freed</strong>.
+ </ul>
+ <li><code>JNI_ABORT</code>
+ <ul>
+ <li>Actual: the array object is un-pinned. Earlier
+ writes are <strong>not</strong> aborted.
+ <li>Copy: the buffer with the copy is freed; any changes to it are lost.
+ </ul>
+</ul>
+
+<p>One reason for checking the <code>isCopy</code> flag is to know if
+you need to call <code>Release</code> with <code>JNI_COMMIT</code>
+after making changes to an array &mdash; if you're alternating between making
+changes and executing code that uses the contents of the array, you may be
+able to
+skip the no-op commit. Another possible reason for checking the flag is for
+efficient handling of <code>JNI_ABORT</code>. For example, you might want
+to get an array, modify it in place, pass pieces to other functions, and
+then discard the changes. If you know that JNI is making a new copy for
+you, there's no need to create another "editable" copy. If JNI is passing
+you the original, then you do need to make your own copy.</p>
+
+<p>It is a common mistake (repeated in example code) to assume that you can skip the <code>Release</code> call if
+<code>*isCopy</code> is false. This is not the case. If no copy buffer was
+allocated, then the original memory must be pinned down and can't be moved by
+the garbage collector.</p>
+
+<p>Also note that the <code>JNI_COMMIT</code> flag does <strong>not</strong> release the array,
+and you will need to call <code>Release</code> again with a different flag
+eventually.</p>
+
+
+<a name="region_calls" id="region_calls"></a>
+<h2>Region Calls</h2>
+
+<p>There is an alternative to calls like <code>Get&lt;Type&gt;ArrayElements</code>
+and <code>GetStringChars</code> that may be very helpful when all you want
+to do is copy data in or out. Consider the following:</p>
+
+<pre> jbyte* data = env-&gt;GetByteArrayElements(array, NULL);
+ if (data != NULL) {
+ memcpy(buffer, data, len);
+ env-&gt;ReleaseByteArrayElements(array, data, JNI_ABORT);
+ }</pre>
+
+<p>This grabs the array, copies the first <code>len</code> byte
+elements out of it, and then releases the array. Depending upon the
+implementation, the <code>Get</code> call will either pin or copy the array
+contents.
+The code copies the data (for perhaps a second time), then calls <code>Release</code>; in this case
+<code>JNI_ABORT</code> ensures there's no chance of a third copy.</p>
+
+<p>One can accomplish the same thing more simply:</p>
+<pre> env-&gt;GetByteArrayRegion(array, 0, len, buffer);</pre>
+
+<p>This has several advantages:</p>
+<ul>
+ <li>Requires one JNI call instead of 2, reducing overhead.
+ <li>Doesn't require pinning or extra data copies.
+ <li>Reduces the risk of programmer error &mdash; no risk of forgetting
+ to call <code>Release</code> after something fails.
+</ul>
+
+<p>Similarly, you can use the <code>Set&lt;Type&gt;ArrayRegion</code> call
+to copy data into an array, and <code>GetStringRegion</code> or
+<code>GetStringUTFRegion</code> to copy characters out of a
+<code>String</code>.
+
+
+<a name="exceptions" id="exceptions"></a>
+<h2>Exceptions</h2>
+
+<p><strong>You must not call most JNI functions while an exception is pending.</strong>
+Your code is expected to notice the exception (via the function's return value,
+<code>ExceptionCheck</code>, or <code>ExceptionOccurred</code>) and return,
+or clear the exception and handle it.</p>
+
+<p>The only JNI functions that you are allowed to call while an exception is
+pending are:</p>
+<ul>
+ <li><code>DeleteGlobalRef</code>
+ <li><code>DeleteLocalRef</code>
+ <li><code>DeleteWeakGlobalRef</code>
+ <li><code>ExceptionCheck</code>
+ <li><code>ExceptionClear</code>
+ <li><code>ExceptionDescribe</code>
+ <li><code>ExceptionOccurred</code>
+ <li><code>MonitorExit</code>
+ <li><code>PopLocalFrame</code>
+ <li><code>PushLocalFrame</code>
+ <li><code>Release&lt;PrimitiveType&gt;ArrayElements</code>
+ <li><code>ReleasePrimitiveArrayCritical</code>
+ <li><code>ReleaseStringChars</code>
+ <li><code>ReleaseStringCritical</code>
+ <li><code>ReleaseStringUTFChars</code>
+</ul>
+
+<p>Many JNI calls can throw an exception, but often provide a simpler way
+of checking for failure. For example, if <code>NewString</code> returns
+a non-NULL value, you don't need to check for an exception. However, if
+you call a method (using a function like <code>CallObjectMethod</code>),
+you must always check for an exception, because the return value is not
+going to be valid if an exception was thrown.</p>
+
+<p>Note that exceptions thrown by interpreted code do not unwind native stack
+frames, and Android does not yet support C++ exceptions.
+The JNI <code>Throw</code> and <code>ThrowNew</code> instructions just
+set an exception pointer in the current thread. Upon returning to managed
+from native code, the exception will be noted and handled appropriately.</p>
+
+<p>Native code can "catch" an exception by calling <code>ExceptionCheck</code> or
+<code>ExceptionOccurred</code>, and clear it with
+<code>ExceptionClear</code>. As usual,
+discarding exceptions without handling them can lead to problems.</p>
+
+<p>There are no built-in functions for manipulating the <code>Throwable</code> object
+itself, so if you want to (say) get the exception string you will need to
+find the <code>Throwable</code> class, look up the method ID for
+<code>getMessage "()Ljava/lang/String;"</code>, invoke it, and if the result
+is non-NULL use <code>GetStringUTFChars</code> to get something you can
+hand to <code>printf(3)</code> or equivalent.</p>
+
+
+<a name="extended_checking" id="extended_checking"></a>
+<h2>Extended Checking</h2>
+
+<p>JNI does very little error checking. Errors usually result in a crash. Android also offers a mode called CheckJNI, where the JavaVM and JNIEnv function table pointers are switched to tables of functions that perform an extended series of checks before calling the standard implementation.</p>
+
+<p>The additional checks include:</p>
+
+<ul>
+<li>Arrays: attempting to allocate a negative-sized array.</li>
+<li>Bad pointers: passing a bad jarray/jclass/jobject/jstring to a JNI call, or passing a NULL pointer to a JNI call with a non-nullable argument.</li>
+<li>Class names: passing anything but the “java/lang/String” style of class name to a JNI call.</li>
+<li>Critical calls: making a JNI call between a “critical” get and its corresponding release.</li>
+<li>Direct ByteBuffers: passing bad arguments to <code>NewDirectByteBuffer</code>.</li>
+<li>Exceptions: making a JNI call while there’s an exception pending.</li>
+<li>JNIEnv*s: using a JNIEnv* from the wrong thread.</li>
+<li>jfieldIDs: using a NULL jfieldID, or using a jfieldID to set a field to a value of the wrong type (trying to assign a StringBuilder to a String field, say), or using a jfieldID for a static field to set an instance field or vice versa, or using a jfieldID from one class with instances of another class.</li>
+<li>jmethodIDs: using the wrong kind of jmethodID when making a <code>Call*Method</code> JNI call: incorrect return type, static/non-static mismatch, wrong type for ‘this’ (for non-static calls) or wrong class (for static calls).</li>
+<li>References: using <code>DeleteGlobalRef</code>/<code>DeleteLocalRef</code> on the wrong kind of reference.</li>
+<li>Release modes: passing a bad release mode to a release call (something other than <code>0</code>, <code>JNI_ABORT</code>, or <code>JNI_COMMIT</code>).</li>
+<li>Type safety: returning an incompatible type from your native method (returning a StringBuilder from a method declared to return a String, say).</li>
+<li>UTF-8: passing an invalid <a href="http://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8">Modified UTF-8</a> byte sequence to a JNI call.</li>
+</ul>
+
+<p>(Accessibility of methods and fields is still not checked: access restrictions don't apply to native code.)</p>
+
+<p>There are several ways to enable CheckJNI.</p>
+
+<p>If you’re using the emulator, CheckJNI is on by default.</p>
+
+<p>If you have a rooted device, you can use the following sequence of commands to restart the runtime with CheckJNI enabled:</p>
+
+<pre>adb shell stop
+adb shell setprop dalvik.vm.checkjni true
+adb shell start</pre>
+
+<p>In either of these cases, you’ll see something like this in your logcat output when the runtime starts:</p>
+
+<pre>D AndroidRuntime: CheckJNI is ON</pre>
+
+<p>If you have a regular device, you can use the following command:</p>
+
+<pre>adb shell setprop debug.checkjni 1</pre>
+
+<p>This won’t affect already-running apps, but any app launched from that point on will have CheckJNI enabled. (Change the property to any other value or simply rebooting will disable CheckJNI again.) In this case, you’ll see something like this in your logcat output the next time an app starts:</p>
+
+<pre>D Late-enabling CheckJNI</pre>
+
+
+
+
+<a name="native_libraries" id="native_libraries"></a>
+<h2>Native Libraries</h2>
+
+<p>You can load native code from shared libraries with the standard
+<code>System.loadLibrary</code> call. The
+preferred way to get at your native code is:</p>
+
+<ul>
+<li> Call <code>System.loadLibrary</code> from a static class
+initializer. (See the earlier example, where one is used to call
+<code>nativeClassInit</code>.) The argument is the "undecorated"
+library name, so to load "libfubar.so" you would pass in "fubar".</li>
+<li> Provide a native function: <code><strong>jint JNI_OnLoad(JavaVM* vm, void* reserved)</strong></code></li>
+<li>In <code>JNI_OnLoad</code>, register all of your native methods. You
+should declare
+the methods "static" so the names don't take up space in the symbol table
+on the device.</li>
+</ul>
+
+<p>The <code>JNI_OnLoad</code> function should look something like this if
+written in C++:</p>
+<pre>jint JNI_OnLoad(JavaVM* vm, void* reserved)
+{
+ JNIEnv* env;
+ if (vm-&gt;GetEnv(reinterpret_cast&lt;void**&gt;(&env), JNI_VERSION_1_6) != JNI_OK) {
+ return -1;
+ }
+
+ // Get jclass with env-&gt;FindClass.
+ // Register methods with env-&gt;RegisterNatives.
+
+ return JNI_VERSION_1_6;
+}</pre>
+
+<p>You can also call <code>System.load</code> with the full path name of the
+shared library. For Android apps, you may find it useful to get the full
+path to the application's private data storage area from the context object.</p>
+
+<p>This is the recommended approach, but not the only approach. Explicit
+registration is not required, nor is it necessary that you provide a
+<code>JNI_OnLoad</code> function.
+You can instead use "discovery" of native methods that are named in a
+specific way (see <a href="http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/design.html#wp615">the JNI spec</a> for details), though this is less desirable because if a method signature is wrong you won't know
+about it until the first time the method is actually used.</p>
+
+<p>One other note about <code>JNI_OnLoad</code>: any <code>FindClass</code>
+calls you make from there will happen in the context of the class loader
+that was used to load the shared library. Normally <code>FindClass</code>
+uses the loader associated with the method at the top of the interpreted
+stack, or if there isn't one (because the thread was just attached) it uses
+the "system" class loader. This makes
+<code>JNI_OnLoad</code> a convenient place to look up and cache class
+object references.</p>
+
+
+<a name="64_bit" id="64_bit"></a>
+<h2>64-bit Considerations</h2>
+
+<p>Android is currently expected to run on 32-bit platforms. In theory it
+could be built for a 64-bit system, but that is not a goal at this time.
+For the most part this isn't something that you will need to worry about
+when interacting with native code,
+but it becomes significant if you plan to store pointers to native
+structures in integer fields in an object. To support architectures
+that use 64-bit pointers, <strong>you need to stash your native pointers in a
+<code>long</code> field rather than an <code>int</code></strong>.
+
+
+<a name="unsupported" id="unsupported"></a>
+<h2>Unsupported Features/Backwards Compatibility</h2>
+
+<p>All JNI 1.6 features are supported, with the following exception:</p>
+<ul>
+ <li><code>DefineClass</code> is not implemented. Android does not use
+ Java bytecodes or class files, so passing in binary class data
+ doesn't work.</li>
+</ul>
+
+<p>For backward compatibility with older Android releases, you may need to
+be aware of:</p>
+<ul>
+ <li><b>Dynamic lookup of native functions</b>
+ <p>Until Android 2.0 (Eclair), the '$' character was not properly
+ converted to "_00024" during searches for method names. Working
+ around this requires using explicit registration or moving the
+ native methods out of inner classes.
+ <li><b>Detaching threads</b>
+ <p>Until Android 2.0 (Eclair), it was not possible to use a <code>pthread_key_create</code>
+ destructor function to avoid the "thread must be detached before
+ exit" check. (The runtime also uses a pthread key destructor function,
+ so it'd be a race to see which gets called first.)
+ <li><b>Weak global references</b>
+ <p>Until Android 2.2 (Froyo), weak global references were not implemented.
+ Older versions will vigorously reject attempts to use them. You can use
+ the Android platform version constants to test for support.
+ <p>Until Android 4.0 (Ice Cream Sandwich), weak global references could only
+ be passed to <code>NewLocalRef</code>, <code>NewGlobalRef</code>, and
+ <code>DeleteWeakGlobalRef</code>. (The spec strongly encourages
+ programmers to create hard references to weak globals before doing
+ anything with them, so this should not be at all limiting.)
+ <p>From Android 4.0 (Ice Cream Sandwich) on, weak global references can be
+ used like any other JNI references.</li>
+ <li><b>Local references</b>
+ <p>Until Android 4.0 (Ice Cream Sandwich), local references were
+ actually direct pointers. Ice Cream Sandwich added the indirection
+ necessary to support better garbage collectors, but this means that lots
+ of JNI bugs are undetectable on older releases. See
+ <a href="http://android-developers.blogspot.com/2011/11/jni-local-reference-changes-in-ics.html">JNI Local Reference Changes in ICS</a> for more details.
+ <li><b>Determining reference type with <code>GetObjectRefType</code></b>
+ <p>Until Android 4.0 (Ice Cream Sandwich), as a consequence of the use of
+ direct pointers (see above), it was impossible to implement
+ <code>GetObjectRefType</code> correctly. Instead we used a heuristic
+ that looked through the weak globals table, the arguments, the locals
+ table, and the globals table in that order. The first time it found your
+ direct pointer, it would report that your reference was of the type it
+ happened to be examining. This meant, for example, that if
+ you called <code>GetObjectRefType</code> on a global jclass that happened
+ to be the same as the jclass passed as an implicit argument to your static
+ native method, you'd get <code>JNILocalRefType</code> rather than
+ <code>JNIGlobalRefType</code>.
+</ul>
+
+
+<a name="faq_ULE" id="faq_ULE"></a>
+<h2>FAQ: Why do I get <code>UnsatisfiedLinkError</code>?</h2>
+
+<p>When working on native code it's not uncommon to see a failure like this:</p>
+<pre>java.lang.UnsatisfiedLinkError: Library foo not found</pre>
+
+<p>In some cases it means what it says &mdash; the library wasn't found. In
+other cases the library exists but couldn't be opened by <code>dlopen(3)</code>, and
+the details of the failure can be found in the exception's detail message.</p>
+
+<p>Common reasons why you might encounter "library not found" exceptions:</p>
+<ul>
+ <li>The library doesn't exist or isn't accessible to the app. Use
+ <code>adb shell ls -l &lt;path&gt;</code> to check its presence
+ and permissions.
+ <li>The library wasn't built with the NDK. This can result in
+ dependencies on functions or libraries that don't exist on the device.
+</ul>
+
+<p>Another class of <code>UnsatisfiedLinkError</code> failures looks like:</p>
+<pre>java.lang.UnsatisfiedLinkError: myfunc
+ at Foo.myfunc(Native Method)
+ at Foo.main(Foo.java:10)</pre>
+
+<p>In logcat, you'll see:</p>
+<pre>W/dalvikvm( 880): No implementation found for native LFoo;.myfunc ()V</pre>
+
+<p>This means that the runtime tried to find a matching method but was
+unsuccessful. Some common reasons for this are:</p>
+<ul>
+ <li>The library isn't getting loaded. Check the logcat output for
+ messages about library loading.
+ <li>The method isn't being found due to a name or signature mismatch. This
+ is commonly caused by:
+ <ul>
+ <li>For lazy method lookup, failing to declare C++ functions
+ with <code>extern "C"</code> and appropriate
+ visibility (<code>JNIEXPORT</code>). Note that prior to Ice Cream
+ Sandwich, the JNIEXPORT macro was incorrect, so using a new GCC with
+ an old <code>jni.h</code> won't work.
+ You can use <code>arm-eabi-nm</code>
+ to see the symbols as they appear in the library; if they look
+ mangled (something like <code>_Z15Java_Foo_myfuncP7_JNIEnvP7_jclass</code>
+ rather than <code>Java_Foo_myfunc</code>), or if the symbol type is
+ a lowercase 't' rather than an uppercase 'T', then you need to
+ adjust the declaration.
+ <li>For explicit registration, minor errors when entering the
+ method signature. Make sure that what you're passing to the
+ registration call matches the signature in the log file.
+ Remember that 'B' is <code>byte</code> and 'Z' is <code>boolean</code>.
+ Class name components in signatures start with 'L', end with ';',
+ use '/' to separate package/class names, and use '$' to separate
+ inner-class names (<code>Ljava/util/Map$Entry;</code>, say).
+ </ul>
+</ul>
+
+<p>Using <code>javah</code> to automatically generate JNI headers may help
+avoid some problems.
+
+
+<a name="faq_FindClass" id="faq_FindClass"></a>
+<h2>FAQ: Why didn't <code>FindClass</code> find my class?</h2>
+
+<p>Make sure that the class name string has the correct format. JNI class
+names start with the package name and are separated with slashes,
+such as <code>java/lang/String</code>. If you're looking up an array class,
+you need to start with the appropriate number of square brackets and
+must also wrap the class with 'L' and ';', so a one-dimensional array of
+<code>String</code> would be <code>[Ljava/lang/String;</code>.</p>
+
+<p>If the class name looks right, you could be running into a class loader
+issue. <code>FindClass</code> wants to start the class search in the
+class loader associated with your code. It examines the call stack,
+which will look something like:
+<pre> Foo.myfunc(Native Method)
+ Foo.main(Foo.java:10)
+ dalvik.system.NativeStart.main(Native Method)</pre>
+
+<p>The topmost method is <code>Foo.myfunc</code>. <code>FindClass</code>
+finds the <code>ClassLoader</code> object associated with the <code>Foo</code>
+class and uses that.</p>
+
+<p>This usually does what you want. You can get into trouble if you
+create a thread yourself (perhaps by calling <code>pthread_create</code>
+and then attaching it with <code>AttachCurrentThread</code>).
+Now the stack trace looks like this:</p>
+<pre> dalvik.system.NativeStart.run(Native Method)</pre>
+
+<p>The topmost method is <code>NativeStart.run</code>, which isn't part of
+your application. If you call <code>FindClass</code> from this thread, the
+JavaVM will start in the "system" class loader instead of the one associated
+with your application, so attempts to find app-specific classes will fail.</p>
+
+<p>There are a few ways to work around this:</p>
+<ul>
+ <li>Do your <code>FindClass</code> lookups once, in
+ <code>JNI_OnLoad</code>, and cache the class references for later
+ use. Any <code>FindClass</code> calls made as part of executing
+ <code>JNI_OnLoad</code> will use the class loader associated with
+ the function that called <code>System.loadLibrary</code> (this is a
+ special rule, provided to make library initialization more convenient).
+ If your app code is loading the library, <code>FindClass</code>
+ will use the correct class loader.
+ <li>Pass an instance of the class into the functions that need
+ it, by declaring your native method to take a Class argument and
+ then passing <code>Foo.class</code> in.
+ <li>Cache a reference to the <code>ClassLoader</code> object somewhere
+ handy, and issue <code>loadClass</code> calls directly. This requires
+ some effort.
+</ul>
+
+
+<a name="faq_sharing" id="faq_sharing"></a>
+<h2>FAQ: How do I share raw data with native code?</h2>
+
+<p>You may find yourself in a situation where you need to access a large
+buffer of raw data from both managed and native code. Common examples
+include manipulation of bitmaps or sound samples. There are two
+basic approaches.</p>
+
+<p>You can store the data in a <code>byte[]</code>. This allows very fast
+access from managed code. On the native side, however, you're
+not guaranteed to be able to access the data without having to copy it. In
+some implementations, <code>GetByteArrayElements</code> and
+<code>GetPrimitiveArrayCritical</code> will return actual pointers to the
+raw data in the managed heap, but in others it will allocate a buffer
+on the native heap and copy the data over.</p>
+
+<p>The alternative is to store the data in a direct byte buffer. These
+can be created with <code>java.nio.ByteBuffer.allocateDirect</code>, or
+the JNI <code>NewDirectByteBuffer</code> function. Unlike regular
+byte buffers, the storage is not allocated on the managed heap, and can
+always be accessed directly from native code (get the address
+with <code>GetDirectBufferAddress</code>). Depending on how direct
+byte buffer access is implemented, accessing the data from managed code
+can be very slow.</p>
+
+<p>The choice of which to use depends on two factors:</p>
+<ol>
+ <li>Will most of the data accesses happen from code written in Java
+ or in C/C++?
+ <li>If the data is eventually being passed to a system API, what form
+ must it be in? (For example, if the data is eventually passed to a
+ function that takes a byte[], doing processing in a direct
+ <code>ByteBuffer</code> might be unwise.)
+</ol>
+
+<p>If there's no clear winner, use a direct byte buffer. Support for them
+is built directly into JNI, and performance should improve in future releases.</p>
diff --git a/docs/html/guide/practices/optimizing-for-3.0.jd b/docs/html/guide/practices/optimizing-for-3.0.jd
index d6c621ea4287..65c56744ce6a 100644
--- a/docs/html/guide/practices/optimizing-for-3.0.jd
+++ b/docs/html/guide/practices/optimizing-for-3.0.jd
@@ -53,7 +53,7 @@ onclick="$('#naMessage').hide();$('#deprecatedSticker').show()" />
<li><a href="tablets-and-handsets.html">Supporting Tablets
and Handsets</a></li>
<li><a
-href="{@docRoot}sdk/compatibility-library.html">Compatibility Library</a></li>
+href="{@docRoot}tools/extras/support-library.html">Compatibility Library</a></li>
<li><a href="http://code.google.com/p/iosched/">Google I/O App source code</a></li>
</ol>
@@ -108,7 +108,7 @@ SDK with the new platform:</p>
SDK starter package now</a>.)</p>
<ol>
- <li><a href="{@docRoot}sdk/adding-components.html#launching">Launch the Android SDK
+ <li><a href="{@docRoot}sdk/exploring.html#launching">Launch the Android SDK
Manager</a> and install the following:
<ul>
<li>SDK Platform Android 3.0</li>
@@ -280,15 +280,15 @@ use techniques such as reflection to check for the availability of certain APIs
to help you add features from Android 3.0 without requiring you to change your <a
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code android:minSdkVersion}</a>
or build target, we're providing a static library called the <a
-href="{@docRoot}sdk/compatibility-library.html">Compatibility Library</a>
+href="{@docRoot}tools/extras/support-library.html">Compatibility Library</a>
(downloadable from the Android SDK Manager).</p>
<p>This library includes APIs for <a
-href="{@docRoot}guide/topics/fundamentals/fragments.html">fragments</a>, <a
-href="{@docRoot}guide/topics/fundamentals/loaders.html">loaders</a>, and some updated classes. By
+href="{@docRoot}guide/components/fragments.html">fragments</a>, <a
+href="{@docRoot}guide/components/loaders.html">loaders</a>, and some updated classes. By
simply adding this library to your Android project, you can use these APIs in your application and
remain compatible with Android 1.6. For information about how to get the library and start
using it in your application, see the <a
-href="{@docRoot}sdk/compatibility-library.html">Compatibility Library</a> document.</p>
+href="{@docRoot}tools/extras/support-library.html">Compatibility Library</a> document.</p>
</div>
</div>
@@ -357,7 +357,7 @@ input events. Thus, instead of using one activity to select an article and anoth
read the article, the user can select an article and read it all within the same activity.</p>
<p>For more information, read the <a
-href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a> document.</p>
+href="{@docRoot}guide/components/fragments.html">Fragments</a> document.</p>
<h3>Use new animation APIs for transitions</h3>
@@ -374,7 +374,7 @@ New transformations are made possible with a set of object properties that defin
position, orientation, transparency and more.</p>
<p>For more information, read the <a
-href="{@docRoot}guide/topics/graphics/animation.html">Property Animation</a> document.</p>
+href="{@docRoot}guide/topics/graphics/prop-animation.html">Property Animation</a> document.</p>
<h3>Enable hardware acceleration</h3>
@@ -412,15 +412,15 @@ application, such as drag and drop APIs, new Bluetooth APIs, a system-wide clipb
new graphics engine called Renderscript, and more.</p>
<p>To learn more about the APIs mentioned above and more, see the <a
-href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a> document.</p>
+href="{@docRoot}about/versions/android-3.0.html">Android 3.0 Platform</a> document.</p>
<h3>Look at some samples</h3>
<p>Many of the new features and APIs that are described above and in the <a
-href="{@docRoot}sdk/android-3.0.html#api">Android 3.0 Platform</a> document also have accompanying
+href="{@docRoot}about/versions/android-3.0.html#api">Android 3.0 Platform</a> document also have accompanying
samples that allow you to preview the effects and can help you understand how to use them. To get
-the samples, download them from the SDK repository <a href="{@docRoot}sdk/adding-components.html"
+the samples, download them from the SDK repository <a href="{@docRoot}sdk/exploring.html"
>using the Android SDK Manager</a>. After downloading the samples ("Samples for SDK API
11"), you can find them in <code>&lt;sdk_root&gt;/samples/android-11/</code>. The following list
provides links to the browsable source code for some of the samples:</p>
@@ -474,7 +474,7 @@ android:targetSdkVersion}</a> set to {@code "4"} or higher, then the Android sys
application's layout and assets to fit the current device screen, whether the device screen is
smaller or larger than the one for which you originally designed your application. As such, you
should always test your application on real or <a
-href="{@docRoot}guide/developing/devices/index.html">virtual devices</a> with various screen sizes
+href="{@docRoot}tools/devices/index.html">virtual devices</a> with various screen sizes
and densities.</p>
<p>Although we recommend that you design your application to function properly on multiple
@@ -641,7 +641,7 @@ orientation. When the user rotates the screen, the system restarts the current a
onCreate()}) in immediate succession. You should design your activity to account for these changes
in the lifecycle, so the activity can save and restore its state. You can learn about the
necessary lifecycle callback methods and how to save and restore the activity state in the <a
-href="{@docRoot}guide/topics/fundamentals/activities.html#Lifecycle">Activities</a>
+href="{@docRoot}guide/components/activities.html#Lifecycle">Activities</a>
document. If your activity state is more complex and cannot retain it using the normal
lifecycle callback methods, you can use alternative techniques described in <a
href="{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime Changes</a>.</p>
diff --git a/docs/html/guide/practices/performance.jd b/docs/html/guide/practices/performance.jd
new file mode 100644
index 000000000000..078999becc39
--- /dev/null
+++ b/docs/html/guide/practices/performance.jd
@@ -0,0 +1,410 @@
+page.title=Designing for Performance
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+ <li><a href="#intro">Introduction</a></li>
+ <li><a href="#optimize_judiciously">Optimize Judiciously</a></li>
+ <li><a href="#object_creation">Avoid Creating Unnecessary Objects</a></li>
+ <li><a href="#myths">Performance Myths</a></li>
+ <li><a href="#prefer_static">Prefer Static Over Virtual</a></li>
+ <li><a href="#internal_get_set">Avoid Internal Getters/Setters</a></li>
+ <li><a href="#use_final">Use Static Final For Constants</a></li>
+ <li><a href="#foreach">Use Enhanced For Loop Syntax</a></li>
+ <li><a href="#package_inner">Consider Package Instead of Private Access with Inner Classes</a></li>
+ <li><a href="#avoidfloat">Use Floating-Point Judiciously</a> </li>
+ <li><a href="#library">Know And Use The Libraries</a></li>
+ <li><a href="#native_methods">Use Native Methods Judiciously</a></li>
+ <li><a href="#closing_notes">Closing Notes</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>An Android application will run on a mobile device with limited computing
+power and storage, and constrained battery life. Because of
+this, it should be <em>efficient</em>. Battery life is one reason you might
+want to optimize your app even if it already seems to run "fast enough".
+Battery life is important to users, and Android's battery usage breakdown
+means users will know if your app is responsible draining their battery.</p>
+
+<p>Note that although this document primarily covers micro-optimizations,
+these will almost never make or break your software. Choosing the right
+algorithms and data structures should always be your priority, but is
+outside the scope of this document.</p>
+
+<a name="intro" id="intro"></a>
+<h2>Introduction</h2>
+
+<p>There are two basic rules for writing efficient code:</p>
+<ul>
+ <li>Don't do work that you don't need to do.</li>
+ <li>Don't allocate memory if you can avoid it.</li>
+</ul>
+
+<h2 id="optimize_judiciously">Optimize Judiciously</h2>
+
+<p>This document is about Android-specific micro-optimization, so it assumes
+that you've already used profiling to work out exactly what code needs to be
+optimized, and that you already have a way to measure the effect (good or bad)
+of any changes you make. You only have so much engineering time to invest, so
+it's important to know you're spending it wisely.
+
+<p>(See <a href="#closing_notes">Closing Notes</a> for more on profiling and
+writing effective benchmarks.)
+
+<p>This document also assumes that you made the best decisions about data
+structures and algorithms, and that you've also considered the future
+performance consequences of your API decisions. Using the right data
+structures and algorithms will make more difference than any of the advice
+here, and considering the performance consequences of your API decisions will
+make it easier to switch to better implementations later (this is more
+important for library code than for application code).
+
+<p>(If you need that kind of advice, see Josh Bloch's <em>Effective Java</em>,
+item 47.)</p>
+
+<p>One of the trickiest problems you'll face when micro-optimizing an Android
+app is that your app is pretty much guaranteed to be running on multiple
+hardware platforms. Different versions of the VM running on different
+processors running at different speeds. It's not even generally the case
+that you can simply say "device X is a factor F faster/slower than device Y",
+and scale your results from one device to others. In particular, measurement
+on the emulator tells you very little about performance on any device. There
+are also huge differences between devices with and without a JIT: the "best"
+code for a device with a JIT is not always the best code for a device
+without.</p>
+
+<p>If you want to know how your app performs on a given device, you need to
+test on that device.</p>
+
+<a name="object_creation"></a>
+<h2>Avoid Creating Unnecessary Objects</h2>
+
+<p>Object creation is never free. A generational GC with per-thread allocation
+pools for temporary objects can make allocation cheaper, but allocating memory
+is always more expensive than not allocating memory.</p>
+
+<p>If you allocate objects in a user interface loop, you will force a periodic
+garbage collection, creating little "hiccups" in the user experience. The
+concurrent collector introduced in Gingerbread helps, but unnecessary work
+should always be avoided.</p>
+
+<p>Thus, you should avoid creating object instances you don't need to. Some
+examples of things that can help:</p>
+
+<ul>
+ <li>If you have a method returning a string, and you know that its result
+ will always be appended to a StringBuffer anyway, change your signature
+ and implementation so that the function does the append directly,
+ instead of creating a short-lived temporary object.</li>
+ <li>When extracting strings from a set of input data, try
+ to return a substring of the original data, instead of creating a copy.
+ You will create a new String object, but it will share the char[]
+ with the data. (The trade-off being that if you're only using a small
+ part of the original input, you'll be keeping it all around in memory
+ anyway if you go this route.)</li>
+</ul>
+
+<p>A somewhat more radical idea is to slice up multidimensional arrays into
+parallel single one-dimension arrays:</p>
+
+<ul>
+ <li>An array of ints is a much better than an array of Integers,
+ but this also generalizes to the fact that two parallel arrays of ints
+ are also a <strong>lot</strong> more efficient than an array of (int,int)
+ objects. The same goes for any combination of primitive types.</li>
+ <li>If you need to implement a container that stores tuples of (Foo,Bar)
+ objects, try to remember that two parallel Foo[] and Bar[] arrays are
+ generally much better than a single array of custom (Foo,Bar) objects.
+ (The exception to this, of course, is when you're designing an API for
+ other code to access; in those cases, it's usually better to trade
+ good API design for a small hit in speed. But in your own internal
+ code, you should try and be as efficient as possible.)</li>
+</ul>
+
+<p>Generally speaking, avoid creating short-term temporary objects if you
+can. Fewer objects created mean less-frequent garbage collection, which has
+a direct impact on user experience.</p>
+
+<a name="avoid_enums" id="avoid_enums"></a>
+<a name="myths" id="myths"></a>
+<h2>Performance Myths</h2>
+
+<p>Previous versions of this document made various misleading claims. We
+address some of them here.</p>
+
+<p>On devices without a JIT, it is true that invoking methods via a
+variable with an exact type rather than an interface is slightly more
+efficient. (So, for example, it was cheaper to invoke methods on a
+<code>HashMap map</code> than a <code>Map map</code>, even though in both
+cases the map was a <code>HashMap</code>.) It was not the case that this
+was 2x slower; the actual difference was more like 6% slower. Furthermore,
+the JIT makes the two effectively indistinguishable.</p>
+
+<p>On devices without a JIT, caching field accesses is about 20% faster than
+repeatedly accesssing the field. With a JIT, field access costs about the same
+as local access, so this isn't a worthwhile optimization unless you feel it
+makes your code easier to read. (This is true of final, static, and static
+final fields too.)
+
+<a name="prefer_static" id="prefer_static"></a>
+<h2>Prefer Static Over Virtual</h2>
+
+<p>If you don't need to access an object's fields, make your method static.
+Invocations will be about 15%-20% faster.
+It's also good practice, because you can tell from the method
+signature that calling the method can't alter the object's state.</p>
+
+<a name="internal_get_set" id="internal_get_set"></a>
+<h2>Avoid Internal Getters/Setters</h2>
+
+<p>In native languages like C++ it's common practice to use getters (e.g.
+<code>i = getCount()</code>) instead of accessing the field directly (<code>i
+= mCount</code>). This is an excellent habit for C++, because the compiler can
+usually inline the access, and if you need to restrict or debug field access
+you can add the code at any time.</p>
+
+<p>On Android, this is a bad idea. Virtual method calls are expensive,
+much more so than instance field lookups. It's reasonable to follow
+common object-oriented programming practices and have getters and setters
+in the public interface, but within a class you should always access
+fields directly.</p>
+
+<p>Without a JIT, direct field access is about 3x faster than invoking a
+trivial getter. With the JIT (where direct field access is as cheap as
+accessing a local), direct field access is about 7x faster than invoking a
+trivial getter. This is true in Froyo, but will improve in the future when
+the JIT inlines getter methods.</p>
+
+<p>Note that if you're using ProGuard, you can have the best
+of both worlds because ProGuard can inline accessors for you.</p>
+
+<a name="use_final" id="use_final"></a>
+<h2>Use Static Final For Constants</h2>
+
+<p>Consider the following declaration at the top of a class:</p>
+
+<pre>static int intVal = 42;
+static String strVal = "Hello, world!";</pre>
+
+<p>The compiler generates a class initializer method, called
+<code>&lt;clinit&gt;</code>, that is executed when the class is first used.
+The method stores the value 42 into <code>intVal</code>, and extracts a
+reference from the classfile string constant table for <code>strVal</code>.
+When these values are referenced later on, they are accessed with field
+lookups.</p>
+
+<p>We can improve matters with the "final" keyword:</p>
+
+<pre>static final int intVal = 42;
+static final String strVal = "Hello, world!";</pre>
+
+<p>The class no longer requires a <code>&lt;clinit&gt;</code> method,
+because the constants go into static field initializers in the dex file.
+Code that refers to <code>intVal</code> will use
+the integer value 42 directly, and accesses to <code>strVal</code> will
+use a relatively inexpensive "string constant" instruction instead of a
+field lookup. (Note that this optimization only applies to primitive types and
+<code>String</code> constants, not arbitrary reference types. Still, it's good
+practice to declare constants <code>static final</code> whenever possible.)</p>
+
+<a name="foreach" id="foreach"></a>
+<h2>Use Enhanced For Loop Syntax</h2>
+
+<p>The enhanced for loop (also sometimes known as "for-each" loop) can be used
+for collections that implement the Iterable interface and for arrays.
+With collections, an iterator is allocated to make interface calls
+to hasNext() and next(). With an ArrayList, a hand-written counted loop is
+about 3x faster (with or without JIT), but for other collections the enhanced
+for loop syntax will be exactly equivalent to explicit iterator usage.</p>
+
+<p>There are several alternatives for iterating through an array:</p>
+
+<pre> static class Foo {
+ int mSplat;
+ }
+ Foo[] mArray = ...
+
+ public void zero() {
+ int sum = 0;
+ for (int i = 0; i &lt; mArray.length; ++i) {
+ sum += mArray[i].mSplat;
+ }
+ }
+
+ public void one() {
+ int sum = 0;
+ Foo[] localArray = mArray;
+ int len = localArray.length;
+
+ for (int i = 0; i &lt; len; ++i) {
+ sum += localArray[i].mSplat;
+ }
+ }
+
+ public void two() {
+ int sum = 0;
+ for (Foo a : mArray) {
+ sum += a.mSplat;
+ }
+ }
+</pre>
+
+<p><strong>zero()</strong> is slowest, because the JIT can't yet optimize away
+the cost of getting the array length once for every iteration through the
+loop.</p>
+
+<p><strong>one()</strong> is faster. It pulls everything out into local
+variables, avoiding the lookups. Only the array length offers a performance
+benefit.</p>
+
+<p><strong>two()</strong> is fastest for devices without a JIT, and
+indistinguishable from <strong>one()</strong> for devices with a JIT.
+It uses the enhanced for loop syntax introduced in version 1.5 of the Java
+programming language.</p>
+
+<p>To summarize: use the enhanced for loop by default, but consider a
+hand-written counted loop for performance-critical ArrayList iteration.</p>
+
+<p>(See also <em>Effective Java</em> item 46.)</p>
+
+<a name="package_inner" id="package_inner"></a>
+<h2>Consider Package Instead of Private Access with Private Inner Classes</h2>
+
+<p>Consider the following class definition:</p>
+
+<pre>public class Foo {
+ private class Inner {
+ void stuff() {
+ Foo.this.doStuff(Foo.this.mValue);
+ }
+ }
+
+ private int mValue;
+
+ public void run() {
+ Inner in = new Inner();
+ mValue = 27;
+ in.stuff();
+ }
+
+ private void doStuff(int value) {
+ System.out.println("Value is " + value);
+ }
+}</pre>
+
+<p>The key things to note here are that we define a private inner class
+(<code>Foo$Inner</code>) that directly accesses a private method and a private
+instance field in the outer class. This is legal, and the code prints "Value is
+27" as expected.</p>
+
+<p>The problem is that the VM considers direct access to <code>Foo</code>'s
+private members from <code>Foo$Inner</code> to be illegal because
+<code>Foo</code> and <code>Foo$Inner</code> are different classes, even though
+the Java language allows an inner class to access an outer class' private
+members. To bridge the gap, the compiler generates a couple of synthetic
+methods:</p>
+
+<pre>/*package*/ static int Foo.access$100(Foo foo) {
+ return foo.mValue;
+}
+/*package*/ static void Foo.access$200(Foo foo, int value) {
+ foo.doStuff(value);
+}</pre>
+
+<p>The inner class code calls these static methods whenever it needs to
+access the <code>mValue</code> field or invoke the <code>doStuff</code> method
+in the outer class. What this means is that the code above really boils down to
+a case where you're accessing member fields through accessor methods.
+Earlier we talked about how accessors are slower than direct field
+accesses, so this is an example of a certain language idiom resulting in an
+"invisible" performance hit.</p>
+
+<p>If you're using code like this in a performance hotspot, you can avoid the
+overhead by declaring fields and methods accessed by inner classes to have
+package access, rather than private access. Unfortunately this means the fields
+can be accessed directly by other classes in the same package, so you shouldn't
+use this in public API.</p>
+
+<a name="avoidfloat" id="avoidfloat"></a>
+<h2>Use Floating-Point Judiciously</h2>
+
+<p>As a rule of thumb, floating-point is about 2x slower than integer on
+Android devices. This is true on a FPU-less, JIT-less G1 and a Nexus One with
+an FPU and the JIT. (Of course, absolute speed difference between those two
+devices is about 10x for arithmetic operations.)</p>
+
+<p>In speed terms, there's no difference between <code>float</code> and
+<code>double</code> on the more modern hardware. Space-wise, <code>double</code>
+is 2x larger. As with desktop machines, assuming space isn't an issue, you
+should prefer <code>double</code> to <code>float</code>.</p>
+
+<p>Also, even for integers, some chips have hardware multiply but lack
+hardware divide. In such cases, integer division and modulus operations are
+performed in software &mdash; something to think about if you're designing a
+hash table or doing lots of math.</p>
+
+<a name="library" id="library"></a>
+<h2>Know And Use The Libraries</h2>
+
+<p>In addition to all the usual reasons to prefer library code over rolling
+your own, bear in mind that the system is at liberty to replace calls
+to library methods with hand-coded assembler, which may be better than the
+best code the JIT can produce for the equivalent Java. The typical example
+here is <code>String.indexOf</code> and friends, which Dalvik replaces with
+an inlined intrinsic. Similarly, the <code>System.arraycopy</code> method
+is about 9x faster than a hand-coded loop on a Nexus One with the JIT.</p>
+
+<p>(See also <em>Effective Java</em> item 47.)</p>
+
+<a name="native_methods" id="native_methods"></a>
+<h2>Use Native Methods Judiciously</h2>
+
+<p>Native code isn't necessarily more efficient than Java. For one thing,
+there's a cost associated with the Java-native transition, and the JIT can't
+optimize across these boundaries. If you're allocating native resources (memory
+on the native heap, file descriptors, or whatever), it can be significantly
+more difficult to arrange timely collection of these resources. You also
+need to compile your code for each architecture you wish to run on (rather
+than rely on it having a JIT). You may even have to compile multiple versions
+for what you consider the same architecture: native code compiled for the ARM
+processor in the G1 can't take full advantage of the ARM in the Nexus One, and
+code compiled for the ARM in the Nexus One won't run on the ARM in the G1.</p>
+
+<p>Native code is primarily useful when you have an existing native codebase
+that you want to port to Android, not for "speeding up" parts of a Java app.</p>
+
+<p>If you do need to use native code, you should read our
+<a href="{@docRoot}guide/practices/jni.html">JNI Tips</a>.</p>
+
+<p>(See also <em>Effective Java</em> item 54.)</p>
+
+<a name="closing_notes" id="closing_notes"></a>
+<h2>Closing Notes</h2>
+
+<p>One last thing: always measure. Before you start optimizing, make sure you
+have a problem. Make sure you can accurately measure your existing performance,
+or you won't be able to measure the benefit of the alternatives you try.</p>
+
+<p>Every claim made in this document is backed up by a benchmark. The source
+to these benchmarks can be found in the <a href="http://code.google.com/p/dalvik/source/browse/#svn/trunk/benchmarks">code.google.com "dalvik" project</a>.</p>
+
+<p>The benchmarks are built with the
+<a href="http://code.google.com/p/caliper/">Caliper</a> microbenchmarking
+framework for Java. Microbenchmarks are hard to get right, so Caliper goes out
+of its way to do the hard work for you, and even detect some cases where you're
+not measuring what you think you're measuring (because, say, the VM has
+managed to optimize all your code away). We highly recommend you use Caliper
+to run your own microbenchmarks.</p>
+
+<p>You may also find
+<a href="{@docRoot}tools/debugging/debugging-tracing.html">Traceview</a> useful
+for profiling, but it's important to realize that it currently disables the JIT,
+which may cause it to misattribute time to code that the JIT may be able to win
+back. It's especially important after making changes suggested by Traceview
+data to ensure that the resulting code actually runs faster when run without
+Traceview.
diff --git a/docs/html/guide/practices/responsiveness.jd b/docs/html/guide/practices/responsiveness.jd
new file mode 100644
index 000000000000..a00e3aa65114
--- /dev/null
+++ b/docs/html/guide/practices/responsiveness.jd
@@ -0,0 +1,140 @@
+page.title=Designing for Responsiveness
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+ <li><a href="#anr">What Triggers ANR?</a></li>
+ <li><a href="#avoiding">How to Avoid ANR</a></li>
+ <li><a href="#reinforcing">Reinforcing Responsiveness</a></li>
+</ol>
+
+</div>
+</div>
+
+<div class="figure">
+<img src="{@docRoot}images/anr.png" alt="Screenshot of ANR dialog box" width="240" height="320"/>
+<p><strong>Figure 1.</strong> An ANR dialog displayed to the user.</p>
+</div>
+
+<p>It's possible to write code that wins every performance test in the world,
+but still sends users in a fiery rage when they try to use the application.
+These are the applications that aren't <em>responsive</em> enough &mdash; the
+ones that feel sluggish, hang or freeze for significant periods, or take too
+long to process input. </p>
+
+<p>In Android, the system guards against applications that are insufficiently
+responsive for a period of time by displaying a dialog to the user, called the
+Application Not Responding (ANR) dialog, shown at right in Figure 1. The user
+can choose to let the application continue, but the user won't appreciate having
+to act on this dialog every time he or she uses your application. It's critical
+to design responsiveness into your application, so that the system never has
+cause to display an ANR dialog to the user. </p>
+
+<p>Generally, the system displays an ANR if an application cannot respond to
+user input. For example, if an application blocks on some I/O operation
+(frequently a network access), then the main application thread won't be able to
+process incoming user input events. After a time, the system concludes that the
+application is frozen, and displays the ANR to give the user the option to kill
+it. </p>
+
+<p>Similarly, if your application spends too much time building an elaborate in-memory
+structure, or perhaps computing the next move in a game, the system will
+conclude that your application has hung. It's always important to make
+sure these computations are efficient using the techniques above, but even the
+most efficient code still takes time to run.</p>
+
+<p>In both of these cases, the recommended approach is to create a child thread and do
+most of your work there. This keeps the main thread (which drives the user
+interface event loop) running and prevents the system from concluding that your code
+has frozen. Since such threading usually is accomplished at the class
+level, you can think of responsiveness as a <em>class</em> problem. (Compare
+this with basic performance, which was described above as a <em>method</em>-level
+concern.)</p>
+
+<p>This document describes how the Android system determines whether an
+application is not responding and provides guidelines for ensuring that your
+application stays responsive. </p>
+
+<h2 id="anr">What Triggers ANR?</h2>
+
+<p>In Android, application responsiveness is monitored by the Activity Manager
+and Window Manager system services. Android will display the ANR dialog
+for a particular application when it detects one of the following
+conditions:</p>
+<ul>
+ <li>No response to an input event (e.g. key press, screen touch)
+ within 5 seconds</li>
+ <li>A {@link android.content.BroadcastReceiver BroadcastReceiver}
+ hasn't finished executing within 10 seconds</li>
+</ul>
+
+<h2 id="avoiding">How to Avoid ANR</h2>
+
+<p>Given the above definition for ANR, let's examine why this can occur in
+Android applications and how best to structure your application to avoid ANR.</p>
+
+<p>Android applications normally run entirely on a single (i.e. main) thread.
+This means that anything your application is doing in the main thread that
+takes a long time to complete can trigger the ANR dialog because your
+application is not giving itself a chance to handle the input event or Intent
+broadcast.</p>
+
+<p>Therefore any method that runs in the main thread should do as little work
+as possible. In particular, Activities should do as little as possible to set
+up in key life-cycle methods such as <code>onCreate()</code> and
+<code>onResume()</code>. Potentially long running operations such as network
+or database operations, or computationally expensive calculations such as
+resizing bitmaps should be done in a child thread (or in the case of databases
+operations, via an asynchronous request). However, this does not mean that
+your main thread should block while waiting for the child thread to
+complete &mdash; nor should you call <code>Thread.wait()</code> or
+<code>Thread.sleep()</code>. Instead of blocking while waiting for a child
+thread to complete, your main thread should provide a {@link
+android.os.Handler Handler} for child threads to post back to upon completion.
+Designing your application in this way will allow your main thread to remain
+responsive to input and thus avoid ANR dialogs caused by the 5 second input
+event timeout. These same practices should be followed for any other threads
+that display UI, as they are also subject to the same timeouts.</p>
+
+<p>You can use {@link android.os.StrictMode} to help find potentially
+long running operations such as network or database operations that
+you might accidentally be doing your main thread.</p>
+
+<p>The specific constraint on IntentReceiver execution time emphasizes what
+they were meant to do: small, discrete amounts of work in the background such
+as saving a setting or registering a Notification. So as with other methods
+called in the main thread, applications should avoid potentially long-running
+operations or calculations in BroadcastReceivers. But instead of doing intensive
+tasks via child threads (as the life of a BroadcastReceiver is short), your
+application should start a {@link android.app.Service Service} if a
+potentially long running action needs to be taken in response to an Intent
+broadcast. As a side note, you should also avoid starting an Activity from an
+Intent Receiver, as it will spawn a new screen that will steal focus from
+whatever application the user is currently has running. If your application
+has something to show the user in response to an Intent broadcast, it should
+do so using the {@link android.app.NotificationManager Notification
+Manager}.</p>
+
+<h2 id="reinforcing">Reinforcing Responsiveness</h2>
+
+<p>Generally, 100 to 200ms is the threshold beyond which users will perceive
+lag (or lack of "snappiness," if you will) in an application. As such, here
+are some additional tips beyond what you should do to avoid ANR that will help
+make your application seem responsive to users.</p>
+
+<ul>
+ <li>If your application is doing work in the background in response to
+ user input, show that progress is being made ({@link
+ android.widget.ProgressBar ProgressBar} and {@link
+ android.app.ProgressDialog ProgressDialog} are useful for this).</li>
+ <li>For games specifically, do calculations for moves in a child
+ thread.</li>
+ <li>If your application has a time-consuming initial setup phase, consider
+ showing a splash screen or rendering the main view as quickly as possible
+ and filling in the information asynchronously. In either case, you should
+ indicate somehow that progress is being made, lest the user perceive that
+ the application is frozen.</li>
+</ul>
diff --git a/docs/html/guide/practices/screens-distribution.jd b/docs/html/guide/practices/screens-distribution.jd
index a7c4a8ee791c..90ac752f7008 100644
--- a/docs/html/guide/practices/screens-distribution.jd
+++ b/docs/html/guide/practices/screens-distribution.jd
@@ -213,4 +213,4 @@ sizes, especially, is within reason using a single APK, as long as you follow th
<a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a>.</p>
<p>If you need more information about how to publish multiple APKs on Google Play, read <a
-href="{@docRoot}guide/market/publishing/multiple-apks.html">Multiple APK Support</a>.</p>
+href="{@docRoot}guide/google/play/publishing/multiple-apks.html">Multiple APK Support</a>.</p>
diff --git a/docs/html/guide/practices/screens-support-1.5.jd b/docs/html/guide/practices/screens-support-1.5.jd
index 4c6fb99f9397..15f069535df2 100644
--- a/docs/html/guide/practices/screens-support-1.5.jd
+++ b/docs/html/guide/practices/screens-support-1.5.jd
@@ -59,7 +59,7 @@ below.</p>
<p class="note"><strong>Note:</strong> Before you begin, you should first decide whether it's even
necessary to support Android 1.5. To see the relative number of devices that are still running
Android 1.5, see the <a
-href="http://developer.android.com/resources/dashboard/platform-versions.html">Platform Versions
+href="http://developer.android.com/about/dashboards/index.html">Platform Versions
Dashboard</a>.</p>
diff --git a/docs/html/guide/practices/screens_support.jd b/docs/html/guide/practices/screens_support.jd
index a870b223c6ac..ca29589b4204 100644
--- a/docs/html/guide/practices/screens_support.jd
+++ b/docs/html/guide/practices/screens_support.jd
@@ -57,7 +57,7 @@ href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResou
Providing Alternative Resources</a></li>
<li><a href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">Icon Design
Guidelines</a></li>
- <li><a href="{@docRoot}guide/developing/devices/index.html">Managing Virtual Devices</a></li>
+ <li><a href="{@docRoot}tools/devices/index.html">Managing Virtual Devices</a></li>
</ol>
</div>
@@ -1253,7 +1253,7 @@ Manager with a selection of AVDs, for testing various screen configurations.</p>
to emulate some of the most common screen configurations.</p>
<p>For more information about creating and using AVDs to test your application, see <a
-href="{@docRoot}guide/developing/devices/managing-avds.html">Managing AVDs with AVD
+href="{@docRoot}tools/devices/managing-avds.html">Managing AVDs with AVD
Manager</a>.</p>
@@ -1366,5 +1366,5 @@ the emulator with the <code>-scale</code> option. For example:</p>
between 0.1 and 3 that represents the desired scaling factor.</p>
<p>For more information about creating AVDs from the command line, see <a
-href="{@docRoot}guide/developing/devices/managing-avds-cmdline.html">Managing AVDs from the
+href="{@docRoot}tools/devices/managing-avds-cmdline.html">Managing AVDs from the
Command Line</a></p>
diff --git a/docs/html/guide/practices/seamlessness.jd b/docs/html/guide/practices/seamlessness.jd
new file mode 100644
index 000000000000..ec6b7fdff73c
--- /dev/null
+++ b/docs/html/guide/practices/seamlessness.jd
@@ -0,0 +1,249 @@
+page.title=Designing for Seamlessness
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+ <li><a href="#drop">Don't Drop Data</a></li>
+ <li><a href="#expose">Don't Expose Raw Data</a></li>
+ <li><a href="#interrupt">Don't Interrupt the User</a></li>
+ <li><a href="#threads">Got a Lot to Do? Do it in a Thread</a></li>
+ <li><a href="#multiple-activities">Don't Overload a Single Activity Screen</a></li>
+ <li><a href="#themes">Extend System Themes</a></li>
+ <li><a href="#flexui">Design Your UI to Work with Multiple Screen Resolutions</a></li>
+ <li><a href="#network">Assume the Network is Slow</a></li>
+ <li><a href="#keyboard">Don't Assume Touchscreen or Keyboard</a></li>
+ <li><a href="#battery">Do Conserve the Device Battery</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>Even if your application is fast and responsive, certain design decisions can
+still cause problems for users &mdash; because of unplanned interactions with
+other applications or dialogs, inadvertent loss of data, unintended blocking,
+and so on. To avoid these problems, it helps to understand the context in which
+your applications run and the system interactions that can affect your
+application. In short, you should strive to develop an application that
+interacts seamlessly with the system and with other applications. </p>
+
+<p>A common seamlessness problem is when an application's background process
+&mdash; for example, a service or broadcast receiver &mdash; pops up a dialog in
+response to some event. This may seem like harmless behavior, especially when
+you are building and testing your application in isolation, on the emulator.
+However, when your application is run on an actual device, your application may
+not have user focus at the time your background process displays the dialog. So
+it could end up that your application would display it's dialog behind the
+active application, or it could take focus from the current application and
+display the dialog in front of whatever the user was doing (such as dialing a
+phone call, for example). That behavior would not work for your application or
+for the user. </p>
+
+<p>To avoid these problems, your application should use the proper system
+facility for notifying the user &mdash; the
+{@link android.app.Notification Notification} classes. Using
+notifications, your application can signal the user that an event has
+taken place, by displaying an icon in the status bar rather than taking
+focus and interrupting the user.</p>
+
+<p>Another example of a seamlessness problem is when an activity inadvertently
+loses state or user data because it doesn't correctly implement the onPause()
+and other lifecycle methods. Or, if your application exposes data intended to be
+used by other applications, you should expose it via a ContentProvider, rather
+than (for example) doing so through a world-readable raw file or database.</p>
+
+<p>What those examples have in common is that they involve cooperating nicely
+with the system and other applications. The Android system is designed to treat
+applications as a sort of federation of loosely-coupled components, rather than
+chunks of black-box code. This allows you as the developer to view the entire
+system as just an even-larger federation of these components. This benefits you
+by allowing you to integrate cleanly and seamlessly with other applications, and
+so you should design your own code to return the favor.</p>
+
+<p>This document discusses common seamlessness problems and how to avoid them.</p>
+
+<h2 id="drop">Don't Drop Data</h2>
+
+<p>Always keep in mind that Android is a mobile platform. It may seem obvious to
+say it, but it's important to remember that another Activity (such as the
+"Incoming Phone Call" app) can pop up over your own Activity at any moment.
+This will fire the onSaveInstanceState() and onPause() methods, and will likely result in
+your application being killed.</p>
+
+<p>If the user was editing data in your application when the other Activity
+appeared, your application will likely lose that data when your application is
+killed. Unless, of course, you save the work in progress first. The "Android
+Way" is to do just that: Android applications that accept or edit input should
+override the onSaveInstanceState() method and save their state in some appropriate
+fashion. When the user revisits the application, she should be able to
+retrieve her data.</p>
+
+<p>A classic example of a good use of this behavior is a mail application. If the
+user was composing an email when another Activity started up, the application
+should save the in-process email as a draft.</p>
+
+<h2 id="expose">Don't Expose Raw Data</h2>
+
+<p>If you wouldn't walk down the street in your underwear, neither should your
+data. While it's possible to expose certain kinds of application to the world
+to read, this is usually not the best idea. Exposing raw data requires other
+applications to understand your data format; if you change that format, you'll
+break any other applications that aren't similarly updated.</p>
+
+<p>The "Android Way" is to create a ContentProvider to expose your data to other
+applications via a clean, well-thought-out, and maintainable API. Using a
+ContentProvider is much like inserting a Java language interface to split up and
+componentize two tightly-coupled pieces of code. This means you'll be able to
+modify the internal format of your data without changing the interface exposed
+by the ContentProvider, and this without affecting other applications.</p>
+
+<h2 id="interrupt">Don't Interrupt the User</h2>
+
+<p>If the user is running an application (such as the Phone application during a
+call) it's a pretty safe bet he did it on purpose. That's why you should avoid
+spawning activities except in direct response to user input from the current
+Activity.</p>
+
+<p>That is, don't call startActivity() from BroadcastReceivers or Services running in
+the background. Doing so will interrupt whatever application is currently
+running, and result in an annoyed user. Perhaps even worse, your Activity may
+become a "keystroke bandit" and receive some of the input the user was in the
+middle of providing to the previous Activity. Depending on what your
+application does, this could be bad news.</p>
+
+<p>Instead of spawning Activity UIs directly from the background, you should
+instead use the NotificationManager to set Notifications. These will appear in
+the status bar, and the user can then click on them at his leisure, to see
+what your application has to show him.</p>
+
+<p>(Note that all this doesn't apply to cases where your own Activity is already
+in the foreground: in that case, the user expects to see your next Activity in
+response to input.)</p>
+
+<h2 id="threads">Got a Lot to Do? Do it in a Thread</h2>
+
+<p>If your application needs to perform some expensive or long-running
+computation, you should probably move it to a thread. This will prevent the
+dreaded "Application Not Responding" dialog from being displayed to the user,
+with the ultimate result being the fiery demise of your application.</p>
+
+<p>By default, all code in an Activity as well as all its Views run in the same
+thread. This is the same thread that also handles UI events. For example, when
+the user presses a key, a key-down event is added to the Activity's main
+thread's queue. The event handler system needs to dequeue and handle that
+event quickly; if it doesn't, the system concludes after a few seconds that
+the application is hung and offers to kill it for the user.</p>
+
+<p>If you have long-running code, running it inline in your Activity will run it
+on the event handler thread, effectively blocking the event handler. This will
+delay input processing, and result in the ANR dialogs. To avoid this, move
+your computations to a thread. This <a
+href="responsiveness.html">Design for Responsiveness</a> document
+discusses how to do that..</p>
+
+<h2 id="multiple-activities">Don't Overload a Single Activity Screen</h2>
+
+<p>Any application worth using will probably have several different screens.
+When designing the screens of your UI, be sure to make use of multiple Activity
+object instances.</p>
+
+<p>Depending on your development background, you may interpret an Activity as
+similar to something like a Java Applet, in that it is the entry point for
+your application. However, that's not quite accurate: where an Applet subclass
+is the single entry point for a Java Applet, an Activity should be thought of
+as one of potentially several entry points to your application. The only
+difference between your "main" Activity and any others you might have is that
+the "main" one just happens to be the only one that expressed an interest in
+the "android.intent.action.MAIN" action in your AndroidManifest..xml file.</p>
+
+<p>So, when designing your application, think of your application as a federation
+of Activity objects. This will make your code a lot more maintainable in the long
+run, and as a nice side effect also plays nicely with Android's application
+history and "backstack" model.</p>
+
+<h2 id="themes">Extend System Themes</h2>
+
+<p>When it comes to the look-and-feel of the user interface, it's important to
+blend in nicely. Users are jarred by applications which contrast with the user
+interface they've come to expect. When designing your UIs, you should try and
+avoid rolling your own as much as possible. Instead, use a Theme. You
+can override or extend those parts of the theme that you need to, but at least
+you're starting from the same UI base as all the other applications. For all
+the details, read <a href="{@docRoot}guide/topics/ui/themes.html">Styles and Themes</a>.</p>
+
+<h2 id="flexui">Design Your UI to Work with Multiple Screen Resolutions</h2>
+
+<p>Different Android-powered devices will support different screen resolutions.
+Some will even be able to change resolutions on the fly, such as by switching
+to landscape mode. It's important to make sure your layouts and drawables
+are flexible enough to display properly on a variety of device screens.</p>
+
+<p>Fortunately, this is very easy to do. In brief, what you must do is
+provide different versions of your artwork (if you use any) for the key
+resolutions, and then design your layout to accommodate various dimensions.
+(For example, avoid using hard-coded positions and instead use relative
+layouts.) If you do that much, the system handles the rest, and your
+application looks great on any device.</p>
+
+<h2 id="network">Assume the Network is Slow</h2>
+
+<p>Android devices will come with a variety of network-connectivity options. All
+will have some data-access provision, though some will be faster than others.
+The lowest common denominator, however, is GPRS, the non-3G data service for
+GSM networks. Even 3G-capable devices will spend lots of time on non-3G
+networks, so slow networks will remain a reality for quite a long time to
+come.</p>
+
+<p>That's why you should always code your applications to minimize network
+accesses and bandwidth. You can't assume the network is fast, so you should
+always plan for it to be slow. If your users happen to be on faster networks,
+then that's great &mdash; their experience will only improve. You want to avoid the
+inverse case though: applications that are usable some of the time, but
+frustratingly slow the rest based on where the user is at any given moment are
+likely to be unpopular.</p>
+
+<p>One potential gotcha here is that it's very easy to fall into this trap if
+you're using the emulator, since the emulator uses your desktop computer's
+network connection. That's almost guaranteed to be much faster than a cell
+network, so you'll want to change the settings on the emulator that simulate
+slower network speeds. You can do this in Eclipse, in the "Emulator Settings"
+tab of your launch configuration or via a <a
+href="{@docRoot}tools/help/emulator.html#netspeed">command-line
+option</a> when starting the emulator.</p>
+
+<h2 id="keyboard">Don't Assume Touchscreen or Keyboard</h2>
+
+<p>
+Android will support a variety of handset form-factors. That's a fancy way of
+saying that some Android devices will have full "QWERTY" keyboards, while
+others will have 40-key, 12-key, or even other key configurations. Similarly,
+some devices will have touch-screens, but many won't.
+</p><p>
+When building your applications, keep that in mind. Don't make assumptions
+about specific keyboard layouts -- unless, of course, you're really interested
+in restricting your application so that it can only be used on those devices.
+</p>
+
+<h2 id="battery">Do Conserve the Device Battery</h2>
+<p>
+A mobile device isn't very mobile if it's constantly plugged into the
+wall. Mobile devices are battery-powered, and the longer we can make that
+battery last on a charge, the happier everyone is &mdash; especially the user.
+Two of the biggest consumers of battery power are the processor, and the
+radio; that's why it's important to write your applications to do as little
+work as possible, and use the network as infrequently as possible.
+</p><p>
+Minimizing the amount of processor time your application uses really comes
+down to <a href="performance.html">writing efficient
+code</a>. To minimize the power drain from using the radio, be sure to handle
+error conditions gracefully, and only fetch what you need. For example, don't
+constantly retry a network operation if one failed. If it failed once, it's
+likely because the user has no reception, so it's probably going to fail again
+if you try right away; all you'll do is waste battery power.
+</p><p>
+Users are pretty smart: if your program is power-hungry, you can count on
+them noticing. The only thing you can be sure of at that point is that your
+program won't stay installed very long.
+</p>
diff --git a/docs/html/guide/practices/security.jd b/docs/html/guide/practices/security.jd
index eeaac44e3940..48ccdebcfc93 100644
--- a/docs/html/guide/practices/security.jd
+++ b/docs/html/guide/practices/security.jd
@@ -20,8 +20,7 @@ page.title=Designing for Security
<ol>
<li><a href="http://source.android.com/tech/security/index.html">Android
Security Overview</a></li>
-<li><a href="{@docRoot}guide/topics/security/security.html">Android Security
-And Permissions</a></li>
+<li><a href="{@docRoot}guide/topics/security/permissions.html">Permissions</a></li>
</ol>
</div></div>
<p>Android was designed so that most developers will be able to build
@@ -136,7 +135,7 @@ dynamic permission grants on a case-by-case basis.</p>
<p>To provide additional protection for sensitive data, some applications
choose to encrypt local files using a key that is not accessible to the
application. (For example, a key can be placed in a <code><a
-href={@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> and
+href="{@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> and
protected with a user password that is not stored on the device). While this
does not protect data from a root compromise that can monitor the user
inputting the password, it can provide protection for a lost device without <a
diff --git a/docs/html/guide/practices/tablets-and-handsets.jd b/docs/html/guide/practices/tablets-and-handsets.jd
index 8e07a08f5553..8d6d3dd3777f 100644
--- a/docs/html/guide/practices/tablets-and-handsets.jd
+++ b/docs/html/guide/practices/tablets-and-handsets.jd
@@ -26,7 +26,7 @@ Gallery</a></li>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a></li>
+ <li><a href="{@docRoot}guide/components/fragments.html">Fragments</a></li>
<li><a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a></li>
<li><a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a></li>
</ol>
@@ -85,7 +85,7 @@ activity), which has its own lifecycle and which you can add or remove while the
running.</p>
<p>If you haven't used fragments yet, start by reading the <a
-href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a> developer guide.</p>
+href="{@docRoot}guide/components/fragments.html">Fragments</a> developer guide.</p>
</li>
@@ -141,16 +141,16 @@ bar below.</p>
<h3>Remaining backward-compatible</h3>
<p>If you want to use fragments in your application <em>and</em> remain compatible with
versions of Android older than 3.0, you can do so by using the Android <a
-href="{@docRoot}sdk/compatibility-library.html">Support Library</a> (downloadable from the
+href="{@docRoot}tools/extras/support-library.html">Support Library</a> (downloadable from the
SDK Manager).</p>
<p>The support library includes APIs for <a
-href="{@docRoot}guide/topics/fundamentals/fragments.html">fragments</a>, <a
-href="{@docRoot}guide/topics/fundamentals/loaders.html">loaders</a>, and other APIs added in newer
+href="{@docRoot}guide/components/fragments.html">fragments</a>, <a
+href="{@docRoot}guide/components/loaders.html">loaders</a>, and other APIs added in newer
versions of Android. By simply adding this library to your Android project, you can use
backward-compatible versions of these APIs in your application and remain compatible with Android
1.6 (your <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
android:minSdkVersion}</a> value can be as low as {@code "4"}). For information about how to get the
-library and start using it, see the <a href="{@docRoot}sdk/compatibility-library.html">Support
+library and start using it, see the <a href="{@docRoot}tools/extras/support-library.html">Support
Library</a> document.</p>
<p>The support library <em>does not</em> provide APIs for the action bar, but you can use
diff --git a/docs/html/guide/practices/ui_guidelines/activity_task_design.jd b/docs/html/guide/practices/ui_guidelines/activity_task_design.jd
index 8e4528e8553a..cb2bc373bbf1 100644
--- a/docs/html/guide/practices/ui_guidelines/activity_task_design.jd
+++ b/docs/html/guide/practices/ui_guidelines/activity_task_design.jd
@@ -19,7 +19,7 @@ parent.link=index.html
for <a href="{@docRoot}design/patterns/app-structure.html">App Structure</a> and
<a href="{@docRoot}design/patterns/navigation.html">Navigation</a>, or the developer guide
about <a
-href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a>.</p>
+href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks and Back Stack</a>.</p>
<input style="margin-top:1em;padding:5px" type="button"
value="That's nice, but I still want to read this document"
@@ -88,7 +88,7 @@ need to</a></li>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/topics/fundamentals.html">Application Fundamentals</a></li>
+ <li><a href="{@docRoot}guide/components/fundamentals.html">Application Fundamentals</a></li>
</ol>
</div>
@@ -121,9 +121,9 @@ need to</a></li>
<p>
Be sure to look at the <a href="#design_tips">Design Tips</a> section
for guidelines, tips, and things to avoid. This document is a
- complement to the <a href="{@docRoot}guide/topics/fundamentals.html">Application
+ complement to the <a href="{@docRoot}guide/components/fundamentals.html">Application
Fundamentals</a> documentation (particularly the <a
-href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a>
+href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks and Back Stack</a>
document),
which covers the underlying mechanics for programmers.
</p>
@@ -189,7 +189,7 @@ document),
<p>
An activity handles a particular type of content (data) and accepts a
set of related user actions. Each activity has a
- <a href="{@docRoot}guide/topics/fundamentals/activities.html#Lifecycle">lifecycle</a> that is
+ <a href="{@docRoot}guide/components/activities.html#Lifecycle">lifecycle</a> that is
independent of the other
activities in its application or task &mdash; each activity is
launched (started) independently, and the user or system can start,
@@ -268,7 +268,7 @@ independent of the other
An activity is the most prominent of four <em>components</em> of an
application. The other components are service, content provider and
broadcast receiver. For more details on activities, see the
- <a href="{@docRoot}guide/topics/fundamentals/activities.html">Activities</a> document.
+ <a href="{@docRoot}guide/components/activities.html">Activities</a> document.
</p>
@@ -750,7 +750,7 @@ itself.
<p>
For more about intents, see <a
-href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a>.
+href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a>.
</p>
@@ -947,7 +947,7 @@ href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Fi
Home screen), or from a shortcut icon on the Home screen, or
from the task switcher. (The mechanism for this is for the
activity to have an
- <a href={@docRoot}guide/topics/intents/intents-filters.html>intent filter</a> with action
+ <a href={@docRoot}guide/components/intents-filters.html>intent filter</a> with action
MAIN and
category LAUNCHER.)
</li>
diff --git a/docs/html/guide/practices/ui_guidelines/icon_design_launcher.jd b/docs/html/guide/practices/ui_guidelines/icon_design_launcher.jd
index 4b6768f5d8e5..28817fdd9282 100644
--- a/docs/html/guide/practices/ui_guidelines/icon_design_launcher.jd
+++ b/docs/html/guide/practices/ui_guidelines/icon_design_launcher.jd
@@ -241,8 +241,8 @@ that launcher icons are legible across on any background color.</p>
<h3 id="icons_in_market">Application Icons on Google Play</h3>
-<p>If you are <a href="{@docRoot}guide/publishing/publishing.html">publishing your application on
-Google Play</a>, you will also need to provide a 512 x 512 pixel, high-resolution application icon
+<p>If you are publishing your app on
+Google Play, you will also need to provide a 512 x 512 pixel, high-resolution application icon
in the <a href="http://play.google.com/apps/publish">developer console</a> at upload time. This icon
will be used in various locations on Google Play and does not replace your launcher icon.</p>
diff --git a/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd b/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd
index 85a3cc860242..f6c2247c2bbf 100644
--- a/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd
+++ b/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd
@@ -58,7 +58,7 @@ suggestions on how to work with multiple sets of icons.</p>
<h2 id="market">Application Icons on Google Play</h2>
-<p>If you are <a href="{@docRoot}guide/publishing/publishing.html">publishing
+<p>If you are <a href="{@docRoot}tools/publishing/publishing.html">publishing
your application on Google Play</a>, you will also need to provide a 512x512
pixel, high-resolution application icon in the <a
href="http://play.google.com/apps/publish">developer console</a> at upload-time.
diff --git a/docs/html/guide/practices/ui_guidelines/widget_design.jd b/docs/html/guide/practices/ui_guidelines/widget_design.jd
index d7894070e700..616f9aeb98e7 100644
--- a/docs/html/guide/practices/ui_guidelines/widget_design.jd
+++ b/docs/html/guide/practices/ui_guidelines/widget_design.jd
@@ -229,7 +229,7 @@ in the <em>Developer's Guide</em> for information on how to achieve this with la
practice to define this shape using nine patches; one for each screen density (see <a
href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a> for details).
Nine-patches can be created with the <a
-href="{@docRoot}guide/developing/tools/draw9patch.html">draw9patch</a> tool, or simply with a
+href="{@docRoot}tools/help/draw9patch.html">draw9patch</a> tool, or simply with a
graphics editing program such as Adobe&reg; Photoshop. This will allow the widget background shape
to take up the entire available space. The nine-patch should be edge-to-edge with no transparent
pixels providing extra margins, save for perhaps a few border pixels for <strong>subtle</strong>
diff --git a/docs/html/guide/publishing/licensing.html b/docs/html/guide/publishing/licensing.html
deleted file mode 100644
index 8e97f328da3c..000000000000
--- a/docs/html/guide/publishing/licensing.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh"
-content="0;url=http://developer.android.com/guide/market/licensing/index.html">
-<title>Redirecting...</title>
-</head>
-<body>
-<p>You should have been redirected. Please <a
-href="http://developer.android.com/guide/market/licensing/index.html">click here</a>.</p>
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/guide/topics/admin/index.jd b/docs/html/guide/topics/admin/index.jd
new file mode 100644
index 000000000000..b2a896f817c5
--- /dev/null
+++ b/docs/html/guide/topics/admin/index.jd
@@ -0,0 +1,22 @@
+page.title=Administration
+page.landing=true
+page.landing.intro=If you are an enterprise administrator, you can take advantage of APIs and system capabilities to manage Android devices and control access.
+page.landing.image=
+
+@jd:body
+
+<div class="landing-docs">
+
+ <div class="col-12">
+ <h3>Blog Articles</h3>
+ <a
+href="http://android-developers.blogspot.com/2012/03/unifying-key-store-access-in-ics.html">
+ <h4>Unifying Key Store Access in ICS</h4>
+ <p>Android 4.0 (ICS) comes with a number of enhancements that make it easier for people to
+bring their personal Android devices to work. In this post, we’re going to have a look at the key
+store functionality.</p>
+ </a>
+ </div>
+
+
+</div> \ No newline at end of file
diff --git a/docs/html/guide/topics/admin/keychain.jd b/docs/html/guide/topics/admin/keychain.jd
new file mode 100644
index 000000000000..2ea24084e51b
--- /dev/null
+++ b/docs/html/guide/topics/admin/keychain.jd
@@ -0,0 +1,4 @@
+page.title=Text and Input
+@jd:body
+
+<p>Add contnet here</p>
diff --git a/docs/html/guide/topics/appwidgets/index.jd b/docs/html/guide/topics/appwidgets/index.jd
index ba7b67c9770f..a46f9a76f6ee 100644
--- a/docs/html/guide/topics/appwidgets/index.jd
+++ b/docs/html/guide/topics/appwidgets/index.jd
@@ -295,7 +295,7 @@ Guidelines</a>.</p>
<p>Creating the App Widget layout is simple if you're
familiar with <a
-href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layouts</a>.
+href="{@docRoot}guide/topics/ui/declaring-layout.html">Layouts</a>.
However, you must be aware that App Widget layouts are based on {@link
android.widget.RemoteViews},
which do not support every kind of layout or view widget.</p>
@@ -516,7 +516,7 @@ consider starting a {@link android.app.Service} in the
{@link android.appwidget.AppWidgetProvider#onUpdate(Context,AppWidgetManager,int[]) onUpdate()}
method. From within the Service, you can perform your own updates
to the App Widget without worrying about the AppWidgetProvider closing down due
-to an <a href="{@docRoot}guide/practices/design/responsiveness.html">Application
+to an <a href="{@docRoot}guide/practices/responsiveness.html">Application
Not Responding</a> (ANR) error. See the <a
href="http://code.google.com/p/wiktionary-android/source/browse/trunk/Wiktionary/src/com/example/android/wiktionary/WordWidget.java">Wiktionary sample's AppWidgetProvider</a> for an example of an App Widget running a {@link
android.app.Service}.</p>
diff --git a/docs/html/guide/topics/wireless/bluetooth.jd b/docs/html/guide/topics/connectivity/bluetooth.jd
index 0567799565e2..832b8506466c 100644
--- a/docs/html/guide/topics/wireless/bluetooth.jd
+++ b/docs/html/guide/topics/connectivity/bluetooth.jd
@@ -912,7 +912,7 @@ profiles:</p>
Bluetooth headsets to be used with mobile phones. Android provides the {@link
android.bluetooth.BluetoothHeadset} class, which is a proxy for controlling the
Bluetooth Headset Service via interprocess communication (<a
-href="{@docRoot}guide/topics/fundamentals/processes-and-threads.html#IPC">IPC</a
+href="{@docRoot}guide/components/processes-and-threads.html#IPC">IPC</a
>). This includes both Bluetooth Headset and Hands-Free (v1.5) profiles. The
{@link android.bluetooth.BluetoothHeadset} class includes support for AT commands.
For more discussion of this topic, see <a href="#AT-Commands">Vendor-specific AT commands</a></li>
@@ -940,7 +940,7 @@ HDP, see <a href="#HDP">Health Device Profile</a>.</li>
<ol>
<li>Get the default adapter, as described in
- <a href="{@docRoot}guide/topics/wireless/bluetooth.html#SettingUp">Setting Up
+ <a href="{@docRoot}guide/topics/connectivity/bluetooth.html#SettingUp">Setting Up
Bluetooth</a>.</li>
<li>Use {@link
diff --git a/docs/html/guide/topics/connectivity/index.jd b/docs/html/guide/topics/connectivity/index.jd
new file mode 100644
index 000000000000..322518e67929
--- /dev/null
+++ b/docs/html/guide/topics/connectivity/index.jd
@@ -0,0 +1,42 @@
+page.title=Connectivity
+page.landing=true
+page.landing.intro=Android provides rich APIs to let your app connect and interact with other devices over Bluetooth, NFC, Wi-Fi Direct, USB, and SIP, in addition to standard network connections.
+page.landing.image=images/develop/connectivity.png
+
+@jd:body
+
+<div class="landing-docs">
+
+ <div class="col-6">
+ <h3>Blog Articles</h3>
+
+ <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">
+ <h4>Android’s HTTP Clients</h4>
+ <p>Most network-connected Android apps will use HTTP to send and receive data. Android
+includes two HTTP clients: HttpURLConnection and Apache HTTP Client. Both support HTTPS, streaming
+uploads and downloads, configurable timeouts, IPv6 and connection pooling.</p>
+ </a>
+
+ </div>
+
+ <div class="col-6">
+ <h3>Training</h3>
+
+ <a href="http://developer.android.com/training/efficient-downloads/index.html">
+ <h4>Transferring Data Without Draining the Battery</h4>
+ <p>This class demonstrates the best practices for scheduling and executing downloads using
+techniques such as caching, polling, and prefetching. You will learn how the power-use profile of
+the wireless radio can affect your choices on when, what, and how to transfer data in order to
+minimize impact on battery life.</p>
+ </a>
+
+ <a href="http://developer.android.com/training/cloudsync/index.html">
+ <h4>Syncing to the Cloud</h4>
+ <p>This class covers different strategies for cloud enabled applications. It covers syncing
+data with the cloud using your own back-end web application, and backing up data using the cloud so
+that users can restore their data when installing your application on a new device.</p>
+ </a>
+
+ </div>
+
+</div> \ No newline at end of file
diff --git a/docs/html/guide/topics/nfc/advanced-nfc.jd b/docs/html/guide/topics/connectivity/nfc/advanced-nfc.jd
index b43b559678c7..9d6cda51ab34 100644
--- a/docs/html/guide/topics/nfc/advanced-nfc.jd
+++ b/docs/html/guide/topics/connectivity/nfc/advanced-nfc.jd
@@ -128,12 +128,12 @@ tag technologies are as follows:</p>
<ol>
<li>Filter for an {@link android.nfc.NfcAdapter#ACTION_TECH_DISCOVERED} intent specifying the
tag technologies that you want to handle. See <a
-href="{@docRoot}guide/topics/nfc/nfc.html#tech-disc">Filtering for NFC
+href="{@docRoot}guide/topics/connectivity/nfc/nfc.html#tech-disc">Filtering for NFC
intents</a> for more information. In general, the tag dispatch system tries to start a {@link
android.nfc.NfcAdapter#ACTION_TECH_DISCOVERED} intent when an NDEF message
cannot be mapped to a MIME type or URI, or if the tag scanned did not contain NDEF data. For
more information on how this is determined, see <a
-href="{@docRoot}guide/topics/nfc/nfc.html#tag-dispatch">The Tag Dispatch System</a>.</li>
+href="{@docRoot}guide/topics/connectivity/nfc/nfc.html#tag-dispatch">The Tag Dispatch System</a>.</li>
<li>When your application receives the intent, obtain the {@link android.nfc.Tag} object from
the intent:
<pre>Tag tagFromIntent = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);</pre></li>
diff --git a/docs/html/guide/topics/nfc/index.jd b/docs/html/guide/topics/connectivity/nfc/index.jd
index b86d72d418d0..88c206f4958a 100644
--- a/docs/html/guide/topics/nfc/index.jd
+++ b/docs/html/guide/topics/connectivity/nfc/index.jd
@@ -15,13 +15,13 @@ page.title=Near Field Communication
called NDEF (NFC Data Exchange Format).</p>
<dl>
- <dt><strong><a href="{@docRoot}guide/topics/nfc/nfc.html">NFC Basics</a></strong></dt>
+ <dt><strong><a href="{@docRoot}guide/topics/connectivity/nfc/nfc.html">NFC Basics</a></strong></dt>
<dd>This document describes how Android handles discovered NFC tags and how it notifies
applications of data that is relevant to the application. It also goes over how to work with the
NDEF data in your applications and gives an overview of the framework APIs that support the basic
NFC feature set of Android.</dd>
- <dt><strong><a href="{@docRoot}guide/topics/nfc/advanced-nfc.html">Advanced
+ <dt><strong><a href="{@docRoot}guide/topics/connectivity/nfc/advanced-nfc.html">Advanced
NFC</a></strong></dt>
<dd>This document goes over the APIs that enable use of the various tag technologies that
Android supports. When you are not working with NDEF data, or when you are working with NDEF
diff --git a/docs/html/guide/topics/nfc/nfc.jd b/docs/html/guide/topics/connectivity/nfc/nfc.jd
index 834656a9d5f5..51c7bee04f26 100644
--- a/docs/html/guide/topics/nfc/nfc.jd
+++ b/docs/html/guide/topics/connectivity/nfc/nfc.jd
@@ -39,7 +39,7 @@ page.title=NFC Basics
<p>This document describes the basic NFC tasks you perform in Android. It explains how to send and
receive NFC data in the form of NDEF messages and describes the Android framework APIs that support
these features. For more advanced topics, including a discussion of working with non-NDEF data,
-see <a href="{@docRoot}guide/topics/nfc/advanced-nfc.html">Advanced NFC</a>.</p>
+see <a href="{@docRoot}guide/topics/connectivity/nfc/advanced-nfc.html">Advanced NFC</a>.</p>
<p>There are two major uses cases when working with NDEF data and Android:</p>
@@ -105,7 +105,7 @@ or more records ({@link android.nfc.NdefRecord}). Each NDEF record must be well-
the specification of the type of record that you want to create. Android
also supports other types of tags that do not contain NDEF data, which you can work with by using
the classes in the {@link android.nfc.tech} package. To learn more
-about these technologies, see the <a href="{@docRoot}guide/topics/nfc/advanced-nfc.html">Advanced
+about these technologies, see the <a href="{@docRoot}guide/topics/connectivity/nfc/advanced-nfc.html">Advanced
NFC</a> topic. Working with these other types of tags involves
writing your own protocol stack to communicate with the tags, so we recommend using NDEF when
possible for ease of development and maximum support for Android-powered devices.
@@ -454,7 +454,7 @@ within a <code>tech-list</code> set. Your activity is
<p>For more information about working with tag technologies and the {@link
android.nfc.NfcAdapter#ACTION_TECH_DISCOVERED} intent, see <a
-href="{@docRoot}guide/topics/nfc/advanced-nfc.html#tag-tech">Working with Supported Tag
+href="{@docRoot}guide/topics/connectivity/nfc/advanced-nfc.html#tag-tech">Working with Supported Tag
Technologies</a> in the Advanced NFC document.</p>
<h3 id="tag-disc">ACTION_TAG_DISCOVERED</h3>
<p>To filter for {@link android.nfc.NfcAdapter#ACTION_TAG_DISCOVERED} use the following intent
@@ -685,7 +685,7 @@ application based on the AAR.</li>
</p>
<p class="note"><strong>Note:</strong> You can override AARs and the intent dispatch system with the <a
-href="{@docRoot}guide/topics/nfc/advanced-nfc.html#foreground-dispatch">foreground dispatch
+href="{@docRoot}guide/topics/connectivity/nfc/advanced-nfc.html#foreground-dispatch">foreground dispatch
system</a>, which allows a foreground activity to have priority when an NFC tag is discovered.
With this method, the activity must be in the foreground to
override AARs and the intent dispatch system.</p>
@@ -766,7 +766,7 @@ API level 14 (Android 4.0) and later.</li>
<p class="note"><strong>Note:</strong> If your activity enables Android Beam and is
in the foreground, the standard intent dispatch system is disabled. However, if your activity also
-enables <a href="{@docRoot}guide/topics/nfc/advanced-nfc.html#foreground-dispatch">foreground
+enables <a href="{@docRoot}guide/topics/connectivity/nfc/advanced-nfc.html#foreground-dispatch">foreground
dispatching</a>, then it can still scan tags that match the intent filters set in the foreground
dispatching.</p>
diff --git a/docs/html/guide/topics/network/sip.jd b/docs/html/guide/topics/connectivity/sip.jd
index 600da78ffcfb..a5f0e2e49a26 100644
--- a/docs/html/guide/topics/network/sip.jd
+++ b/docs/html/guide/topics/connectivity/sip.jd
@@ -140,7 +140,7 @@ manifest:</p>
<ul>
<li><code>&lt;uses-sdk android:minSdkVersion=&quot;9&quot; /&gt;</code>. This
indicates that your application requires Android 2.3 or higher. For more
-information, see <a href="{@docRoot}guide/appendix/api-levels.html">API
+information, see <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API
Levels</a> and the documentation for the <a
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk&gt;</a
> element.</li>
@@ -479,9 +479,9 @@ wireless, so you must test on an actual device. Testing on AVD won't work.</li>
<li>On your device, connect to wireless (<strong>Settings > Wireless & networks
> Wi-Fi > Wi-Fi settings</strong>)</li>
<li>Set up your mobile device for testing, as described in <a
-href="{@docRoot}guide/developing/device.html">Developing on a Device</a>.</li>
+href="{@docRoot}tools/device.html">Developing on a Device</a>.</li>
<li>Run your application on your mobile device, as described in <a
-href="{@docRoot}guide/developing/device.html">Developing on a Device</a>.</li>
+href="{@docRoot}tools/device.html">Developing on a Device</a>.</li>
<li>If you are using Eclipse, you can view the application log output in Eclipse
using LogCat (<strong>Window > Show View > Other > Android >
diff --git a/docs/html/guide/topics/usb/accessory.jd b/docs/html/guide/topics/connectivity/usb/accessory.jd
index 8b74bc0d6429..a2177678fc56 100644
--- a/docs/html/guide/topics/usb/accessory.jd
+++ b/docs/html/guide/topics/connectivity/usb/accessory.jd
@@ -433,7 +433,7 @@ private void openAccessory() {
protocol bundles the packets together for both speeds into one logical packet for simplicity.</p>
<p>For more information about using threads in Android, see <a href=
- "{@docRoot}guide/topics/fundamentals/processes-and-threads.html#Threads">Processes and
+ "{@docRoot}guide/components/processes-and-threads.html#Threads">Processes and
Threads</a>.</p>
<h3 id="terminating-a">Terminating communication with an accessory</h3>
diff --git a/docs/html/guide/topics/usb/adk.jd b/docs/html/guide/topics/connectivity/usb/adk.jd
index c8949a30bf48..034728cf9e2c 100644
--- a/docs/html/guide/topics/usb/adk.jd
+++ b/docs/html/guide/topics/connectivity/usb/adk.jd
@@ -63,7 +63,7 @@ page.title=Android Open Accessory Development Kit
<ol>
<li><a href="http://www.youtube.com/watch?v=s7szcpXf2rE">Google I/O Session Video</a></li>
- <li><a href="{@docRoot}guide/topics/usb/accessory.html">USB Accessory Dev Guide</a></li>
+ <li><a href="{@docRoot}guide/topics/connectivity/usb/accessory.html">USB Accessory Dev Guide</a></li>
</ol>
<h2>Where to buy</h2>
@@ -121,7 +121,7 @@ page.title=Android Open Accessory Development Kit
hardware and not all devices will support accessory mode. Devices that support accessory mode can
be filtered using a <code>&lt;uses-feature&gt;</code> element in your corresponding application's
Android manifest. For more information, see the <a href=
- "{@docRoot}guide/topics/usb/accessory.html#manifest">USB Accessory</a> Developer Guide.</p>
+ "{@docRoot}guide/topics/connectivity/usb/accessory.html#manifest">USB Accessory</a> Developer Guide.</p>
<p>The following list of distributers are currently producing Android Open Accessory compatible
development boards:</p>
@@ -168,7 +168,7 @@ page.title=Android Open Accessory Development Kit
prototyping platform</a>, the accessory's hardware design files, code that implements the
accessory's firmware, and the Android application that interacts with the accessory. The hardware
design files and firmware code are contained in the <a href=
- "https://dl-ssl.google.com/android/adk/adk_release_0512.zip">ADK package download</a>.</p>
+ "https://dl-ssl.google.com/android/adk/adk_release_20120606.zip">ADK package download</a>.</p>
<p>The main hardware and software components of the ADK include:</p>
<ul>
@@ -190,18 +190,19 @@ page.title=Android Open Accessory Development Kit
"http://www.circuitsathome.com/arduino_usb_host_shield_projects">Arduino USB Host Shield</a>
library provides the logic for the USB micro-controller board to act as a USB Host. This allows
the board to initiate transactions with USB devices. Describing how to use this entire library
- is out of the scope of this document. Where needed, this document points out important
+ is beyond the scope of this document. Where needed, this document points out important
interactions with the library. For more information, see the source code for the Arduino USB
- Host Shield library in the <code>firmware/arduino_libs/USB_Host_Shield</code> directory.</li>
+ Host Shield library in the <code>arduino_libs/USB_Host_Shield</code> directory.</li>
- <li>An Arduino sketch, <code>firmware/demokit/demokit.pde</code>, defines the firmware that
+ <li>An Arduino sketch, <code>arduino_libs/AndroidAccessory/examples/demokit/demokit.pde</code>,
+ defines the firmware that
runs on the ADK board and is written in C++. The sketch calls the Android accessory protocol
library to interact with the Android-powered device. It also sends data from the ADK board and
shield to the Android application and receives data from the Android application and outputs it
to the ADK board and shield.</li>
<li>The Android accessory protocol library, which is located in the
- <code>firmware/arduino_libs/AndroidAccessory</code> directory. This library defines how to
+ <code>arduino_libs/AndroidAccessory</code> directory. This library defines how to
enumerate the bus, find a connected Android-powered device that supports accessory mode, and
how to setup communication with the device.</li>
@@ -228,20 +229,21 @@ page.title=Android Open Accessory Development Kit
<h2 id="getting-started">Getting Started with the ADK</h2>
<p>The following sections describe how to install the Arduino software on your computer, use the
- Arduino software to install the ADK board's firmware, and install and run the accompanying
+ Arduino IDE to install the ADK board's firmware, and install and run the accompanying
Android application for the ADK board. Before you begin, download the following items to set up
your development environment:</p>
<ul>
- <li><a href="http://www.arduino.cc/en/Main/software">Arduino Software</a>: contains libraries
- and an IDE for coding and installing firmware to the ADK board.</li>
+ <li><a href="http://arduino.cc/en/Main/Software">Arduino 1.0 or higher</a>: contains
+ libraries and an IDE for coding and installing firmware to the ADK board.</li>
- <li><a href="http://www.arduino.cc/playground/Main/CapSense">CapSense library</a>: contains the
- libraries to sense human capacitance. This is needed for the capacative button that is located
- on the ADK shield.</li>
+ <li><a href="http://www.arduino.cc/playground/Main/CapSense">CapSense library v.04</a>:
+ contains the libraries to sense human capacitance. This library is needed for the capacitive
+ button that is located on the ADK shield.</li>
- <li><a href="https://dl-ssl.google.com/android/adk/adk_release_0512.zip">The ADK package</a>: contains the firmware for the ADK board and hardware design
- files for the ADK board and shield.</li>
+ <li><a href="https://dl-ssl.google.com/android/adk/adk_release_20120606.zip">ADK software
+ package</a>: contains the firmware for the ADK board and hardware design files for the ADK
+ board and shield.</li>
</ul>
<h3 id="installing">Installing the Arduino software and necessary libraries</h3>
@@ -250,35 +252,33 @@ page.title=Android Open Accessory Development Kit
<ol>
<li>
- <a href="http://arduino.cc/en/Guide/HomePage">Download and install</a> the Arduino Software
- as described on the Arduino website.
+ <a href="http://arduino.cc/en/Main/Software">Download and install</a> the Arduino 1.0 or
+ higher as described on the Arduino website.
<p class="note"><strong>Note:</strong> If you are on a Mac, install the FTDI USB Serial
Driver that is included in the Arduino package, even though the installation instructions say
otherwise.</p>
</li>
- <li><a href="https://dl-ssl.google.com/android/adk/adk_release_0512.zip">Download</a> and
+ <li><a href="https://dl-ssl.google.com/android/adk/adk_release_20120606.zip">Download</a> and
extract the ADK package to a directory of your choice. You should have an <code>app</code>,
- <code>firmware</code>, and <code>hardware</code> directories.</li>
+ <code>arduino_libs</code>, and <code>hardware</code> directories.</li>
- <li>Extract the CapSense download to a directory of your choice.</li>
+ <li><a href="http://www.arduino.cc/playground/Main/CapSense">Download</a> and extract
+ the CapSense package to a directory of your choice.</li>
<li>Install the necessary libraries:
<p>On Windows:</p>
<ol type="a">
- <li>Copy the <code>firmware/arduino_libs/AndroidAccessory</code> and
- <code>firmware/arduino_libs/USB_Host_Shield</code> directories (the complete directories,
+ <li>Copy the <code>arduino_libs/AndroidAccessory</code> and
+ <code>arduino_libs/USB_Host_Shield</code> directories (the complete directories,
not just the files within) to the <code>&lt;arduino_installation_root&gt;/libraries/</code>
directory.</li>
- <li>Create a CapSense directory in the
- <code>&lt;arduino_installation_root&gt;/libraries/</code> directory</li>
-
- <li>Copy <code>CapSense.cpp</code> and <code>CapSense.h</code> from the unzipped CapSense
- download to the <code>CapSense</code> directory.</li>
+ <li>Copy the extracted <code>CapSense/</code> library directory and its contents to the
+ <code>&lt;arduino_installation_root&gt;/libraries/</code> directory.</li>
</ol>
<p>On Mac:</p>
@@ -288,16 +288,13 @@ page.title=Android Open Accessory Development Kit
directory inside your user account's <code>Documents</code> directory, and within
that, a <code>libraries</code> directory.</li>
- <li>Copy the <code>firmware/arduino_libs/AndroidAccessory</code> and
- <code>firmware/arduino_libs/USB_Host_Shield</code> directories (the
+ <li>Copy the <code>arduino_libs/AndroidAccessory</code> and
+ <code>arduino_libs/USB_Host_Shield</code> directories (the
complete directories, not just the files within) to your
<code>Documents/Arduino/libraries/</code> directory.</li>
- <li>Create a <code>CapSense</code> directory in your
- <code>Documents/Arduino/libraries/</code> directory.</li>
-
- <li>Copy <code>CapSense.cpp</code> and <code>CapSense.h</code> from the unzipped CapSense
- download to the <code>CapSense</code> directory.</li>
+ <li>Copy the extracted <code>CapSense/</code> library directory and its contents to the
+ <code>Documents/Arduino/libraries/</code> directory.
</ol>
<p>On Linux (Ubuntu):</p>
@@ -308,19 +305,16 @@ page.title=Android Open Accessory Development Kit
not just the files within) to the <code>&lt;arduino_installation_root&gt;/libraries/</code>
directory.</li>
- <li>Create a <code>CapSense</code> directory in the
+ <li>Copy the extracted <code>CapSense/</code> library directory and its contents to the
<code>&lt;arduino_installation_root&gt;/libraries/</code> directory.</li>
- <li>Copy <code>CapSense.cpp</code> and <code>CapSense.h</code> from the unzipped CapSense
- download to the <code>CapSense</code> directory.</li>
-
<li>Install the avr-libc library by entering <code>sudo apt-get install avr-libc</code>
from a shell prompt.</li>
</ol>
</li>
</ol>
- <p>You should now have three new directories in the Arduino libraries directory:
+ <p>You should now have three new directories in the Arduino <code>libraries/</code> directory:
<code>AndroidAccessory</code>, <code>USB_Host_Shield</code>, and <code>CapSense</code>.</p>
<h3 id="installing-firmware">Installing the firmware to the ADK board</h3>
@@ -331,7 +325,7 @@ page.title=Android Open Accessory Development Kit
<li>Connect the ADK board to your computer using the micro-USB port, which allows two-way
communication and provides power to the ADK board.</li>
- <li>Launch Arduino.</li>
+ <li>Launch the Arduino IDE.</li>
<li>Click <strong>Tools &gt; Board &gt; Arduino Mega 2560</strong> to specify the ADK board's
type.</li>
@@ -351,13 +345,13 @@ page.title=Android Open Accessory Development Kit
</ul>
</li>
- <li>To open the firmware code (a sketch), click <strong>File &gt; Open</strong> and select
- <code>firmware/demokit/demokit.pde</code>.</li>
+ <li>To open the Demokit sketch (firmware code), click <strong>File &gt; Examples &gt;
+ AndroidAccessory &gt; demokit</strong>.</li>
<li>Click <strong>Sketch &gt; Verify/Compile</strong> to ensure that the sketch has no
errors.</li>
- <li>Select <strong>File &gt; Upload to I/O Board</strong>. When Arduino outputs <strong>Done
+ <li>Select <strong>File &gt; Upload</strong>. When Arduino outputs <strong>Done
uploading.</strong>, the board is ready to communicate with your Android-powered device.</li>
</ol>
@@ -375,7 +369,7 @@ page.title=Android Open Accessory Development Kit
2.3.4 devices that support accessory mode. This library is also forward compatible with Android
3.1 or newer devices that support accessory mode. If you only care about Android 3.1 or newer
devices, all you need is API Level 12. For more information on deciding which API level to use,
- see the <a href="{@docRoot}guide/topics/usb/accessory.html#choosing">USB Accessory</a>
+ see the <a href="{@docRoot}guide/topics/connectivity/usb/accessory.html#choosing">USB Accessory</a>
documentation.</li>
<li>Click <strong>File &gt; New &gt; Project...</strong>, then select <strong>Android &gt;
@@ -414,12 +408,12 @@ page.title=Android Open Accessory Development Kit
<h3 id="monitoring">Monitoring the ADK Board</h3>
<p>The ADK firmware consists of a few files that you should be looking at if you want to build
- your own accessory. The files in the <code>firmware/arduino_libs/AndroidAccessory</code>
+ your own accessory. The files in the <code>arduino_libs/AndroidAccessory</code>
directory are the most important files and have the logic to detect and connect to
Android-powered devices that support accessory mode. Feel free to add debug statements (Arduino
- <code>Serial.print()</code> statements) to the code located in the
- <code>arduino_libraries_directory/AndroidAccessory</code> directory and
- <code>firmware/demokit/demokit.pde</code> sketch and re-upload the sketch to the ADK board to
+ <code>Serial.println()</code> statements) to the code located in the
+ <code>&lt;arduino_installation_root&gt;/libraries/AndroidAccessory</code> directory and
+ <code>demokit.pde</code> sketch and re-upload the sketch to the ADK board to
discover more about how the firmware works.</p>
<p>You can view the debug statements in the Arduino Serial Monitor by clicking <strong>Tools &gt;
@@ -575,11 +569,11 @@ data: none
useful if you want to port the code over for your own accessories.</p>
<p>The important pieces of the firmware are the
- <code>accessory/demokit/demokit/demokit.pde</code> sketch, which is the code that receives and
- sends data to the DemoKit application running on the Android-powered device. The code to detect
- and set up communication with the Android-powered device is contained in the
- <code>accessory/arduino_libs/AndroidAccessory/AndroidAccessory.h</code> and
- <code>accessory/arduino_libs/AndroidAccessory/AndroidAccessory.cpp</code> files. This code
+ <code>arduino_libs/AndroidAccessory/examples/demokit/demokit/demokit.pde</code> sketch, which is
+ the code that receives and sends data to the DemoKit application running on the Android-powered
+ device. The code to detect and set up communication with the Android-powered device is contained
+ in the <code>arduino_libs/AndroidAccessory/AndroidAccessory.h</code> and
+ <code>arduino_libs/AndroidAccessory/AndroidAccessory.cpp</code> files. This code
includes most of the logic that will help you implement your own accessory's firmware. It might
be useful to have all three of these files open in a text editor as you read through these next
sections.</p>
@@ -909,8 +903,7 @@ int AndroidAccessory::read(void *buff, int len, unsigned int nakLimit) {
int AndroidAccessory::write(void *buff, int len) {
usb.outTransfer(1, out, len, (char *)buff);
return len; }
-
</pre>
- <p>See the <code>firmware/demokit/demokit.pde</code> file for information about how the ADK board
+ <p>See the <code>demokit.pde</code> sketch for information about how the ADK board
reads and writes data.</p>
diff --git a/docs/html/guide/topics/usb/host.jd b/docs/html/guide/topics/connectivity/usb/host.jd
index b56175445159..355dd2dd9199 100644
--- a/docs/html/guide/topics/usb/host.jd
+++ b/docs/html/guide/topics/connectivity/usb/host.jd
@@ -380,7 +380,7 @@ mUsbManager.requestPermission(device, mPermissionIntent);
android.hardware.usb.UsbDeviceConnection#controlTransfer controlTransfer()} method. You should
carry out this step in another thread to prevent blocking the main UI thread. For more
information about using threads in Android, see <a href=
- "{@docRoot}guide/topics/fundamentals/processes-and-threads.html#Threads">Processes and
+ "{@docRoot}guide/components/processes-and-threads.html#Threads">Processes and
Threads</a>.</li>
</ul>
diff --git a/docs/html/guide/topics/usb/index.jd b/docs/html/guide/topics/connectivity/usb/index.jd
index ef53bdf7c5db..7086ab199d6e 100644
--- a/docs/html/guide/topics/usb/index.jd
+++ b/docs/html/guide/topics/connectivity/usb/index.jd
@@ -6,9 +6,9 @@ page.title=USB Host and Accessory
<h2>Topics</h2>
<ol>
- <li><a href="{@docRoot}guide/topics/usb/accessory.html">USB Accessory</a></li>
+ <li><a href="{@docRoot}guide/topics/connectivity/usb/accessory.html">USB Accessory</a></li>
- <li><a href="{@docRoot}guide/topics/usb/host.html">USB Host</a></li>
+ <li><a href="{@docRoot}guide/topics/connectivity/usb/host.html">USB Host</a></li>
</ol>
</div>
</div>
@@ -42,8 +42,8 @@ page.title=USB Host and Accessory
dependant on the device's hardware, regardless of platform level. You can filter for devices that
support USB host and accessory through a <a href=
"{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a> element. See
- the USB <a href="{@docRoot}guide/topics/usb/accessory.html">accessory</a> and <a href=
- "{@docRoot}guide/topics/usb/host.html">host</a> documentation for more details.</p>
+ the USB <a href="{@docRoot}guide/topics/connectivity/usb/accessory.html">accessory</a> and <a href=
+ "{@docRoot}guide/topics/connectivity/usb/host.html">host</a> documentation for more details.</p>
<h2>Debugging considerations</h2>
diff --git a/docs/html/guide/topics/wireless/wifip2p.jd b/docs/html/guide/topics/connectivity/wifip2p.jd
index 82c9abdb1066..82c9abdb1066 100644
--- a/docs/html/guide/topics/wireless/wifip2p.jd
+++ b/docs/html/guide/topics/connectivity/wifip2p.jd
diff --git a/docs/html/guide/topics/data/backup.jd b/docs/html/guide/topics/data/backup.jd
index d91e422a2388..602b6e84b225 100644
--- a/docs/html/guide/topics/data/backup.jd
+++ b/docs/html/guide/topics/data/backup.jd
@@ -47,7 +47,7 @@ data onto the new device</li>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/developing/tools/bmgr.html">{@code bmgr} tool</a></li>
+ <li><a href="{@docRoot}tools/help/bmgr.html">{@code bmgr} tool</a></li>
</ol>
</div>
@@ -316,7 +316,7 @@ backup for all applications that have requested a backup since the last backup w
<p class="note"><strong>Tip:</strong> While developing your application, you can initiate an
immediate backup operation from the Backup Manager with the <a
-href="{@docRoot}guide/developing/tools/bmgr.html">{@code bmgr} tool</a>.</p>
+href="{@docRoot}tools/help/bmgr.html">{@code bmgr} tool</a>.</p>
<p>When the Backup Manager calls your {@link
android.app.backup.BackupAgent#onBackup(ParcelFileDescriptor,BackupDataOutput,ParcelFileDescriptor)
@@ -460,7 +460,7 @@ android.app.backup.BackupManager#requestRestore(RestoreObserver) requestRestore(
href="#RequestingRestore">Requesting restore</a> for more information).</p>
<p class="note"><strong>Note:</strong> While developing your application, you can also request a
-restore operation with the <a href="{@docRoot}guide/developing/tools/bmgr.html">{@code bmgr}
+restore operation with the <a href="{@docRoot}tools/help/bmgr.html">{@code bmgr}
tool</a>.</p>
<p>When the Backup Manager calls your {@link
@@ -863,7 +863,7 @@ onBackup()}.</p>
<p class="note"><strong>Note:</strong> While developing your application, you can request a
backup and initiate an immediate backup operation with the <a
-href="{@docRoot}guide/developing/tools/bmgr.html">{@code bmgr}
+href="{@docRoot}tools/help/bmgr.html">{@code bmgr}
tool</a>.</p>
@@ -878,7 +878,7 @@ android.app.backup.BackupAgent#onRestore(BackupDataInput,int,ParcelFileDescripto
implementation, passing the data from the current set of backup data.</p>
<p class="note"><strong>Note:</strong> While developing your application, you can request a
-restore operation with the <a href="{@docRoot}guide/developing/tools/bmgr.html">{@code bmgr}
+restore operation with the <a href="{@docRoot}tools/help/bmgr.html">{@code bmgr}
tool</a>.</p>
@@ -886,7 +886,7 @@ tool</a>.</p>
<p>Once you've implemented your backup agent, you can test the backup and restore functionality
with the following procedure, using <a
-href="{@docRoot}guide/developing/tools/bmgr.html">{@code bmgr}</a>.</p>
+href="{@docRoot}tools/help/bmgr.html">{@code bmgr}</a>.</p>
<ol>
<li>Install your application on a suitable Android system image
diff --git a/docs/html/guide/topics/data/data-storage.jd b/docs/html/guide/topics/data/data-storage.jd
index d31afa554c5e..e9d2d25eefb7 100644
--- a/docs/html/guide/topics/data/data-storage.jd
+++ b/docs/html/guide/topics/data/data-storage.jd
@@ -1,4 +1,4 @@
-page.title=Data Storage
+page.title=Storage Options
@jd:body
@@ -16,22 +16,9 @@ page.title=Data Storage
<h2>In this document</h2>
<ol>
<li><a href="#pref">Using Shared Preferences</a></li>
- <li><a href="#filesInternal">Using the Internal Storage</a>
- <ol>
- <li><a href="#InternalCache">Saving cache files</a></li>
- <li><a href="#InternalMethods">Other useful methods</a></li>
- </ol></li>
- <li><a href="#filesExternal">Using the External Storage</a>
- <ol>
- <li><a href="#MediaAvail">Checking media availability</a></li>
- <li><a href="#AccessingExtFiles">Accessing files on external storage</a></li>
- <li><a href="#SavingSharedFiles">Saving files that should be shared</a></li>
- <li><a href="#ExternalCache">Saving cache files</a></li>
- </ol></li>
- <li><a href="#db">Using Databases</a>
- <ol>
- <li><a href="#dbDebugging">Database debugging</a></li>
- </ol></li>
+ <li><a href="#filesInternal">Using the Internal Storage</a></li>
+ <li><a href="#filesExternal">Using the External Storage</a></li>
+ <li><a href="#db">Using Databases</a></li>
<li><a href="#netw">Using a Network Connection</a></li>
</ol>
@@ -449,7 +436,7 @@ applications.</p>
<p>The Android SDK includes a {@code sqlite3} database tool that allows you to browse
table contents, run SQL commands, and perform other useful functions on SQLite
-databases. See <a href="{@docRoot}guide/developing/tools/adb.html#sqlite">Examining sqlite3
+databases. See <a href="{@docRoot}tools/help/adb.html#sqlite">Examining sqlite3
databases from a remote shell</a> to learn how to run this tool.
</p>
diff --git a/docs/html/guide/topics/data/index.html b/docs/html/guide/topics/data/index.html
deleted file mode 100644
index a94f8c0b2fe8..000000000000
--- a/docs/html/guide/topics/data/index.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=data-storage.html">
-<title>Redirecting...</title>
-</head>
-<body>
-<a href="data-storage.html">click here</a> if you are not redirected.
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/guide/topics/data/index.jd b/docs/html/guide/topics/data/index.jd
new file mode 100644
index 000000000000..1e082b3fef95
--- /dev/null
+++ b/docs/html/guide/topics/data/index.jd
@@ -0,0 +1,23 @@
+page.title=Data Storage
+page.landing=true
+page.landing.intro=Store application data in databases, files, or preferences, in internal or removeable storage. You can also add a data backup service to let users store and recover application and system data.
+page.landing.image=
+
+@jd:body
+
+<div class="landing-docs">
+
+
+ <div class="col-12">
+ <h3>Training</h3>
+
+ <a href="http://developer.android.com/training/cloudsync/index.html">
+ <h4>Syncing to the Cloud</h4>
+ <p>This class covers different strategies for cloud enabled applications. It covers syncing
+data with the cloud using your own back-end web application, and backing up data using the cloud so
+that users can restore their data when installing your application on a new device.</p>
+ </a>
+
+ </div>
+
+</div> \ No newline at end of file
diff --git a/docs/html/guide/topics/data/install-location.jd b/docs/html/guide/topics/data/install-location.jd
new file mode 100644
index 000000000000..19c4b3900ef1
--- /dev/null
+++ b/docs/html/guide/topics/data/install-location.jd
@@ -0,0 +1,206 @@
+page.title=App Install Location
+@jd:body
+
+
+<div id="qv-wrapper">
+<div id="qv">
+
+ <h2>Quickview</h2>
+ <ul>
+ <li>You can allow your application to install on the device's external storage.</li>
+ <li>Some types of applications should <strong>not</strong> allow installation on the external
+storage.</li>
+ <li>Installing on the external storage is ideal for large applications that are not tightly
+integrated with the system (most commonly, games).</li>
+ </ul>
+
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#Compatiblity">Backward Compatibility</a></li>
+ <li><a href="#ShouldNot">Applications That Should NOT Install on External Storage</a></li>
+ <li><a href="#Should">Applications That Should Install on External Storage</a></li>
+ </ol>
+
+ <h2>See also</h2>
+ <ol>
+ <li><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">
+&lt;manifest&gt;</a></code></li>
+ </ol>
+
+</div>
+</div>
+
+<p>Beginning with API Level 8, you can allow your application to be installed on the
+external storage (for example, the device's SD card). This is an optional feature you can declare
+for your application with the <a
+href="{@docRoot}guide/topics/manifest/manifest-element.html#install">{@code
+android:installLocation}</a> manifest attribute. If you do
+<em>not</em> declare this attribute, your application will be installed on the internal storage
+only and it cannot be moved to the external storage.</p>
+
+<p>To allow the system to install your application on the external storage, modify your
+manifest file to include the <a
+href="{@docRoot}guide/topics/manifest/manifest-element.html#install">{@code
+android:installLocation}</a> attribute in the <code><a
+href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code> element,
+with a value of either "{@code preferExternal}" or "{@code auto}". For example:</p>
+
+<pre>
+&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ android:installLocation="preferExternal"
+ ... &gt;
+</pre>
+
+<p>If you declare "{@code preferExternal}", you request that your application be installed on the
+external storage, but the system does not guarantee that your application will be installed on
+the external storage. If the external storage is full, the system will install it on the internal
+storage. The user can also move your application between the two locations.</p>
+
+<p>If you declare "{@code auto}", you indicate that your application may be installed on the
+external storage, but you don't have a preference of install location. The system will
+decide where to install your application based on several factors. The user can also move your
+application between the two locations.</p>
+
+<p>When your application is installed on the external storage:</p>
+<ul>
+ <li>There is no effect on the application performance so long
+as the external storage is mounted on the device.</li>
+ <li>The {@code .apk} file is saved on the external storage, but all private user data,
+databases, optimized {@code .dex} files, and extracted native code are saved on the
+internal device memory.</li>
+ <li>The unique container in which your application is stored is encrypted with a randomly
+generated key that can be decrypted only by the device that originally installed it. Thus, an
+application installed on an SD card works for only one device.</li>
+ <li>The user can move your application to the internal storage through the system settings.</li>
+</ul>
+
+<p class="warning"><strong>Warning:</strong> When the user enables USB mass storage to share files
+with a computer or unmounts the SD card via the system settings, the external storage is unmounted
+from the device and all applications running on the external storage are immediately killed.</p>
+
+
+
+<h2 id="Compatiblity">Backward Compatibility</h2>
+
+<p>The ability for your application to install on the external storage is a feature available only
+on devices running API Level 8 (Android 2.2) or greater. Existing applications that were built prior
+to API Level 8 will always install on the internal storage and cannot be moved to the external
+storage (even on devices with API Level 8). However, if your application is designed to support an
+API Level <em>lower than</em> 8, you can choose to support this feature for devices with API Level 8
+or greater and still be compatible with devices using an API Level lower than 8.</p>
+
+<p>To allow installation on external storage and remain compatible with versions lower than API
+Level 8:</p>
+<ol>
+ <li>Include the {@code android:installLocation} attribute with a value of "{@code auto}" or
+"{@code preferExternal}" in the <code><a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">&lt;manifest&gt;</a></code>
+element.</li>
+ <li>Leave your {@code android:minSdkVersion} attribute as is (something <em>less
+than</em> "8") and be certain that your application code uses only APIs compatible with that
+level.</li>
+ <li>In order to compile your application, change your build target to API Level 8. This is
+necessary because older Android libraries don't understand the {@code android:installLocation}
+attribute and will not compile your application when it's present.</li>
+</ol>
+
+<p>When your application is installed on a device with an API Level lower than 8, the {@code
+android:installLocation} attribute is ignored and the application is installed on the internal
+storage.</p>
+
+<p class="caution"><strong>Caution:</strong> Although XML markup such as this will be ignored by
+older platforms, you must be careful not to use programming APIs introduced in API Level 8
+while your {@code minSdkVersion} is less than "8", unless you perform the work necessary to
+provide backward compatibility in your code. For information about building
+backward compatibility in your application code, see the <a
+href="{@docRoot}resources/articles/backward-compatibility.html">Backward Compatibility</a>
+article.</p>
+
+
+
+<h2 id="ShouldNot">Applications That Should NOT Install on External Storage</h2>
+
+<p>When the user enables USB mass storage to share files with their computer (or otherwise
+unmounts or removes the external storage), any application
+installed on the external storage and currently running is killed. The system effectively becomes
+unaware of the application until mass storage is disabled and the external storage is
+remounted on the device. Besides killing the application and making it unavailable to the user,
+this can break some types of applications in a more serious way. In order for your application to
+consistently behave as expected, you <strong>should not</strong> allow your application to be
+installed on the external storage if it uses any of the following features, due to the cited
+consequences when the external storage is unmounted:</p>
+
+<dl>
+ <dt>Services</dt>
+ <dd>Your running {@link android.app.Service} will be killed and will not be restarted when
+external storage is remounted. You can, however, register for the {@link
+android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE} broadcast Intent, which will notify
+your application when applications installed on external storage have become available to the
+system again. At which time, you can restart your Service.</dd>
+ <dt>Alarm Services</dt>
+ <dd>Your alarms registered with {@link android.app.AlarmManager} will be cancelled. You must
+manually re-register any alarms when external storage is remounted.</dd>
+ <dt>Input Method Engines</dt>
+ <dd>Your <a href="{@docRoot}resources/articles/on-screen-inputs.html">IME</a> will be
+replaced by the default IME. When external storage is remounted, the user can open system settings
+to enable your IME again.</dd>
+ <dt>Live Wallpapers</dt>
+ <dd>Your running <a href="{@docRoot}resources/articles/live-wallpapers.html">Live Wallpaper</a>
+will be replaced by the default Live Wallpaper. When external storage is remounted, the user can
+select your Live Wallpaper again.</dd>
+ <dt>Live Folders</dt>
+ <dd>Your <a href="{@docRoot}resources/articles/live-folders.html">Live Folder</a> will be
+removed from the home screen. When external storage is remounted, the user can add your Live Folder
+to the home screen again.</dd>
+ <dt>App Widgets</dt>
+ <dd>Your <a href="{@docRoot}guide/topics/appwidgets/index.html">App Widget</a> will be removed
+from the home screen. When external storage is remounted, your App Widget will <em>not</em> be
+available for the user to select until the system resets the home application (usually not until a
+system reboot).</dd>
+ <dt>Account Managers</dt>
+ <dd>Your accounts created with {@link android.accounts.AccountManager} will disappear until
+external storage is remounted.</dd>
+ <dt>Sync Adapters</dt>
+ <dd>Your {@link android.content.AbstractThreadedSyncAdapter} and all its sync functionality will
+not work until external storage is remounted.</dd>
+ <dt>Device Administrators</dt>
+ <dd>Your {@link android.app.admin.DeviceAdminReceiver} and all its admin capabilities will
+be disabled, which can have unforeseeable consequences for the device functionality, which may
+persist after external storage is remounted.</dd>
+ <dt>Broadcast Receivers listening for "boot completed"</dt>
+ <dd>The system delivers the {@link android.content.Intent#ACTION_BOOT_COMPLETED} broadcast
+before the external storage is mounted to the device. If your application is installed on the
+external storage, it can never receive this broadcast.</dd>
+ <dt>Copy Protection</dt>
+ <dd>Your application cannot be installed to a device's SD card if it uses Google Play's
+ Copy Protection feature. However, if you use Google Play's
+ <a href="{@docRoot}guide/google/play/licensing.html">Application Licensing</a> instead, your
+ application <em>can</em> be installed to internal or external storage, including SD cards.</dd>
+</dl>
+
+<p>If your application uses any of the features listed above, you <strong>should not</strong> allow
+your application to install on external storage. By default, the system <em>will not</em> allow your
+application to install on the external storage, so you don't need to worry about your existing
+applications. However, if you're certain that your application should never be installed on the
+external storage, then you should make this clear by declaring <a
+href="{@docRoot}guide/topics/manifest/manifest-element.html#install">{@code
+android:installLocation}</a> with a value of "{@code internalOnly}". Though this does not
+change the default behavior, it explicitly states that your application should only be installed
+on the internal storage and serves as a reminder to you and other developers that this decision has
+been made.</p>
+
+
+<h2 id="Should">Applications That Should Install on External Storage</h2>
+
+<p>In simple terms, anything that does not use the features listed in the previous section
+are safe when installed on external storage. Large games are more commonly the types of
+applications that should allow installation on external storage, because games don't typically
+provide additional services when inactive. When external storage becomes unavailable and a game
+process is killed, there should be no visible effect when the storage becomes available again and
+the user restarts the game (assuming that the game properly saved its state during the normal
+<a href="{@docRoot}guide/components/activities.html#Lifecycle">Activity lifecycle</a>).</p>
+
+<p>If your application requires several megabytes for the APK file, you should
+carefully consider whether to enable the application to install on the external storage so that
+users can preserve space on their internal storage.</p>
+
diff --git a/docs/html/guide/topics/drawing/index.html b/docs/html/guide/topics/drawing/index.html
deleted file mode 100644
index 43c14994df23..000000000000
--- a/docs/html/guide/topics/drawing/index.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=opengl.html">
-<title>Redirecting...</title>
-</head>
-<body>
-<a href="opengl.html">click here</a> if you are not redirected.
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/guide/topics/drawing/opengl.jd b/docs/html/guide/topics/drawing/opengl.jd
deleted file mode 100644
index e22a251f6962..000000000000
--- a/docs/html/guide/topics/drawing/opengl.jd
+++ /dev/null
@@ -1,53 +0,0 @@
-page.title=OpenGL
-@jd:body
-
-<p>Android includes support for 3D hardware acceleration. This functionality is
-accessed via the OpenGL API &mdash; specifically, the OpenGL ES API.</p>
-
-<p>OpenGL ES is a flavor of the OpenGL specification intended for embedded
-devices. Versions of OpenGL ES are loosely peered to versions of the primary
-OpenGL standard. Android currently supports OpenGL ES 1.0, which corresponds
-to OpenGL 1.3. So, if the application you have in mind is possible with OpenGL
-1.3 on a desktop system, it should be possible on Android.</p>
-
-<p>The specific API provided by Android is similar to the J2ME JSR239 OpenGL
-ES API. However, it may not be identical, so watch out for deviations.</p>
-
-<h2>Using the API</h2>
-
-<p>Here's how to use the API at an extremely high level:</p>
-
-<ol>
-<li>Write a custom View subclass.</li>
-<li>Obtain a handle to an OpenGLContext, which provides access to the OpenGL functionality.</li>
-<li>In your View's onDraw() method, get a handle to a GL object, and use its methods to perform GL operations.</li>
-</ol>
-
-<p>For an example of this usage model (based on the classic GL ColorCube),
-see
-<a href="{@docRoot}samples/ApiDemos/src/com/example/android/apis/graphics/GLView1.html">com.android.samples.graphics.GLView1.java</a>
-in the ApiDemos sample code project. A slightly more sophisticated version showing how to use
-it with threads can be found in
-<a href="{@docRoot}samples/ApiDemos/src/com/example/android/apis/graphics/GLSurfaceViewActivity.html">com.android.samples.graphics.GLSurfaceViewActivity.java</a>.
-</p>
-
-<p>Writing a summary of how to actually write 3D applications using OpenGL is
-beyond the scope of this text and is left as an exercise for the reader.</p>
-
-<h2>Links to Additional Information</h2>
-
-<p>Information about OpenGL ES can be
-found at <a title="http://www.khronos.org/opengles/"
-href="http://www.khronos.org/opengles/">http://www.khronos.org/opengles/</a>.</p>
-
-<p>Information specifically
-about OpenGL ES 1.0 (including a detailed specification) can be found
-at <a title="http://www.khronos.org/opengles/1_X/"
-href="http://www.khronos.org/opengles/1_X/">http://www.khronos.org/opengles/1_X/</a>.</p>
-
-<p>The documentation for the Android {@link javax.microedition.khronos.opengles.GL
-OpenGL ES implementations} are also available.</p>
-
-<p>Finally, note that though Android does include some basic support for
-OpenGL ES 1.1, the support is <strong>not complete</strong>, and should not be relied
-upon at this time.</p>
diff --git a/docs/html/guide/topics/graphics/2d-graphics.jd b/docs/html/guide/topics/graphics/2d-graphics.jd
index 5cf1a59b2232..d842cb9e611d 100644
--- a/docs/html/guide/topics/graphics/2d-graphics.jd
+++ b/docs/html/guide/topics/graphics/2d-graphics.jd
@@ -476,7 +476,7 @@ allowed.
do.
</p>
-<p>The <a href="{@docRoot}guide/developing/tools/draw9patch.html">Draw 9-patch</a> tool offers
+<p>The <a href="{@docRoot}tools/help/draw9patch.html">Draw 9-patch</a> tool offers
an extremely handy way to create your NinePatch images, using a WYSIWYG graphics editor. It
even raises warnings if the region you've defined for the stretchable area is at risk of
producing drawing artifacts as a result of the pixel replication.
diff --git a/docs/html/guide/topics/graphics/animation.jd b/docs/html/guide/topics/graphics/animation.jd
deleted file mode 100644
index 561369d2fe86..000000000000
--- a/docs/html/guide/topics/graphics/animation.jd
+++ /dev/null
@@ -1,64 +0,0 @@
-page.title=Animation
-@jd:body
-
- <div id="qv-wrapper">
- <div id="qv">
-
- <h2>See also</h2>
- <ol>
- <li><a href="{@docRoot}guide/topics/graphics/prop-animation.html">Property
-Animation</a></li>
- <li><a href="{@docRoot}guide/topics/graphics/view-animation.html">View Animation</a></li>
- <li><a href="{@docRoot}guide/topics/graphics/drawable-animation.html">Drawable Animation</a></li>
- <ol>
- </div>
- </div>
-
- <p>The Android framework provides two animation systems: property animation
- (introduced in Android 3.0) and view animation. Both animation systems are viable options,
- but the property animation system, in general, is the preferred method to use, because it
- is more flexible and offers more features. In addition to these two systems, you can utilize Drawable
-animation, which allows you to load drawable resources and display them one frame after
-another.</p>
-
- <p>The view animation system provides the capability to only animate {@link android.view.View}
-objects, so if you wanted to animate non-{@link android.view.View} objects, you have to implement
-your own code to do so. The view animation system is also constrained in the fact that it only
-exposes a few aspects of a {@link android.view.View} object to animate, such as the scaling and
-rotation of a View but not the background color, for instance.</p>
-
- <p>Another disadvantage of the view animation system is that it only modified where the
- View was drawn, and not the actual View itself. For instance, if you animated a button to move
- across the screen, the button draws correctly, but the actual location where you can click the
- button does not change, so you have to implement your own logic to handle this.</p>
-
- <p>With the property animation system, these constraints are completely removed, and you can animate
- any property of any object (Views and non-Views) and the object itself is actually modified.
- The property animation system is also more robust in the way it carries out animation. At
- a high level, you assign animators to the properties that you want to animate, such as color,
- position, or size and can define aspects of the animation such as interpolation and
- synchronization of multiple animators.</p>
-
- <p>The view animation system, however, takes less time to setup and requires less code to write.
- If view animation accomplishes everything that you need to do, or if your existing code already
- works the way you want, there is no need to use the property animation system. It also might
- make sense to use both animation systems for different situations if the use case arises.</p>
-
-<dl>
-<dt><strong><a href="{@docRoot}guide/topics/graphics/prop-animation.html">Property
-Animation</a></strong></dt>
-<dd>Introduced in Android 3.0 (API level 11), the property animation system lets you
-animate properties of any object, including ones that are not rendered to the screen. The system is
-extensible and lets you animate properties of custom types as well.</dd>
-
-<dt><strong><a href="{@docRoot}guide/topics/graphics/view-animation.html">View
-Animation</a></strong></dt>
-<dd>View Animation is the older system and can only be used for Views. It is relatively easy to
-setup and offers enough capabilities to meet many application's needs.</dd>
-</dl>
-
-<dt><strong><a href="{@docRoot}guide/topics/graphics/drawable-animation.html">Drawable
-Animation</a></strong></dt>
-<dd>Drawable animation involves displaying {@link android.graphics.drawable.Drawable} resources one
-after another, like a roll of film. This method of animation is useful if you want to animate
-things that are easier to represent with Drawable resources, such as a progression of bitmaps.</dd>
diff --git a/docs/html/guide/topics/graphics/index.jd b/docs/html/guide/topics/graphics/index.jd
index ab623c269100..17f630994952 100644
--- a/docs/html/guide/topics/graphics/index.jd
+++ b/docs/html/guide/topics/graphics/index.jd
@@ -1,51 +1,49 @@
-page.title=Graphics
-@jd:body
-
-<div id="qv-wrapper">
- <div id="qv">
- <h2>Topics</h2>
- <ol>
- <li><a href="{@docRoot}guide/topics/graphics/2d-graphics.html">Canvas and Drawables</a></li>
- <li><a href="{@docRoot}guide/topics/graphics/hardware-accel.html">Hardware Acceleration</a></li>
- <li><a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL</a></li>
- </ol>
- </div>
-</div>
-
-<p>When writing an application, it's important to consider exactly what your graphical demands will be.
-Varying graphical tasks are best accomplished with varying techniques. For example, graphics and animations
-for a rather static application should be implemented much differently than graphics and animations
-for an interactive game. Here, we'll discuss a few of the options you have for drawing graphics
-on Android and which tasks they're best suited for.
-</p>
+page.title=Animation and Graphics
+page.landing=true
+page.landing.intro=Make your apps look and perform their best using Android's powerful graphics features such as OpenGL, hardware acceleration, and built-in UI animations.
+page.landing.image=
-<dl>
-<dt><strong><a href="{@docRoot}guide/topics/graphics/2d-graphics.html">Canvas and
-Drawables</a></strong></dt>
-<dd>Android provides a set of {@link android.view.View} widgets that provide general functionality
-for a wide array of user interfaces. You can also extend these widgets to modify the way they
-look or behave. In addition, you can do your own custom 2D rendering using the various drawing
-methods contained in the {@link android.graphics.Canvas} class or create {@link
-android.graphics.drawable.Drawable} objects for things such as textured buttons or frame-by-frame
-animations.</dd>
+@jd:body
-<dt><strong><a href="{@docRoot}guide/topics/graphics/hardware-accel.html">Hardware
-Acceleration</a></strong></dt>
-<dd>Beginning in Android 3.0, you can hardware accelerate the majority of
-the drawing done by the Canvas APIs to further increase their performance.</dd>
+<div class="landing-docs">
-<dt><strong><a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL</a></strong></dt>
-<dd>Android supports OpenGL ES 1.0 and 2.0, with Android framework APIs as well as natively
-with the Native Development Kit (NDK). Using the framework APIs is desireable when you want to add a
-few graphical enhancements to your application that are not supported with the Canvas APIs, or if
-you desire platform independence and don't demand high performance. There is a performance hit in
-using the framework APIs compared to the NDK, so for many graphic intensive applications such as
-games, using the NDK is beneficial (It is important to note though that you can still get adequate
-performance using the framework APIs. For example, the Google Body app is developed entirely
-using the framework APIs). OpenGL with the NDK is also useful if you have a lot of native
-code that you want to port over to Android. For more information about using the NDK, read the
-docs in the <code>docs/</code> directory of the <a href="{@docRoot}sdk/ndk/index.html">NDK
-download.</a></dd>
-</dl>
+ <div class="col-6">
+ <h3>Blog Articles</h3>
+ <a
+href="http://android-developers.blogspot.com/2011/11/android-40-graphics-and-animations.html">
+ <h4>Android 4.0 Graphics and Animations</h4>
+ <p>Earlier this year, Android 3.0 launched with a new 2D rendering pipeline designed to
+support hardware acceleration on tablets. With this new pipeline, all drawing operations performed
+by the UI toolkit are carried out using the GPU. You’ll be happy to hear that Android 4.0, Ice Cream
+Sandwich, brings an improved version of the hardware-accelerated 2D rendering pipeline.</p>
+ </a>
+
+ <a
+href="http://android-developers.blogspot.com/2011/05/introducing-viewpropertyanimator.html">
+ <h4>Introducing ViewPropertyAnimator</h4>
+ <p>This new animation system makes it easy to animate any kind of property on any object,
+including the new properties added to the View class in 3.0. In the 3.1 release, we added a small
+utility class that makes animating these properties even easier.</p>
+ </a>
+
+ <a
+href="http://android-developers.blogspot.com/2011/03/android-30-hardware-acceleration.html">
+ <h4>Android 3.0 Hardware Acceleration</h4>
+ <p>Hardware accelerated graphics is nothing new to the Android platform, it has always been
+used for windows composition or OpenGL games for instance, but with this new rendering pipeline
+applications can benefit from an extra boost in performance.</p>
+ </a>
+ </div>
+ <div class="col-6">
+ <h3>Training</h3>
+ <a href="{@docRoot}training/displaying-bitmaps/index.html">
+ <h4>Displaying Bitmaps Efficiently</h4>
+ <p>This class covers some common techniques for processing and loading Bitmap objects in a way
+that keeps your user interface (UI) components responsive and avoids exceeding your application
+memory limit.</p>
+ </a>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/docs/html/guide/topics/graphics/opengl.jd b/docs/html/guide/topics/graphics/opengl.jd
index a786d4282d6f..a9fedb708228 100644
--- a/docs/html/guide/topics/graphics/opengl.jd
+++ b/docs/html/guide/topics/graphics/opengl.jd
@@ -20,6 +20,7 @@ parent.link=index.html
<li><a href="#proj-es1">Projection and camera in ES 2.0</a></li>
</ol>
</li>
+ <li><a href="#faces-winding">Shape Faces and Winding</li>
<li><a href="#compatibility">OpenGL Versions and Device Compatibility</a>
<ol>
<li><a href="#textures">Texture compression support</a></li>
@@ -33,11 +34,6 @@ parent.link=index.html
<li>{@link android.opengl.GLSurfaceView}</li>
<li>{@link android.opengl.GLSurfaceView.Renderer}</li>
</ol>
- <h2>Related tutorials</h2>
- <ol>
- <li><a href="{@docRoot}resources/tutorials/opengl/opengl-es10.html">OpenGL ES 1.0</a></li>
- <li><a href="{@docRoot}resources/tutorials/opengl/opengl-es20.html">OpenGL ES 2.0</a></li>
- </ol>
<h2>Related samples</h2>
<ol>
<li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/GLSurfaceViewActivity.html">GLSurfaceViewActivity</a></li>
@@ -48,8 +44,8 @@ href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}resources/articles/glsurfaceview.html">Introducing
-GLSurfaceView</a></li>
+ <li><a href="{@docRoot}training/graphics/opengl/index.html">
+ Displaying Graphics with OpenGL ES</a></li>
<li><a href="http://www.khronos.org/opengles/">OpenGL ES</a></li>
<li><a href="http://www.khronos.org/opengles/1_X/">OpenGL ES 1.x Specification</a></li>
<li><a href="http://www.khronos.org/opengles/2_X/">OpenGL ES 2.x specification</a></li>
@@ -73,7 +69,7 @@ OpenGL ES 2.0 API specification.</p>
<p>Android supports OpenGL both through its framework API and the Native Development
Kit (NDK). This topic focuses on the Android framework interfaces. For more information about the
-NDK, see the <a href="{@docRoot}sdk/ndk/index.html">Android NDK</a>.
+NDK, see the <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a>.
<p>There are two foundational classes in the Android framework that let you create and manipulate
graphics with the OpenGL ES API: {@link android.opengl.GLSurfaceView} and {@link
@@ -389,6 +385,43 @@ objects to be rendered by OpenGL.
href="{@docRoot}resources/tutorials/opengl/opengl-es20.html#projection-and-views">OpenGL ES 2.0
tutorial</a>.</p>
+<h2 id="faces-winding">Shape Faces and Winding</h2>
+
+<p>In OpenGL, the face of a shape is a surface defined by three or more points in three-dimensional
+space. A set of three or more three-dimensional points (called vertices in OpenGL) have a front face
+and a back face. How do you know which face is front and which is the back? Good question. The
+answer has to do with winding, or, the direction in which you define the points of a shape.</p>
+
+<img src="{@docRoot}images/opengl/ccw-winding.png">
+<p class="img-caption">
+ <strong>Figure 1.</strong> Illustration of a coordinate list which translates into a
+counterclockwise drawing order.</p>
+
+<p>In this example, the points of the triangle are defined in an order such that they are drawn in a
+counterclockwise direction. The order in which these coordinates are drawn defines the winding
+direction for the shape. By default, in OpenGL, the face which is drawn counterclockwise is the
+front face. The triangle shown in Figure 1 is defined so that you are looking at the front face of
+the shape (as interpreted by OpenGL) and the other side is the back face.</p>
+
+<p>Why is it important to know which face of a shape is the front face? The answer has to do with a
+commonly used feature of OpenGL, called face culling. Face culling is an option for the OpenGL
+environment which allows the rendering pipeline to ignore (not calculate or draw) the back face of a
+shape, saving time, memory and processing cycles:</p>
+
+<pre>
+// enable face culling feature
+gl.glEnable(GL10.GL_CULL_FACE);
+// specify which faces to not draw
+gl.glCullFace(GL10.GL_BACK);
+</pre>
+
+<p>If you try to use the face culling feature without knowing which sides of your shapes are the
+front and back, your OpenGL graphics are going to look a bit thin, or possibly not show up at all.
+So, always define the coordinates of your OpenGL shapes in a counterclockwise drawing order.</p>
+
+<p class="note"><strong>Note:</strong> It is possible to set an OpenGL environment to treat the
+clockwise face as the front face, but doing so requires more code and is likely to confuse
+experienced OpenGL developers when you ask them for help. So don’t do that.</p>
<h2 id="compatibility">OpenGL Versions and Device Compatibility</h2>
@@ -410,7 +443,8 @@ texture compression, see the <a
href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/CompressedTextureActivity.html"
>CompressedTextureActivity</a> code sample.</p>
-<p>To check if the ETC1 format is supported on a device, call the {@link
+<p>The ETC format is supported by most Android devices, but it not guarranteed to be available. To
+check if the ETC1 format is supported on a device, call the {@link
android.opengl.ETC1Util#isETC1Supported() ETC1Util.isETC1Supported()} method.</p>
<p class="note"><b>Note:</b> The ETC1 texture compression format does not support textures with an
diff --git a/docs/html/guide/topics/graphics/overview.jd b/docs/html/guide/topics/graphics/overview.jd
new file mode 100644
index 000000000000..a53cd3f15936
--- /dev/null
+++ b/docs/html/guide/topics/graphics/overview.jd
@@ -0,0 +1,73 @@
+page.title=Animation and Graphics Overview
+@jd:body
+
+ <p>Android provides a variety of powerful APIs for applying animation to UI elements and drawing custom
+ 2D and 3D graphics. The sections below provide an overview of the APIs and system capabilities available
+ and help you decide with approach is best for your needs.</p>
+
+ <h3 id="animation">Animation</h3>
+
+ <p>The Android framework provides two animation systems: property animation
+ (introduced in Android 3.0) and view animation. Both animation systems are viable options,
+ but the property animation system, in general, is the preferred method to use, because it
+ is more flexible and offers more features. In addition to these two systems, you can utilize Drawable
+ animation, which allows you to load drawable resources and display them one frame after
+ another.</p>
+
+<dl>
+<dt><strong><a href="{@docRoot}guide/topics/graphics/prop-animation.html">Property
+Animation</a></strong></dt>
+<dd>Introduced in Android 3.0 (API level 11), the property animation system lets you
+animate properties of any object, including ones that are not rendered to the screen. The system is
+extensible and lets you animate properties of custom types as well.</dd>
+
+<dt><strong><a href="{@docRoot}guide/topics/graphics/view-animation.html">View
+Animation</a></strong></dt>
+<dd>View Animation is the older system and can only be used for Views. It is relatively easy to
+setup and offers enough capabilities to meet many application's needs.</dd>
+</dl>
+
+<dt><strong><a href="{@docRoot}guide/topics/graphics/drawable-animation.html">Drawable
+Animation</a></strong></dt>
+<dd>Drawable animation involves displaying {@link android.graphics.drawable.Drawable} resources one
+after another, like a roll of film. This method of animation is useful if you want to animate
+things that are easier to represent with Drawable resources, such as a progression of bitmaps.</dd>
+
+<h3 id="graphics">2D and 3D Graphics</h3>
+
+<p>When writing an application, it's important to consider exactly what your graphical demands will be.
+Varying graphical tasks are best accomplished with varying techniques. For example, graphics and animations
+for a rather static application should be implemented much differently than graphics and animations
+for an interactive game. Here, we'll discuss a few of the options you have for drawing graphics
+on Android and which tasks they're best suited for.
+</p>
+
+<dl>
+<dt><strong><a href="{@docRoot}guide/topics/graphics/2d-graphics.html">Canvas and
+Drawables</a></strong></dt>
+<dd>Android provides a set of {@link android.view.View} widgets that provide general functionality
+for a wide array of user interfaces. You can also extend these widgets to modify the way they
+look or behave. In addition, you can do your own custom 2D rendering using the various drawing
+methods contained in the {@link android.graphics.Canvas} class or create {@link
+android.graphics.drawable.Drawable} objects for things such as textured buttons or frame-by-frame
+animations.</dd>
+
+<dt><strong><a href="{@docRoot}guide/topics/graphics/hardware-accel.html">Hardware
+Acceleration</a></strong></dt>
+<dd>Beginning in Android 3.0, you can hardware accelerate the majority of
+the drawing done by the Canvas APIs to further increase their performance.</dd>
+
+<dt><strong><a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL</a></strong></dt>
+<dd>Android supports OpenGL ES 1.0 and 2.0, with Android framework APIs as well as natively
+with the Native Development Kit (NDK). Using the framework APIs is desireable when you want to add a
+few graphical enhancements to your application that are not supported with the Canvas APIs, or if
+you desire platform independence and don't demand high performance. There is a performance hit in
+using the framework APIs compared to the NDK, so for many graphic intensive applications such as
+games, using the NDK is beneficial (It is important to note though that you can still get adequate
+performance using the framework APIs. For example, the Google Body app is developed entirely
+using the framework APIs). OpenGL with the NDK is also useful if you have a lot of native
+code that you want to port over to Android. For more information about using the NDK, read the
+docs in the <code>docs/</code> directory of the <a href="{@docRoot}tools/sdk/ndk/index.html">NDK
+download.</a></dd>
+</dl>
+
diff --git a/docs/html/guide/topics/graphics/prop-animation.jd b/docs/html/guide/topics/graphics/prop-animation.jd
index be24788ea760..b733624a8727 100644
--- a/docs/html/guide/topics/graphics/prop-animation.jd
+++ b/docs/html/guide/topics/graphics/prop-animation.jd
@@ -166,6 +166,31 @@ parent.link=animation.html
"{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/animation/index.html">API
Demos</a> sample project provides many examples on how to use the property
animation system.</p>
+
+ <h2 id="property-vs-view">How Property Animation Differs from View Animation</h2>
+
+ <p>The view animation system provides the capability to only animate {@link android.view.View}
+ objects, so if you wanted to animate non-{@link android.view.View} objects, you have to implement
+ your own code to do so. The view animation system is also constrained in the fact that it only
+ exposes a few aspects of a {@link android.view.View} object to animate, such as the scaling and
+ rotation of a View but not the background color, for instance.</p>
+
+ <p>Another disadvantage of the view animation system is that it only modified where the
+ View was drawn, and not the actual View itself. For instance, if you animated a button to move
+ across the screen, the button draws correctly, but the actual location where you can click the
+ button does not change, so you have to implement your own logic to handle this.</p>
+
+ <p>With the property animation system, these constraints are completely removed, and you can animate
+ any property of any object (Views and non-Views) and the object itself is actually modified.
+ The property animation system is also more robust in the way it carries out animation. At
+ a high level, you assign animators to the properties that you want to animate, such as color,
+ position, or size and can define aspects of the animation such as interpolation and
+ synchronization of multiple animators.</p>
+
+ <p>The view animation system, however, takes less time to setup and requires less code to write.
+ If view animation accomplishes everything that you need to do, or if your existing code already
+ works the way you want, there is no need to use the property animation system. It also might
+ make sense to use both animation systems for different situations if the use case arises.</p>
<h2>API Overview</h2>
diff --git a/docs/html/guide/topics/renderscript/compute.jd b/docs/html/guide/topics/graphics/renderscript/compute.jd
index e827f003f97d..e827f003f97d 100644
--- a/docs/html/guide/topics/renderscript/compute.jd
+++ b/docs/html/guide/topics/graphics/renderscript/compute.jd
diff --git a/docs/html/guide/topics/renderscript/graphics.jd b/docs/html/guide/topics/graphics/renderscript/graphics.jd
index 462a9904faaa..58676ea99fe3 100644
--- a/docs/html/guide/topics/renderscript/graphics.jd
+++ b/docs/html/guide/topics/graphics/renderscript/graphics.jd
@@ -46,7 +46,8 @@ parent.link=index.html
<li><a href="{@docRoot}resources/samples/RenderScript/FountainFbo/index.html">FountainFbo</a></li>
- <li><a href="{@docRoot}resources/samples/RenderScript/HelloWorld/index.html">Hello World</a></li>
+ <li><a href="{@docRoot}resources/samples/RenderScript/HelloWorld/index.html">Hello
+World</a></li>
<li><a
href="{@docRoot}resources/samples/RenderScript/MiscSamples/index.html">Misc Samples</a></li>
diff --git a/docs/html/guide/topics/renderscript/index.jd b/docs/html/guide/topics/graphics/renderscript/index.jd
index b2d9f8461be3..b2d9f8461be3 100644
--- a/docs/html/guide/topics/renderscript/index.jd
+++ b/docs/html/guide/topics/graphics/renderscript/index.jd
diff --git a/docs/html/guide/topics/renderscript/reference.jd b/docs/html/guide/topics/graphics/renderscript/reference.jd
index a0a9df2df8ab..a0a9df2df8ab 100644
--- a/docs/html/guide/topics/renderscript/reference.jd
+++ b/docs/html/guide/topics/graphics/renderscript/reference.jd
diff --git a/docs/html/guide/topics/intents/index.html b/docs/html/guide/topics/intents/index.html
deleted file mode 100644
index b831246ad7b6..000000000000
--- a/docs/html/guide/topics/intents/index.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=intents-filters.html">
-<title>Redirecting...</title>
-</head>
-<body>
-<a href="intents-filters.html">click here</a> if you are not redirected.
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/guide/topics/location/index.jd b/docs/html/guide/topics/location/index.jd
index 8a2e9cdb2bae..54c034d9cd13 100644
--- a/docs/html/guide/topics/location/index.jd
+++ b/docs/html/guide/topics/location/index.jd
@@ -13,8 +13,7 @@ device's location and bearing and register for updates</li>
<h2>Topics</h2>
<ol>
- <li><a href="{@docRoot}guide/topics/location/obtaining-user-location.html">Obtaining User
-Location</a></li>
+ <li><a href="{@docRoot}guide/topics/location/strategies.html">Location Strategies</a></li>
</ol>
<h2>See Also</h2>
@@ -58,8 +57,7 @@ comes within a given proximity (specified by radius in meters) of a given lat/lo
</ul>
<p>For more information, read the guide to <a
-href="{@docRoot}guide/topics/location/obtaining-user-location.html">Obtaining User
-Location</a>.</p>
+href="{@docRoot}guide/topics/location/strategies.html">Location Strategies</a>.</p>
<h2 id="maps">Google Maps External Library</h2>
@@ -98,8 +96,8 @@ Google APIs add-on, visit</p>
href="http://code.google.com/android/add-ons/google-apis">http://code.google.com/android/add-ons/google-apis</a></p>
<p>For your convenience, the Google APIs add-on is also available as a downloadable component from
-the Android SDK Manager (see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
-Components</a>).</p>
+the Android SDK Manager (see <a href="{@docRoot}sdk/exploring.html">Exploring the
+SDK</a>).</p>
<p class="note"><strong>Note:</strong> In order to display Google Maps data in a
MapView, you must register with the Google Maps service and obtain a Maps API
diff --git a/docs/html/guide/topics/location/obtaining-user-location.jd b/docs/html/guide/topics/location/strategies.jd
index 3b450f0d403a..f7909536f2f8 100644
--- a/docs/html/guide/topics/location/obtaining-user-location.jd
+++ b/docs/html/guide/topics/location/strategies.jd
@@ -1,4 +1,4 @@
-page.title=Obtaining User Location
+page.title=Location Strategies
parent.title=Location and Maps
parent.link=index.html
@jd:body
@@ -422,7 +422,7 @@ lat/long coordinates, with a GPX file for route playback, or a KML file for mult
</ul>
<p>For more information on using DDMS to spoof location data, see
-<a href="{@docRoot}guide/developing/debugging/ddms.html">Using DDMS</a>.
+<a href="{@docRoot}tools/debugging/ddms.html">Using DDMS</a>.
<h3 id="MockGeo">Using the "geo" command in the emulator console</h3>
@@ -451,4 +451,4 @@ lat/long coordinates, with a GPX file for route playback, or a KML file for mult
</ol>
<p>For information about how to connect to the emulator console, see
-<a href="{@docRoot}guide/developing/devices/emulator.html#console">Using the Emulator Console</a>.</p>
+<a href="{@docRoot}tools/devices/emulator.html#console">Using the Emulator Console</a>.</p>
diff --git a/docs/html/guide/topics/manifest/action-element.jd b/docs/html/guide/topics/manifest/action-element.jd
index 8ad94cdc1d50..037d0dc75d3d 100644
--- a/docs/html/guide/topics/manifest/action-element.jd
+++ b/docs/html/guide/topics/manifest/action-element.jd
@@ -16,7 +16,7 @@ parent.link=manifest-intro.html
An <code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">&lt;intent-filter&gt;</a></code> element must contain
one or more {@code &lt;action&gt;} elements. If it doesn't contain any, no
Intent objects will get through the filter. See
-<a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and
+<a href="{@docRoot}guide/components/intents-filters.html">Intents and
Intent Filters</a> for details on intent filters and the role of action
specifications within a filter.
</dd>
diff --git a/docs/html/guide/topics/manifest/activity-element.jd b/docs/html/guide/topics/manifest/activity-element.jd
index 9dc124be4f3e..88f226c7e61b 100644
--- a/docs/html/guide/topics/manifest/activity-element.jd
+++ b/docs/html/guide/topics/manifest/activity-element.jd
@@ -508,7 +508,7 @@ other activities and tasks using the <em>Back</em> button. </p>
<p>For more information on launch modes and their interaction with Intent
flags, see the
-<a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a>
+<a href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks and Back Stack</a>
document.
</p>
</dd>
diff --git a/docs/html/guide/topics/manifest/category-element.jd b/docs/html/guide/topics/manifest/category-element.jd
index f392c0a30f52..41a2cfdedb71 100644
--- a/docs/html/guide/topics/manifest/category-element.jd
+++ b/docs/html/guide/topics/manifest/category-element.jd
@@ -12,7 +12,7 @@ parent.link=manifest-intro.html
<dt>description:</dt>
<dd>Adds a category name to an intent filter. See
-<a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and
+<a href="{@docRoot}guide/components/intents-filters.html">Intents and
Intent Filters</a> for details on intent filters and the role of category
specifications within a filter.</dd>
diff --git a/docs/html/guide/topics/manifest/compatible-screens-element.jd b/docs/html/guide/topics/manifest/compatible-screens-element.jd
index a27c31624de2..bb004fbef46c 100644
--- a/docs/html/guide/topics/manifest/compatible-screens-element.jd
+++ b/docs/html/guide/topics/manifest/compatible-screens-element.jd
@@ -54,7 +54,7 @@ href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
&lt;supports-screens&gt;}</a> element to declare whether the system should resize your
application for different screen sizes.</p>
- <p>Also see the <a href="{@docRoot}guide/appendix/market-filters.html">Filters on Google Play</a>
+ <p>Also see the <a href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a>
document for more information about how Google Play filters applications using this and
other manifest elements.</p>
@@ -138,5 +138,5 @@ entry looks like if your application is compatible with only small and normal sc
<dt>see also:</dt>
<dd><a
href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a></dd>
-<dd><a href="{@docRoot}guide/appendix/market-filters.html">Filters on Google Play</a></dd>
+<dd><a href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a></dd>
</dl>
diff --git a/docs/html/guide/topics/manifest/data-element.jd b/docs/html/guide/topics/manifest/data-element.jd
index 9b0d0df6ae06..8fd91deae6a2 100644
--- a/docs/html/guide/topics/manifest/data-element.jd
+++ b/docs/html/guide/topics/manifest/data-element.jd
@@ -62,7 +62,7 @@ options. None of its attributes have default values.
<p>
Information on how intent filters work, including the rules for how Intent objects
are matched against filters, can be found in another document,
-<a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and
+<a href="{@docRoot}guide/components/intents-filters.html">Intents and
Intent Filters</a>. See also the
<a href="{@docRoot}guide/topics/manifest/manifest-intro.html#ifs">Intent Filters</a>
section in the introduction.
diff --git a/docs/html/guide/topics/manifest/intent-filter-element.jd b/docs/html/guide/topics/manifest/intent-filter-element.jd
index d2934005f47b..f90541cafd17 100644
--- a/docs/html/guide/topics/manifest/intent-filter-element.jd
+++ b/docs/html/guide/topics/manifest/intent-filter-element.jd
@@ -41,7 +41,7 @@ Most of the contents of the filter are described by its
<p>
For a more detailed discussion of filters, see the separate
-<a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents
+<a href="{@docRoot}guide/components/intents-filters.html">Intents
and Intent Filters</a> document, as well as the
<a href="{@docRoot}guide/topics/manifest/manifest-intro.html#ifs">Intents Filters</a>
section in the introduction.
diff --git a/docs/html/guide/topics/manifest/manifest-element.jd b/docs/html/guide/topics/manifest/manifest-element.jd
index 98968d739f12..a3d4a955e396 100644
--- a/docs/html/guide/topics/manifest/manifest-element.jd
+++ b/docs/html/guide/topics/manifest/manifest-element.jd
@@ -152,7 +152,7 @@ either internal or external storage through the system settings.</td>
<p class="caution"><strong>Caution:</strong> If your application uses Google Play's Copy
Protection feature, it cannot be installed to a device's SD card. However, if you use Google
- Play's <a href="{@docRoot}guide/market/licensing.html">Application Licensing</a> instead,
+ Play's <a href="{@docRoot}guide/google/play/licensing.html">Application Licensing</a> instead,
your application <em>can</em> be installed to internal or external storage, including SD cards.</p>
<p class="note"><strong>Note:</strong> By default, your application will be installed on the
diff --git a/docs/html/guide/topics/manifest/manifest-intro.jd b/docs/html/guide/topics/manifest/manifest-intro.jd
index 0f2030556587..a130f7d9761e 100644
--- a/docs/html/guide/topics/manifest/manifest-intro.jd
+++ b/docs/html/guide/topics/manifest/manifest-intro.jd
@@ -345,7 +345,7 @@ filters.
<p>
For information on how Intent objects are tested against intent filters,
see a separate document,
-<a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents
+<a href="{@docRoot}guide/components/intents-filters.html">Intents
and Intent Filters</a>.
</p>
diff --git a/docs/html/guide/topics/manifest/supports-gl-texture-element.jd b/docs/html/guide/topics/manifest/supports-gl-texture-element.jd
index ebdd0b10917a..6dfc59e0b800 100644
--- a/docs/html/guide/topics/manifest/supports-gl-texture-element.jd
+++ b/docs/html/guide/topics/manifest/supports-gl-texture-element.jd
@@ -141,7 +141,7 @@ and others.</td>
<dt>see also:</dt>
<dd>
<ul>
- <li><a href="{@docRoot}guide/appendix/market-filters.html">Filters on Google Play</a></li>
+ <li><a href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a></li>
</ul>
</dd>
diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd
index 5f0a501c3670..f60529513cfc 100644
--- a/docs/html/guide/topics/manifest/uses-feature-element.jd
+++ b/docs/html/guide/topics/manifest/uses-feature-element.jd
@@ -207,7 +207,7 @@ can check at run-time whether a higher level of OpenGL ES is available.)</p>
<li>{@link android.content.pm.FeatureInfo}</li>
<li>{@link android.content.pm.ConfigurationInfo}</li>
<li><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"><code>&lt;uses-permission&gt;</code></a></li>
- <li><a href="{@docRoot}guide/appendix/market-filters.html">Filters on Google Play</a></li>
+ <li><a href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a></li>
</ul>
</dd>
@@ -501,7 +501,7 @@ If you are using SDK Tools r8 or higher, you can find <code>aapt</code> in the
<p class="note"><strong>Note:</strong> You must use the version of
<code>aapt</code> that is provided for the latest Platform-Tools component available. If
you do not have the latest Platform-Tools component, download it using the <a
-href="{@docRoot}sdk/adding-components.html">Android SDK Manager</a>.
+href="{@docRoot}sdk/exploring.html">Android SDK Manager</a>.
</p></li>
<li>Run <code>aapt</code> using this syntax: </li>
</ol>
diff --git a/docs/html/guide/topics/manifest/uses-library-element.jd b/docs/html/guide/topics/manifest/uses-library-element.jd
index 2f8eb508c270..3ad8ddb5589a 100644
--- a/docs/html/guide/topics/manifest/uses-library-element.jd
+++ b/docs/html/guide/topics/manifest/uses-library-element.jd
@@ -46,7 +46,7 @@ parent.link=manifest-intro.html
<dd>
Google Play filters applications based on the libraries installed on the
user's device. For more information about filtering, see the topic
- <a href="{@docRoot}guide/appendix/market-filters.html">Filters on Google Play</a>.
+ <a href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a>.
</dd>
</dl>
<p>
diff --git a/docs/html/guide/topics/manifest/uses-sdk-element.jd b/docs/html/guide/topics/manifest/uses-sdk-element.jd
index 8fa39d156914..29dcb56b8b74 100644
--- a/docs/html/guide/topics/manifest/uses-sdk-element.jd
+++ b/docs/html/guide/topics/manifest/uses-sdk-element.jd
@@ -3,6 +3,29 @@ parent.title=The AndroidManifest.xml File
parent.link=manifest-intro.html
@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+ <li><a href="#ApiLevels">What is API Level?</a></li>
+ <li><a href="#uses">Uses of API Level in Android</a></li>
+ <li><a href="#considerations">Development Considerations</a>
+ <ol>
+ <li><a href="#fc">Application forward compatibility</a></li>
+ <li><a href="#bc">Application backward compatibility</a></li>
+ <li><a href="#platform">Selecting a platform version and API Level</a></li>
+ <li><a href="#apilevel">Declaring a minimum API Level</a></li>
+ <li><a href="#testing">Testing against higher API Levels</a></li>
+ </ol>
+ </li>
+ <li><a href="#provisional">Using a Provisional API Level</a></li>
+ <li><a href="#filtering">Filtering the Reference Documentation by API Level</a></li>
+</ol>
+</div>
+</div>
+
<dl class="xml">
<dt>syntax:</dt>
<dd><pre>
@@ -25,9 +48,8 @@ The API Level is always a single integer. You cannot derive the API Level from
its associated Android version number (for example, it is not the same as the
major version or the sum of the major and minor versions).</p>
-<p>For more information, read about
-<a href="{@docRoot}guide/appendix/api-levels.html">Android API Levels</a> and
-<a href="{@docRoot}guide/publishing/versioning.html">Versioning Your Applications</a>.
+<p>Also read the document about
+<a href="{@docRoot}tools/publishing/versioning.html">Versioning Your Applications</a>.
</p></dd>
<div class="sidebox-wrapper" xstyle="margin-bottom:2em;margin-top:.5em;width:90%;">
@@ -42,7 +64,7 @@ version-compatibility. To do this, Google Play checks the <code>&lt;uses-sdk&gt;
attributes in each application's manifest to establish its version-compatibility
range, then shows or hides the application based on a comparison with the API
Level of the user's Android system version. For more information, see <a
-href="{@docRoot}guide/appendix/market-filters.html">Filters on Google Play</a>.</p>
+href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a>.</p>
</div>
</div>
@@ -156,3 +178,403 @@ download. </div>
<dd>API Level 1</dd>
</dl>
+
+
+
+
+
+<!--- CONTENT FROM OLD API LEVEL DOC ---->
+
+
+
+
+<h2 id="ApiLevels">What is API Level?</h2>
+
+<p>API Level is an integer value that uniquely identifies the framework API
+revision offered by a version of the Android platform.</p>
+
+<p>The Android platform provides a framework API that applications can use to
+interact with the underlying Android system. The framework API consists of:</p>
+
+<ul>
+<li>A core set of packages and classes</li>
+<li>A set of XML elements and attributes for declaring a manifest file</li>
+<li>A set of XML elements and attributes for declaring and accessing resources</li>
+<li>A set of Intents</li>
+<li>A set of permissions that applications can request, as well as permission
+enforcements included in the system</li>
+</ul>
+
+<p>Each successive version of the Android platform can include updates to the
+Android application framework API that it delivers. </p>
+
+<p>Updates to the framework API are designed so that the new API remains
+compatible with earlier versions of the API. That is, most changes in the API
+are additive and introduce new or replacement functionality. As parts of the API
+are upgraded, the older replaced parts are deprecated but are not removed, so
+that existing applications can still use them. In a very small number of cases,
+parts of the API may be modified or removed, although typically such changes are
+only needed to ensure API robustness and application or system security. All
+other API parts from earlier revisions are carried forward without
+modification.</p>
+
+<p>The framework API that an Android platform delivers is specified using an
+integer identifier called "API Level". Each Android platform version supports
+exactly one API Level, although support is implicit for all earlier API Levels
+(down to API Level 1). The initial release of the Android platform provided
+API Level 1 and subsequent releases have incremented the API Level.</p>
+
+<p>The following table specifies the API Level supported by each version of the
+Android platform.</p>
+
+<table>
+ <tr><th>Platform Version</th><th>API Level</th><th>VERSION_CODE</th><th>Notes</th></tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-4.0.3.html">Android 4.0.3</a></td>
+ <td><a href="{@docRoot}sdk/api_diff/15/changes.html" title="Diff Report">15</a></td>
+ <td>{@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1}</td>
+ <td rowspan="2"><a href="{@docRoot}about/versions/android-4.0-highlights.html">Platform
+Highlights</a></td></tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-4.0.html">Android 4.0, 4.0.1, 4.0.2</a></td>
+ <td><a href="{@docRoot}sdk/api_diff/14/changes.html" title="Diff Report">14</a></td>
+ <td>{@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH}</td>
+ </tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-3.2.html">Android 3.2</a></td>
+ <td><a href="{@docRoot}sdk/api_diff/13/changes.html" title="Diff Report">13</a></td>
+ <td>{@link android.os.Build.VERSION_CODES#HONEYCOMB_MR2}</td>
+ <td><!-- <a href="{@docRoot}about/versions/android-3.2-highlights.html">Platform
+Highlights</a>--></td></tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-3.1.html">Android 3.1.x</a></td>
+ <td><a href="{@docRoot}sdk/api_diff/12/changes.html" title="Diff Report">12</a></td>
+ <td>{@link android.os.Build.VERSION_CODES#HONEYCOMB_MR1}</td>
+ <td><a href="{@docRoot}about/versions/android-3.1-highlights.html">Platform Highlights</a></td></tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-3.0.html">Android 3.0.x</td>
+ <td><a href="{@docRoot}sdk/api_diff/11/changes.html" title="Diff Report">11</a></td>
+ <td>{@link android.os.Build.VERSION_CODES#HONEYCOMB}</td>
+ <td><a href="{@docRoot}about/versions/android-3.0-highlights.html">Platform Highlights</a></td></tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-2.3.3.html">Android 2.3.4<br>Android 2.3.3</td>
+ <td><a href="{@docRoot}sdk/api_diff/10/changes.html" title="Diff Report">10</a></td>
+ <td>{@link android.os.Build.VERSION_CODES#GINGERBREAD_MR1}</td>
+ <td rowspan="2"><a href="{@docRoot}about/versions/android-2.3-highlights.html">Platform
+Highlights</a></td></tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-2.3.html">Android 2.3.2<br>Android 2.3.1<br>Android
+2.3</td>
+ <td><a href="{@docRoot}sdk/api_diff/9/changes.html" title="Diff Report">9</a></td>
+ <td>{@link android.os.Build.VERSION_CODES#GINGERBREAD}</td>
+ </tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-2.2.html">Android 2.2.x</td>
+ <td ><a href="{@docRoot}sdk/api_diff/8/changes.html" title="Diff Report">8</a></td>
+ <td>{@link android.os.Build.VERSION_CODES#FROYO}</td>
+ <td><a href="{@docRoot}about/versions/android-2.2-highlights.html">Platform Highlights</a></td></tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-2.1.html">Android 2.1.x</td>
+ <td><a href="{@docRoot}sdk/api_diff/7/changes.html" title="Diff Report">7</a></td>
+ <td>{@link android.os.Build.VERSION_CODES#ECLAIR_MR1}</td>
+ <td rowspan="3" ><a href="{@docRoot}about/versions/android-2.0-highlights.html">Platform
+Highlights</a></td></tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-2.0.1.html">Android 2.0.1</td>
+ <td><a href="{@docRoot}sdk/api_diff/6/changes.html" title="Diff Report">6</a></td>
+ <td>{@link android.os.Build.VERSION_CODES#ECLAIR_0_1}</td>
+ </tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-2.0.html">Android 2.0</td>
+ <td><a href="{@docRoot}sdk/api_diff/5/changes.html" title="Diff Report">5</a></td>
+ <td>{@link android.os.Build.VERSION_CODES#ECLAIR}</td>
+ </tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-1.6.html">Android 1.6</td>
+ <td><a href="{@docRoot}sdk/api_diff/4/changes.html" title="Diff Report">4</a></td>
+ <td>{@link android.os.Build.VERSION_CODES#DONUT}</td>
+ <td><a href="{@docRoot}about/versions/android-1.6-highlights.html">Platform Highlights</a></td></tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-1.5.html">Android 1.5</td>
+ <td><a href="{@docRoot}sdk/api_diff/3/changes.html" title="Diff Report">3</a></td>
+ <td>{@link android.os.Build.VERSION_CODES#CUPCAKE}</td>
+ <td><a href="{@docRoot}about/versions/android-1.5-highlights.html">Platform Highlights</a></td></tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-1.1.html">Android 1.1</td>
+ <td>2</td>
+ <td>{@link android.os.Build.VERSION_CODES#BASE_1_1}</td><td></td></tr>
+
+ <tr><td>Android 1.0</td>
+ <td>1</td>
+ <td>{@link android.os.Build.VERSION_CODES#BASE}</td>
+ <td></td></tr>
+</table>
+
+
+<h2 id="uses">Uses of API Level in Android</h2>
+
+<p>The API Level identifier serves a key role in ensuring the best possible
+experience for users and application developers:
+
+<ul>
+<li>It lets the Android platform describe the maximum framework API revision
+that it supports</li>
+<li>It lets applications describe the framework API revision that they
+require</li>
+<li>It lets the system negotiate the installation of applications on the user's
+device, such that version-incompatible applications are not installed.</li>
+</ul>
+
+<p>Each Android platform version stores its API Level identifier internally, in
+the Android system itself. </p>
+
+<p>Applications can use a manifest element provided by the framework API &mdash;
+<code>&lt;uses-sdk&gt;</code> &mdash; to describe the minimum and maximum API
+Levels under which they are able to run, as well as the preferred API Level that
+they are designed to support. The element offers three key attributes:</p>
+
+<ul>
+<li><code>android:minSdkVersion</code> &mdash; Specifies the minimum API Level
+on which the application is able to run. The default value is "1".</li>
+<li><code>android:targetSdkVersion</code> &mdash; Specifies the API Level
+on which the application is designed to run. In some cases, this allows the
+application to use manifest elements or behaviors defined in the target
+API Level, rather than being restricted to using only those defined
+for the minimum API Level.</li>
+<li><code>android:maxSdkVersion</code> &mdash; Specifies the maximum API Level
+on which the application is able to run. <strong>Important:</strong> Please read the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
+documentation before using this attribute. </li>
+</ul>
+
+<p>For example, to specify the minimum system API Level that an application
+requires in order to run, the application would include in its manifest a
+<code>&lt;uses-sdk&gt;</code> element with a <code>android:minSdkVersion</code>
+attribute. The value of <code>android:minSdkVersion</code> would be the integer
+corresponding to the API Level of the earliest version of the Android platform
+under which the application can run. </p>
+
+<p>When the user attempts to install an application, or when revalidating an
+appplication after a system update, the Android system first checks the
+<code>&lt;uses-sdk&gt;</code> attributes in the application's manifest and
+compares the values against its own internal API Level. The system allows the
+installation to begin only if these conditions are met:</p>
+
+<ul>
+<li>If a <code>android:minSdkVersion</code> attribute is declared, its value
+must be less than or equal to the system's API Level integer. If not declared,
+the system assumes that the application requires API Level 1. </li>
+<li>If a <code>android:maxSdkVersion</code> attribute is declared, its value
+must be equal to or greater than the system's API Level integer.
+If not declared, the system assumes that the application
+has no maximum API Level. Please read the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
+documentation for more information about how the system handles this attribute.</li>
+</ul>
+
+<p>When declared in an application's manifest, a <code>&lt;uses-sdk&gt;</code>
+element might look like this: </p>
+
+<pre>&lt;manifest&gt;
+ &lt;uses-sdk android:minSdkVersion="5" /&gt;
+ ...
+&lt;/manifest&gt;</pre>
+
+<p>The principal reason that an application would declare an API Level in
+<code>android:minSdkVersion</code> is to tell the Android system that it is
+using APIs that were <em>introduced</em> in the API Level specified. If the
+application were to be somehow installed on a platform with a lower API Level,
+then it would crash at run-time when it tried to access APIs that don't exist.
+The system prevents such an outcome by not allowing the application to be
+installed if the lowest API Level it requires is higher than that of the
+platform version on the target device.</p>
+
+<p>For example, the {@link android.appwidget} package was introduced with API
+Level 3. If an application uses that API, it must declare a
+<code>android:minSdkVersion</code> attribute with a value of "3". The
+application will then be installable on platforms such as Android 1.5 (API Level
+3) and Android 1.6 (API Level 4), but not on the Android 1.1 (API Level 2) and
+Android 1.0 platforms (API Level 1).</p>
+
+<p>For more information about how to specify an application's API Level
+requirements, see the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
+ section of the manifest file documentation.</p>
+
+
+<h2 id="considerations">Development Considerations</h2>
+
+<p>The sections below provide information related to API level that you should
+consider when developing your application.</p>
+
+<h3 id="fc">Application forward compatibility</h3>
+
+<p>Android applications are generally forward-compatible with new versions of
+the Android platform.</p>
+
+<p>Because almost all changes to the framework API are additive, an Android
+application developed using any given version of the API (as specified by its
+API Level) is forward-compatible with later versions of the Android platform and
+higher API levels. The application should be able to run on all later versions
+of the Android platform, except in isolated cases where the application uses a
+part of the API that is later removed for some reason. </p>
+
+<p>Forward compatibility is important because many Android-powered devices
+receive over-the-air (OTA) system updates. The user may install your
+application and use it successfully, then later receive an OTA update to a new
+version of the Android platform. Once the update is installed, your application
+will run in a new run-time version of the environment, but one that has the API
+and system capabilities that your application depends on. </p>
+
+<p>In some cases, changes <em>below</em> the API, such those in the underlying
+system itself, may affect your application when it is run in the new
+environment. For that reason it's important for you, as the application
+developer, to understand how the application will look and behave in each system
+environment. To help you test your application on various versions of the Android
+platform, the Android SDK includes multiple platforms that you can download.
+Each platform includes a compatible system image that you can run in an AVD, to
+test your application. </p>
+
+<h3 id="bc">Application backward compatibility</h3>
+
+<p>Android applications are not necessarily backward compatible with versions of
+the Android platform older than the version against which they were compiled.
+</p>
+
+<p>Each new version of the Android platform can include new framework APIs, such
+as those that give applications access to new platform capabilities or replace
+existing API parts. The new APIs are accessible to applications when running on
+the new platform and, as mentioned above, also when running on later versions of
+the platform, as specified by API Level. Conversely, because earlier versions of
+the platform do not include the new APIs, applications that use the new APIs are
+unable to run on those platforms.</p>
+
+<p>Although it's unlikely that an Android-powered device would be downgraded to
+a previous version of the platform, it's important to realize that there are
+likely to be many devices in the field that run earlier versions of the
+platform. Even among devices that receive OTA updates, some might lag and
+might not receive an update for a significant amount of time. </p>
+
+<h3 id="platform">Selecting a platform version and API Level</h3>
+
+<p>When you are developing your application, you will need to choose
+the platform version against which you will compile the application. In
+general, you should compile your application against the lowest possible
+version of the platform that your application can support.
+
+<p>You can determine the lowest possible platform version by compiling the
+application against successively lower build targets. After you determine the
+lowest version, you should create an AVD using the corresponding platform
+version (and API Level) and fully test your application. Make sure to declare a
+<code>android:minSdkVersion</code> attribute in the application's manifest and
+set its value to the API Level of the platform version. </p>
+
+<h3 id="apilevel">Declaring a minimum API Level</h3>
+
+<p>If you build an application that uses APIs or system features introduced in
+the latest platform version, you should set the
+<code>android:minSdkVersion</code> attribute to the API Level of the latest
+platform version. This ensures that users will only be able to install your
+application if their devices are running a compatible version of the Android
+platform. In turn, this ensures that your application can function properly on
+their devices. </p>
+
+<p>If your application uses APIs introduced in the latest platform version but
+does <em>not</em> declare a <code>android:minSdkVersion</code> attribute, then
+it will run properly on devices running the latest version of the platform, but
+<em>not</em> on devices running earlier versions of the platform. In the latter
+case, the application will crash at runtime when it tries to use APIs that don't
+exist on the earlier versions.</p>
+
+<h3 id="testing">Testing against higher API Levels</h3>
+
+<p>After compiling your application, you should make sure to test it on the
+platform specified in the application's <code>android:minSdkVersion</code>
+attribute. To do so, create an AVD that uses the platform version required by
+your application. Additionally, to ensure forward-compatibility, you should run
+and test the application on all platforms that use a higher API Level than that
+used by your application. </p>
+
+<p>The Android SDK includes multiple platform versions that you can use,
+including the latest version, and provides an updater tool that you can use to
+download other platform versions as necessary. </p>
+
+<p>To access the updater, use the <code>android</code> command-line tool,
+located in the &lt;sdk&gt;/tools directory. You can launch the SDK updater by
+executing <code>android sdk</code>. You can
+also simply double-click the android.bat (Windows) or android (OS X/Linux) file.
+In ADT, you can also access the updater by selecting
+<strong>Window</strong>&nbsp;>&nbsp;<strong>Android SDK
+Manager</strong>.</p>
+
+<p>To run your application against different platform versions in the emulator,
+create an AVD for each platform version that you want to test. For more
+information about AVDs, see <a
+href="{@docRoot}tools/devices/index.html">Creating and Managing Virtual Devices</a>. If
+you are using a physical device for testing, ensure that you know the API Level
+of the Android platform it runs. See the table at the top of this document for
+a list of platform versions and their API Levels. </p>
+
+<h2 id="provisional">Using a Provisional API Level</h2>
+
+<p>In some cases, an "Early Look" Android SDK platform may be available. To let
+you begin developing on the platform although the APIs may not be final, the
+platform's API Level integer will not be specified. You must instead use the
+platform's <em>provisional API Level</em> in your application manifest, in order
+to build applications against the platform. A provisional API Level is not an
+integer, but a string matching the codename of the unreleased platform version.
+The provisional API Level will be specified in the release notes for the Early
+Look SDK release notes and is case-sensitive.</p>
+
+<p>The use of a provisional API Level is designed to protect developers and
+device users from inadvertently publishing or installing applications based on
+the Early Look framework API, which may not run properly on actual devices
+running the final system image.</p>
+
+<p>The provisional API Level will only be valid while using the Early Look SDK
+and can only be used to run applications in the emulator. An application using
+the provisional API Level can never be installed on an Android device. At the
+final release of the platform, you must replace any instances of the provisional
+API Level in your application manifest with the final platform's actual API
+Level integer.</p>
+
+
+<h2 id="filtering">Filtering the Reference Documentation by API Level</h2>
+
+<p>Reference documentation pages on the Android Developers site offer a "Filter
+by API Level" control in the top-right area of each page. You can use the
+control to show documentation only for parts of the API that are actually
+accessible to your application, based on the API Level that it specifies in
+the <code>android:minSdkVersion</code> attribute of its manifest file. </p>
+
+<p>To use filtering, select the checkbox to enable filtering, just below the
+page search box. Then set the "Filter by API Level" control to the same API
+Level as specified by your application. Notice that APIs introduced in a later
+API Level are then grayed out and their content is masked, since they would not
+be accessible to your application. </p>
+
+<p>Filtering by API Level in the documentation does not provide a view
+of what is new or introduced in each API Level &mdash; it simply provides a way
+to view the entire API associated with a given API Level, while excluding API
+elements introduced in later API Levels.</p>
+
+<p>If you decide that you don't want to filter the API documentation, just
+disable the feature using the checkbox. By default, API Level filtering is
+disabled, so that you can view the full framework API, regardless of API Level.
+</p>
+
+<p>Also note that the reference documentation for individual API elements
+specifies the API Level at which each element was introduced. The API Level
+for packages and classes is specified as "Since &lt;api level&gt;" at the
+top-right corner of the content area on each documentation page. The API Level
+for class members is specified in their detailed description headers,
+at the right margin. </p>
+
+
+
+
+
+
+
+
+
diff --git a/docs/html/guide/topics/media/camera.jd b/docs/html/guide/topics/media/camera.jd
index 7d72491ef109..a63270a77ead 100644
--- a/docs/html/guide/topics/media/camera.jd
+++ b/docs/html/guide/topics/media/camera.jd
@@ -162,8 +162,7 @@ information, you must request location permission:
&lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
</pre>
<p>For more information about getting user location, see
-<a href="{@docRoot}guide/topics/location/obtaining-user-location.html">Obtaining User
-Location</a>.</p>
+<a href="{@docRoot}guide/topics/location/strategies.html">Location Strategies</a>.</p>
</li>
</ul>
diff --git a/docs/html/guide/topics/media/index.jd b/docs/html/guide/topics/media/index.jd
index 0e0412a10d52..a750c9a8809f 100644
--- a/docs/html/guide/topics/media/index.jd
+++ b/docs/html/guide/topics/media/index.jd
@@ -1,63 +1,56 @@
-page.title=Multimedia and Camera
+page.title=Media and Camera
+page.landing=true
+page.landing.intro=Add video, audio, and photo capabilities to your app with Android's robust APIs for playing and recording media.
+page.landing.image=
+
@jd:body
- <div id="qv-wrapper">
- <div id="qv">
-
-<h2>Topics</h2>
-<ol>
-<li><a href="{@docRoot}guide/topics/media/mediaplayer.html">Media Playback</a></li>
-<li><a href="{@docRoot}guide/topics/media/jetplayer.html">JetPlayer</a></li>
-<li><a href="{@docRoot}guide/topics/media/camera.html">Camera</a></li>
-<li><a href="{@docRoot}guide/topics/media/audio-capture.html">Audio Capture</a></li>
-</ol>
-
-<h2>Key classes</h2>
-<ol>
-<li>{@link android.media.MediaPlayer}</li>
-<li>{@link android.media.JetPlayer}</li>
-<li>{@link android.hardware.Camera}</li>
-<li>{@link android.media.MediaRecorder}</li>
-<li>{@link android.media.AudioManager}</li>
-<li>{@link android.media.SoundPool}</li>
-</ol>
-
-<h2>See also</h2>
-<ol>
-<li></li>
-<li><a href="{@docRoot}guide/appendix/media-formats.html">Android Supported Media Formats</a></li>
-<li><a href="{@docRoot}guide/topics/media/jet/jetcreator_manual.html">JetCreator User
-Manual</a></li>
-</ol>
-
-</div>
-</div>
-
-<p>The Android multimedia framework includes support for capturing and playing audio, video and
-images in a variety of common media types, so that you can easily integrate them into your
-applications. You can play audio or video from media files stored in your application's resources,
-from standalone files in the file system, or from a data stream arriving over a
-network connection, all using the {@link android.media.MediaPlayer} or {@link
-android.media.JetPlayer} APIs. You can also record audio, video and take pictures using the {@link
-android.media.MediaRecorder} and {@link android.hardware.Camera} APIs if supported by the device
-hardware.</p>
-
-<p>The following topics show you how to use the Android framework to implement multimedia capture
-and playback.</p>
-
-<dl>
- <dt><strong><a href="{@docRoot}guide/topics/media/mediaplayer.html">Media Playback</a></strong>
- </dt>
- <dd>How to play audio and video in your application.</dd>
-
- <dt><strong><a href="{@docRoot}guide/topics/media/jetplayer.html">JetPlayer</a></strong></dt>
- <dd>How to play interactive audio and video in your application using content created with
-JetCreator.</dd>
-
- <dt><strong><a href="{@docRoot}guide/topics/media/camera.html">Camera</a></strong></dt>
- <dd>How to use a device camera to take pictures or video in your application.</dd>
-
- <dt><strong><a href="{@docRoot}guide/topics/media/audio-capture.html">Audio
-Capture</a></strong></dt>
- <dd>How to record sound in your application.</dd>
-</dl> \ No newline at end of file
+<div class="landing-docs">
+
+ <div class="col-6">
+ <h3>Blog Articles</h3>
+ <a
+href="http://android-developers.blogspot.com/2010/06/allowing-applications-to-play-nicer.html">
+ <h4>Allowing applications to play nice(r) with each other: Handling remote control
+buttons</h4>
+ <p>If your media playback application creates a media playback service, just like Music, that
+responds to the media button events, how will the user know where those events are going to? Music,
+or your new application?</p>
+ </a>
+
+ <a
+href="http://android-developers.blogspot.com/2011/11/making-android-games-that-play-nice.html">
+ <h4>Making Android Games that Play Nice</h4>
+ <p>Making a game on Android is easy. Making a great game for a mobile, multitasking, often
+multi-core, multi-purpose system like Android is trickier. Even the best developers frequently make
+mistakes in the way they interact with the Android system and with other applications</p>
+ </a>
+
+ <a href="http://android-developers.blogspot.com/2011/12/more-android-games-that-play-nice.html">
+ <h4>More Android Games that Play Nice</h4>
+ <p>Android users get used to using the back key. We expect the volume keys to work in some
+intuitive fashion. We expect that the home key behaves in a manner consistent with the Android
+navigation paradigm.</p>
+ </a>
+ </div>
+
+ <div class="col-6">
+ <h3>Training</h3>
+
+ <a href="http://developer.android.com/training/camera/index.html">
+ <h4>Capturing Photos</h4>
+ <p>This class gets you clicking fast with some super-easy ways of leveraging existing camera
+applications. In later lessons, you dive deeper and learn how to control the camera hardware
+directly.</p>
+ </a>
+
+ <a href="http://developer.android.com/training/managing-audio/index.html">
+ <h4>Managing Audio Playback</h4>
+ <p>After this class, you will be able to build apps that respond to hardware audio key
+presses, which request audio focus when playing audio, and which respond appropriately to changes in
+audio focus caused by the system or other applications.</p>
+ </a>
+
+ </div>
+
+</div> \ No newline at end of file
diff --git a/docs/html/guide/topics/media/mediaplayer.jd b/docs/html/guide/topics/media/mediaplayer.jd
index 002d113ea31a..45a58a7b5c4a 100644
--- a/docs/html/guide/topics/media/mediaplayer.jd
+++ b/docs/html/guide/topics/media/mediaplayer.jd
@@ -457,7 +457,7 @@ stopForeground(true);
</pre>
<p>For more information, see the documentation about <a
-href="{@docRoot}guide/topics/fundamentals/services.html#Foreground">Services</a> and
+href="{@docRoot}guide/components/services.html#Foreground">Services</a> and
<a href="{@docRoot}guide/topics/ui/notifiers/notifications.html">Status Bar Notifications</a>.</p>
diff --git a/docs/html/guide/topics/providers/calendar-provider.jd b/docs/html/guide/topics/providers/calendar-provider.jd
index d30dda423ec5..f53b0625841d 100644
--- a/docs/html/guide/topics/providers/calendar-provider.jd
+++ b/docs/html/guide/topics/providers/calendar-provider.jd
@@ -250,27 +250,30 @@ and store its events on the device.</td>
<h3 id="query">Querying a calendar</h3>
-<p>Here is an example that shows how to get all the calendars for a particular
+<p>Here is an example that shows how to get the calendars that are owned by a particular
user. For simplicity's sake, in this example the query operation is shown in the
user interface thread ("main thread"). In practice, this should be done in an asynchronous
thread instead of on the main thread. For more discussion, see
-<a href="{@docRoot}guide/topics/fundamentals/loaders.html">Loaders</a>. If you are not just reading data but modifying it, see {@link android.content.AsyncQueryHandler}.
+<a href="{@docRoot}guide/components/loaders.html">Loaders</a>. If you are not just
+reading data but modifying it, see {@link android.content.AsyncQueryHandler}.
</p>
<pre>
- // Projection array. Creating indices for this array instead of doing
- // dynamic lookups improves performance.
- public static final String[] EVENT_PROJECTION = new String[] {
+// Projection array. Creating indices for this array instead of doing
+// dynamic lookups improves performance.
+public static final String[] EVENT_PROJECTION = new String[] {
Calendars._ID, // 0
Calendars.ACCOUNT_NAME, // 1
- Calendars.CALENDAR_DISPLAY_NAME // 2
- };
+ Calendars.CALENDAR_DISPLAY_NAME, // 2
+ Calendars.OWNER_ACCOUNT // 3
+};
- // The indices for the projection array above.
- private static final int PROJECTION_ID_INDEX = 0;
- private static final int PROJECTION_ACCOUNT_NAME_INDEX = 1;
- private static final int PROJECTION_DISPLAY_NAME_INDEX = 2;</pre>
+// The indices for the projection array above.
+private static final int PROJECTION_ID_INDEX = 0;
+private static final int PROJECTION_ACCOUNT_NAME_INDEX = 1;
+private static final int PROJECTION_DISPLAY_NAME_INDEX = 2;
+private static final int PROJECTION_OWNER_ACCOUNT_INDEX = 3;</pre>
<div class="sidebox-wrapper"> <div class="sidebox"> <h3>Why must you include
@@ -291,11 +294,15 @@ synced.</p> </div> </div>
<p> In the next part of the example, you construct your query. The selection
specifies the criteria for the query. In this example the query is looking for
-all calendars that have the <code>ACCOUNT_NAME</code>
-"sampleuser@google.com" and the <code>ACCOUNT_TYPE</code>
-"com.google". The query returns a {@link android.database.Cursor}
+calendars that have the <code>ACCOUNT_NAME</code>
+"sampleuser@google.com", the <code>ACCOUNT_TYPE</code>
+"com.google", and the <code>OWNER_ACCOUNT</code>
+"sampleuser@google.com". If you want to see all calendars that a user
+has viewed, not just calendars the user owns, omit the <code>OWNER_ACCOUNT</code>.
+The query returns a {@link android.database.Cursor}
object that you can use to traverse the result set returned by the database
-query. For more discussion of using queries in content providers, see <a href="{@docRoot}guide/topics/providers/content-providers.html">Content Providers</a>.</p>
+query. For more discussion of using queries in content providers,
+see <a href="{@docRoot}guide/topics/providers/content-providers.html">Content Providers</a>.</p>
<pre>// Run query
@@ -303,8 +310,10 @@ Cursor cur = null;
ContentResolver cr = getContentResolver();
Uri uri = Calendars.CONTENT_URI;
String selection = "((" + Calendars.ACCOUNT_NAME + " = ?) AND ("
- + Calendars.ACCOUNT_TYPE + " = ?))";
-String[] selectionArgs = new String[] {"sampleuser@gmail.com", "com.google"};
+ + Calendars.ACCOUNT_TYPE + " = ?) AND ("
+ + Calendars.OWNER_ACCOUNT + " = ?))";
+String[] selectionArgs = new String[] {"sampleuser@gmail.com", "com.google",
+ "sampleuser@gmail.com"};
// Submit the query and get a Cursor object back.
cur = cr.query(uri, EVENT_PROJECTION, selection, selectionArgs, null);</pre>
@@ -316,12 +325,14 @@ for each field.</p>
while (cur.moveToNext()) {
long calID = 0;
String displayName = null;
- String accountName = null;
+ String accountName = null;
+ String ownerName = null;
// Get the field values
calID = cur.getLong(PROJECTION_ID_INDEX);
displayName = cur.getString(PROJECTION_DISPLAY_NAME_INDEX);
accountName = cur.getString(PROJECTION_ACCOUNT_NAME_INDEX);
+ ownerName = cur.getString(PROJECTION_OWNER_ACCOUNT_INDEX);
// Do something with the values...
@@ -1179,5 +1190,3 @@ However, a sync adapter is restricted to the <code>ACCOUNT_NAME</code> and
</pre>
<p>For a sample implementation of a sync adapter (not specifically related to Calendar), see
<a href="{@docRoot}resources/samples/SampleSyncAdapter/index.html">SampleSyncAdapter</a>.
-</body>
-</html>
diff --git a/docs/html/guide/topics/providers/contacts-provider.jd b/docs/html/guide/topics/providers/contacts-provider.jd
new file mode 100644
index 000000000000..e3b998a7677f
--- /dev/null
+++ b/docs/html/guide/topics/providers/contacts-provider.jd
@@ -0,0 +1,2361 @@
+page.title=Contacts Provider
+@jd:body
+<div id="qv-wrapper">
+<div id="qv">
+<h2>Quickview</h2>
+<ul>
+ <li>Android's repository of information about people.</li>
+ <li>
+ Syncs with the web.
+ </li>
+ <li>
+ Integrates social stream data.
+ </li>
+</ul>
+<h2>In this document</h2>
+<ol>
+ <li>
+ <a href="#InformationTypes">Contacts Provider Organization</a>
+ </li>
+ <li>
+ <a href="#RawContactBasics">Raw contacts</a>
+ </li>
+ <li>
+ <a href="#DataBasics">Data</a>
+ </li>
+ <li>
+ <a href="#ContactBasics">Contacts</a>
+ </li>
+ <li>
+ <a href="#Sources">Data From Sync Adapters</a>
+ </li>
+ <li>
+ <a href="#Permissions">Required Permissions</a>
+ </li>
+ <li>
+ <a href="#UserProfile">The User Profile</a>
+ </li>
+ <li>
+ <a href="#ContactsProviderMetadata">Contacts Provider Metadata</a>
+ </li>
+ <li>
+ <a href="#Access">Contacts Provider Access</a>
+ <li>
+ </li>
+ <li>
+ <a href="#SyncAdapters">Contacts Provider Sync Adapters</a>
+ </li>
+ <li>
+ <a href="#SocialStream">Social Stream Data</a>
+ </li>
+ <li>
+ <a href="#AdditionalFeatures">Additional Contacts Provider Features</a>
+ </li>
+</ol>
+<h2>Key classes</h2>
+<ol>
+ <li>{@link android.provider.ContactsContract.Contacts}</li>
+ <li>{@link android.provider.ContactsContract.RawContacts}</li>
+ <li>{@link android.provider.ContactsContract.Data}</li>
+ <li>{@link android.provider.ContactsContract.StreamItems}</li>
+</ol>
+<h2>Related Samples</h2>
+<ol>
+ <li>
+ <a href="{@docRoot}resources/samples/ContactManager/index.html">
+ Contact Manager
+ </a>
+ </li>
+ <li>
+ <a href="{@docRoot}resources/samples/SampleSyncAdapter/index.html">
+ Sample Sync Adapter</a>
+ </li>
+</ol>
+<h2>See Also</h2>
+<ol>
+ <li>
+ <a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
+ Content Provider Basics
+ </a>
+ </li>
+</ol>
+</div>
+</div>
+<p>
+ The Contacts Provider is a powerful and flexible Android component that manages the
+ device's central repository of data about people. The Contacts Provider is the source of data
+ you see in the device's contacts application, and you can also access its data in your own
+ application and transfer data between the device and online services. The provider accommodates
+ a wide range of data sources and tries to manage as much data as possible for each person, with
+ the result that its organization is complex. Because of this, the provider's API includes an
+ extensive set of contract classes and interfaces that facilitate both data retrieval and
+ modification.
+</p>
+<p>
+ This guide describes the following:
+</p>
+ <ul>
+ <li>
+ The basic provider structure.
+ </li>
+ <li>
+ How to retrieve data from the provider.
+ </li>
+ <li>
+ How to modify data in the provider.
+ </li>
+ <li>
+ How to write a sync adapter for synchronizing data from your server to the
+ Contacts Provider.
+ </li>
+ </ul>
+<p>
+ This guide assumes that you know the basics of Android content providers. To learn more
+ about Android content providers, read the
+ <a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
+ Content Provider Basics</a> guide. The
+ <a href="{@docRoot}resources/samples/SampleSyncAdapter/index.html">Sample Sync Adapter</a>
+ sample app is an example of using a sync adapter to transfer data between the Contacts
+ Provider and a sample application hosted by Google Web Services.
+</p>
+<h2 id="InformationTypes">Contacts Provider Organization</h2>
+<p>
+ The Contacts Provider is an Android content provider component. It maintains three types of
+ data about a person, each of which corresponds to a table offered by the provider, as
+ illustrated in figure 1:
+</p>
+<img src="{@docRoot}images/providers/contacts_structure.png" alt=""
+ height="364" id="figure1" />
+<p class="img-caption">
+ <strong>Figure 1.</strong> Contacts Provider table structure.
+</p>
+<p>
+ The three tables are commonly referred to by the names of their contract classes. The classes
+ define constants for content URIs, column names, and column values used by the tables:
+</p>
+<dl>
+ <dt>
+ {@link android.provider.ContactsContract.Contacts} table
+ </dt>
+ <dd>
+ Rows representing different people, based on aggregations of raw contact rows.
+ </dd>
+ <dt>
+ {@link android.provider.ContactsContract.RawContacts} table
+ </dt>
+ <dd>
+ Rows containing a summary of a person's data, specific to a user account and type.
+ </dd>
+ <dt>
+ {@link android.provider.ContactsContract.Data} table
+ </dt>
+ <dd>
+ Rows containing the details for raw contact, such as email addresses or phone numbers.
+ </dd>
+</dl>
+<p>
+ The other tables represented by contract classes in {@link android.provider.ContactsContract}
+ are auxiliary tables that the Contacts Provider uses to manage its operations or support
+ specific functions in the device's contacts or telephony applications.
+</p>
+<h2 id="RawContactBasics">Raw contacts</h2>
+<p>
+ A raw contact represents a person's data coming from a single account type and account
+ name. Because the Contacts Provider allows more than one online service as the source of
+ data for a person, the Contacts Provider allows multiple raw contacts for the same person.
+ Multiple raw contacts also allow a user to combine a person's data from more than one account
+ from the same account type.
+</p>
+<p>
+ Most of the data for a raw contact isn't stored in the
+ {@link android.provider.ContactsContract.RawContacts} table. Instead, it's stored in one or more
+ rows in the {@link android.provider.ContactsContract.Data} table. Each data row has a column
+ {@link android.provider.ContactsContract.DataColumns#RAW_CONTACT_ID Data.RAW_CONTACT_ID} that
+ contains the {@link android.provider.BaseColumns#_ID RawContacts._ID} value of its
+ parent {@link android.provider.ContactsContract.RawContacts} row.
+</p>
+<h3 id="RawContactsColumns">Important raw contact columns</h3>
+<p>
+ The important columns in the {@link android.provider.ContactsContract.RawContacts} table are
+ listed in table 1. Please read the notes that follow after the table:
+</p>
+<p class="table-caption" id="table1">
+ <strong>Table 1.</strong> Important raw contact columns.
+</p>
+<table>
+ <tr>
+ <th scope="col">Column name</th>
+ <th scope="col">Use</th>
+ <th scope="col">Notes</th>
+ </tr>
+ <tr>
+ <td>
+ {@link android.provider.ContactsContract.SyncColumns#ACCOUNT_NAME}
+ </td>
+ <td>
+ The account name for the account type that's the source of this raw contact.
+ For example, the account name of a Google account is one of the device owner's Gmail
+ addresses. See the next entry for
+ {@link android.provider.ContactsContract.SyncColumns#ACCOUNT_TYPE} for more
+ information.
+ </td>
+ <td>
+ The format of this name is specific to its account type. It is not
+ necessarily an email address.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ {@link android.provider.ContactsContract.SyncColumns#ACCOUNT_TYPE}
+ </td>
+ <td>
+ The account type that's the source of this raw contact. For example, the account
+ type of a Google account is <code>com.google</code>. Always qualify your account type
+ with a domain identifier for a domain you own or control. This will ensure that your
+ account type is unique.
+ </td>
+ <td>
+ An account type that offers contacts data usually has an associated sync adapter that
+ synchronizes with the Contacts Provider.
+ </tr>
+ <tr>
+ <td>
+ {@link android.provider.ContactsContract.RawContactsColumns#DELETED}
+ </td>
+ <td>
+ The "deleted" flag for a raw contact.
+ </td>
+ <td>
+ This flag allows the Contacts Provider to maintain the row internally until sync
+ adapters are able to delete the row from their servers and then finally delete the row
+ from the repository.
+ </td>
+ </tr>
+</table>
+<h4>Notes</h4>
+<p>
+ The following are important notes about the
+ {@link android.provider.ContactsContract.RawContacts} table:
+</p>
+<ul>
+ <li>
+ A raw contact's name is not stored in its row in
+ {@link android.provider.ContactsContract.RawContacts}. Instead, it's stored in
+ the {@link android.provider.ContactsContract.Data} table, in a
+ {@link android.provider.ContactsContract.CommonDataKinds.StructuredName} row. A raw contact
+ has only one row of this type in the {@link android.provider.ContactsContract.Data} table.
+ </li>
+ <li>
+ <strong>Caution:</strong> To use your own account data in a raw contact row, it must
+ first be registered with the {@link android.accounts.AccountManager}. To do this, prompt
+ users to add the account type and their account name to the list of accounts. If you don't
+ do this, the Contacts Provider will automatically delete your raw contact row.
+ <p>
+ For example, if you want your app to maintain contacts data for your web-based service
+ with the domain {@code com.example.dataservice}, and the user's account for your service
+ is {@code becky.sharp@dataservice.example.com}, the user must first add the account
+ "type" ({@code com.example.dataservice}) and account "name"
+ ({@code becky.smart@dataservice.example.com}) before your app can add raw contact rows.
+ You can explain this requirement to the user in documentation, or you can prompt the
+ user to add the type and name, or both. Account types and account names
+ are described in more detail in the next section.
+ </li>
+</ul>
+<h3 id="RawContactsExample">Sources of raw contacts data</h3>
+<p>
+ To understand how raw contacts work, consider the user "Emily Dickinson" who has the following
+ three user accounts defined on her device:
+</p>
+<ul>
+ <li><code>emily.dickinson@gmail.com</code></li>
+ <li><code>emilyd@gmail.com</code></li>
+ <li>Twitter account "belle_of_amherst"</li>
+</ul>
+<p>
+ This user has enabled <em>Sync Contacts</em> for all three of these accounts in the
+ <em>Accounts</em> settings.
+</p>
+<p>
+ Suppose Emily Dickinson opens a browser window, logs into Gmail as
+ <code>emily.dickinson@gmail.com</code>, opens
+ Contacts, and adds "Thomas Higginson". Later on, she logs into Gmail as
+ <code>emilyd@gmail.com</code> and sends an email to "Thomas Higginson", which automatically
+ adds him as a contact. She also follows "colonel_tom" (Thomas Higginson's Twitter ID) on
+ Twitter.
+</p>
+<p>
+ The Contacts Provider creates three raw contacts as a result of this work:
+</p>
+<ol>
+ <li>
+ A raw contact for "Thomas Higginson" associated with <code>emily.dickinson@gmail.com</code>.
+ The user account type is Google.
+ </li>
+ <li>
+ A second raw contact for "Thomas Higginson" associated with <code>emilyd@gmail.com</code>.
+ The user account type is also Google. There is a second raw contact even
+ though the name is identical to a previous name, because the person was added for a
+ different user account.
+ </li>
+ <li>
+ A third raw contact for "Thomas Higginson" associated with "belle_of_amherst". The user
+ account type is Twitter.
+ </li>
+</ol>
+<h2 id="DataBasics">Data</h2>
+<p>
+ As noted previously, the data for a raw contact is stored in a
+ {@link android.provider.ContactsContract.Data} row that is linked to the raw contact's
+ <code>_ID</code> value. This allows a single raw contact to have multiple instances of the same
+ type of data such as email addresses or phone numbers. For example, if
+ "Thomas Higginson" for {@code emilyd@gmail.com} (the raw contact row for Thomas Higginson
+ associated with the Google account <code>emilyd@gmail.com</code>) has a home email address of
+ <code>thigg@gmail.com</code> and a work email address of
+ <code>thomas.higginson@gmail.com</code>, the Contacts Provider stores the two email address
+ rows and links them both to the raw contact.
+</p>
+<p>
+ Notice that different types of data are stored in this single table. Display name,
+ phone number, email, postal address, photo, and website detail rows are all found in the
+ {@link android.provider.ContactsContract.Data} table. To help manage this, the
+ {@link android.provider.ContactsContract.Data} table has some columns with descriptive names,
+ and others with generic names. The contents of a descriptive-name column have the same meaning
+ regardless of the type of data in the row, while the contents of a generic-name column have
+ different meanings depending on the type of data.
+</p>
+<h3 id="DescriptiveColumns">Descriptive column names</h3>
+<p>
+ Some examples of descriptive column names are:
+</p>
+<dl>
+ <dt>
+ {@link android.provider.ContactsContract.Data#RAW_CONTACT_ID}
+ </dt>
+ <dd>
+ The value of the <code>_ID</code> column of the raw contact for this data.
+ </dd>
+ <dt>
+ {@link android.provider.ContactsContract.Data#MIMETYPE}
+ </dt>
+ <dd>
+ The type of data stored in this row, expressed as a custom MIME type. The Contacts Provider
+ uses the MIME types defined in the subclasses of
+ {@link android.provider.ContactsContract.CommonDataKinds}. These MIME types are open source,
+ and can be used by any application or sync adapter that works with the Contacts Provider.
+ </dd>
+ <dt>
+ {@link android.provider.ContactsContract.DataColumns#IS_PRIMARY}
+ </dt>
+ <dd>
+ If this type of data row can occur more than once for a raw contact, the
+ {@link android.provider.ContactsContract.DataColumns#IS_PRIMARY} column flags
+ the data row that contains the primary data for the type. For example, if
+ the user long-presses a phone number for a contact and selects <strong>Set default</strong>,
+ then the {@link android.provider.ContactsContract.Data} row containing that number
+ has its {@link android.provider.ContactsContract.DataColumns#IS_PRIMARY} column set to a
+ non-zero value.
+ </dd>
+</dl>
+<h3 id="GenericColumns">Generic column names</h3>
+<p>
+ There are 15 generic columns named <code>DATA1</code> through
+ <code>DATA15</code> that are generally available and an additional four generic
+ columns <code>SYNC1</code> through <code>SYNC4</code> that should only be used by sync
+ adapters. The generic column name constants always work, regardless of the type of
+ data the row contains.
+</p>
+<p>
+ The <code>DATA1</code> column is indexed. The Contacts Provider always uses this column for
+ the data that the provider expects will be the most frequent target of a query. For example,
+ in an email row, this column contains the actual email address.
+</p>
+<p>
+ By convention, the column <code>DATA15</code> is reserved for storing Binary Large Object
+ (BLOB) data such as photo thumbnails.
+</p>
+<h3 id="TypeSpecificNames">Type-specific column names</h3>
+<p>
+ To facilitate working with the columns for a particular type of row, the Contacts Provider
+ also provides type-specific column name constants, defined in subclasses of
+ {@link android.provider.ContactsContract.CommonDataKinds}. The constants simply give a
+ different constant name to the same column name, which helps you access data in a row of a
+ particular type.
+</p>
+<p>
+ For example, the {@link android.provider.ContactsContract.CommonDataKinds.Email} class defines
+ type-specific column name constants for a {@link android.provider.ContactsContract.Data} row
+ that has the MIME type
+ {@link android.provider.ContactsContract.CommonDataKinds.Email#CONTENT_ITEM_TYPE
+ Email.CONTENT_ITEM_TYPE}. The class contains the constant
+ {@link android.provider.ContactsContract.CommonDataKinds.Email#ADDRESS} for the email address
+ column. The actual value of
+ {@link android.provider.ContactsContract.CommonDataKinds.Email#ADDRESS} is "data1", which is
+ the same as the column's generic name.
+</p>
+<p class="caution">
+ <strong>Caution:</strong> Don't add your own custom data to the
+ {@link android.provider.ContactsContract.Data} table using a row that has one of the
+ provider's pre-defined MIME types. If you do, you may lose the data or cause the provider to
+ malfunction. For example, you should not add a row with the MIME type
+ {@link android.provider.ContactsContract.CommonDataKinds.Email#CONTENT_ITEM_TYPE
+ Email.CONTENT_ITEM_TYPE} that contains a user name instead of an email address in the
+ column <code>DATA1</code>. If you use your own custom MIME type for the row, then you are free
+ to define your own type-specific column names and use the columns however you wish.
+</p>
+<p>
+ Figure 2 shows how descriptive columns and data columns appear in a
+ {@link android.provider.ContactsContract.Data} row, and how type-specific column names "overlay"
+ the generic column names
+</p>
+<img src="{@docRoot}images/providers/data_columns.png"
+ alt="How type-specific column names map to generic column names"
+ height="311" id="figure2" />
+<p class="img-caption">
+ <strong>Figure 2.</strong> Type-specific column names and generic column names.
+</p>
+<h3 id="ColumnMaps">Type-specific column name classes</h3>
+<p>
+ Table 2 lists the most commonly-used type-specific column name classes:
+</p>
+<p class="table-caption" id="table2">
+ <strong>Table 2.</strong> Type-specific column name classes</p>
+<table>
+ <tr>
+ <th scope="col">Mapping class</th>
+ <th scope="col">Type of data</th>
+ <th scope="col">Notes</th>
+ </tr>
+ <tr>
+ <td>{@link android.provider.ContactsContract.CommonDataKinds.StructuredName}</td>
+ <td>The name data for the raw contact associated with this data row.</td>
+ <td>A raw contact has only one of these rows.</td>
+ </tr>
+ <tr>
+ <td>{@link android.provider.ContactsContract.CommonDataKinds.Photo}</td>
+ <td>The main photo for the raw contact associated with this data row.</td>
+ <td>A raw contact has only one of these rows.</td>
+ </tr>
+ <tr>
+ <td>{@link android.provider.ContactsContract.CommonDataKinds.Email}</td>
+ <td>An email address for the raw contact associated with this data row.</td>
+ <td>A raw contact can have multiple email addresses.</td>
+ </tr>
+ <tr>
+ <td>{@link android.provider.ContactsContract.CommonDataKinds.StructuredPostal}</td>
+ <td>A postal address for the raw contact associated with this data row.</td>
+ <td>A raw contact can have multiple postal addresses.</td>
+ </tr>
+ <tr>
+ <td>{@link android.provider.ContactsContract.CommonDataKinds.GroupMembership}</td>
+ <td>An identifier that links the raw contact to one of the groups in the Contacts Provider.</td>
+ <td>
+ Groups are an optional feature of an account type and account name. They're described in
+ more detail in the section <a href="#Groups">Contact groups</a>.
+ </td>
+ </tr>
+</table>
+<h3 id="ContactBasics">Contacts</h3>
+<p>
+ The Contacts Provider combines the raw contact rows across all account types and account names
+ to form a <strong>contact</strong>. This facilitates displaying and modifying all the data a
+ user has collected for a person. The Contacts Provider manages the creation of new contact
+ rows, and the aggregation of raw contacts with an existing contact row. Neither applications nor
+ sync adapters are allowed to add contacts, and some columns in a contact row are read-only.
+</p>
+<p class="note">
+ <strong>Note:</strong> If you try to add a contact to the Contacts Provider with an
+ {@link android.content.ContentResolver#insert(Uri,ContentValues) insert()}, you'll get
+ an {@link java.lang.UnsupportedOperationException} exception. If you try to update a column
+ that's listed as "read-only," the update is ignored.
+</p>
+<p>
+ The Contacts Provider creates a new contact in response to the addition of a new raw contact
+ that doesn't match any existing contacts. The provider also does this if an existing raw
+ contact's data changes in such a way that it no longer matches the contact to which it was
+ previously attached. If an application or sync adapter creates a new raw contact that
+ <em>does</em> match an existing contact, the new raw contact is aggregated to the existing
+ contact.
+</p>
+<p>
+ The Contacts Provider links a contact row to its raw contact rows with the contact row's
+ <code>_ID</code> column in the {@link android.provider.ContactsContract.Contacts Contacts}
+ table. The <code>CONTACT_ID</code> column of the raw contacts table
+ {@link android.provider.ContactsContract.RawContacts} contains <code>_ID</code> values for
+ the contacts row associated with each raw contacts row.
+</p>
+<p>
+ The {@link android.provider.ContactsContract.Contacts} table also has the column
+ {@link android.provider.ContactsContract.ContactsColumns#LOOKUP_KEY} that is a
+ "permanent" link to the contact row. Because the Contacts Provider maintains contacts
+ automatically, it may change a contact row's {@link android.provider.BaseColumns#_ID} value
+ in response to an aggregation or sync. Even If this happens, the content URI
+ {@link android.provider.ContactsContract.Contacts#CONTENT_LOOKUP_URI} combined with
+ contact's {@link android.provider.ContactsContract.ContactsColumns#LOOKUP_KEY} will still
+ point to the contact row, so you can use
+ {@link android.provider.ContactsContract.ContactsColumns#LOOKUP_KEY}
+ to maintain links to "favorite" contacts, and so forth. This column has its own format that is
+ unrelated to the format of the {@link android.provider.BaseColumns#_ID} column.
+</p>
+<p>
+ Figure 3 shows how the three main tables relate to each other.
+</p>
+<img src="{@docRoot}images/providers/contacts_tables.png" alt="Contacts provider main tables"
+ height="514" id="figure4" />
+<p class="img-caption">
+ <strong>Figure 3.</strong> Contacts, Raw Contacts, and Details table relationships.
+</p>
+<h2 id="Sources">Data From Sync Adapters</h2>
+<p>
+ Users enter contacts data directly into the device, but data also flows into the Contacts
+ Provider from web services via <strong>sync adapters</strong>, which automate
+ the transfer of data between the device and services. Sync adapters run in the background
+ under the control of the system, and they call {@link android.content.ContentResolver} methods
+ to manage data.
+</p>
+<p>
+ In Android, the web service that a sync adapter works with is identified by an account type.
+ Each sync adapter works with one account type, but it can support multiple account names for
+ that type. Account types and account names are described briefly in the section
+ <a href="#RawContactsExample">Sources of raw contacts data</a>. The following definitions offer
+ more detail, and describe how account type and name relate to sync adapters and services.
+</p>
+<dl>
+ <dt>
+ Account type
+ </dt>
+ <dd>
+ Identifies a service in which the user has stored data. Most of the time, the user has to
+ authenticate with the service. For example, Google Contacts is an account type, identified
+ by the code <code>google.com</code>. This value corresponds to the account type used by
+ {@link android.accounts.AccountManager}.
+ </dd>
+ <dt>
+ Account name
+ </dt>
+ <dd>
+ Identifies a particular account or login for an account type. Google Contacts accounts
+ are the same as Google accounts, which have an email address as an account name.
+ Other services may use a single-word username or numeric id.
+ </dd>
+</dl>
+<p>
+ Account types don't have to be unique. A user can configure multiple Google Contacts accounts
+ and download their data to the Contacts Provider; this may happen if the user has one set of
+ personal contacts for a personal account name, and another set for work. Account names are
+ usually unique. Together, they identify a specific data flow between the Contacts Provider and
+ an external service.
+</p>
+<p>
+ If you want to transfer your service's data to the Contacts Provider, you need to write your
+ own sync adapter. This is described in more detail in the section
+ <a href="#SyncAdapters">Contacts Provider Sync Adapters</a>.
+</p>
+<p>
+ Figure 4 shows how the Contacts Provider fits into the flow of data
+ about people. In the box marked "sync adapters," each adapter is labeled by its account type.
+</p>
+<img src="{@docRoot}images/providers/ContactsDataFlow.png" alt="Flow of data about people"
+ height="252" id="figure5" />
+<p class="img-caption">
+ <strong>Figure 4.</strong> The Contacts Provider flow of data.
+</p>
+<h2 id="Permissions">Required Permissions</h2>
+<p>
+ Applications that want to access the Contacts Provider must request the following
+ permissions:
+</p>
+<dl>
+ <dt>Read access to one or more tables</dt>
+ <dd>
+ {@link android.Manifest.permission#READ_CONTACTS}, specified in
+ <code>AndroidManifest.xml</code> with the
+ <code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">
+ &lt;uses-permission&gt;</a></code> element as
+ <code>&lt;uses-permission android:name="android.permission.READ_CONTACTS"&gt;</code>.
+ </dd>
+ <dt>Write access to one or more tables</dt>
+ <dd>
+ {@link android.Manifest.permission#WRITE_CONTACTS}, specified in
+ <code>AndroidManifest.xml</code> with the
+ <code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">
+ &lt;uses-permission&gt;</a></code> element as
+ <code>&lt;uses-permission android:name="android.permission.WRITE_CONTACTS"&gt;</code>.
+ </dd>
+</dl>
+<p>
+ These permissions do not extend to the user profile data. The user profile and its
+ required permissions are discussed in the following section,
+ <a href="#UserProfile">The User Profile</a>.
+</p>
+<p>
+ Remember that the user's contacts data is personal and sensitive. Users are concerned about
+ their privacy, so they don't want applications collecting data about them or their contacts.
+ If it's not obvious why you need permission to access their contacts data, they may give
+ your application low ratings or simply refuse to install it.
+</p>
+<h2 id="UserProfile">The User Profile</h2>
+<p>
+ The {@link android.provider.ContactsContract.Contacts} table has a single row containing
+ profile data for the device's user. This data describes the device's <code>user</code> rather
+ than one of the user's contacts. The profile contacts row is linked to a raw
+ contacts row for each system that uses a profile.
+ Each profile raw contact row can have multiple data rows. Constants for accessing the user
+ profile are available in the {@link android.provider.ContactsContract.Profile} class.
+</p>
+<p>
+ Access to the user profile requires special permissions. In addition to the
+ {@link android.Manifest.permission#READ_CONTACTS} and
+ {@link android.Manifest.permission#WRITE_CONTACTS} permissions needed to read and write, access
+ to the user profile requires the {@link android.Manifest.permission#READ_PROFILE} and
+ {@link android.Manifest.permission#WRITE_PROFILE} permissions for read and write access,
+ respectively.
+</p>
+<p>
+ Remember that you should consider a user's profile to be sensitive. The permission
+ {@link android.Manifest.permission#READ_PROFILE} allows you to access the device user's
+ personally-identifying data. Make sure to tell the user why
+ you need user profile access permissions in the description of your application.
+</p>
+<p>
+ To retrieve the contact row that contains the user's profile,
+ call {@link android.content.ContentResolver#query(Uri,String[], String, String[], String)
+ ContentResolver.query()}. Set the content URI to
+ {@link android.provider.ContactsContract.Profile#CONTENT_URI} and don't provide any
+ selection criteria. You can also use this content URI as the base URI for retrieving raw
+ contacts or data for the profile. For example, this snippet retrieves data for the profile:
+</p>
+<pre>
+// Sets the columns to retrieve for the user profile
+mProjection = new String[]
+ {
+ Profile._ID,
+ Profile.DISPLAY_NAME_PRIMARY,
+ Profile.LOOKUP_KEY,
+ Profile.PHOTO_THUMBNAIL_URI
+ };
+
+// Retrieves the profile from the Contacts Provider
+mProfileCursor =
+ getContentResolver().query(
+ Profile.CONTENT_URI,
+ mProjection ,
+ null,
+ null,
+ null);
+</pre>
+<p class="note">
+ <strong>Note:</strong> If you retrieve multiple contact rows, and you want to determine if one of them
+ is the user profile, test the row's
+ {@link android.provider.ContactsContract.ContactsColumns#IS_USER_PROFILE} column. This column
+ is set to "1" if the contact is the user profile.
+</p>
+<h2 id="ContactsProviderMetadata">Contacts Provider Metadata</h2>
+<p>
+ The Contacts Provider manages data that keeps track of the state of contacts data in the
+ repository. This metadata about the repository is stored in various places, including the
+ Raw Contacts, Data, and Contacts table rows, the
+ {@link android.provider.ContactsContract.Settings} table, and the
+ {@link android.provider.ContactsContract.SyncState} table. The following table shows the
+ effect of each of these pieces of metadata:
+</p>
+<p class="table-caption" id="table3">
+ <strong>Table 3.</strong> Metadata in the Contacts Provider</p>
+<table>
+ <tr>
+ <th scope="col">Table</th>
+ <th scope="col">Column</th>
+ <th scope="col">Values</th>
+ <th scope="col">Meaning</th>
+ </tr>
+ <tr>
+ <td rowspan="2">{@link android.provider.ContactsContract.RawContacts}</td>
+ <td rowspan="2">{@link android.provider.ContactsContract.SyncColumns#DIRTY}</td>
+ <td>"0" - not changed since the last sync.</td>
+ <td rowspan="2">
+ Marks raw contacts that were changed on the device and have to be synced back to the
+ server. The value is set automatically by the Contacts Provider when Android
+ applications update a row.
+ <p>
+ Sync adapters that modify the raw contact or data tables should always append the
+ string {@link android.provider.ContactsContract#CALLER_IS_SYNCADAPTER} to the
+ content URI they use. This prevents the provider from marking rows as dirty.
+ Otherwise, sync adapter modifications appear to be local modifications and are
+ sent to the server, even though the server was the source of the modification.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>"1" - changed since last sync, needs to be synced back to the server.</td>
+ </tr>
+ <tr>
+ <td>{@link android.provider.ContactsContract.RawContacts}</td>
+ <td>{@link android.provider.ContactsContract.SyncColumns#VERSION}</td>
+ <td>The version number of this row.</td>
+ <td>
+ The Contacts Provider automatically increments this value whenever the row or
+ its related data changes.
+ </td>
+ </tr>
+ <tr>
+ <td>{@link android.provider.ContactsContract.Data}</td>
+ <td>{@link android.provider.ContactsContract.DataColumns#DATA_VERSION}</td>
+ <td>The version number of this row.</td>
+ <td>
+ The Contacts Provider automatically increments this value whenever the data row
+ is changed.
+ </td>
+ </tr>
+ <tr>
+ <td>{@link android.provider.ContactsContract.RawContacts}</td>
+ <td>{@link android.provider.ContactsContract.SyncColumns#SOURCE_ID}</td>
+ <td>
+ A string value that uniquely identifies this raw contact to the account in
+ which it was created.
+ </td>
+ <td>
+ When a sync adapter creates a new raw contact, this column should be set to the
+ server's unique ID for the raw contact. When an Android application creates a new
+ raw contact, the application should leave this column empty. This signals the sync
+ adapter that it should create a new raw contact on the server, and get a
+ value for the {@link android.provider.ContactsContract.SyncColumns#SOURCE_ID}.
+ <p>
+ In particular, the source id must be <strong>unique</strong> for each account
+ type and should be stable across syncs:
+ </p>
+ <ul>
+ <li>
+ Unique: Each raw contact for an account must have its own source id. If you
+ don't enforce this, you'll cause problems in the contacts application.
+ Notice that two raw contacts for the same account <em>type</em> may have
+ the same source id. For example, the raw contact "Thomas Higginson" for the
+ account {@code emily.dickinson@gmail.com} is allowed to have the same source
+ id as the raw contact "Thomas Higginson" for the account
+ {@code emilyd@gmail.com}.
+ </li>
+ <li>
+ Stable: Source ids are a permanent part of the online service's data for
+ the raw contact. For example, if the user clears Contacts Storage from the
+ Apps settings and re-syncs, the restored raw contacts should have the same
+ source ids as before. If you don't enforce this, shortcuts will stop
+ working.
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td rowspan="2">{@link android.provider.ContactsContract.Groups}</td>
+ <td rowspan="2">{@link android.provider.ContactsContract.GroupsColumns#GROUP_VISIBLE}</td>
+ <td>"0" - Contacts in this group should not be visible in Android application UIs.</td>
+ <td>
+ This column is for compatibility with servers that allow a user to hide contacts in
+ certain groups.
+ </td>
+ </tr>
+ <tr>
+ <td>"1" - Contacts in this group are allowed to be visible in application UIs.</td>
+ </tr>
+ <tr>
+ <td rowspan="2">{@link android.provider.ContactsContract.Settings}</td>
+ <td rowspan="2">
+ {@link android.provider.ContactsContract.SettingsColumns#UNGROUPED_VISIBLE}</td>
+ <td>
+ "0" - For this account and account type, contacts that don't belong to a group are
+ invisible to Android application UIs.
+ </td>
+ <td rowspan="2">
+ By default, contacts are invisible if none of their raw contacts belongs to a group
+ (Group membership for a raw contact is indicated by one or more
+ {@link android.provider.ContactsContract.CommonDataKinds.GroupMembership} rows
+ in the {@link android.provider.ContactsContract.Data} table).
+ By setting this flag in the {@link android.provider.ContactsContract.Settings} table row
+ for an account type and account, you can force contacts without groups to be visible.
+ One use of this flag is to show contacts from servers that don't use groups.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ "1" - For this account and account type, contacts that don't belong to a group are
+ visible to application UIs.
+ </td>
+
+ </tr>
+ <tr>
+ <td>{@link android.provider.ContactsContract.SyncState}</td>
+ <td>(all)</td>
+ <td>
+ Use this table to store metadata for your sync adapter.
+ </td>
+ <td>
+ With this table you can store sync state and other sync-related data persistently on
+ the device.
+ </td>
+ </tr>
+</table>
+<h2 id="Access">Contacts Provider Access</h2>
+<p>
+ This section describes guidelines for accessing data from the Contacts Provider, focusing on
+ the following:
+</p>
+<ul>
+ <li>
+ Entity queries.
+ </li>
+ <li>
+ Batch modification.
+ </li>
+ <li>
+ Retrieval and modification with intents.
+ </li>
+ <li>
+ Data integrity.
+ </li>
+</ul>
+<p>
+ Making modifications from a sync adapter is also covered in more detail in the section
+ <a href="#SyncAdapters">Contacts Provider Sync Adapters</a>.
+</p>
+<h3 id="Entities">Querying entities</h3>
+<p>
+ Because the Contacts Provider tables are organized in a hierarchy, it's often useful to
+ retrieve a row and all of the "child" rows that are linked to it. For example, to display
+ all the information for a person, you may want to retrieve all the
+ {@link android.provider.ContactsContract.RawContacts} rows for a single
+ {@link android.provider.ContactsContract.Contacts} row, or all the
+ {@link android.provider.ContactsContract.CommonDataKinds.Email} rows for a single
+ {@link android.provider.ContactsContract.RawContacts} row. To facilitate this, the Contacts
+ Provider offers <strong>entity</strong> constructs, which act like database joins between
+ tables.
+</p>
+<p>
+ An entity is like a table composed of selected columns from a parent table and its child table.
+ When you query an entity, you supply a projection and search criteria based on the columns
+ available from the entity. The result is a {@link android.database.Cursor} that contains
+ contains one row for each child table row that was retrieved. For example, if you query
+ {@link android.provider.ContactsContract.Contacts.Entity} for a contact name
+ and all the {@link android.provider.ContactsContract.CommonDataKinds.Email} rows for all the
+ raw contacts for that name, you get back a {@link android.database.Cursor} containing one row
+ for each {@link android.provider.ContactsContract.CommonDataKinds.Email} row.
+</p>
+<p>
+ Entities simplify queries. Using an entity, you can retrieve all of the contacts data for a
+ contact or raw contact at once, instead of having to query the parent table first to get an
+ ID, and then having to query the child table with that ID. Also, the Contacts Provider processes
+ a query against an entity in a single transaction, which ensures that the retrieved data is
+ internally consistent.
+</p>
+<p class="note">
+ <strong>Note:</strong> An entity usually doesn't contain all the columns of the parent and
+ child table. If you attempt to work with a column name that isn't in the list of column name
+ constants for the entity, you'll get an {@link java.lang.Exception}.
+</p>
+<p>
+ The following snippet shows how to retrieve all the raw contact rows for a contact. The snippet
+ is part of a larger application that has two activities, "main" and "detail". The main activity
+ shows a list of contact rows; when the user select one, the activity sends its ID to the detail
+ activity. The detail activity uses the {@link android.provider.ContactsContract.Contacts.Entity}
+ to display all of the data rows from all of the raw contacts associated with the selected
+ contact.
+</p>
+<p>
+ This snippet is taken from the "detail" activity:
+</p>
+<pre>
+...
+ /*
+ * Appends the entity path to the URI. In the case of the Contacts Provider, the
+ * expected URI is content://com.google.contacts/#/entity (# is the ID value).
+ */
+ mContactUri = Uri.withAppendedPath(
+ mContactUri,
+ ContactsContract.Contacts.Entity.CONTENT_DIRECTORY);
+
+ // Initializes the loader identified by LOADER_ID.
+ getLoaderManager().initLoader(
+ LOADER_ID, // The identifier of the loader to initialize
+ null, // Arguments for the loader (in this case, none)
+ this); // The context of the activity
+
+ // Creates a new cursor adapter to attach to the list view
+ mCursorAdapter = new SimpleCursorAdapter(
+ this, // the context of the activity
+ R.layout.detail_list_item, // the view item containing the detail widgets
+ mCursor, // the backing cursor
+ mFromColumns, // the columns in the cursor that provide the data
+ mToViews, // the views in the view item that display the data
+ 0); // flags
+
+ // Sets the ListView's backing adapter.
+ mRawContactList.setAdapter(mCursorAdapter);
+...
+&#64;Override
+public Loader&lt;Cursor&gt; onCreateLoader(int id, Bundle args) {
+
+ /*
+ * Sets the columns to retrieve.
+ * RAW_CONTACT_ID is included to identify the raw contact associated with the data row.
+ * DATA1 contains the first column in the data row (usually the most important one).
+ * MIMETYPE indicates the type of data in the data row.
+ */
+ String[] projection =
+ {
+ ContactsContract.Contacts.Entity.RAW_CONTACT_ID,
+ ContactsContract.Contacts.Entity.DATA1,
+ ContactsContract.Contacts.Entity.MIMETYPE
+ };
+
+ /*
+ * Sorts the retrieved cursor by raw contact id, to keep all data rows for a single raw
+ * contact collated together.
+ */
+ String sortOrder =
+ ContactsContract.Contacts.Entity.RAW_CONTACT_ID +
+ " ASC";
+
+ /*
+ * Returns a new CursorLoader. The arguments are similar to
+ * ContentResolver.query(), except for the Context argument, which supplies the location of
+ * the ContentResolver to use.
+ */
+ return new CursorLoader(
+ getApplicationContext(), // The activity's context
+ mContactUri, // The entity content URI for a single contact
+ projection, // The columns to retrieve
+ null, // Retrieve all the raw contacts and their data rows.
+ null, //
+ sortOrder); // Sort by the raw contact ID.
+}
+</pre>
+<p>
+ When the load is finished, {@link android.app.LoaderManager} invokes a callback to
+ {@link android.app.LoaderManager.LoaderCallbacks#onLoadFinished(Loader, D)
+ onLoadFinished()}. One of the incoming arguments to this method is a
+ {@link android.database.Cursor} with the results of the query. In your own app, you can get the
+ data from this {@link android.database.Cursor} to display it or work with it further.
+</p>
+<h3 id="Transactions">Batch modification</h3>
+<p>
+ Whenever possible, you should insert, update, and delete data in the Contacts Provider in
+ "batch mode", by creating an {@link java.util.ArrayList} of
+ {@link android.content.ContentProviderOperation} objects and calling
+ {@link android.content.ContentResolver#applyBatch(String, ArrayList) applyBatch()}. Because
+ the Contacts Provider performs all of the operations in an
+ {@link android.content.ContentResolver#applyBatch(String, ArrayList) applyBatch()} in a single
+ transaction, your modifications will never leave the contacts repository in an inconsistent
+ state. A batch modification also facilitates inserting a raw contact and its detail data at
+ the same time.
+</p>
+<p class="note">
+ <strong>Note:</strong> To modify a <em>single</em> raw contact, consider sending an intent to
+ the device's contacts application rather than handling the modification in your app.
+ Doing this is described in more detail in the section
+ <a href="#Intents">Retrieval and modification with intents</a>.
+</p>
+<h4>Yield points</h4>
+<p>
+ A batch modification containing a large number of operations can block other processes,
+ resulting in a bad overall user experience. To organize all the modifications you want to
+ perform in as few separate lists as possible, and at the same time prevent them from
+ blocking the system, you should set <strong>yield points</strong> for one or more operations.
+ A yield point is a {@link android.content.ContentProviderOperation} object that has its
+ {@link android.content.ContentProviderOperation#isYieldAllowed()} value set to
+ <code>true</code>. When the Contacts Provider encounters a yield point, it pauses its work to
+ let other processes run and closes the current transaction. When the provider starts again, it
+ continues with the next operation in the {@link java.util.ArrayList} and starts a new
+ transaction.
+</p>
+<p>
+ Yield points do result in more than one transaction per call to
+ {@link android.content.ContentResolver#applyBatch(String, ArrayList) applyBatch()}. Because of
+ this, you should set a yield point for the last operation for a set of related rows.
+ For example, you should set a yield point for the last operation in a set that adds a
+ raw contact rows and its associated data rows, or the last operation for a set of rows related
+ to a single contact.
+</p>
+<p>
+ Yield points are also a unit of atomic operation. All accesses between two yield points will
+ either succeed or fail as a single unit. If you don't set any yield points, the smallest
+ atomic operation is the entire batch of operations. If you do use yield points, you prevent
+ operations from degrading system performance, while at the same time ensuring that a subset of
+ operations is atomic.
+</p>
+<h4>Modification back references</h4>
+<p>
+ When you're inserting a new raw contact row and its associated data rows as a set of
+ {@link android.content.ContentProviderOperation} objects, you have to link the data rows to
+ the raw contact row by inserting the raw contact's
+ {@link android.provider.BaseColumns#_ID} value as the
+ {@link android.provider.ContactsContract.DataColumns#RAW_CONTACT_ID} value. However, this
+ value isn't available when you're creating the {@link android.content.ContentProviderOperation}
+ for the data row, because you haven't yet applied the
+ {@link android.content.ContentProviderOperation} for the raw contact row. To work around this,
+ the {@link android.content.ContentProviderOperation.Builder} class has the method
+ {@link android.content.ContentProviderOperation.Builder#withValueBackReference(String, int) withValueBackReference()}.
+ This method allows you to insert or modify a column with the
+ result of a previous operation.
+</p>
+<p>
+ The {@link android.content.ContentProviderOperation.Builder#withValueBackReference(String, int) withValueBackReference()}
+ method has two arguments:
+</p>
+ <dl>
+ <dt>
+ <code>key</code>
+ </dt>
+ <dd>
+ The key of a key-value pair. The value of this argument should be the name of a column
+ in the table that you're modifying.
+ </dd>
+ <dt>
+ <code>previousResult</code>
+ </dt>
+ <dd>
+ The 0-based index of a value in the array of
+ {@link android.content.ContentProviderResult} objects from
+ {@link android.content.ContentResolver#applyBatch(String, ArrayList) applyBatch()}. As
+ the batch operations are applied, the result of each operation is stored in an
+ intermediate array of results. The <code>previousResult</code> value is the index
+ of one of these results, which is retrieved and stored with the <code>key</code>
+ value. This allows you to insert a new raw contact record and get back its
+ {@link android.provider.BaseColumns#_ID} value, then make a "back reference" to the
+ value when you add a {@link android.provider.ContactsContract.Data} row.
+ <p>
+ The entire result array is created when you first call
+ {@link android.content.ContentResolver#applyBatch(String, ArrayList) applyBatch()},
+ with a size equal to the size of the {@link java.util.ArrayList} of
+ {@link android.content.ContentProviderOperation} objects you provide. However, all
+ the elements in the result array are set to <code>null</code>, and if you try
+ to do a back reference to a result for an operation that hasn't yet been applied,
+{@link android.content.ContentProviderOperation.Builder#withValueBackReference(String, int) withValueBackReference()}
+ throws an {@link java.lang.Exception}.
+
+ </p>
+ </dd>
+ </dl>
+<p>
+ The following snippets show how to insert a new raw contact and data in batch. They
+ includes code that establishes a yield point and uses a back reference. The snippets are an
+ expanded version of the <code>createContacEntry()</code> method, which is part of the
+ <code>ContactAdder</code> class in the
+ <code><a href="{@docRoot}resources/samples/ContactManager/index.html">
+ Contact Manager</a></code> sample application.
+</p>
+<p>
+ The first snippet retrieves contact data from the UI. At this point, the user has already
+ selected the account for which the new raw contact should be added.
+</p>
+<pre>
+// Creates a contact entry from the current UI values, using the currently-selected account.
+protected void createContactEntry() {
+ /*
+ * Gets values from the UI
+ */
+ String name = mContactNameEditText.getText().toString();
+ String phone = mContactPhoneEditText.getText().toString();
+ String email = mContactEmailEditText.getText().toString();
+
+ int phoneType = mContactPhoneTypes.get(
+ mContactPhoneTypeSpinner.getSelectedItemPosition());
+
+ int emailType = mContactEmailTypes.get(
+ mContactEmailTypeSpinner.getSelectedItemPosition());
+</pre>
+<p>
+ The next snippet creates an operation to insert the raw contact row into the
+ {@link android.provider.ContactsContract.RawContacts} table:
+</p>
+<pre>
+ /*
+ * Prepares the batch operation for inserting a new raw contact and its data. Even if
+ * the Contacts Provider does not have any data for this person, you can't add a Contact,
+ * only a raw contact. The Contacts Provider will then add a Contact automatically.
+ */
+
+ // Creates a new array of ContentProviderOperation objects.
+ ArrayList&lt;ContentProviderOperation&gt; ops =
+ new ArrayList&lt;ContentProviderOperation&gt;();
+
+ /*
+ * Creates a new raw contact with its account type (server type) and account name
+ * (user's account). Remember that the display name is not stored in this row, but in a
+ * StructuredName data row. No other data is required.
+ */
+ ContentProviderOperation.Builder op =
+ ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI)
+ .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, mSelectedAccount.getType())
+ .withValue(ContactsContract.RawContacts.ACCOUNT_NAME, mSelectedAccount.getName());
+
+ // Builds the operation and adds it to the array of operations
+ ops.add(op.build());
+</pre>
+<p>
+ Next, the code creates data rows for the display name, phone, and email rows.
+</p>
+<p>
+ Each operation builder object uses
+ {@link android.content.ContentProviderOperation.Builder#withValueBackReference(String, int) withValueBackReference()}
+ to get the
+ {@link android.provider.ContactsContract.DataColumns#RAW_CONTACT_ID}. The reference points
+ back to the {@link android.content.ContentProviderResult} object from the first operation,
+ which adds the raw contact row and returns its new {@link android.provider.BaseColumns#_ID}
+ value. As a result, each data row is automatically linked by its
+ {@link android.provider.ContactsContract.DataColumns#RAW_CONTACT_ID}
+ to the new {@link android.provider.ContactsContract.RawContacts} row to which it belongs.
+</p>
+<p>
+ The {@link android.content.ContentProviderOperation.Builder} object that adds the email row is
+ flagged with {@link android.content.ContentProviderOperation.Builder#withYieldAllowed(boolean)
+ withYieldAllowed()}, which sets a yield point:
+</p>
+<pre>
+ // Creates the display name for the new raw contact, as a StructuredName data row.
+ op =
+ ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
+ /*
+ * withValueBackReference sets the value of the first argument to the value of
+ * the ContentProviderResult indexed by the second argument. In this particular
+ * call, the raw contact ID column of the StructuredName data row is set to the
+ * value of the result returned by the first operation, which is the one that
+ * actually adds the raw contact row.
+ */
+ .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
+
+ // Sets the data row's MIME type to StructuredName
+ .withValue(ContactsContract.Data.MIMETYPE,
+ ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)
+
+ // Sets the data row's display name to the name in the UI.
+ .withValue(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, name);
+
+ // Builds the operation and adds it to the array of operations
+ ops.add(op.build());
+
+ // Inserts the specified phone number and type as a Phone data row
+ op =
+ ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
+ /*
+ * Sets the value of the raw contact id column to the new raw contact ID returned
+ * by the first operation in the batch.
+ */
+ .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
+
+ // Sets the data row's MIME type to Phone
+ .withValue(ContactsContract.Data.MIMETYPE,
+ ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE)
+
+ // Sets the phone number and type
+ .withValue(ContactsContract.CommonDataKinds.Phone.NUMBER, phone)
+ .withValue(ContactsContract.CommonDataKinds.Phone.TYPE, phoneType);
+
+ // Builds the operation and adds it to the array of operations
+ ops.add(op.build());
+
+ // Inserts the specified email and type as a Phone data row
+ op =
+ ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
+ /*
+ * Sets the value of the raw contact id column to the new raw contact ID returned
+ * by the first operation in the batch.
+ */
+ .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
+
+ // Sets the data row's MIME type to Email
+ .withValue(ContactsContract.Data.MIMETYPE,
+ ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE)
+
+ // Sets the email address and type
+ .withValue(ContactsContract.CommonDataKinds.Email.ADDRESS, email)
+ .withValue(ContactsContract.CommonDataKinds.Email.TYPE, emailType);
+
+ /*
+ * Demonstrates a yield point. At the end of this insert, the batch operation's thread
+ * will yield priority to other threads. Use after every set of operations that affect a
+ * single contact, to avoid degrading performance.
+ */
+ op.withYieldAllowed(true);
+
+ // Builds the operation and adds it to the array of operations
+ ops.add(op.build());
+</pre>
+<p>
+ The last snippet shows the call to
+ {@link android.content.ContentResolver#applyBatch(String, ArrayList) applyBatch()} that
+ inserts the new raw contact and data rows.
+</p>
+<pre>
+ // Ask the Contacts Provider to create a new contact
+ Log.d(TAG,"Selected account: " + mSelectedAccount.getName() + " (" +
+ mSelectedAccount.getType() + ")");
+ Log.d(TAG,"Creating contact: " + name);
+
+ /*
+ * Applies the array of ContentProviderOperation objects in batch. The results are
+ * discarded.
+ */
+ try {
+
+ getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);
+ } catch (Exception e) {
+
+ // Display a warning
+ Context ctx = getApplicationContext();
+
+ CharSequence txt = getString(R.string.contactCreationFailure);
+ int duration = Toast.LENGTH_SHORT;
+ Toast toast = Toast.makeText(ctx, txt, duration);
+ toast.show();
+
+ // Log exception
+ Log.e(TAG, "Exception encountered while inserting contact: " + e);
+ }
+}
+</pre>
+<p>
+ Batch operations also allow you to implement <strong>optimistic concurrency control</strong>,
+ a method of applying modification transactions without having to lock the underlying repository.
+ To use this method, you apply the transaction and then check for other modifications that
+ may have been made at the same time. If you find an inconsistent modification has occurred, you
+ roll back your transaction and retry it.
+</p>
+<p>
+ Optimistic concurrency control is useful for a mobile device, where there's only one user at
+ a time, and simultaneous accesses to a data repository are rare. Because locking isn't used,
+ no time is wasted on setting locks or waiting for other transactions to release their locks.
+</p>
+<p>
+ To use optimistic concurrency control while updating a single
+ {@link android.provider.ContactsContract.RawContacts} row, follow these steps:
+</p>
+<ol>
+ <li>
+ Retrieve the raw contact's {@link android.provider.ContactsContract.SyncColumns#VERSION}
+ column along with the other data you retrieve.
+ </li>
+ <li>
+ Create a {@link android.content.ContentProviderOperation.Builder} object suitable for
+ enforcing a constraint, using the method
+ {@link android.content.ContentProviderOperation#newAssertQuery(Uri)}. For the content URI,
+ use {@link android.provider.ContactsContract.RawContacts#CONTENT_URI
+ RawContacts.CONTENT_URI}
+ with the raw contact's {@link android.provider.BaseColumns#_ID} appended to it.
+ </li>
+ <li>
+ For the {@link android.content.ContentProviderOperation.Builder} object, call
+ {@link android.content.ContentProviderOperation.Builder#withValue(String, Object)
+ withValue()} to compare the {@link android.provider.ContactsContract.SyncColumns#VERSION}
+ column to the version number you just retrieved.
+ </li>
+ <li>
+ For the same {@link android.content.ContentProviderOperation.Builder}, call
+ {@link android.content.ContentProviderOperation.Builder#withExpectedCount(int)
+ withExpectedCount()} to ensure that only one row is tested by this assertion.
+ </li>
+ <li>
+ Call {@link android.content.ContentProviderOperation.Builder#build()} to create the
+ {@link android.content.ContentProviderOperation} object, then add this object as the
+ first object in the {@link java.util.ArrayList} that you pass to
+ {@link android.content.ContentResolver#applyBatch(String, ArrayList) applyBatch()}.
+ </li>
+ <li>
+ Apply the batch transaction.
+ </li>
+</ol>
+<p>
+ If the raw contact row is updated by another operation between the time you read the row and
+ the time you attempt to modify it, the "assert" {@link android.content.ContentProviderOperation}
+ will fail, and the entire batch of operations will be backed out. You can then choose to retry
+ the batch or take some other action.
+</p>
+<p>
+ The following snippet demonstrates how to create an "assert"
+ {@link android.content.ContentProviderOperation} after querying for a single raw contact using
+ a {@link android.content.CursorLoader}:
+</p>
+<pre>
+/*
+ * The application uses CursorLoader to query the raw contacts table. The system calls this method
+ * when the load is finished.
+ */
+public void onLoadFinished(Loader&lt;Cursor&gt; loader, Cursor cursor) {
+
+ // Gets the raw contact's _ID and VERSION values
+ mRawContactID = cursor.getLong(cursor.getColumnIndex(BaseColumns._ID));
+ mVersion = cursor.getInt(cursor.getColumnIndex(SyncColumns.VERSION));
+}
+
+...
+
+// Sets up a Uri for the assert operation
+Uri rawContactUri = ContentUris.withAppendedId(RawContacts.CONTENT_URI, mRawContactID);
+
+// Creates a builder for the assert operation
+ContentProviderOperation.Builder assertOp = ContentProviderOperation.netAssertQuery(rawContactUri);
+
+// Adds the assertions to the assert operation: checks the version and count of rows tested
+assertOp.withValue(SyncColumns.VERSION, mVersion);
+assertOp.withExpectedCount(1);
+
+// Creates an ArrayList to hold the ContentProviderOperation objects
+ArrayList ops = new ArrayList&lt;ContentProviderOperationg&gt;;
+
+ops.add(assertOp.build());
+
+// You would add the rest of your batch operations to "ops" here
+
+...
+
+// Applies the batch. If the assert fails, an Exception is thrown
+try
+ {
+ ContentProviderResult[] results =
+ getContentResolver().applyBatch(AUTHORITY, ops);
+
+ } catch (OperationApplicationException e) {
+
+ // Actions you want to take if the assert operation fails go here
+ }
+</pre>
+<h3 id="Intents">Retrieval and modification with intents</h3>
+<p>
+ Sending an intent to the device's contacts application allows you to access the Contacts
+ Provider indirectly. The intent starts the device's contacts application UI, in which users can
+ do contacts-related work. With this type of access, users can:
+ <ul>
+ <li>Pick a contact from a list and have it returned to your app for further work.</li>
+ <li>Edit an existing contact's data.</li>
+ <li>Insert a new raw contact for any of their accounts.</li>
+ <li>Delete a contact or contacts data.</li>
+ </ul>
+<p>
+ If the user is inserting or updating data, you can collect the data first and send it as
+ part of the intent.
+</p>
+<p>
+ When you use intents to access the Contacts Provider via the device's contacts application, you
+ don't have to write your own UI or code for accessing the provider. You also don't have to
+ request permission to read or write to the provider. The device's contacts application can
+ delegate read permission for a contact to you, and because you're making modifications to the
+ provider through another application, you don't have to have write permissions.
+</p>
+<p>
+ The general process of sending an intent to access a provider is described in detail in the
+ <a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
+ Content Provider Basics</a> guide in the section "Data access via intents." The action,
+ MIME type, and data values you use for the available tasks are summarized in Table 4, while the
+ extras values you can use with
+ {@link android.content.Intent#putExtra(String, String) putExtra()} are listed in the
+ reference documentation for {@link android.provider.ContactsContract.Intents.Insert}:
+</p>
+<p class="table-caption" id="table4">
+ <strong>Table 4.</strong> Contacts Provider Intents.
+</p>
+<table style="width:75%">
+ <tr>
+ <th scope="col" style="width:10%">Task</th>
+ <th scope="col" style="width:5%">Action</th>
+ <th scope="col" style="width:10%">Data</th>
+ <th scope="col" style="width:10%">MIME type</th>
+ <th scope="col" style="width:25%">Notes</th>
+ </tr>
+ <tr>
+ <td><strong>Pick a contact from a list</strong></td>
+ <td>{@link android.content.Intent#ACTION_PICK}</td>
+ <td>
+ One of:
+ <ul>
+ <li>
+{@link android.provider.ContactsContract.Contacts#CONTENT_URI Contacts.CONTENT_URI},
+ which displays a list of contacts.
+ </li>
+ <li>
+{@link android.provider.ContactsContract.CommonDataKinds.Phone#CONTENT_URI Phone.CONTENT_URI},
+ which displays a list of phone numbers for a raw contact.
+ </li>
+ <li>
+{@link android.provider.ContactsContract.CommonDataKinds.StructuredPostal#CONTENT_URI
+StructuredPostal.CONTENT_URI},
+ which displays a list of postal addresses for a raw contact.
+ </li>
+ <li>
+{@link android.provider.ContactsContract.CommonDataKinds.Email#CONTENT_URI Email.CONTENT_URI},
+ which displays a list of email addresses for a raw contact.
+ </li>
+ </ul>
+ </td>
+ <td>
+ Not used
+ </td>
+ <td>
+ Displays a list of raw contacts or a list of data from a raw contact, depending on the
+ content URI type you supply.
+ <p>
+ Call
+ {@link android.app.Activity#startActivityForResult(Intent, int) startActivityForResult()},
+ which returns the content URI of the selected row. The form of the URI is the
+ table's content URI with the row's <code>LOOKUP_ID</code> appended to it.
+ The device's contacts app delegates read and write permissions to this content URI
+ for the life of your activity. See the
+ <a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
+ Content Provider Basics</a> guide for more details.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td><strong>Insert a new raw contact</strong></td>
+ <td>{@link android.provider.ContactsContract.Intents.Insert#ACTION Insert.ACTION}</td>
+ <td>N/A</td>
+ <td>
+ {@link android.provider.ContactsContract.RawContacts#CONTENT_TYPE
+ RawContacts.CONTENT_TYPE}, MIME type for a set of raw contacts.
+ </td>
+ <td>
+ Displays the device's contacts application's <strong>Add Contact</strong> screen. The
+ extras values you add to the intent are displayed. If sent with
+ {@link android.app.Activity#startActivityForResult(Intent, int) startActivityForResult()},
+ the content URI of the newly-added raw contact is passed back to your activity's
+ {@link android.app.Activity#onActivityResult(int, int, Intent) onActivityResult()}
+ callback method in the {@link android.content.Intent} argument, in the
+ "data" field. To get the value, call {@link android.content.Intent#getData()}.
+ </td>
+ </tr>
+ <tr>
+ <td><strong>Edit a contact</strong></td>
+ <td>{@link android.content.Intent#ACTION_EDIT}</td>
+ <td>
+ {@link android.provider.ContactsContract.Contacts#CONTENT_LOOKUP_URI} for
+ the contact. The editor activity will allow the user to edit any of the data associated
+ with this contact.
+ </td>
+ <td>
+ {@link android.provider.ContactsContract.Contacts#CONTENT_ITEM_TYPE
+ Contacts.CONTENT_ITEM_TYPE}, a single contact.</td>
+ <td>
+ Displays the Edit Contact screen in the contacts application. The extras values you add
+ to the intent are displayed. When the user clicks <strong>Done</strong> to save the
+ edits, your activity returns to the foreground.
+ </td>
+ </tr>
+ <tr>
+ <td><strong>Display a picker that can also add data.</strong></td>
+ <td>{@link android.content.Intent#ACTION_INSERT_OR_EDIT}</td>
+ <td>
+ N/A
+ </td>
+ <td>
+ {@link android.provider.ContactsContract.Contacts#CONTENT_ITEM_TYPE}
+ </td>
+ <td>
+ This intent always displays the contacts app's picker screen. The user can either
+ pick a contact to edit, or add a new contact. Either the edit or the add screen
+ appears, depending on the user's choice, and the extras data you pass in the intent
+ is displayed. If your app displays contact data such as an email or phone number, use
+ this intent to allow the user to add the data to an existing contact.
+ contact,
+ <p class="note">
+ <strong>Note:</strong> There's no need to send a name value in this intent's extras,
+ because the user always picks an existing name or adds a new one. Moreover,
+ if you send a name, and the user chooses to do an edit, the contacts app will
+ display the name you send, overwriting the previous value. If the user doesn't
+ notice this and saves the edit, the old value is lost.
+ </p>
+ </td>
+ </tr>
+</table>
+<p>
+ The device's contacts app doesn't allow you to delete a raw contact or any of its data with an
+ intent. Instead, to delete a raw contact, use
+ {@link android.content.ContentResolver#delete(Uri, String, String[]) ContentResolver.delete()}
+ or {@link android.content.ContentProviderOperation#newDelete(Uri)
+ ContentProviderOperation.newDelete()}.
+</p>
+<p>
+ The following snippet shows how to construct and send an intent that inserts a new raw
+ contact and data:
+</p>
+<pre>
+// Gets values from the UI
+String name = mContactNameEditText.getText().toString();
+String phone = mContactPhoneEditText.getText().toString();
+String email = mContactEmailEditText.getText().toString();
+
+String company = mCompanyName.getText().toString();
+String jobtitle = mJobTitle.getText().toString();
+
+// Creates a new intent for sending to the device's contacts application
+Intent insertIntent = new Intent(ContactsContract.Intents.Insert.ACTION);
+
+// Sets the MIME type to the one expected by the insertion activity
+insertIntent.setType(ContactsContract.RawContacts.CONTENT_TYPE);
+
+// Sets the new contact name
+insertIntent.putExtra(ContactsContract.Intents.Insert.NAME, name);
+
+// Sets the new company and job title
+insertIntent.putExtra(ContactsContract.Intents.Insert.COMPANY, company);
+insertIntent.putExtra(ContactsContract.Intents.Insert.JOB_TITLE, jobtitle);
+
+/*
+ * Demonstrates adding data rows as an array list associated with the DATA key
+ */
+
+// Defines an array list to contain the ContentValues objects for each row
+ArrayList&lt;ContentValues&gt; contactData = new ArrayList&lt;ContentValues&gt;();
+
+
+/*
+ * Defines the raw contact row
+ */
+
+// Sets up the row as a ContentValues object
+ContentValues rawContactRow = new ContentValues();
+
+// Adds the account type and name to the row
+rawContactRow.put(ContactsContract.RawContacts.ACCOUNT_TYPE, mSelectedAccount.getType());
+rawContactRow.put(ContactsContract.RawContacts.ACCOUNT_NAME, mSelectedAccount.getName());
+
+// Adds the row to the array
+contactData.add(rawContactRow);
+
+/*
+ * Sets up the phone number data row
+ */
+
+// Sets up the row as a ContentValues object
+ContentValues phoneRow = new ContentValues();
+
+// Specifies the MIME type for this data row (all data rows must be marked by their type)
+phoneRow.put(
+ ContactsContract.Data.MIMETYPE,
+ ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE
+);
+
+// Adds the phone number and its type to the row
+phoneRow.put(ContactsContract.CommonDataKinds.Phone.NUMBER, phone);
+
+// Adds the row to the array
+contactData.add(phoneRow);
+
+/*
+ * Sets up the email data row
+ */
+
+// Sets up the row as a ContentValues object
+ContentValues emailRow = new ContentValues();
+
+// Specifies the MIME type for this data row (all data rows must be marked by their type)
+emailRow.put(
+ ContactsContract.Data.MIMETYPE,
+ ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE
+);
+
+// Adds the email address and its type to the row
+emailRow.put(ContactsContract.CommonDataKinds.Email.ADDRESS, email);
+
+// Adds the row to the array
+contactData.add(emailRow);
+
+/*
+ * Adds the array to the intent's extras. It must be a parcelable object in order to
+ * travel between processes. The device's contacts app expects its key to be
+ * Intents.Insert.DATA
+ */
+insertIntent.putParcelableArrayListExtra(ContactsContract.Intents.Insert.DATA, contactData);
+
+// Send out the intent to start the device's contacts app in its add contact activity.
+startActivity(insertIntent);
+</pre>
+<h3 id="DataIntegrity">Data integrity</h3>
+<p>
+ Because the contacts repository contains important and sensitive data that users expect to be
+ correct and up-to-date, the Contacts Provider has well-defined rules for data integrity. It's
+ your responsibility to conform to these rules when you modify contacts data. The important
+ rules are listed here:
+</p>
+<dl>
+ <dt>
+ Always add a {@link android.provider.ContactsContract.CommonDataKinds.StructuredName} row
+ for every {@link android.provider.ContactsContract.RawContacts} row you add.
+ </dt>
+ <dd>
+ A {@link android.provider.ContactsContract.RawContacts} row without a
+ {@link android.provider.ContactsContract.CommonDataKinds.StructuredName} row in the
+ {@link android.provider.ContactsContract.Data} table may cause problems during
+ aggregation.
+ </dd>
+ <dt>
+ Always link new {@link android.provider.ContactsContract.Data} rows to their parent
+ {@link android.provider.ContactsContract.RawContacts} row.
+ </dt>
+ <dd>
+ A {@link android.provider.ContactsContract.Data} row that isn't linked to a
+ {@link android.provider.ContactsContract.RawContacts} won't be visible in the device's
+ contacts application, and it might cause problems with sync adapters.
+ </dd>
+ <dt>
+ Change data only for those raw contacts that you own.
+ </dt>
+ <dd>
+ Remember that the Contacts Provider is usually managing data from several different
+ account types/online services. You need to ensure that your application only modifies
+ or deletes data for rows that belong to you, and that it only inserts data with an
+ account type and name that you control.
+ </dd>
+ <dt>
+ Always use the constants defined in {@link android.provider.ContactsContract} and its
+ subclasses for authorities, content URIs, URI paths, column names, MIME types, and
+ {@link android.provider.ContactsContract.CommonDataKinds.CommonColumns#TYPE} values.
+ </dt>
+ <dd>
+ Using these constants helps you to avoid errors. You'll also be notified with compiler
+ warnings if any of the constants is deprecated.
+ </dd>
+</dl>
+<h3 id="CustomData">Custom data rows</h3>
+<p>
+ By creating and using your own custom MIME types, you can insert, edit, delete, and retrieve
+ your own data rows in the {@link android.provider.ContactsContract.Data} table. Your rows
+ are limited to using the column defined in
+ {@link android.provider.ContactsContract.DataColumns}, although you can map your own
+ type-specific column names to the default column names. In the device's contacts application,
+ the data for your rows is displayed but can't be edited or deleted, and users can't add
+ additional data. To allow users to modify your custom data rows, you must provide an editor
+ activity in your own application.
+</p>
+<p>
+ To display your custom data, provide a <code>contacts.xml</code> file containing a
+ <code>&lt;ContactsAccountType&gt;</code> element and one or more of its
+ <code>&lt;ContactsDataKind&gt;</code> child elements. This is described in more detail in the
+ section <a href="#SocialStreamDataKind"><code>&lt;ContactsDataKind&gt; element</code></a>.
+</p>
+<p>
+ To learn more about custom MIME types, read the
+ <a href="{@docRoot}guide/topics/providers/content-provider-creating.html">
+ Creating a Content Provider</a> guide.
+</p>
+<h2 id="SyncAdapters">Contacts Provider Sync Adapters</h2>
+<p>
+ The Contacts Provider is specifically designed for handling <strong>synchronization</strong>
+ of contacts data between a device and an online service. This allows users to download
+ existing data to a new device and upload existing data to a new account.
+ Synchronization also ensures that users have the latest data at hand, regardless
+ of the source of additions and changes. Another advantage of synchronization is that it makes
+ contacts data available even when the device is not connected to the network.
+</p>
+<p>
+ Although you can implement synchronization in a variety of ways, the Android system provides
+ a plug-in synchronization framework that automates the following tasks:
+ <ul>
+
+ <li>
+ Checking network availability.
+ </li>
+ <li>
+ Scheduling and executing synchronization, based on user preferences.
+ </li>
+ <li>
+ Restarting synchronizations that have stopped.
+ </li>
+ </ul>
+<p>
+ To use this framework, you supply a sync adapter plug-in. Each sync adapter is unique to a
+ service and content provider, but can handle multiple account names for the same service. The
+ framework also allows multiple sync adapters for the same service and provider.
+</p>
+<h3 id="SyncClassesFiles">Sync adapter classes and files</h3>
+<p>
+ You implement a sync adapter as a subclass of
+ {@link android.content.AbstractThreadedSyncAdapter} and install it as part of an Android
+ application. The system learns about the sync adapter from elements in your application
+ manifest, and from a special XML file pointed to by the manifest. The XML file defines the
+ account type for the online service and the authority for the content provider, which together
+ uniquely identify the adapter. The sync adapter does not become active until the user adds an
+ account for the sync adapter's account type and enables synchronization for the content
+ provider the sync adapter syncs with. At that point, the system starts managing the adapter,
+ calling it as necessary to synchronize between the content provider and the server.
+</p>
+<p class="note">
+ <strong>Note:</strong> Using an account type as part of the sync adapter's identification allows
+ the system to detect and group together sync adapters that access different services from the
+ same organization. For example, sync adapters for Google online services all have the same
+ account type <code>com.google</code>. When users add a Google account to their devices, all
+ of the installed sync adapters for Google services are listed together; each sync adapter
+ listed syncs with a different content provider on the device.
+</p>
+<p>
+ Because most services require users to verify their identity before accessing
+ data, the Android system offers an authentication framework that is similar to, and often
+ used in conjunction with, the sync adapter framework. The authentication framework uses
+ plug-in authenticators that are subclasses of
+ {@link android.accounts.AbstractAccountAuthenticator}. An authenticator verifies
+ the user's identity in the following steps:
+ <ol>
+ <li>
+ Collects the user's name, password or similar information (the user's
+ <strong>credentials</strong>).
+ </li>
+ <li>
+ Sends the credentials to the service
+ </li>
+ <li>
+ Examines the service's reply.
+ </li>
+ </ol>
+<p>
+ If the service accepts the credentials, the authenticator can
+ store the credentials for later use. Because of the plug-in authenticator framework, the
+ {@link android.accounts.AccountManager} can provide access to any authtokens an authenticator
+ supports and chooses to expose, such as OAuth2 authtokens.
+</p>
+<p>
+ Although authentication is not required, most contacts services use it.
+ However, you're not required to use the Android authentication framework to do authentication.
+</p>
+<h3 id="SyncAdapterImplementing">Sync adapter implementation</h3>
+<p>
+ To implement a sync adapter for the Contacts Provider, you start by creating an
+ Android application that contains the following:
+</p>
+ <dl>
+ <dt>
+ A {@link android.app.Service} component that responds to requests from the system to
+ bind to the sync adapter.
+ </dt>
+ <dd>
+ When the system wants to run a synchronization, it calls the service's
+ {@link android.app.Service#onBind(Intent) onBind()} method to get an
+ {@link android.os.IBinder} for the sync adapter. This allows the system to do
+ cross-process calls to the adapter's methods.
+ <p>
+ In the <a href="{@docRoot}resources/samples/SampleSyncAdapter/index.html">
+ Sample Sync Adapter</a> sample app, the class name of this service is
+ <code>com.example.android.samplesync.syncadapter.SyncService</code>.
+ </p>
+ </dd>
+ <dt>
+ The actual sync adapter, implemented as a concrete subclass of
+ {@link android.content.AbstractThreadedSyncAdapter}.
+ </dt>
+ <dd>
+ This class does the work of downloading data from the server, uploading data from the
+ device, and resolving conflicts. The main work of the adapter is
+ done in the method {@link android.content.AbstractThreadedSyncAdapter#onPerformSync(
+ Account, Bundle, String, ContentProviderClient, SyncResult)
+ onPerformSync()}. This class must be instantiated as a singleton.
+ <p>
+ In the <a href="{@docRoot}resources/samples/SampleSyncAdapter/index.html">
+ Sample Sync Adapter</a> sample app, the sync adapter is defined in the class
+ <code>com.example.android.samplesync.syncadapter.SyncAdapter</code>.
+ </p>
+ </dd>
+ <dt>
+ A subclass of {@link android.app.Application}.
+ </dt>
+ <dd>
+ This class acts as a factory for the sync adapter singleton. Use the
+ {@link android.app.Application#onCreate()} method to instantiate the sync adapter, and
+ provide a static "getter" method to return the singleton to the
+ {@link android.app.Service#onBind(Intent) onBind()} method of the sync adapter's
+ service.
+ </dd>
+ <dt>
+ <strong>Optional:</strong> A {@link android.app.Service} component that responds to
+ requests from the system for user authentication.
+ </dt>
+ <dd>
+ {@link android.accounts.AccountManager} starts this service to begin the authentication
+ process. The service's {@link android.app.Service#onCreate()} method instantiates an
+ authenticator object. When the system wants to authenticate a user account for the
+ application's sync adapter, it calls the service's
+ {@link android.app.Service#onBind(Intent) onBind()} method to get an
+ {@link android.os.IBinder} for the authenticator. This allows the system to do
+ cross-process calls to the authenticator's methods..
+ <p>
+ In the <a href="{@docRoot}resources/samples/SampleSyncAdapter/index.html">
+ Sample Sync Adapter</a> sample app, the class name of this service is
+ <code>com.example.android.samplesync.authenticator.AuthenticationService</code>.
+ </p>
+ </dd>
+ <dt>
+ <strong>Optional:</strong> A concrete subclass of
+ {@link android.accounts.AbstractAccountAuthenticator} that handles requests for
+ authentication.
+ </dt>
+ <dd>
+ This class provides methods that the {@link android.accounts.AccountManager} invokes
+ to authenticate the user's credentials with the server. The details of the
+ authentication process vary widely, based on the server technology in use. You should
+ refer to the documentation for your server software to learn more about authentication.
+ <p>
+ In the <a href="{@docRoot}resources/samples/SampleSyncAdapter/index.html">
+ Sample Sync Adapter</a> sample app, the authenticator is defined in the class
+ <code>com.example.android.samplesync.authenticator.Authenticator</code>.
+ </p>
+ </dd>
+ <dt>
+ XML files that define the sync adapter and authenticator to the system.
+ </dt>
+ <dd>
+ The sync adapter and authenticator service components described previously are
+ defined in
+<code>&lt;<a href="{@docRoot}guide/topics/manifest/service-element.html">service</a>&gt;</code>
+ elements in the application manifest. These elements
+ contain
+<code>&lt;<a href="{@docRoot}guide/topics/manifest/meta-data-element.html">meta-data</a>&gt;</code>
+child elements that provide specific data to the
+ system:
+ <ul>
+ <li>
+ The
+<code>&lt;<a href="{@docRoot}guide/topics/manifest/meta-data-element.html">meta-data</a>&gt;</code>
+ element for the sync adapter service points to the
+ XML file <code>res/xml/syncadapter.xml</code>. In turn, this file specifies
+ a URI for the web service that will be synchronized with the Contacts Provider,
+ and an account type for the web service.
+ </li>
+ <li>
+ <strong>Optional:</strong> The
+<code>&lt;<a href="{@docRoot}guide/topics/manifest/meta-data-element.html">meta-data</a>&gt;</code>
+ element for the authenticator points to the XML file
+ <code>res/xml/authenticator.xml</code>. In turn, this file specifies the
+ account type that this authenticator supports, as well as UI resources that
+ appear during the authentication process. The account type specified in this
+ element must be the same as the account type specified for the sync
+ adapter.
+ </li>
+ </ul>
+ </dd>
+ </dl>
+<h2 id="SocialStream">Social Stream Data</h2>
+<p>
+ The {@link android.provider.ContactsContract.StreamItems} and
+ {@link android.provider.ContactsContract.StreamItemPhotos} tables
+ manage incoming data from social networks. You can write a sync adapter that adds stream data
+ from your own network to these tables, or you can read stream data from these tables and
+ display it in your own application, or both. With these features, your social networking
+ services and applications can be integrated into Android's social networking experience.
+</p>
+<h3 id="StreamText">Social stream text</h3>
+<p>
+ Stream items are always associated with a raw contact. The
+ {@link android.provider.ContactsContract.StreamItemsColumns#RAW_CONTACT_ID} links to the
+ <code>_ID</code> value for the raw contact. The account type and account name of the raw
+ contact are also stored in the stream item row.
+</p>
+<p>
+ Store the data from your stream in the following columns:
+</p>
+<dl>
+ <dt>
+ {@link android.provider.ContactsContract.StreamItemsColumns#ACCOUNT_TYPE}
+ </dt>
+ <dd>
+ <strong>Required.</strong> The user's account type for the raw contact associated with this
+ stream item. Remember to set this value when you insert a stream item.
+ </dd>
+ <dt>
+ {@link android.provider.ContactsContract.StreamItemsColumns#ACCOUNT_NAME}
+ </dt>
+ <dd>
+ <strong>Required.</strong> The user's account name for the raw contact associated with this
+ stream item. Remember to set this value when you insert a stream item.
+ </dd>
+ <dt>
+ Identifier columns
+ </dt>
+ <dd>
+ <strong>Required.</strong> You must insert the following identifier columns when you
+ insert a stream item:
+ <ul>
+ <li>
+ {@link android.provider.ContactsContract.StreamItemsColumns#CONTACT_ID}: The
+ {@link android.provider.BaseColumns#_ID} value of the contact that this stream
+ item is associated with.
+ </li>
+ <li>
+ {@link android.provider.ContactsContract.StreamItemsColumns#CONTACT_LOOKUP_KEY}: The
+ {@link android.provider.ContactsContract.ContactsColumns#LOOKUP_KEY} value of the
+ contact this stream item is associated with.
+ </li>
+ <li>
+ {@link android.provider.ContactsContract.StreamItemsColumns#RAW_CONTACT_ID}: The
+ {@link android.provider.BaseColumns#_ID} value of the raw contact that this stream
+ item is associated with.
+ </li>
+ </ul>
+ </dd>
+ <dt>
+ {@link android.provider.ContactsContract.StreamItemsColumns#COMMENTS}
+ </dt>
+ <dd>
+ Optional. Stores summary information that you can display at the beginning of a stream item.
+ </dd>
+ <dt>
+ {@link android.provider.ContactsContract.StreamItemsColumns#TEXT}
+ </dt>
+ <dd>
+ The text of the stream item, either the content that was posted by the source of the item,
+ or a description of some action that generated the stream item. This column can contain
+ any formatting and embedded resource images that can be rendered by
+ {@link android.text.Html#fromHtml(String) fromHtml()}. The provider may truncate or
+ ellipsize long content, but it will try to avoid breaking tags.
+ </dd>
+ <dt>
+ {@link android.provider.ContactsContract.StreamItemsColumns#TIMESTAMP}
+ </dt>
+ <dd>
+ A text string containing the time the stream item was inserted or updated, in the form
+ of <em>milliseconds</em> since epoch. Applications that insert or update stream items are
+ responsible for maintaining this column; it is not automatically maintained by the
+ Contacts Provider.
+ </dd>
+</dl>
+<p>
+ To display identifying information for your stream items, use the
+ {@link android.provider.ContactsContract.StreamItemsColumns#RES_ICON},
+ {@link android.provider.ContactsContract.StreamItemsColumns#RES_LABEL}, and
+ {@link android.provider.ContactsContract.StreamItemsColumns#RES_PACKAGE} to link to resources
+ in your application.
+</p>
+<p>
+ The {@link android.provider.ContactsContract.StreamItems} table also contains the columns
+ {@link android.provider.ContactsContract.StreamItemsColumns#SYNC1} through
+ {@link android.provider.ContactsContract.StreamItemsColumns#SYNC4} for the exclusive use of
+ sync adapters.
+</p>
+<h3 id="StreamPhotos">Social stream photos</h3>
+<p>
+ The {@link android.provider.ContactsContract.StreamItemPhotos} table stores photos associated
+ with a stream item. The table's
+ {@link android.provider.ContactsContract.StreamItemPhotosColumns#STREAM_ITEM_ID} column
+ links to values in the {@link android.provider.BaseColumns#_ID} column of
+ {@link android.provider.ContactsContract.StreamItems} table. Photo references are stored in the
+ table in these columns:
+</p>
+<dl>
+ <dt>
+ {@link android.provider.ContactsContract.StreamItemPhotos#PHOTO} column (a BLOB).
+ </dt>
+ <dd>
+ A binary representation of the photo, resized by the provider for storage and display.
+ This column is available for backwards compatibility with previous versions of the Contacts
+ Provider that used it for storing photos. However, in the current version
+ you should not use this column to store photos. Instead, use
+ either {@link android.provider.ContactsContract.StreamItemPhotosColumns#PHOTO_FILE_ID} or
+ {@link android.provider.ContactsContract.StreamItemPhotosColumns#PHOTO_URI} (both of
+ which are described in the following points) to store photos in a file. This column now
+ contains a thumbnail of the photo, which is available for reading.
+ </dd>
+ <dt>
+ {@link android.provider.ContactsContract.StreamItemPhotosColumns#PHOTO_FILE_ID}
+ </dt>
+ <dd>
+ A numeric identifier of a photo for a raw contact. Append this value to the constant
+ {@link android.provider.ContactsContract.DisplayPhoto#CONTENT_URI DisplayPhoto.CONTENT_URI}
+ to get a content URI pointing to a single photo file, and then call
+ {@link android.content.ContentResolver#openAssetFileDescriptor(Uri, String)
+ openAssetFileDescriptor()} to get a handle to the photo file.
+ </dd>
+ <dt>
+ {@link android.provider.ContactsContract.StreamItemPhotosColumns#PHOTO_URI}
+ </dt>
+ <dd>
+ A content URI pointing directly to the photo file for the photo represented by this row.
+ Call {@link android.content.ContentResolver#openAssetFileDescriptor(Uri, String)
+ openAssetFileDescriptor()} with this URI to get a handle to the photo file.
+ </dd>
+</dl>
+<h3 id="SocialStreamTables">Using the social stream tables</h3>
+<p>
+ These tables work the same as the other main tables in the Contacts Provider, except that:
+</p>
+ <ul>
+ <li>
+ These tables require additional access permissions. To read from them, your application
+ must have the permission {@link android.Manifest.permission#READ_SOCIAL_STREAM}. To
+ modify them, your application must have the permission
+ {@link android.Manifest.permission#WRITE_SOCIAL_STREAM}.
+ </li>
+ <li>
+ For the {@link android.provider.ContactsContract.StreamItems} table, the number of rows
+ stored for each raw contact is limited. Once this limit is reached,
+ the Contacts Provider makes space for new stream item rows by automatically deleting
+ the rows having the oldest
+ {@link android.provider.ContactsContract.StreamItemsColumns#TIMESTAMP}. To get the
+ limit, issue a query to the content URI
+ {@link android.provider.ContactsContract.StreamItems#CONTENT_LIMIT_URI}. You can leave
+ all the arguments other than the content URI set to <code>null</code>. The query
+ returns a Cursor containing a single row, with the single column
+ {@link android.provider.ContactsContract.StreamItems#MAX_ITEMS}.
+ </li>
+ </ul>
+
+<p>
+ The class {@link android.provider.ContactsContract.StreamItems.StreamItemPhotos} defines a
+ sub-table of {@link android.provider.ContactsContract.StreamItemPhotos} containing the photo
+ rows for a single stream item.
+</p>
+<h3 id="SocialStreamInteraction">Social stream interactions</h3>
+<p>
+ The social stream data managed by the Contacts Provider, in conjunction with the
+ device's contacts application, offers a powerful way to connect your social networking system
+ with existing contacts. The following features are available:
+</p>
+ <ul>
+ <li>
+ By syncing your social networking service to the Contacts Provider with a sync
+ adapter, you can retrieve recent activity for a user's contacts and store it in
+ the {@link android.provider.ContactsContract.StreamItems} and
+ {@link android.provider.ContactsContract.StreamItemPhotos} tables for later use.
+ </li>
+ <li>
+ Besides regular synchronization, you can trigger your sync adapter to retrieve
+ additional data when the user selects a contact to view. This allows your sync adapter
+ to retrieve high-resolution photos and the most recent stream items for the contact.
+ </li>
+ <li>
+ By registering a notification with the device's contacts application and the Contacts
+ Provider, you can <em>receive</em> an intent when a contact is viewed, and at that point
+ update the contact's status from your service. This approach may be faster and use less
+ bandwidth than doing a full sync with a sync adapter.
+ </li>
+ <li>
+ Users can add a contact to your social networking service while looking at the contact
+ in the device's contacts application. You enable this with the "invite contact" feature,
+ which you enable with a combination of an activity that adds an existing contact to your
+ network, and an XML file that provides the device's contacts application and the
+ Contacts Provider with the details of your application.
+ </li>
+ </ul>
+<p>
+ Regular synchronization of stream items with the Contacts Provider is the same as
+ other synchronizations. To learn more about synchronization, see the section
+ <a href="#SyncAdapters">Contacts Provider Sync Adapters</a>. Registering notifications and
+ inviting contacts are covered in the next two sections.
+</p>
+<h4>Registering to handle social networking views</h4>
+<p>
+ To register your sync adapter to receive notifications when the user views a contact that's
+ managed by your sync adapter:
+</p>
+<ol>
+ <li>
+ Create a file named <code>contacts.xml</code> in your project's <code>res/xml/</code>
+ directory. If you already have this file, you can skip this step.
+ </li>
+ <li>
+ In this file, add the element
+<code>&lt;ContactsAccountType xmlns:android="http://schemas.android.com/apk/res/android"&gt;</code>.
+ If this element already exists, you can skip this step.
+ </li>
+ <li>
+ To register a service that is notified when the user opens a contact's detail page in
+ the device's contacts application, add the attribute
+ <code>viewContactNotifyService="<em>serviceclass</em>"</code> to the element, where
+ <code><em>serviceclass</em></code> is the fully-qualified classname of the service
+ that should receive the intent from the device's contacts application. For the notifier
+ service, use a class that extends {@link android.app.IntentService}, to allow the service to
+ receive intents. The data in the incoming intent contains the content URI of the raw
+ contact the user clicked. From the notifier service, you can bind to and then call your
+ sync adapter to update the data for the raw contact.
+ </li>
+</ol>
+<p>
+ To register an activity to be called when the user clicks on a stream item or photo or both:
+</p>
+<ol>
+ <li>
+ Create a file named <code>contacts.xml</code> in your project's <code>res/xml/</code>
+ directory. If you already have this file, you can skip this step.
+ </li>
+ <li>
+ In this file, add the element
+<code>&lt;ContactsAccountType xmlns:android="http://schemas.android.com/apk/res/android"&gt;</code>.
+ If this element already exists, you can skip this step.
+ </li>
+ <li>
+ To register one of your activities to handle the user clicking on a stream item in the
+ device's contacts application, add the attribute
+ <code>viewStreamItemActivity="<em>activityclass</em>"</code> to the element, where
+ <code><em>activityclass</em></code> is the fully-qualified classname of the activity
+ that should receive the intent from the device's contacts application.
+ </li>
+ <li>
+ To register one of your activities to handle the user clicking on a stream photo in the
+ device's contacts application, add the attribute
+ <code>viewStreamItemPhotoActivity="<em>activityclass</em>"</code> to the element, where
+ <code><em>activityclass</em></code> is the fully-qualified classname of the activity
+ that should receive the intent from the device's contacts application.
+ </li>
+</ol>
+<p>
+ The <code>&lt;ContactsAccountType&gt;</code> element is described in more detail in the
+ section <a href="#SocialStreamAcctType">&lt;ContactsAccountType&gt; element</a>.
+</p>
+<p>
+ The incoming intent contains the content URI of the item or photo that the user clicked.
+ To have separate activities for text items and for photos, use both attributes in the same file.
+</p>
+<h4>Interacting with your social networking service</h4>
+<p>
+ Users don't have to leave the device's contacts application to invite a contact to your social
+ networking site. Instead, you can have the device's contacts app send an intent for inviting the
+ contact to one of your activities. To set this up:
+</p>
+<ol>
+ <li>
+ Create a file named <code>contacts.xml</code> in your project's <code>res/xml/</code>
+ directory. If you already have this file, you can skip this step.
+ </li>
+ <li>
+ In this file, add the element
+<code>&lt;ContactsAccountType xmlns:android="http://schemas.android.com/apk/res/android"&gt;</code>.
+ If this element already exists, you can skip this step.
+ </li>
+ <li>
+ Add the following attributes:
+ <ul>
+ <li><code>inviteContactActivity="<em>activityclass</em>"</code></li>
+ <li>
+ <code>inviteContactActionLabel="&#64;string/<em>invite_action_label</em>"</code>
+ </li>
+ </ul>
+ The <code><em>activityclass</em></code> value is the fully-qualified classname of the
+ activity that should receive the intent. The <code><em>invite_action_label</em></code>
+ value is a text string that's displayed in the <strong>Add Connection</strong> menu in the
+ device's contacts application.
+ </li>
+</ol>
+<p class="note">
+ <strong>Note:</strong> <code>ContactsSource</code> is a deprecated tag name for
+ <code>ContactsAccountType</code>.
+</p>
+<h3 id="ContactsFile">contacts.xml reference</h3>
+<p>
+ The file <code>contacts.xml</code> contains XML elements that control the interaction of your
+ sync adapter and application with the contacts application and the Contacts Provider. These
+ elements are described in the following sections.
+</p>
+<h4 id="SocialStreamAcctType">&lt;ContactsAccountType&gt; element</h4>
+<p>
+ The <code>&lt;ContactsAccountType&gt;</code> element controls the interaction of your
+ application with the contacts application. It has the following syntax:
+</p>
+<pre>
+&lt;ContactsAccountType
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ inviteContactActivity="<em>activity_name</em>"
+ inviteContactActionLabel="<em>invite_command_text</em>"
+ viewContactNotifyService="<em>view_notify_service</em>"
+ viewGroupActivity="<em>group_view_activity</em>"
+ viewGroupActionLabel="<em>group_action_text</em>"
+ viewStreamItemActivity="<em>viewstream_activity_name</em>"
+ viewStreamItemPhotoActivity="<em>viewphotostream_activity_name</em>"&gt;
+</pre>
+<p>
+ <strong>contained in:</strong>
+</p>
+<p>
+ <code>res/xml/contacts.xml</code>
+</p>
+<p>
+ <strong>can contain:</strong>
+</p>
+<p>
+ <strong><code>&lt;ContactsDataKind&gt;</code></strong>
+</p>
+<p>
+ <strong>Description:</strong>
+</p>
+<p>
+ Declares Android components and UI labels that allow users to invite one of their contacts to
+ a social network, notify users when one of their social networking streams is updated, and
+ so forth.
+</p>
+<p>
+ Notice that the attribute prefix <code>android:</code> is not necessary for the attributes
+ of <code>&lt;ContactsAccountType&gt;</code>.
+</p>
+<p>
+ <strong>Attributes:</strong>
+</p>
+<dl>
+ <dt>{@code inviteContactActivity}</dt>
+ <dd>
+ The fully-qualified class name of the activity in your application that you want to
+ activate when the user selects <strong>Add connection</strong> from the device's
+ contacts application.
+ </dd>
+ <dt>{@code inviteContactActionLabel}</dt>
+ <dd>
+ A text string that is displayed for the activity specified in
+ {@code inviteContactActivity}, in the <strong>Add connection</strong> menu.
+ For example, you can use the string "Follow in my network". You can use a string resource
+ identifier for this label.
+ </dd>
+ <dt>{@code viewContactNotifyService}</dt>
+ <dd>
+ The fully-qualified class name of a service in your application that should receive
+ notifications when the user views a contact. This notification is sent by the device's
+ contacts application; it allows your application to postpone data-intensive operations
+ until they're needed. For example, your application can respond to this notification
+ by reading in and displaying the contact's high-resolution photo and most recent
+ social stream items. This feature is described in more detail in the section
+ <a href="#SocialStreamInteraction">Social stream interactions</a>. You can see an
+ example of the notification service in the <code>NotifierService.java</code> file in the
+ <a href="{@docRoot}resources/samples/SampleSyncAdapter/index.html">SampleSyncAdapter</a>
+ sample app.
+ </dd>
+ <dt>{@code viewGroupActivity}</dt>
+ <dd>
+ The fully-qualified class name of an activity in your application that can display
+ group information. When the user clicks the group label in the device's contacts
+ application, the UI for this activity is displayed.
+ </dd>
+ <dt>{@code viewGroupActionLabel}</dt>
+ <dd>
+ The label that the contacts application displays for a UI control that allows
+ the user to look at groups in your application.
+ <p>
+ For example, if you install the Google+ application on your device and you sync
+ Google+ with the contacts application, you'll see Google+ circles listed as groups
+ in your contacts application's <strong>Groups</strong> tab. If you click on a
+ Google+ circle, you'll see people in that circle listed as a "group". At the top of
+ the display, you'll see a Google+ icon; if you click it, control switches to the
+ Google+ app. The contacts application does this with the
+ {@code viewGroupActivity}, using the Google+ icon as the value of
+ {@code viewGroupActionLabel}.
+ </p>
+ <p>
+ A string resource identifier is allowed for this attribute.
+ </p>
+ </dd>
+ <dt>{@code viewStreamItemActivity}</dt>
+ <dd>
+ The fully-qualified class name of an activity in your application that the device's
+ contacts application launches when the user clicks a stream item for a raw contact.
+ </dd>
+ <dt>{@code viewStreamItemPhotoActivity}</dt>
+ <dd>
+ The fully-qualified class name of an activity in your application that the device's
+ contacts application launches when the user clicks a photo in the stream item
+ for a raw contact.
+ </dd>
+</dl>
+<h4 id="SocialStreamDataKind">&lt;ContactsDataKind&gt; element</h4>
+<p>
+ The <code>&lt;ContactsDataKind&gt;</code> element controls the display of your application's
+ custom data rows in the contacts application's UI. It has the following syntax:
+</p>
+<pre>
+&lt;ContactsDataKind
+ android:mimeType="<em>MIMEtype</em>"
+ android:icon="<em>icon_resources</em>"
+ android:summaryColumn="<em>column_name</em>"
+ android:detailColumn="<em>column_name</em>"&gt;
+</pre>
+<p>
+ <strong>contained in:</strong>
+</p>
+<code>&lt;ContactsAccountType&gt;</code>
+<p>
+ <strong>Description:</strong>
+</p>
+<p>
+ Use this element to have the contacts application display the contents of a custom data row as
+ part of the details of a raw contact. Each <code>&lt;ContactsDataKind&gt;</code> child element
+ of <code>&lt;ContactsAccountType&gt;</code> represents a type of custom data row that your sync
+ adapter adds to the {@link android.provider.ContactsContract.Data} table. Add one
+ <code>&lt;ContactsDataKind&gt;</code> element for each custom MIME type you use. You don't have
+ to add the element if you have a custom data row for which you don't want to display data.
+</p>
+<p>
+ <strong>Attributes:</strong>
+</p>
+<dl>
+ <dt>{@code android:mimeType}</dt>
+ <dd>
+ The custom MIME type you've defined for one of your custom data row types in the
+ {@link android.provider.ContactsContract.Data} table. For example, the value
+ <code>vnd.android.cursor.item/vnd.example.locationstatus</code> could be a custom
+ MIME type for a data row that records a contact's last known location.
+ </dd>
+ <dt>{@code android:icon}</dt>
+ <dd>
+ An Android
+ <a href="{@docRoot}guide/topics/resources/drawable-resource.html">drawable resource</a>
+ that the contacts application displays next to your data. Use this to indicate to the
+ user that the data comes from your service.
+ </dd>
+ <dt>{@code android:summaryColumn}</dt>
+ <dd>
+ The column name for the first of two values retrieved from the data row. The
+ value is displayed as the first line of the entry for this data row. The first line is
+ intended to be used as a summary of the data, but that is optional. See also
+ <a href="#detailColumn">android:detailColumn</a>.
+ </dd>
+ <dt>{@code android:detailColumn}</dt>
+ <dd>
+ The column name for the second of two values retrieved from the data row. The value is
+ displayed as the second line of the entry for this data row. See also
+ {@code android:summaryColumn}.
+ </dd>
+</dl>
+<h2 id="AdditionalFeatures">Additional Contacts Provider Features</h2>
+<p>
+ Besides the main features described in previous sections, the Contacts Provider offers
+ these useful features for working with contacts data:
+</p>
+ <ul>
+ <li>Contact groups</li>
+ <li>Photo features</li>
+ </ul>
+<h3 id="Groups">Contact groups</h3>
+<p>
+ The Contacts Provider can optionally label collections of related contacts with
+ <strong>group</strong> data. If the server associated with a user account
+ wants to maintain groups, the sync adapter for the account's account type should transfer
+ groups data between the Contacts Provider and the server. When users add a new contact to the
+ server and then put this contact in a new group, the sync adapter must add the new group
+ to the {@link android.provider.ContactsContract.Groups} table. The group or groups a raw
+ contact belongs to are stored in the {@link android.provider.ContactsContract.Data} table, using
+ the {@link android.provider.ContactsContract.CommonDataKinds.GroupMembership} MIME type.
+</p>
+<p>
+ If you're designing a sync adapter that will add raw contact data from
+ server to the Contacts Provider, and you aren't using groups, then you need to tell the
+ Provider to make your data visible. In the code that is executed when a user adds an account
+ to the device, update the {@link android.provider.ContactsContract.Settings}
+ row that the Contacts Provider adds for the account. In this row, set the value of the
+ {@link android.provider.ContactsContract.SettingsColumns#UNGROUPED_VISIBLE
+ Settings.UNGROUPED_VISIBLE} column to 1. When you do this, the Contacts Provider will always
+ make your contacts data visible, even if you don't use groups.
+</p>
+<h3 id="Photos">Contact photos</h3>
+<p>
+ The {@link android.provider.ContactsContract.Data} table stores photos as rows with MIME type
+ {@link android.provider.ContactsContract.CommonDataKinds.Photo#CONTENT_ITEM_TYPE
+ Photo.CONTENT_ITEM_TYPE}. The row's
+ {@link android.provider.ContactsContract.RawContactsColumns#CONTACT_ID} column is linked to the
+ {@link android.provider.BaseColumns#_ID} column of the raw contact to which it belongs.
+ The class {@link android.provider.ContactsContract.Contacts.Photo} defines a sub-table of
+ {@link android.provider.ContactsContract.Contacts} containing photo information for a contact's
+ primary photo, which is the primary photo of the contact's primary raw contact. Similarly,
+ the class {@link android.provider.ContactsContract.RawContacts.DisplayPhoto} defines a sub-table
+ of {@link android.provider.ContactsContract.RawContacts} containing photo information for a
+ raw contact's primary photo.
+</p>
+<p>
+ The reference documentation for {@link android.provider.ContactsContract.Contacts.Photo} and
+ {@link android.provider.ContactsContract.RawContacts.DisplayPhoto} contain examples of
+ retrieving photo information. There is no convenience class for retrieving the primary
+ thumbnail for a raw contact, but you can send a query to the
+ {@link android.provider.ContactsContract.Data} table, selecting on the raw contact's
+ {@link android.provider.BaseColumns#_ID}, the
+ {@link android.provider.ContactsContract.CommonDataKinds.Photo#CONTENT_ITEM_TYPE
+ Photo.CONTENT_ITEM_TYPE}, and the {@link android.provider.ContactsContract.Data#IS_PRIMARY}
+ column to find the raw contact's primary photo row.
+</p>
+<p>
+ Social stream data for a person may also include photos. These are stored in the
+ {@link android.provider.ContactsContract.StreamItemPhotos} table, which is described in more
+ detail in the section <a href="#StreamPhotos">Social stream photos</a>.
+</p>
diff --git a/docs/html/guide/topics/providers/content-provider-basics.jd b/docs/html/guide/topics/providers/content-provider-basics.jd
index de89568c4fc6..b1d6827eb1c2 100644
--- a/docs/html/guide/topics/providers/content-provider-basics.jd
+++ b/docs/html/guide/topics/providers/content-provider-basics.jd
@@ -371,7 +371,7 @@ Uri singleUri = ContentUri.withAppendedId(UserDictionary.Words.CONTENT_URI,4);
ContentResolver.query()} on the "UI thread"". In actual code, however, you should
do queries asynchronously on a separate thread. One way to do this is to use the
{@link android.content.CursorLoader} class, which is described
- in more detail in the <a href="{@docRoot}guide/topics/fundamentals/loaders.html">
+ in more detail in the <a href="{@docRoot}guide/components/loaders.html">
Loaders</a> guide. Also, the lines of code are snippets only; they don't show a complete
application.
</p>
@@ -941,7 +941,7 @@ mRowsDeleted = getContentResolver().delete(
<li>
Asynchronous queries: You should do queries in a separate thread. One way to do this is to
use a {@link android.content.CursorLoader} object. The examples in the
- <a href="{@docRoot}guide/topics/fundamentals/loaders.html">Loaders</a> guide demonstrate
+ <a href="{@docRoot}guide/components/loaders.html">Loaders</a> guide demonstrate
how to do this.
</li>
<li>
diff --git a/docs/html/guide/topics/providers/content-provider-creating.jd b/docs/html/guide/topics/providers/content-provider-creating.jd
index 4ebdb502138c..bad5390fa5f5 100644
--- a/docs/html/guide/topics/providers/content-provider-creating.jd
+++ b/docs/html/guide/topics/providers/content-provider-creating.jd
@@ -551,7 +551,7 @@ public class ExampleProvider extends ContentProvider {
All of these methods except {@link android.content.ContentProvider#onCreate() onCreate()}
can be called by multiple threads at once, so they must be thread-safe. To learn
more about multiple threads, see the topic
- <a href="{@docRoot}guide/topics/fundamentals/processes-and-threads.html">
+ <a href="{@docRoot}guide/components/processes-and-threads.html">
Processes and Threads</a>.
</li>
<li>
@@ -1211,5 +1211,5 @@ vnd.android.cursor.<strong>item</strong>/vnd.com.example.provider.table1
<p>
Handling an incoming intent that wishes to modify your provider's data is no different from
handling other intents. You can learn more about using intents by reading the topic
- <a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a>.
+ <a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a>.
</p>
diff --git a/docs/html/guide/topics/providers/content-providers.jd b/docs/html/guide/topics/providers/content-providers.jd
index 1707f038b3ce..751fc95bbc85 100644
--- a/docs/html/guide/topics/providers/content-providers.jd
+++ b/docs/html/guide/topics/providers/content-providers.jd
@@ -18,6 +18,9 @@ page.title=Content Providers
<li>
<a href="{@docRoot}guide/topics/providers/calendar-provider.html">Calendar Provider</a>
</li>
+ <li>
+ <a href="{@docRoot}guide/topics/providers/contacts-provider.html">Contacts Provider</a>
+ </li>
</ol>
<!-- Related Samples -->
@@ -38,6 +41,10 @@ page.title=Content Providers
href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/List7.html">
&quot;Cursor (Phones)&quot;</a>
</li>
+ <li>
+ <a href="{@docRoot}resources/samples/SampleSyncAdapter/index.html">
+ Sample Sync Adapter</a>
+ </li>
</ol>
</div>
</div>
@@ -93,4 +100,11 @@ page.title=Content Providers
<dd>
How to access the Calendar Provider that is part of the Android platform.
</dd>
+ <dt>
+ <strong><a href="{@docRoot}guide/topics/providers/contacts-provider.html">
+ Contacts Provider</a></strong>
+ </dt>
+ <dd>
+ How to access the Contacts Provider that is part of the Android platform.
+ </dd>
</dl>
diff --git a/docs/html/guide/topics/resources/animation-resource.jd b/docs/html/guide/topics/resources/animation-resource.jd
index 6473155f33fd..3af52aae38c6 100644
--- a/docs/html/guide/topics/resources/animation-resource.jd
+++ b/docs/html/guide/topics/resources/animation-resource.jd
@@ -18,7 +18,7 @@ parent.link=available-resources.html
<h2>See also</h2>
<ol>
<li><a href="{@docRoot}guide/topics/graphics/view-animation.html">View Animation</a></li>
- <li><a href="{@docRoot}guide/topics/graphics/animation.html">Property Animation</a></li>
+ <li><a href="{@docRoot}guide/topics/graphics/prop-animation.html">Property Animation</a></li>
</ol>
</div>
</div>
@@ -334,7 +334,7 @@ set.start();
<dt>see also:</dt>
<dd>
<ul>
- <li><a href="{@docRoot}guide/topics/graphics/animation.html">Property Animation</a></li>
+ <li><a href="{@docRoot}guide/topics/graphics/prop-animation.html">Property Animation</a></li>
<li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/animation/index.html">API Demos</a> for examples
on how to use the property animation system.</li>
</ul>
diff --git a/docs/html/guide/topics/resources/index.jd b/docs/html/guide/topics/resources/index.jd
index 3f0f1eeb9611..386abf50a38a 100644
--- a/docs/html/guide/topics/resources/index.jd
+++ b/docs/html/guide/topics/resources/index.jd
@@ -1,103 +1,55 @@
-page.title=Application Resources
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
- <h2>Topics</h2>
- <ol>
- <li><a href="providing-resources.html">Providing Resources</a></li>
- <li><a href="accessing-resources.html">Accessing Resources</a></li>
- <li><a href="runtime-changes.html">Handling Runtime Changes</a></li>
- <li><a href="localization.html">Localization</a></li>
- </ol>
-
- <h2>Reference</h2>
- <ol>
- <li><a href="available-resources.html">Resource Types</a></li>
- </ol>
-</div>
-</div>
-
-
-<p>You should always externalize resources such as images and strings from your application
-code, so that you can maintain them independently. Externalizing your
-resources also allows you to provide alternative resources that support specific device
-configurations such as different languages or screen sizes, which becomes increasingly
-important as more Android-powered devices become available with different configurations. In order
-to provide compatibility with different configurations, you must organize resources in your
-project's {@code res/} directory, using various sub-directories that group resources by type and
-configuration.</p>
-
-<div class="figure" style="width:429px">
-<img src="{@docRoot}images/resources/resource_devices_diagram1.png" height="167" alt="" />
-<p class="img-caption">
-<strong>Figure 1.</strong> Two different devices, each using the default layout
-(the app provides no alternative layouts).</p>
-</div>
-
-<div class="figure" style="width:429px">
-<img src="{@docRoot}images/resources/resource_devices_diagram2.png" height="167" alt="" />
-<p class="img-caption">
-<strong>Figure 2.</strong> Two different devices, each using a different layout provided
-for different screen sizes.</p>
-</div>
+page.title=App Resources
+page.landing=true
+page.landing.intro=It takes more than just code to build a great app. Resources are the additional files and static content that your code uses, such as bitmaps, layout definitions, user interface strings, animation instructions, and more.
+page.landing.image=images/develop/resources.png
-<p>For any type of resource, you can specify <em>default</em> and multiple
-<em>alternative</em> resources for your application:</p>
-<ul>
- <li>Default resources are those that should be used regardless of
-the device configuration or when there are no alternative resources that match the current
-configuration.</li>
- <li>Alternative resources are those that you've designed for use with a specific
-configuration. To specify that a group of resources are for a specific configuration,
-append an appropriate configuration qualifier to the directory name.</li>
-</ul>
-
-<p>For example, while your default UI
-layout is saved in the {@code res/layout/} directory, you might specify a different layout to
-be used when the screen is in landscape orientation, by saving it in the {@code res/layout-land/}
-directory. Android automatically applies the appropriate resources by matching the
-device's current configuration to your resource directory names.</p>
-
-<p>Figure 1 illustrates how the system applies the same layout for
-two different devices when there are no alternative resources available. Figure 2 shows
-the same application when it adds an alternative layout resource for larger screens.</p>
-
-<p>The following documents provide a complete guide to how you can organize your application resources,
-specify alternative resources, access them in your application, and more:</p>
-
-<dl>
- <dt><strong><a href="providing-resources.html">Providing Resources</a></strong></dt>
- <dd>What kinds of resources you can provide in your app, where to save them, and how to create
-alternative resources for specific device configurations.</dd>
- <dt><strong><a href="accessing-resources.html">Accessing Resources</a></strong></dt>
- <dd>How to use the resources you've provided, either by referencing them from your application
-code or from other XML resources.</dd>
- <dt><strong><a href="runtime-changes.html">Handling Runtime Changes</a></strong></dt>
- <dd>How to manage configuration changes that occur while your Activity is running.</dd>
- <dt><strong><a href="localization.html">Localization</a></strong></dt>
- <dd>A bottom-up guide to localizing your application using alternative resources. While this is
-just one specific use of alternative resources, it is very important in order to reach more
-users.</dd>
- <dt><strong><a href="available-resources.html">Resource Types</a></strong></dt>
- <dd>A reference of various resource types you can provide, describing their XML elements,
-attributes, and syntax. For example, this reference shows you how to create a resource for
-application menus, drawables, animations, and more.</dd>
-</dl>
-
-<!--
-<h2>Raw Assets</h2>
+@jd:body
-<p>An alternative to saving files in {@code res/} is to save files in the {@code
-assets/} directory. This should only be necessary if you need direct access to original files and
-directories by name. Files saved in the {@code assets/} directory will not be given a resource
-ID, so you can't reference them through the {@code R} class or from XML resources. Instead, you can
-query data in the {@code assets/} directory like an ordinary file system, search through the
-directory and
-read raw data using {@link android.content.res.AssetManager}. For example, this can be more useful
-when dealing with textures for a game. However, if you only need to read raw data from a file
-(such as a video or audio file), then you should save files into the {@code res/raw/} directory and
-then read a stream of bytes using {@link android.content.res.Resources#openRawResource(int)}. This
-is uncommon, but if you need direct access to original files in {@code assets/}, refer to the {@link
-android.content.res.AssetManager} documentation.</p>
--->
+<div class="landing-docs">
+
+ <div class="col-6">
+ <h3>Blog Articles</h3>
+
+ <a
+href="http://android-developers.blogspot.com/2011/07/new-tools-for-managing-screen-sizes.html">
+ <h4>New Tools For Managing Screen Sizes</h4>
+ <p>Android 3.2 includes new tools for supporting devices with a wide range of screen sizes.
+One important result is better support for a new size of screen; what is typically called a ?7-inch?
+tablet. This release also offers several new APIs to simplify developers? work in adjusting to
+different screen sizes.</p>
+ </a>
+
+ <a href="http://android-developers.blogspot.com/2012/01/holo-everywhere.html">
+ <h4>Holo Everywhere</h4>
+ <p>Before Android 4.0 the variance in system themes from device to device could make it
+difficult to design an app with a single predictable look and feel. We set out to improve this
+situation for the developer community in Ice Cream Sandwich and beyond.</p>
+ </a>
+
+ <a
+href="http://android-developers.blogspot.com/2011/07/new-mode-for-apps-on-large-screens.html">
+ <h4>New Mode for Apps on Large Screens</h4>
+ <p>Android tablets are becoming more popular, and we're pleased to note that the vast majority
+of apps resize to the larger screens just fine. To keep the few apps that don't resize well from
+frustrating users with awkward-looking apps on their tablets, Android 3.2 introduces a screen
+compatibility mode that makes these apps more usable on tablets.</p>
+ </a>
+ </div>
+
+ <div class="col-6">
+ <h3>Training</h3>
+
+ <a href="http://developer.android.com/training/basics/supporting-devices/index.html">
+ <h4>Supporting Different Devices</h4>
+ <p>This class teaches you how to use basic platform features that leverage alternative
+resources and other features so your app can provide an optimized user experience on a variety of
+Android-compatible devices, using a single application package (APK).</p>
+ </a>
+
+ <a href="http://developer.android.com/training/multiscreen/index.html">
+ <h4>Designing for Multiple Screens</h4>
+ <p>This class shows you how to implement a user interface that's optimized for several screen
+configurations.</p>
+ </a>
+ </div>
+</div><!-- end landing-docs -->
diff --git a/docs/html/guide/topics/resources/layout-resource.jd b/docs/html/guide/topics/resources/layout-resource.jd
index 286e3d1280a3..5643075c6a3a 100644
--- a/docs/html/guide/topics/resources/layout-resource.jd
+++ b/docs/html/guide/topics/resources/layout-resource.jd
@@ -7,7 +7,7 @@ parent.link=available-resources.html
<div id="qv">
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layouts</a></li>
+ <li><a href="{@docRoot}guide/topics/ui/declaring-layout.html">Layouts</a></li>
</ol>
</div>
</div>
@@ -128,7 +128,7 @@ or {@code "wrap_content"}). See the <a href="#layoutvalues">valid values</a> bel
<p>More attributes are supported by the {@link android.view.View}
base class, and many more are supported by each implementation of
{@link android.view.View}. Read <a
-href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layouts</a> for more information. For
+href="{@docRoot}guide/topics/ui/declaring-layout.html">Layouts</a> for more information. For
a reference of all available attributes,
see the corresponding reference documentation (for example, the <a
href="{@docRoot}reference/android/widget/TextView.html#lattrs">TextView XML attributes</a>).</p>
@@ -275,7 +275,7 @@ public void onCreate(Bundle savedInstanceState) {
<dt>see also:</dt>
<dd>
<ul>
- <li><a href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layouts</a></li>
+ <li><a href="{@docRoot}guide/topics/ui/declaring-layout.html">Layouts</a></li>
<li>{@link android.view.View}</li>
<li>{@link android.view.ViewGroup}</li>
</ul>
diff --git a/docs/html/guide/topics/resources/localization.jd b/docs/html/guide/topics/resources/localization.jd
index c2b668da99dd..41961a346d6e 100755
--- a/docs/html/guide/topics/resources/localization.jd
+++ b/docs/html/guide/topics/resources/localization.jd
@@ -38,7 +38,6 @@ defaults.</li>
<li><a href="#emulator">Testing on an Emulator</a></li>
<li><a href="#test-for-default">Testing for Default Resources</a></li>
</ol>
-<li><a href="#publishing">Publishing</a></li>
<li><a href="#checklist">Localization Checklists</a></li>
<ol>
<li><a href="#planning-checklist">Planning and Design Checklist</a></li>
@@ -52,7 +51,7 @@ defaults.</li>
<li><a
href="{@docRoot}resources/tutorials/localization/index.html">Hello, L10N Tutorial</a></li>
<li><a href="{@docRoot}guide/topics/resources/providing-resources.html">Providing Resources</a></li>
- <li><a href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layouts</a></li>
+ <li><a href="{@docRoot}guide/topics/ui/declaring-layout.html">Layouts</a></li>
<li><a href="{@docRoot}reference/android/app/Activity.html#ActivityLifecycle">Activity Lifecycle</a></li>
</ol>
</div>
@@ -430,7 +429,7 @@ Menu &gt; Settings &gt; Locale &amp; text &gt; Select locale). </p>
<h3 id="emulator">Testing on an Emulator</h3>
<p>For details about using the emulator, see See <a
-href="{@docRoot}guide/developing/tools/emulator.html">Android Emulator</a>.</p>
+href="{@docRoot}tools/help/emulator.html">Android Emulator</a>.</p>
<h4>Creating and using a custom locale</h4>
<p>A &quot;custom&quot; locale is a language/region combination that the Android
@@ -505,26 +504,6 @@ the new locale. </p>
<code>res/layout-port/main.xml</code>, then set the emulator or device to
portrait orientation and see if the application will run.
-<h2 id="publishing">Publishing Localized Applications</h2>
-
-<p>The Google Play is
- the main application distribution system for Android devices. To publish a
- localized application, you need to sign your application, version it, and go
-through all the other steps described in <a
-href="{@docRoot}guide/publishing/preparing.html">Preparing to Publish</a>. </p>
-
-<p>If you split your application in several .apk files, each targeted to a
-different locale, follow these guidelines:</p>
-
-<ul>
- <li>Sign each .apk file with the same certificate. For more about this, see <a
-href="{@docRoot}guide/publishing/app-signing.html#strategies">Signing
-Strategies</a>. </li>
- <li>Give each .apk file a different application name. Currently it is
-impossible to publish two applications on Google Play that have exactly the
-same name.</li>
-<li>Include a complete set of default resources in each .apk file.</li>
-</ul>
<h2 id="checklist">Localization Checklists</h2>
@@ -640,8 +619,6 @@ border="0"></td>
border="0"></td>
<td>Upload your .apk file or files to Google Play, selecting the appropriate
languages as
- you upload. (For more details, see <a
-href="{@docRoot}guide/publishing/publishing.html">Publishing Your
-Applications</a>.)</td>
+ you upload.</td>
</tr>
</table> \ No newline at end of file
diff --git a/docs/html/guide/topics/resources/menu-resource.jd b/docs/html/guide/topics/resources/menu-resource.jd
index fb7612e41767..b2d6eb3445c9 100644
--- a/docs/html/guide/topics/resources/menu-resource.jd
+++ b/docs/html/guide/topics/resources/menu-resource.jd
@@ -111,7 +111,7 @@ only parameter, which indicates the item clicked. This method takes precedence o
callback to {@link android.app.Activity#onOptionsItemSelected onOptionsItemSelected()}. See the
example at the bottom.
<p class="warning"><strong>Warning:</strong> If you obfuscate your code using <a
-href="{@docRoot}guide/developing/tools/proguard.html">ProGuard</a> (or a similar tool),
+href="{@docRoot}tools/help/proguard.html">ProGuard</a> (or a similar tool),
be sure to exclude the method you specify in this attribute from renaming, because it can break the
functionality.</p>
<p>Introduced in API Level 11.</p></dd>
@@ -133,7 +133,8 @@ Avoid using this unless it's critical that the item always appear in the action
bar. Setting multiple items to always appear as action items can result in them overlapping
with other UI in the action bar.</td></tr>
<tr><td><code>collapseActionView</code></td><td>The action view associated
-with this action item (as declared by <code>android:actionViewLayout</code>) is
+with this action item (as declared by <code>android:actionLayout</code> or
+<code>android:actionViewClass</code>) is
collapsible.<br/>Introduced in API Level 14.</td></tr>
</table>
<p>See the <a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> developer
@@ -141,7 +142,7 @@ guide for more information.</p>
<p>Introduced in API Level 11.</p>
</dd>
- <dt><code>android:actionViewLayout</code></dt>
+ <dt><code>android:actionLayout</code></dt>
<dd><em>Layout resource</em>. A layout to use as the action view.
<p>See the <a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> developer
guide for more information.</p>
@@ -154,7 +155,7 @@ to use as the action view. For example,
<p>See the <a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> developer
guide for more information.</p>
<p class="warning"><strong>Warning:</strong> If you obfuscate your code using <a
-href="{@docRoot}guide/developing/tools/proguard.html">ProGuard</a> (or a similar tool),
+href="{@docRoot}tools/help/proguard.html">ProGuard</a> (or a similar tool),
be sure to exclude the class you specify in this attribute from renaming, because it can break the
functionality.</p>
<p>Introduced in API Level 11.</p></dd>
@@ -166,7 +167,7 @@ android.view.ActionProvider} to use in place of the action item. For example,
<p>See the <a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> developer
guide for more information.</p>
<p class="warning"><strong>Warning:</strong> If you obfuscate your code using <a
-href="{@docRoot}guide/developing/tools/proguard.html">ProGuard</a> (or a similar tool),
+href="{@docRoot}tools/help/proguard.html">ProGuard</a> (or a similar tool),
be sure to exclude the class you specify in this attribute from renaming, because it can break the
functionality.</p>
<p>Introduced in API Level 14.</p></dd>
diff --git a/docs/html/guide/topics/resources/overview.jd b/docs/html/guide/topics/resources/overview.jd
new file mode 100644
index 000000000000..c3bd0bfb0581
--- /dev/null
+++ b/docs/html/guide/topics/resources/overview.jd
@@ -0,0 +1,103 @@
+page.title=Resources Overview
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+ <h2>Topics</h2>
+ <ol>
+ <li><a href="providing-resources.html">Providing Resources</a></li>
+ <li><a href="accessing-resources.html">Accessing Resources</a></li>
+ <li><a href="runtime-changes.html">Handling Runtime Changes</a></li>
+ <li><a href="localization.html">Localization</a></li>
+ </ol>
+
+ <h2>Reference</h2>
+ <ol>
+ <li><a href="available-resources.html">Resource Types</a></li>
+ </ol>
+</div>
+</div>
+
+
+<p>You should always externalize resources such as images and strings from your application
+code, so that you can maintain them independently. Externalizing your
+resources also allows you to provide alternative resources that support specific device
+configurations such as different languages or screen sizes, which becomes increasingly
+important as more Android-powered devices become available with different configurations. In order
+to provide compatibility with different configurations, you must organize resources in your
+project's {@code res/} directory, using various sub-directories that group resources by type and
+configuration.</p>
+
+<div class="figure" style="width:429px">
+<img src="{@docRoot}images/resources/resource_devices_diagram1.png" height="167" alt="" />
+<p class="img-caption">
+<strong>Figure 1.</strong> Two different devices, each using the default layout
+(the app provides no alternative layouts).</p>
+</div>
+
+<div class="figure" style="width:429px">
+<img src="{@docRoot}images/resources/resource_devices_diagram2.png" height="167" alt="" />
+<p class="img-caption">
+<strong>Figure 2.</strong> Two different devices, each using a different layout provided
+for different screen sizes.</p>
+</div>
+
+<p>For any type of resource, you can specify <em>default</em> and multiple
+<em>alternative</em> resources for your application:</p>
+<ul>
+ <li>Default resources are those that should be used regardless of
+the device configuration or when there are no alternative resources that match the current
+configuration.</li>
+ <li>Alternative resources are those that you've designed for use with a specific
+configuration. To specify that a group of resources are for a specific configuration,
+append an appropriate configuration qualifier to the directory name.</li>
+</ul>
+
+<p>For example, while your default UI
+layout is saved in the {@code res/layout/} directory, you might specify a different layout to
+be used when the screen is in landscape orientation, by saving it in the {@code res/layout-land/}
+directory. Android automatically applies the appropriate resources by matching the
+device's current configuration to your resource directory names.</p>
+
+<p>Figure 1 illustrates how the system applies the same layout for
+two different devices when there are no alternative resources available. Figure 2 shows
+the same application when it adds an alternative layout resource for larger screens.</p>
+
+<p>The following documents provide a complete guide to how you can organize your application resources,
+specify alternative resources, access them in your application, and more:</p>
+
+<dl>
+ <dt><strong><a href="providing-resources.html">Providing Resources</a></strong></dt>
+ <dd>What kinds of resources you can provide in your app, where to save them, and how to create
+alternative resources for specific device configurations.</dd>
+ <dt><strong><a href="accessing-resources.html">Accessing Resources</a></strong></dt>
+ <dd>How to use the resources you've provided, either by referencing them from your application
+code or from other XML resources.</dd>
+ <dt><strong><a href="runtime-changes.html">Handling Runtime Changes</a></strong></dt>
+ <dd>How to manage configuration changes that occur while your Activity is running.</dd>
+ <dt><strong><a href="localization.html">Localization</a></strong></dt>
+ <dd>A bottom-up guide to localizing your application using alternative resources. While this is
+just one specific use of alternative resources, it is very important in order to reach more
+users.</dd>
+ <dt><strong><a href="available-resources.html">Resource Types</a></strong></dt>
+ <dd>A reference of various resource types you can provide, describing their XML elements,
+attributes, and syntax. For example, this reference shows you how to create a resource for
+application menus, drawables, animations, and more.</dd>
+</dl>
+
+<!--
+<h2>Raw Assets</h2>
+
+<p>An alternative to saving files in {@code res/} is to save files in the {@code
+assets/} directory. This should only be necessary if you need direct access to original files and
+directories by name. Files saved in the {@code assets/} directory will not be given a resource
+ID, so you can't reference them through the {@code R} class or from XML resources. Instead, you can
+query data in the {@code assets/} directory like an ordinary file system, search through the
+directory and
+read raw data using {@link android.content.res.AssetManager}. For example, this can be more useful
+when dealing with textures for a game. However, if you only need to read raw data from a file
+(such as a video or audio file), then you should save files into the {@code res/raw/} directory and
+then read a stream of bytes using {@link android.content.res.Resources#openRawResource(int)}. This
+is uncommon, but if you need direct access to original files in {@code assets/}, refer to the {@link
+android.content.res.AssetManager} documentation.</p>
+-->
diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd
index 82b5e29472f8..b0d5d6fc21ee 100644
--- a/docs/html/guide/topics/resources/providing-resources.jd
+++ b/docs/html/guide/topics/resources/providing-resources.jd
@@ -44,7 +44,7 @@ Screens</a></li>
<p>You should always externalize application resources such as images and strings from your
code, so that you can maintain them independently. You should also provide alternative resources for
specific device configurations, by grouping them in specially-named resource directories. At
-runtime, Android uses uses the appropriate resource based on the current configuration. For
+runtime, Android uses the appropriate resource based on the current configuration. For
example, you might want to provide a different UI layout depending on the screen size or different
strings depending on the language setting.</p>
@@ -89,7 +89,7 @@ supported inside project {@code res/} directory.</p>
<tr>
<td><code>animator/</code></td>
- <td>XML files that define <a href="{@docRoot}guide/topics/graphics/animation.html">property
+ <td>XML files that define <a href="{@docRoot}guide/topics/graphics/prop-animation.html">property
animations</a>.</td>
</tr>
@@ -744,7 +744,7 @@ orientation" described above.</p>
<p>The API level supported by the device. For example, <code>v1</code> for API level
1 (devices with Android 1.0 or higher) and <code>v4</code> for API level 4 (devices with Android
1.6 or higher). See the <a
-href="{@docRoot}guide/appendix/api-levels.html">Android API levels</a> document for more information
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">Android API levels</a> document for more information
about these values.</p>
<p class="caution"><strong>Caution:</strong> Android 1.5 and 1.6 only match resources
with this qualifier when it exactly matches the platform version. See the section below about <a
@@ -976,7 +976,7 @@ put {@code normal} size resources in the corresponding default resource director
notlong} resources in the corresponding default resource directory.</p>
</li>
- <li>Ensure that your <a href="{@docRoot}sdk/tools-notes.html">SDK Tools</a> version
+ <li>Ensure that your <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools</a> version
is r6 or greater.
<p>You need SDK Tools, Revision 6 (or greater), because it includes a new packaging tool that
diff --git a/docs/html/guide/topics/resources/runtime-changes.jd b/docs/html/guide/topics/resources/runtime-changes.jd
index 871b06320cde..f5475b40abc4 100644
--- a/docs/html/guide/topics/resources/runtime-changes.jd
+++ b/docs/html/guide/topics/resources/runtime-changes.jd
@@ -32,7 +32,7 @@ alternative resources that match the new device configuration.</p>
<p>To properly handle a restart, it is important that your activity restores its previous
state through the normal <a
-href="{@docRoot}guide/topics/fundamentals/activities.html#Lifecycle">Activity
+href="{@docRoot}guide/components/activities.html#Lifecycle">Activity
lifecycle</a>, in which Android calls
{@link android.app.Activity#onSaveInstanceState(Bundle) onSaveInstanceState()} before it destroys
your activity so that you can save data about the application state. You can then restore the state
@@ -45,7 +45,7 @@ tasks in your application. Your application should be able to restart at any tim
user data or state in order to handle events such as configuration changes or when the user receives
an incoming phone call and then returns to your application much later after your application
process may have been destroyed. To learn how you can restore your activity state, read about the <a
-href="{@docRoot}guide/topics/fundamentals/activities.html#Lifecycle">Activity lifecycle</a>.</p>
+href="{@docRoot}guide/components/activities.html#Lifecycle">Activity lifecycle</a>.</p>
<p>However, you might encounter a situation in which restarting your application and
restoring significant amounts of data can be costly and create a poor user experience. In such a
diff --git a/docs/html/guide/topics/search/index.jd b/docs/html/guide/topics/search/index.jd
index 218511b2a8e4..2ee624b6b7a7 100644
--- a/docs/html/guide/topics/search/index.jd
+++ b/docs/html/guide/topics/search/index.jd
@@ -1,4 +1,4 @@
-page.title=Search
+page.title=Search Overview
@jd:body
<div id="qv-wrapper">
diff --git a/docs/html/guide/topics/search/search-dialog.jd b/docs/html/guide/topics/search/search-dialog.jd
index 8b8e75bb8a73..49451acf4d29 100644
--- a/docs/html/guide/topics/search/search-dialog.jd
+++ b/docs/html/guide/topics/search/search-dialog.jd
@@ -561,7 +561,7 @@ case, the search dialog naturally disappears).</p>
events are triggered once the user executes a search (the current activity receives {@link
android.app.Activity#onPause()} and so forth, as
described in the <a
-href="{@docRoot}guide/topics/fundamentals/activities.html#Lifecycle">Activities</a>
+href="{@docRoot}guide/components/activities.html#Lifecycle">Activities</a>
document). If, however, the current activity is the searchable activity, then one of two
things happens:</p>
diff --git a/docs/html/guide/topics/security/index.jd b/docs/html/guide/topics/security/index.jd
new file mode 100644
index 000000000000..775fc036547b
--- /dev/null
+++ b/docs/html/guide/topics/security/index.jd
@@ -0,0 +1,65 @@
+page.title=Security and Permissions
+page.landing=true
+page.landing.intro=Android's security architecture gives the user full control over what resources are accessible to each app, protecting the system itself and all apps in it. Learn how to use system permissions to request access to the resources your app needs and design your app for optimal security.
+page.landing.image=
+
+@jd:body
+
+<div style="width=100%;padding-left:1em;">
+
+ <div style="float:left;clear:both;padding-top:20px;">
+ <p style="text-transform:uppercase;"><b style="color:#666;font-size:14px;">Blog Articles</b></p>
+
+ <div class="" style="border-top:2px solid #DDD;margin:1em 0;background-color:#F7F7F7;width:336px">
+
+ <div style="float:left;padding:8px;padding-right:16px;">
+ <img src="/assets/images/resource-article.png">
+ </div>
+
+ <div class="caption">
+ <p style="margin:0;padding:0;font-weight:bold;"><a href="">Accessibility: Are You Serving All Your Users?</a></p>
+ <p style="margin:0;padding:0">In the upcoming weeks, some of the older Client Login authentication keys will expire.
+ If you generated the token you’re currently using to authenticate with the C2DM servers before October 2011, it will stop working.</p>
+
+ <p style="margin:0;padding:0;font-weight:bold;"><a href="">Android C2DM — Client Login key expiration</a></p>
+ <p style="margin:0;padding:0">Accessibility is about making sure that Android users who have limited vision or other physical impairments can use your application just as well</p>
+
+ <p style="margin:0;padding:0;font-weight:bold;"><a href="">A Faster Emulator with Better Hardware Support</a></p>
+ <p style="margin:0;padding:0">The Android emulator is a key tool for Android developers in building and testing their apps.
+ As the power and diversity of Android devices has grown quickly, it’s been hard for the emulator keep pace. </p>
+
+ <a href="">More &raquo;</a>
+ </div>
+ </div>
+ </div>
+
+ <div style="float:right;padding-top:20px;">
+ <p style="text-transform:uppercase;"><b style="color:#666;font-size:14px;">Training</b></p>
+
+ <div class="" style="border-top:2px solid #DDD;bordddser-top:2px solid #FF8800;margin:1em 0;background-color:#F7F7F7;width:336px">
+
+ <div style="float:left;padding:8px;padding-right:16px;">
+ <img src="/assets/images/resource-tutorial.png">
+ </div>
+
+ <div class="caption">
+ <p style="margin:0;padding:0;font-weight:bold;"><a href="">Managing the Activity Lifecycle</a></p>
+ <p style="margin:0;padding:0">This class explains important lifecycle callback methods that each Activity
+ instance receives and how you can use them so your activity does what the user expects and does not consume system
+ resources when your activity doesn't need them.</p>
+
+ <p style="margin:0;padding:0;font-weight:bold;"><a href="">Supporting Different Devices</a></p>
+ <p style="margin:0;padding:0">This class teaches you how to use basic platform features that leverage alternative
+ resources and other features so your app can provide an optimized user experience on a variety of Android-compatible devices,
+ using a single application package (APK).</p>
+
+ <p style="margin:0;padding:0;font-weight:bold;"><a href="">Sharing Content</a></p>
+ <p style="margin:0;padding:0">This class covers some common ways you can send and receive content between
+ applications using Intent APIs and the ActionProvider object.</p>
+
+ <a href="">More &raquo;</a>
+ </div>
+ </div>
+</div>
+
+</div> \ No newline at end of file
diff --git a/docs/html/guide/topics/security/permissions.jd b/docs/html/guide/topics/security/permissions.jd
new file mode 100644
index 000000000000..3013e387008d
--- /dev/null
+++ b/docs/html/guide/topics/security/permissions.jd
@@ -0,0 +1,407 @@
+page.title=Permissions
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+<li><a href="#arch">Security Architecture</a></li>
+<li><a href="#signing">Application Signing</a></li>
+<li><a href="#userid">User IDs and File Access</a></li>
+<li><a href="#permissions">Using Permissions</a></li>
+<li><a href="#declaring">Declaring and Enforcing Permissions</a>
+ <ol>
+ <li><a href="#manifest">...in AndroidManifest.xml</a></li>
+ <li><a href="#broadcasts">...when Sending Broadcasts</a></li>
+ <li><a href="#enforcement">Other Permission Enforcement</a></li>
+ </ol></li>
+<li><a href="#uri">URI Permissions</a></li>
+</ol>
+</div>
+</div>
+<p>This document describes how application developers can use the
+security features provided by Android. A more general <a
+href="http://source.android.com/tech/security/index.html"> Android Security
+Overview</a> is provided in the Android Open Source Project.</p>
+
+<p>Android is a privilege-separated operating system, in which each
+application runs with a distinct system identity (Linux user ID and group
+ID). Parts of the system are also separated into distinct identities.
+Linux thereby isolates applications from each other and from the system.</p>
+
+<p>Additional finer-grained security features are provided through a
+"permission" mechanism that enforces restrictions on the specific operations
+that a particular process can perform, and per-URI permissions for granting
+ad-hoc access to specific pieces of data.</p>
+
+<a name="arch"></a>
+<h2>Security Architecture</h2>
+
+<p>A central design point of the Android security architecture is that no
+application, by default, has permission to perform any operations that would
+adversely impact other applications, the operating system, or the user. This
+includes reading or writing the user's private data (such as contacts or
+e-mails), reading or writing another application's files, performing
+network access, keeping the device awake, etc.</p>
+
+<p>Because Android sandboxes applications from each other, applications
+must explicitly share resources and data. They do this by declaring the
+<em>permissions</em> they need for additional capabilities not provided by
+the basic sandbox. Applications statically declare the permissions they
+require, and the Android system prompts the user for consent at the time the
+application is installed. Android has no mechanism for granting permissions
+dynamically (at run-time) because it complicates the user experience to the
+detriment of security.</p>
+
+<p>The application sandbox does not depend on the technology used to build
+an application. In particular the Dalvik VM is not a security boundary, and
+any app can run native code (see <a href="/sdk/ndk/index.html">the Android
+NDK</a>). All types of applications &mdash; Java, native, and hybrid &mdash;
+are sandboxed in the same way and have the same degree of security from each
+other.</p>
+
+<a name="signing"></a>
+<h2>Application Signing</h2>
+
+<p>All Android applications (.apk files) must be signed with a certificate
+whose private key is held by their developer. This certificate identifies
+the author of the application. The certificate does <em>not</em> need to be
+signed by a certificate authority: it is perfectly allowable, and typical,
+for Android applications to use self-signed certificates. The purpose of
+certificates in Android is to distinguish application authors. This allows
+the system to grant or deny applications access to <a
+href="/guide/topics/manifest/permission-element.html#plevel">signature-level
+permissions</a> and to grant or deny an application's <a
+href="/guide/topics/manifest/manifest-element.html#uid">request to be given
+the same Linux identity</a> as another application.</p>
+
+<a name="userid"></a>
+<h2>User IDs and File Access</h2>
+
+<p>At install time, Android gives each package a distinct Linux user ID. The
+identity remains constant for the duration of the package's life on that
+device. On a different device, the same package may have a different UID;
+what matters is that each package has a distinct UID on a given device.</p>
+
+<p>Because security enforcement happens at the
+process level, the code of any two packages can not normally
+run in the same process, since they need to run as different Linux users.
+You can use the {@link android.R.attr#sharedUserId} attribute in the
+<code>AndroidManifest.xml</code>'s
+{@link android.R.styleable#AndroidManifest manifest} tag of each package to
+have them assigned the same user ID. By doing this, for purposes of security
+the two packages are then treated as being the same application, with the same
+user ID and file permissions. Note that in order to retain security, only two applications
+signed with the same signature (and requesting the same sharedUserId) will
+be given the same user ID.</p>
+
+<p>Any data stored by an application will be assigned that application's user
+ID, and not normally accessible to other packages. When creating a new file
+with {@link android.content.Context#getSharedPreferences},
+{@link android.content.Context#openFileOutput}, or
+{@link android.content.Context#openOrCreateDatabase},
+you can use the
+{@link android.content.Context#MODE_WORLD_READABLE} and/or
+{@link android.content.Context#MODE_WORLD_WRITEABLE} flags to allow any other
+package to read/write the file. When setting these flags, the file is still
+owned by your application, but its global read and/or write permissions have
+been set appropriately so any other application can see it.</p>
+
+
+<a name="permissions"></a>
+<h2>Using Permissions</h2>
+
+<p>A basic Android application has no permissions associated with it,
+meaning it can not do anything that would adversely impact the user experience
+or any data on the device. To make use of protected features of the device,
+you must include in your <code>AndroidManifest.xml</code> one or more
+<code>{@link android.R.styleable#AndroidManifestUsesPermission &lt;uses-permission&gt;}</code>
+tags declaring the permissions that your application needs.</p>
+
+<p>For example, an application that needs to monitor incoming SMS messages would
+specify:</p>
+
+<pre>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
+ package=&quot;com.android.app.myapp&quot; &gt;
+ &lt;uses-permission android:name=&quot;android.permission.RECEIVE_SMS&quot; /&gt;
+ ...
+&lt;/manifest&gt;</pre>
+
+<p>At application install time, permissions requested by the application are
+granted to it by the package installer, based on checks against the
+signatures of the applications declaring those permissions and/or interaction
+with the user. <em>No</em> checks with the user
+are done while an application is running: it either was granted a particular
+permission when installed, and can use that feature as desired, or the
+permission was not granted and any attempt to use the feature will fail
+without prompting the user.</p>
+
+<p>Often times a permission failure will result in a {@link
+java.lang.SecurityException} being thrown back to the application. However,
+this is not guaranteed to occur everywhere. For example, the {@link
+android.content.Context#sendBroadcast} method checks permissions as data is
+being delivered to each receiver, after the method call has returned, so you
+will not receive an exception if there are permission failures. In almost all
+cases, however, a permission failure will be printed to the system log.</p>
+
+<p>The permissions provided by the Android system can be found at {@link
+android.Manifest.permission}. Any application may also define and enforce its
+own permissions, so this is not a comprehensive list of all possible
+permissions.</p>
+
+<p>A particular permission may be enforced at a number of places during your
+program's operation:</p>
+
+<ul>
+<li>At the time of a call into the system, to prevent an application from
+executing certain functions.</li>
+<li>When starting an activity, to prevent applications from launching
+activities of other applications.</li>
+<li>Both sending and receiving broadcasts, to control who can receive
+your broadcast or who can send a broadcast to you.</li>
+<li>When accessing and operating on a content provider.</li>
+<li>Binding to or starting a service.</li>
+</ul>
+
+
+<a name="declaring"></a>
+<h2>Declaring and Enforcing Permissions</h2>
+
+<p>To enforce your own permissions, you must first declare them in your
+<code>AndroidManifest.xml</code> using one or more
+<code>{@link android.R.styleable#AndroidManifestPermission &lt;permission&gt;}</code>
+tags.</p>
+
+<p>For example, an application that wants to control who can start one
+of its activities could declare a permission for this operation as follows:</p>
+
+<pre>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
+ package=&quot;com.me.app.myapp&quot; &gt;
+ &lt;permission android:name=&quot;com.me.app.myapp.permission.DEADLY_ACTIVITY&quot;
+ android:label=&quot;&#64;string/permlab_deadlyActivity&quot;
+ android:description=&quot;&#64;string/permdesc_deadlyActivity&quot;
+ android:permissionGroup=&quot;android.permission-group.COST_MONEY&quot;
+ android:protectionLevel=&quot;dangerous&quot; /&gt;
+ ...
+&lt;/manifest&gt;</pre>
+
+<p>The {@link android.R.styleable#AndroidManifestPermission_protectionLevel
+&lt;protectionLevel&gt;} attribute is required, telling the system how the
+user is to be informed of applications requiring the permission, or who is
+allowed to hold that permission, as described in the linked documentation.</p>
+
+<p>The {@link android.R.styleable#AndroidManifestPermission_permissionGroup
+&lt;permissionGroup&gt;} attribute is optional, and only used to help the system display
+permissions to the user. You will usually want to set this to either a standard
+system group (listed in {@link android.Manifest.permission_group
+android.Manifest.permission_group}) or in more rare cases to one defined by
+yourself. It is preferred to use an existing group, as this simplifies the
+permission UI shown to the user.</p>
+
+<p>Note that both a label and description should be supplied for the
+permission. These are string resources that can be displayed to the user when
+they are viewing a list of permissions
+(<code>{@link android.R.styleable#AndroidManifestPermission_label android:label}</code>)
+or details on a single permission (
+<code>{@link android.R.styleable#AndroidManifestPermission_description android:description}</code>).
+The label should be short, a few words
+describing the key piece of functionality the permission is protecting. The
+description should be a couple sentences describing what the permission allows
+a holder to do. Our convention for the description is two sentences, the first
+describing the permission, the second warning the user of what bad things
+can happen if an application is granted the permission.</p>
+
+<p>Here is an example of a label and description for the CALL_PHONE
+permission:</p>
+
+<pre>
+ &lt;string name=&quot;permlab_callPhone&quot;&gt;directly call phone numbers&lt;/string&gt;
+ &lt;string name=&quot;permdesc_callPhone&quot;&gt;Allows the application to call
+ phone numbers without your intervention. Malicious applications may
+ cause unexpected calls on your phone bill. Note that this does not
+ allow the application to call emergency numbers.&lt;/string&gt;
+</pre>
+
+<p>You can look at the permissions currently defined in the system with the
+Settings app and the shell command <code>adb shell pm list permissions</code>.
+To use the Settings app, go to Settings &gt; Applications. Pick an app and
+scroll down to see the permissions that the app uses. For developers, the adb '-s'
+option displays the permissions in a form similar to how the user will see them:</p>
+
+<pre>
+$ adb shell pm list permissions -s
+All Permissions:
+
+Network communication: view Wi-Fi state, create Bluetooth connections, full
+Internet access, view network state
+
+Your location: access extra location provider commands, fine (GPS) location,
+mock location sources for testing, coarse (network-based) location
+
+Services that cost you money: send SMS messages, directly call phone numbers
+
+...</pre>
+
+<a name="manifest"></a>
+<h3>Enforcing Permissions in AndroidManifest.xml</h3>
+
+<p>High-level permissions restricting access to entire components of the
+system or application can be applied through your
+<code>AndroidManifest.xml</code>. All that this requires is including an {@link
+android.R.attr#permission android:permission} attribute on the desired
+component, naming the permission that will be used to control access to
+it.</p>
+
+<p><strong>{@link android.app.Activity}</strong> permissions
+(applied to the
+{@link android.R.styleable#AndroidManifestActivity &lt;activity&gt;} tag)
+restrict who can start the associated
+activity. The permission is checked during
+{@link android.content.Context#startActivity Context.startActivity()} and
+{@link android.app.Activity#startActivityForResult Activity.startActivityForResult()};
+if the caller does not have
+the required permission then {@link java.lang.SecurityException} is thrown
+from the call.</p>
+
+<p><strong>{@link android.app.Service}</strong> permissions
+(applied to the
+{@link android.R.styleable#AndroidManifestService &lt;service&gt;} tag)
+restrict who can start or bind to the
+associated service. The permission is checked during
+{@link android.content.Context#startService Context.startService()},
+{@link android.content.Context#stopService Context.stopService()} and
+{@link android.content.Context#bindService Context.bindService()};
+if the caller does not have
+the required permission then {@link java.lang.SecurityException} is thrown
+from the call.</p>
+
+<p><strong>{@link android.content.BroadcastReceiver}</strong> permissions
+(applied to the
+{@link android.R.styleable#AndroidManifestReceiver &lt;receiver&gt;} tag)
+restrict who can send broadcasts to the associated receiver.
+The permission is checked <em>after</em>
+{@link android.content.Context#sendBroadcast Context.sendBroadcast()} returns,
+as the system tries
+to deliver the submitted broadcast to the given receiver. As a result, a
+permission failure will not result in an exception being thrown back to the
+caller; it will just not deliver the intent. In the same way, a permission
+can be supplied to
+{@link android.content.Context#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, String, android.os.Handler)
+Context.registerReceiver()}
+to control who can broadcast to a programmatically registered receiver.
+Going the other way, a permission can be supplied when calling
+{@link android.content.Context#sendBroadcast(Intent, String) Context.sendBroadcast()}
+to restrict which BroadcastReceiver objects are allowed to receive the broadcast (see
+below).</p>
+
+<p><strong>{@link android.content.ContentProvider}</strong> permissions
+(applied to the
+{@link android.R.styleable#AndroidManifestProvider &lt;provider&gt;} tag)
+restrict who can access the data in
+a {@link android.content.ContentProvider}. (Content providers have an important
+additional security facility available to them called
+<a href="#uri">URI permissions</a> which is described later.)
+Unlike the other components,
+there are two separate permission attributes you can set:
+{@link android.R.attr#readPermission android:readPermission} restricts who
+can read from the provider, and
+{@link android.R.attr#writePermission android:writePermission} restricts
+who can write to it. Note that if a provider is protected with both a read
+and write permission, holding only the write permission does not mean
+you can read from a provider. The permissions are checked when you first
+retrieve a provider (if you don't have either permission, a SecurityException
+will be thrown), and as you perform operations on the provider. Using
+{@link android.content.ContentResolver#query ContentResolver.query()} requires
+holding the read permission; using
+{@link android.content.ContentResolver#insert ContentResolver.insert()},
+{@link android.content.ContentResolver#update ContentResolver.update()},
+{@link android.content.ContentResolver#delete ContentResolver.delete()}
+requires the write permission.
+In all of these cases, not holding the required permission results in a
+{@link java.lang.SecurityException} being thrown from the call.</p>
+
+
+<a name="broadcasts"></a>
+<h3>Enforcing Permissions when Sending Broadcasts</h3>
+
+<p>In addition to the permission enforcing who can send Intents to a
+registered {@link android.content.BroadcastReceiver} (as described above), you
+can also specify a required permission when sending a broadcast. By calling {@link
+android.content.Context#sendBroadcast(android.content.Intent,String)
+Context.sendBroadcast()} with a
+permission string, you require that a receiver's application must hold that
+permission in order to receive your broadcast.</p>
+
+<p>Note that both a receiver and a broadcaster can require a permission. When
+this happens, both permission checks must pass for the Intent to be delivered
+to the associated target.</p>
+
+
+<a name="enforcement"></a>
+<h3>Other Permission Enforcement</h3>
+
+<p>Arbitrarily fine-grained permissions can be enforced at any call into a
+service. This is accomplished with the {@link
+android.content.Context#checkCallingPermission Context.checkCallingPermission()}
+method. Call with a desired
+permission string and it will return an integer indicating whether that
+permission has been granted to the current calling process. Note that this can
+only be used when you are executing a call coming in from another process,
+usually through an IDL interface published from a service or in some other way
+given to another process.</p>
+
+<p>There are a number of other useful ways to check permissions. If you have
+the pid of another process, you can use the Context method {@link
+android.content.Context#checkPermission(String, int, int) Context.checkPermission(String, int, int)}
+to check a permission against that pid. If you have the package name of another
+application, you can use the direct PackageManager method {@link
+android.content.pm.PackageManager#checkPermission(String, String)
+PackageManager.checkPermission(String, String)}
+to find out whether that particular package has been granted a specific permission.</p>
+
+
+<a name="uri"></a>
+<h2>URI Permissions</h2>
+
+<p>The standard permission system described so far is often not sufficient
+when used with content providers. A content provider may want to
+protect itself with read and write permissions, while its direct clients
+also need to hand specific URIs to other applications for them to operate on.
+A typical example is attachments in a mail application. Access to the mail
+should be protected by permissions, since this is sensitive user data. However,
+if a URI to an image attachment is given to an image viewer, that image viewer
+will not have permission to open the attachment since it has no reason to hold
+a permission to access all e-mail.</p>
+
+<p>The solution to this problem is per-URI permissions: when starting an
+activity or returning a result to an activity, the caller can set
+{@link android.content.Intent#FLAG_GRANT_READ_URI_PERMISSION
+Intent.FLAG_GRANT_READ_URI_PERMISSION} and/or
+{@link android.content.Intent#FLAG_GRANT_WRITE_URI_PERMISSION
+Intent.FLAG_GRANT_WRITE_URI_PERMISSION}. This grants the receiving activity
+permission access the specific data URI in the Intent, regardless of whether
+it has any permission to access data in the content provider corresponding
+to the Intent.</p>
+
+<p>This mechanism allows a common capability-style model where user interaction
+(opening an attachment, selecting a contact from a list, etc) drives ad-hoc
+granting of fine-grained permission. This can be a key facility for reducing
+the permissions needed by applications to only those directly related to their
+behavior.</p>
+
+<p>The granting of fine-grained URI permissions does, however, require some
+cooperation with the content provider holding those URIs. It is strongly
+recommended that content providers implement this facility, and declare that
+they support it through the
+{@link android.R.styleable#AndroidManifestProvider_grantUriPermissions
+android:grantUriPermissions} attribute or
+{@link android.R.styleable#AndroidManifestGrantUriPermission
+&lt;grant-uri-permissions&gt;} tag.</p>
+
+<p>More information can be found in the
+{@link android.content.Context#grantUriPermission Context.grantUriPermission()},
+{@link android.content.Context#revokeUriPermission Context.revokeUriPermission()}, and
+{@link android.content.Context#checkUriPermission Context.checkUriPermission()}
+methods.</p>
+
diff --git a/docs/html/guide/topics/security/security.jd b/docs/html/guide/topics/security/security.jd
index 1fd9ba011ce1..eeaac44e3940 100644
--- a/docs/html/guide/topics/security/security.jd
+++ b/docs/html/guide/topics/security/security.jd
@@ -1,407 +1,770 @@
-page.title=Security and Permissions
+page.title=Designing for Security
@jd:body
<div id="qv-wrapper">
<div id="qv">
-
<h2>In this document</h2>
<ol>
-<li><a href="#arch">Security Architecture</a></li>
-<li><a href="#signing">Application Signing</a></li>
-<li><a href="#userid">User IDs and File Access</a></li>
-<li><a href="#permissions">Using Permissions</a></li>
-<li><a href="#declaring">Declaring and Enforcing Permissions</a>
- <ol>
- <li><a href="#manifest">...in AndroidManifest.xml</a></li>
- <li><a href="#broadcasts">...when Sending Broadcasts</a></li>
- <li><a href="#enforcement">Other Permission Enforcement</a></li>
- </ol></li>
-<li><a href="#uri">URI Permissions</a></li>
+<li><a href="#Dalvik">Using Davlik Code</a></li>
+<li><a href="#Native">Using Native Code</a></li>
+<li><a href="#Data">Storing Data</a></li>
+<li><a href="#IPC">Using IPC</a></li>
+<li><a href="#Permissions">Using Permissions</a></li>
+<li><a href="#Networking">Using Networking</a></li>
+<li><a href="#DynamicCode">Dynamically Loading Code</a></li>
+<li><a href="#Input">Performing Input Validation</a></li>
+<li><a href="#UserData">Handling User Data</a></li>
+<li><a href="#Crypto">Using Cryptography</a></li>
</ol>
-</div>
-</div>
-<p>This document describes how application developers can use the
-security features provided by Android. A more general <a
-href="http://source.android.com/tech/security/index.html"> Android Security
-Overview</a> is provided in the Android Open Source Project.</p>
-
-<p>Android is a privilege-separated operating system, in which each
-application runs with a distinct system identity (Linux user ID and group
-ID). Parts of the system are also separated into distinct identities.
-Linux thereby isolates applications from each other and from the system.</p>
-
-<p>Additional finer-grained security features are provided through a
-"permission" mechanism that enforces restrictions on the specific operations
-that a particular process can perform, and per-URI permissions for granting
-ad-hoc access to specific pieces of data.</p>
-
-<a name="arch"></a>
-<h2>Security Architecture</h2>
-
-<p>A central design point of the Android security architecture is that no
-application, by default, has permission to perform any operations that would
-adversely impact other applications, the operating system, or the user. This
-includes reading or writing the user's private data (such as contacts or
-e-mails), reading or writing another application's files, performing
-network access, keeping the device awake, etc.</p>
-
-<p>Because Android sandboxes applications from each other, applications
-must explicitly share resources and data. They do this by declaring the
-<em>permissions</em> they need for additional capabilities not provided by
-the basic sandbox. Applications statically declare the permissions they
-require, and the Android system prompts the user for consent at the time the
-application is installed. Android has no mechanism for granting permissions
-dynamically (at run-time) because it complicates the user experience to the
-detriment of security.</p>
-
-<p>The application sandbox does not depend on the technology used to build
-an application. In particular the Dalvik VM is not a security boundary, and
-any app can run native code (see <a href="/sdk/ndk/index.html">the Android
-NDK</a>). All types of applications &mdash; Java, native, and hybrid &mdash;
-are sandboxed in the same way and have the same degree of security from each
-other.</p>
-
-<a name="signing"></a>
-<h2>Application Signing</h2>
-
-<p>All Android applications (.apk files) must be signed with a certificate
-whose private key is held by their developer. This certificate identifies
-the author of the application. The certificate does <em>not</em> need to be
-signed by a certificate authority: it is perfectly allowable, and typical,
-for Android applications to use self-signed certificates. The purpose of
-certificates in Android is to distinguish application authors. This allows
-the system to grant or deny applications access to <a
-href="/guide/topics/manifest/permission-element.html#plevel">signature-level
-permissions</a> and to grant or deny an application's <a
-href="/guide/topics/manifest/manifest-element.html#uid">request to be given
-the same Linux identity</a> as another application.</p>
-
-<a name="userid"></a>
-<h2>User IDs and File Access</h2>
-
-<p>At install time, Android gives each package a distinct Linux user ID. The
-identity remains constant for the duration of the package's life on that
-device. On a different device, the same package may have a different UID;
-what matters is that each package has a distinct UID on a given device.</p>
-
-<p>Because security enforcement happens at the
-process level, the code of any two packages can not normally
-run in the same process, since they need to run as different Linux users.
-You can use the {@link android.R.attr#sharedUserId} attribute in the
-<code>AndroidManifest.xml</code>'s
-{@link android.R.styleable#AndroidManifest manifest} tag of each package to
-have them assigned the same user ID. By doing this, for purposes of security
-the two packages are then treated as being the same application, with the same
-user ID and file permissions. Note that in order to retain security, only two applications
-signed with the same signature (and requesting the same sharedUserId) will
-be given the same user ID.</p>
-
-<p>Any data stored by an application will be assigned that application's user
-ID, and not normally accessible to other packages. When creating a new file
-with {@link android.content.Context#getSharedPreferences},
-{@link android.content.Context#openFileOutput}, or
-{@link android.content.Context#openOrCreateDatabase},
-you can use the
-{@link android.content.Context#MODE_WORLD_READABLE} and/or
-{@link android.content.Context#MODE_WORLD_WRITEABLE} flags to allow any other
-package to read/write the file. When setting these flags, the file is still
-owned by your application, but its global read and/or write permissions have
-been set appropriately so any other application can see it.</p>
-
-
-<a name="permissions"></a>
-<h2>Using Permissions</h2>
-
-<p>A basic Android application has no permissions associated with it,
-meaning it can not do anything that would adversely impact the user experience
-or any data on the device. To make use of protected features of the device,
-you must include in your <code>AndroidManifest.xml</code> one or more
-<code>{@link android.R.styleable#AndroidManifestUsesPermission &lt;uses-permission&gt;}</code>
-tags declaring the permissions that your application needs.</p>
-
-<p>For example, an application that needs to monitor incoming SMS messages would
-specify:</p>
-
-<pre>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
- package=&quot;com.android.app.myapp&quot; &gt;
- &lt;uses-permission android:name=&quot;android.permission.RECEIVE_SMS&quot; /&gt;
- ...
-&lt;/manifest&gt;</pre>
-
-<p>At application install time, permissions requested by the application are
-granted to it by the package installer, based on checks against the
-signatures of the applications declaring those permissions and/or interaction
-with the user. <em>No</em> checks with the user
-are done while an application is running: it either was granted a particular
-permission when installed, and can use that feature as desired, or the
-permission was not granted and any attempt to use the feature will fail
-without prompting the user.</p>
-
-<p>Often times a permission failure will result in a {@link
-java.lang.SecurityException} being thrown back to the application. However,
-this is not guaranteed to occur everywhere. For example, the {@link
-android.content.Context#sendBroadcast} method checks permissions as data is
-being delivered to each receiver, after the method call has returned, so you
-will not receive an exception if there are permission failures. In almost all
-cases, however, a permission failure will be printed to the system log.</p>
-
-<p>The permissions provided by the Android system can be found at {@link
-android.Manifest.permission}. Any application may also define and enforce its
-own permissions, so this is not a comprehensive list of all possible
+<h2>See also</h2>
+<ol>
+<li><a href="http://source.android.com/tech/security/index.html">Android
+Security Overview</a></li>
+<li><a href="{@docRoot}guide/topics/security/security.html">Android Security
+And Permissions</a></li>
+</ol>
+</div></div>
+<p>Android was designed so that most developers will be able to build
+applications using the default settings and not be confronted with difficult
+decisions about security. Android also has a number of security features built
+into the operating system that significantly reduce the frequency and impact of
+application security issues.</p>
+
+<p>Some of the security features that help developers build secure applications
+include:
+<ul>
+<li>The Android Application Sandbox that isolates data and code execution on a
+per-application basis.</li>
+<li>Android application framework with robust implementations of common
+security functionality such as cryptography, permissions, and secure IPC.</li>
+<li>Technologies like ASLR, NX, ProPolice, safe_iop, OpenBSD dlmalloc, OpenBSD
+calloc, and Linux mmap_min_addr to mitigate risks associated with common memory
+management errors</li>
+<li>An encrypted filesystem that can be enabled to protect data on lost or
+stolen devices.</li>
+</ul></p>
+
+<p>Nevertheless, it is important for developers to be familiar with Android
+security best practices to make sure they take advantage of these capabilities
+and to reduce the likelihood of inadvertently introducing security issues that
+can affect their applications.</p>
+
+<p>This document is organized around common APIs and development techniques
+that can have security implications for your application and its users. As
+these best practices are constantly evolving, we recommend you check back
+occasionally throughout your application development process.</p>
+
+<a name="Dalvik"></a>
+<h2>Using Dalvik Code</h2>
+<p>Writing secure code that runs in virtual machines is a well-studied topic
+and many of the issues are not specific to Android. Rather than attempting to
+rehash these topics, we’d recommend that you familiarize yourself with the
+existing literature. Two of the more popular resources are:
+<ul>
+<li><a href="http://www.securingjava.com/toc.html">
+http://www.securingjava.com/toc.html</a></li>
+<li><a
+href="https://www.owasp.org/index.php/Java_Security_Resources">
+https://www.owasp.org/index.php/Java_Security_Resources</a></li>
+</ul></p>
+
+<p>This document is focused on the areas which are Android specific and/or
+different from other environments. For developers experienced with VM
+programming in other environments, there are two broad issues that may be
+different about writing apps for Android:
+<ul>
+<li>Some virtual machines, such as the JVM or .net runtime, act as a security
+boundary, isolating code from the underlying operating system capabilities. On
+Android, the Dalvik VM is not a security boundary -- the application sandbox is
+implemented at the OS level, so Dalvik can interoperate with native code in the
+same application without any security constraints.</li>
+<li>Given the limited storage on mobile devices, it’s common for developers
+to want to build modular applications and use dynamic class loading. When
+doing this consider both the source where you retrieve your application logic
+and where you store it locally. Do not use dynamic class loading from sources
+that are not verified, such as unsecured network sources or external storage,
+since that code can be modified to include malicious behavior.</li>
+</ul></p>
+
+<a name="Native"></a>
+<h2>Using Native Code</h2>
+
+<p>In general, we encourage developers to use the Android SDK for most
+application development, rather than using native code. Applications built
+with native code are more complex, less portable, and more like to include
+common memory corruption errors such as buffer overflows.</p>
+
+<p>Android is built using the Linux kernel and being familiar with Linux
+development security best practices is especially useful if you are going to
+use native code. This document is too short to discuss all of those best
+practices, but one of the most popular resources is “Secure Programming for
+Linux and Unix HOWTO”, available at <a
+href="http://www.dwheeler.com/secure-programs">
+http://www.dwheeler.com/secure-programs</a>.</p>
+
+<p>An important difference between Android and most Linux environments is the
+Application Sandbox. On Android, all applications run in the Application
+Sandbox, including those written with native code. At the most basic level, a
+good way to think about it for developers familiar with Linux is to know that
+every application is given a unique UID with very limited permissions. This is
+discussed in more detail in the <a
+href="http://source.android.com/tech/security/index.html">Android Security
+Overview</a> and you should be familiar with application permissions even if
+you are using native code.</p>
+
+<a name="Data"></a>
+<h2>Storing Data</h2>
+
+<h3>Using internal files</h3>
+
+<p>By default, files created on <a
+href="{@docRoot}guide/topics/data/data-storage.html#filesInternal">internal
+storage</a> are only accessible to the application that created the file. This
+protection is implemented by Android and is sufficient for most
+applications.</p>
+
+<p>Use of <a
+href="{@docRoot}reference/android/content/Context.html#MODE_WORLD_WRITEABLE">
+world writable</a> or <a
+href="{@docRoot}reference/android/content/Context.html#MODE_WORLD_READABLE">world
+readable</a> files for IPC is discouraged because it does not provide
+the ability to limit data access to particular applications, nor does it
+provide any control on data format. As an alternative, you might consider using
+a ContentProvider which provides read and write permissions, and can make
+dynamic permission grants on a case-by-case basis.</p>
+
+<p>To provide additional protection for sensitive data, some applications
+choose to encrypt local files using a key that is not accessible to the
+application. (For example, a key can be placed in a <code><a
+href={@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> and
+protected with a user password that is not stored on the device). While this
+does not protect data from a root compromise that can monitor the user
+inputting the password, it can provide protection for a lost device without <a
+href="http://source.android.com/tech/encryption/index.html">file system
+encryption</a>.</p>
+
+<h3>Using external storage</h3>
+
+<p>Files created on <a
+href="{@docRoot}guide/topics/data/data-storage.html#filesExternal">external
+storage</a>, such as SD Cards, are globally readable and writable. Since
+external storage can be removed by the user and also modified by any
+application, applications should not store sensitive information using
+external storage.</p>
+
+<p>As with data from any untrusted source, applications should perform input
+validation when handling data from external storage (see Input Validation
+section). We strongly recommend that applications not store executables or
+class files on external storage prior to dynamic loading. If an application
+does retrieve executable files from external storage they should be signed and
+cryptographically verified prior to dynamic loading.</p>
+
+<h3>Using content providers</h3>
+
+<p>ContentProviders provide a structured storage mechanism that can be limited
+to your own application, or exported to allow access by other applications. By
+default, a <code>
+<a href="{@docRoot}reference/android/content/ContentProvider.html">
+ContentProvider</a></code> is
+<a href="{@docRoot}guide/topics/manifest/provider-element.html#exported">exported
+</a> for use by other applications. If you do not intend to provide other
+applications with access to your<code>
+<a href="{@docRoot}reference/android/content/ContentProvider.html">
+ContentProvider</a></code>, mark them as <code><a
+href="{@docRoot}guide/topics/manifest/provider-element.html#exported">
+android:exported=false</a></code> in the application manifest.</p>
+
+<p>When creating a <code>
+<a href="{@docRoot}reference/android/content/ContentProvider.html">ContentProvider
+</a></code> that will be exported for use by other applications, you can specify
+a single
+<a href="{@docRoot}guide/topics/manifest/provider-element.html#prmsn">permission
+</a> for reading and writing, or distinct permissions for reading and writing
+within the manifest. We recommend that you limit your permissions to those
+required to accomplish the task at hand. Keep in mind that it’s usually
+easier to add permissions later to expose new functionality than it is to take
+them away and break existing users.</p>
+
+<p>If you are using a <code>
+<a href="{@docRoot}reference/android/content/ContentProvider.html">
+ContentProvider</a></code> for sharing data between applications built by the
+same developer, it is preferable to use
+<a href="{@docRoot}guide/topics/manifest/permission-element.html#plevel">signature
+level permissions</a>. Signature permissions do not require user confirmation,
+so they provide a better user experience and more controlled access to the
+<code>
+<a href="{@docRoot}reference/android/content/ContentProvider.html">
+ContentProvider</a></code>.</p>
+
+<p>ContentProviders can also provide more granular access by declaring the <a
+href="{@docRoot}guide/topics/manifest/provider-element.html#gprmsn">
+grantUriPermissions</a> element and using the <code><a
+href="{@docRoot}reference/android/content/Intent.html#FLAG_GRANT_READ_URI_PERMISSION">FLAG_GRANT_READ_URI_PERMISSION</a></code>
+and <code><a
+href="{@docRoot}reference/android/content/Intent.html#FLAG_GRANT_WRITE_URI_PERMISSION">FLAG_GRANT_WRITE_URI_PERMISSION</a></code>
+flags in the Intent object
+that activates the component. The scope of these permissions can be further
+limited by the <code><a
+href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html">
+grant-uri-permission element</a></code>.</p>
+
+<p>When accessing a <code>
+<a href="{@docRoot}reference/android/content/ContentProvider.html">
+ContentProvider</a></code>, use parameterized query methods such as <code>
+<a href="{@docRoot}reference/android/content/ContentProvider.html#query(android.net.Uri,%20java.lang.String[],%20java.lang.String,%20java.lang.String[],%20java.lang.String)">query()</a></code>, <code><a
+href="{@docRoot}reference/android/content/ContentProvider.html#update(android.net.Uri,%20android.content.ContentValues,%20java.lang.String,%20java.lang.String[])">update()</a></code>, and <code><a
+href="{@docRoot}reference/android/content/ContentProvider.html#delete(android.net.Uri,%20java.lang.String,%20java.lang.String[])">delete()</a></code> to avoid
+potential <a href="http://en.wikipedia.org/wiki/SQL_injection">SQL
+Injection</a> from untrusted data. Note that using parameterized methods is not
+sufficient if the <code>selection</code> is built by concatenating user data
+prior to submitting it to the method.</p>
+
+<p>Do not have a false sense of security about the write permission. Consider
+that the write permission allows SQL statements which make it possible for some
+data to be confirmed using creative <code>WHERE</code> clauses and parsing the
+results. For example, an attacker might probe for presence of a specific phone
+number in a call-log by modifying a row only if that phone number already
+exists. If the content provider data has predictable structure, the write
+permission may be equivalent to providing both reading and writing.</p>
+
+<a name="IPC"></a>
+<h2>Using Interprocess Communication (IPC)</h2>
+
+<p>Some Android applications attempt to implement IPC using traditional Linux
+techniques such as network sockets and shared files. We strongly encourage the
+use of Android system functionality for IPC such as Intents, Binders, Services,
+and Receivers. The Android IPC mechanisms allow you to verify the identity of
+the application connecting to your IPC and set security policy for each IPC
+mechanism.</p>
+
+<p>Many of the security elements are shared across IPC mechanisms. <a
+href="{@docRoot}reference/android/content/BroadcastReceiver.html">
+Broadcast Receivers</a>, <a
+href="{@docRoot}reference/android/R.styleable.html#AndroidManifestActivity">
+Activities</a>, and <a
+href="{@docRoot}reference/android/R.styleable.html#AndroidManifestService">
+Services</a> are all declared in the application manifest. If your IPC mechanism is
+not intended for use by other applications, set the <a
+href="{@docRoot}guide/topics/manifest/service-element.html#exported">{@code android:exported}</a>
+property to false. This is useful for applications that consist of multiple processes
+within the same UID, or if you decide late in development that you do not
+actually want to expose functionality as IPC but you don’t want to rewrite
+the code.</p>
+
+<p>If your IPC is intended to be accessible to other applications, you can
+apply a security policy by using the <a
+href="{@docRoot}reference/android/R.styleable.html#AndroidManifestPermission">
+Permission</a> tag. If IPC is between applications built by the same developer,
+it is preferable to use <a
+href="{@docRoot}guide/topics/manifest/permission-element.html#plevel">signature
+level permissions</a>. Signature permissions do not require user confirmation,
+so they provide a better user experience and more controlled access to the IPC
+mechanism.</p>
+
+<p>One area that can introduce confusion is the use of intent filters. Note
+that Intent filters should not be considered a security feature -- components
+can be invoked directly and may not have data that would conform to the intent
+filter. You should perform input validation within your intent receiver to
+confirm that it is properly formatted for the invoked receiver, service, or
+activity.</p>
+
+<h3>Using intents</h3>
+
+<p>Intents are the preferred mechanism for asynchronous IPC in Android.
+Depending on your application requirements, you might use <code><a
+href="{@docRoot}reference/android/content/Context.html#sendBroadcast(android.content.Intent)">sendBroadcast()</a></code>,
+<code><a
+href="{@docRoot}reference/android/content/Context.html#sendOrderedBroadcast(android.content.Intent,%20java.lang.String)">sendOrderedBroadcast()</a></code>,
+or direct an intent to a specific application component.</p>
+
+<p>Note that ordered broadcasts can be “consumed” by a recipient, so they
+may not be delivered to all applications. If you are sending an Intent where
+delivery to a specific receiver is required, the intent must be delivered
+directly to the receiver.</p>
+
+<p>Senders of an intent can verify that the recipient has a permission
+specifying a non-Null Permission upon sending. Only applications with that
+Permission will receive the intent. If data within a broadcast intent may be
+sensitive, you should consider applying a permission to make sure that
+malicious applications cannot register to receive those messages without
+appropriate permissions. In those circumstances, you may also consider
+invoking the receiver directly, rather than raising a broadcast.</p>
+
+<h3>Using binder and AIDL interfaces</h3>
+
+<p><a href="{@docRoot}reference/android/os/Binder.html">Binders</a> are the
+preferred mechanism for RPC-style IPC in Android. They provide a well-defined
+interface that enables mutual authentication of the endpoints, if required.</p>
+
+<p>We strongly encourage designing interfaces in a manner that does not require
+interface specific permission checks. Binders are not declared within the
+application manifest, and therefore you cannot apply declarative permissions
+directly to a Binder. Binders generally inherit permissions declared in the
+application manifest for the Service or Activity within which they are
+implemented. If you are creating an interface that requires authentication
+and/or access controls on a specific binder interface, those controls must be
+explicitly added as code in the interface.</p>
+
+<p>If providing an interface that does require access controls, use <code><a
+href="{@docRoot}reference/android/content/Context.html#checkCallingPermission(java.lang.String)">checkCallingPermission()</a></code>
+to verify whether the
+caller of the Binder has a required permission. This is especially important
+before accessing a Service on behalf of the caller, as the identify of your
+application is passed to other interfaces. If invoking an interface provided
+by a Service, the <code><a
+href="{@docRoot}reference/android/content/Context.html#bindService(android.content.Intent,%20android.content.ServiceConnection,%20int)">bindService()</a></code>
+ invocation may fail if you do not have permission to access the given Service.
+ If calling an interface provided locally by your own application, it may be
+useful to use the <code><a
+href="{@docRoot}reference/android/os/Binder.html#clearCallingIdentity()">
+clearCallingIdentity()</a></code> to satisfy internal security checks.</p>
+
+<h3>Using broadcast receivers</h3>
+
+<p>Broadcast receivers are used to handle asynchronous requests initiated via
+an intent.</p>
+
+<p>By default, receivers are exported and can be invoked by any other
+application. If your <code><a
+href="{@docRoot}reference/android/content/BroadcastReceiver.html">
+BroadcastReceivers</a></code> is intended for use by other applications, you
+may want to apply security permissions to receivers using the <code><a
+href="{@docRoot}guide/topics/manifest/receiver-element.html">
+&lt;receiver&gt;</a></code> element within the application manifest. This will
+prevent applications without appropriate permissions from sending an intent to
+the <code><a
+href="{@docRoot}reference/android/content/BroadcastReceiver.html">
+BroadcastReceivers</a></code>.</p>
+
+<h3>Using Services</h3>
+
+<p>Services are often used to supply functionality for other applications to
+use. Each service class must have a corresponding <service> declaration in its
+package's AndroidManifest.xml.</p>
+
+<p>By default, Services are exported and can be invoked by any other
+application. Services can be protected using the <a
+href="{@docRoot}guide/topics/manifest/service-element.html#prmsn">{@code android:permission}</a>
+attribute
+within the manifest’s <code><a
+href="{@docRoot}guide/topics/manifest/service-element.html">
+&lt;service&gt;</a></code> tag. By doing so, other applications will need to declare
+a corresponding <code><a
+href="{@docRoot}guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a>
+</code> element in their own manifest to be
+able to start, stop, or bind to the service.</p>
+
+<p>A Service can protect individual IPC calls into it with permissions, by
+calling <code><a
+href="{@docRoot}reference/android/content/Context.html#checkCallingPermission(java.lang.String)">checkCallingPermission()</a></code>
+before executing
+the implementation of that call. We generally recommend using the
+declarative permissions in the manifest, since those are less prone to
+oversight.</p>
+
+<h3>Using Activities</h3>
+
+<p>Activities are most often used for providing the core user-facing
+functionality of an application. By default, Activities are exported and
+invokable by other applications only if they have an intent filter or binder
+declared. In general, we recommend that you specifically declare a Receiver or
+Service to handle IPC, since this modular approach reduces the risk of exposing
+functionality that is not intended for use by other applications.</p>
+
+<p>If you do expose an Activity for purposes of IPC, the <code><a
+href="{@docRoot}guide/topics/manifest/activity-element.html#prmsn">android:permission</a></code>
+attribute in the <code><a
+href="{@docRoot}guide/topics/manifest/activity-element.html">
+&lt;activity&gt;</a></code> declaration in the application manifest can be used to
+restrict access to only those applications which have the stated
permissions.</p>
-<p>A particular permission may be enforced at a number of places during your
-program's operation:</p>
+<a name="Permissions"></a>
+<h2>Using Permissions</h2>
+<h3>Requesting Permissions</h3>
+
+<p>We recommend minimizing the number of permissions requested by an
+application. Not having access to sensitive permissions reduces the risk of
+inadvertently misusing those permissions, can improve user adoption, and makes
+applications less attractive targets for attackers.</p>
+
+<p>If it is possible to design your application in a way that does not require
+a permission, that is preferable. For example, rather than requesting access
+to device information to create an identifier, create a <a
+href="{@docRoot}reference/java/util/UUID.html">GUID</a> for your application.
+(This specific example is also discussed in Handling User Data) Or, rather than
+using external storage, store data in your application directory.</p>
+
+<p>If a permission is not required, do not request it. This sounds simple, but
+there has been quite a bit of research into the frequency of over-requesting
+permissions. If you’re interested in the subject you might start with this
+research paper published by U.C. Berkeley: <a
+href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2011/EECS-2011-48.pdf">
+http://www.eecs.berkeley.edu/Pubs/TechRpts/2011/EECS-2011-48.pdf</a></p>
+
+<p>In addition to requesting permissions, your application can use <a
+href="{@docRoot}guide/topics/manifest/permission-element.html">permissions</a>
+to protect IPC that is security sensitive and will be exposed to other
+applications -- such as a <code><a
+href="{@docRoot}reference/android/content/ContentProvider.html">
+ContentProvider</a></code>. In general, we recommend using access controls
+other than user confirmed permissions where possible since permissions can
+be confusing for users. For example, consider using the <a
+href="{@docRoot}guide/topics/manifest/permission-element.html#plevel">signature
+protection level</a> on permissions for IPC communication between applications
+provided by a single developer.</p>
+
+<p>Do not cause permission re-delegation. This occurs when an app exposes data
+over IPC that is only available because it has a specific permission, but does
+not require that permission of any clients of it’s IPC interface. More
+details on the potential impacts, and frequency of this type of problem is
+provided in this research paper published at USENIX: <a
+href="http://www.cs.berkeley.edu/~afelt/felt_usenixsec2011.pdf">http://www.cs.be
+rkeley.edu/~afelt/felt_usenixsec2011.pdf</a></p>
+
+<h3>Creating Permissions</h3>
+
+<p>Generally, you should strive to create as few permissions as possible while
+satisfying your security requirements. Creating a new permission is relatively
+uncommon for most applications, since <a
+href="{@docRoot}reference/android/Manifest.permission.html">system-defined
+permissions</a> cover many situations. Where appropriate,
+perform access checks using existing permissions.</p>
+
+<p>If you must create a new permission, consider whether you can accomplish
+your task with a Signature permission. Signature permissions are transparent
+to the user and only allow access by applications signed by the same developer
+as application performing the permission check. If you create a Dangerous
+permission, then the user needs to decide whether to install the application.
+This can be confusing for other developers, as well as for users.</p>
+
+<p>If you create a Dangerous permission, there are a number of complexities
+that you need to consider.
<ul>
-<li>At the time of a call into the system, to prevent an application from
-executing certain functions.</li>
-<li>When starting an activity, to prevent applications from launching
-activities of other applications.</li>
-<li>Both sending and receiving broadcasts, to control who can receive
-your broadcast or who can send a broadcast to you.</li>
-<li>When accessing and operating on a content provider.</li>
-<li>Binding to or starting a service.</li>
-</ul>
-
-
-<a name="declaring"></a>
-<h2>Declaring and Enforcing Permissions</h2>
-
-<p>To enforce your own permissions, you must first declare them in your
-<code>AndroidManifest.xml</code> using one or more
-<code>{@link android.R.styleable#AndroidManifestPermission &lt;permission&gt;}</code>
-tags.</p>
-
-<p>For example, an application that wants to control who can start one
-of its activities could declare a permission for this operation as follows:</p>
-
-<pre>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
- package=&quot;com.me.app.myapp&quot; &gt;
- &lt;permission android:name=&quot;com.me.app.myapp.permission.DEADLY_ACTIVITY&quot;
- android:label=&quot;&#64;string/permlab_deadlyActivity&quot;
- android:description=&quot;&#64;string/permdesc_deadlyActivity&quot;
- android:permissionGroup=&quot;android.permission-group.COST_MONEY&quot;
- android:protectionLevel=&quot;dangerous&quot; /&gt;
- ...
-&lt;/manifest&gt;</pre>
-
-<p>The {@link android.R.styleable#AndroidManifestPermission_protectionLevel
-&lt;protectionLevel&gt;} attribute is required, telling the system how the
-user is to be informed of applications requiring the permission, or who is
-allowed to hold that permission, as described in the linked documentation.</p>
-
-<p>The {@link android.R.styleable#AndroidManifestPermission_permissionGroup
-&lt;permissionGroup&gt;} attribute is optional, and only used to help the system display
-permissions to the user. You will usually want to set this to either a standard
-system group (listed in {@link android.Manifest.permission_group
-android.Manifest.permission_group}) or in more rare cases to one defined by
-yourself. It is preferred to use an existing group, as this simplifies the
-permission UI shown to the user.</p>
-
-<p>Note that both a label and description should be supplied for the
-permission. These are string resources that can be displayed to the user when
-they are viewing a list of permissions
-(<code>{@link android.R.styleable#AndroidManifestPermission_label android:label}</code>)
-or details on a single permission (
-<code>{@link android.R.styleable#AndroidManifestPermission_description android:description}</code>).
-The label should be short, a few words
-describing the key piece of functionality the permission is protecting. The
-description should be a couple sentences describing what the permission allows
-a holder to do. Our convention for the description is two sentences, the first
-describing the permission, the second warning the user of what bad things
-can happen if an application is granted the permission.</p>
-
-<p>Here is an example of a label and description for the CALL_PHONE
-permission:</p>
-
-<pre>
- &lt;string name=&quot;permlab_callPhone&quot;&gt;directly call phone numbers&lt;/string&gt;
- &lt;string name=&quot;permdesc_callPhone&quot;&gt;Allows the application to call
- phone numbers without your intervention. Malicious applications may
- cause unexpected calls on your phone bill. Note that this does not
- allow the application to call emergency numbers.&lt;/string&gt;
-</pre>
-
-<p>You can look at the permissions currently defined in the system with the
-Settings app and the shell command <code>adb shell pm list permissions</code>.
-To use the Settings app, go to Settings &gt; Applications. Pick an app and
-scroll down to see the permissions that the app uses. For developers, the adb '-s'
-option displays the permissions in a form similar to how the user will see them:</p>
-
-<pre>
-$ adb shell pm list permissions -s
-All Permissions:
-
-Network communication: view Wi-Fi state, create Bluetooth connections, full
-Internet access, view network state
-
-Your location: access extra location provider commands, fine (GPS) location,
-mock location sources for testing, coarse (network-based) location
-
-Services that cost you money: send SMS messages, directly call phone numbers
-
-...</pre>
-
-<a name="manifest"></a>
-<h3>Enforcing Permissions in AndroidManifest.xml</h3>
-
-<p>High-level permissions restricting access to entire components of the
-system or application can be applied through your
-<code>AndroidManifest.xml</code>. All that this requires is including an {@link
-android.R.attr#permission android:permission} attribute on the desired
-component, naming the permission that will be used to control access to
-it.</p>
-
-<p><strong>{@link android.app.Activity}</strong> permissions
-(applied to the
-{@link android.R.styleable#AndroidManifestActivity &lt;activity&gt;} tag)
-restrict who can start the associated
-activity. The permission is checked during
-{@link android.content.Context#startActivity Context.startActivity()} and
-{@link android.app.Activity#startActivityForResult Activity.startActivityForResult()};
-if the caller does not have
-the required permission then {@link java.lang.SecurityException} is thrown
-from the call.</p>
-
-<p><strong>{@link android.app.Service}</strong> permissions
-(applied to the
-{@link android.R.styleable#AndroidManifestService &lt;service&gt;} tag)
-restrict who can start or bind to the
-associated service. The permission is checked during
-{@link android.content.Context#startService Context.startService()},
-{@link android.content.Context#stopService Context.stopService()} and
-{@link android.content.Context#bindService Context.bindService()};
-if the caller does not have
-the required permission then {@link java.lang.SecurityException} is thrown
-from the call.</p>
-
-<p><strong>{@link android.content.BroadcastReceiver}</strong> permissions
-(applied to the
-{@link android.R.styleable#AndroidManifestReceiver &lt;receiver&gt;} tag)
-restrict who can send broadcasts to the associated receiver.
-The permission is checked <em>after</em>
-{@link android.content.Context#sendBroadcast Context.sendBroadcast()} returns,
-as the system tries
-to deliver the submitted broadcast to the given receiver. As a result, a
-permission failure will not result in an exception being thrown back to the
-caller; it will just not deliver the intent. In the same way, a permission
-can be supplied to
-{@link android.content.Context#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, String, android.os.Handler)
-Context.registerReceiver()}
-to control who can broadcast to a programmatically registered receiver.
-Going the other way, a permission can be supplied when calling
-{@link android.content.Context#sendBroadcast(Intent, String) Context.sendBroadcast()}
-to restrict which BroadcastReceiver objects are allowed to receive the broadcast (see
-below).</p>
-
-<p><strong>{@link android.content.ContentProvider}</strong> permissions
-(applied to the
-{@link android.R.styleable#AndroidManifestProvider &lt;provider&gt;} tag)
-restrict who can access the data in
-a {@link android.content.ContentProvider}. (Content providers have an important
-additional security facility available to them called
-<a href="#uri">URI permissions</a> which is described later.)
-Unlike the other components,
-there are two separate permission attributes you can set:
-{@link android.R.attr#readPermission android:readPermission} restricts who
-can read from the provider, and
-{@link android.R.attr#writePermission android:writePermission} restricts
-who can write to it. Note that if a provider is protected with both a read
-and write permission, holding only the write permission does not mean
-you can read from a provider. The permissions are checked when you first
-retrieve a provider (if you don't have either permission, a SecurityException
-will be thrown), and as you perform operations on the provider. Using
-{@link android.content.ContentResolver#query ContentResolver.query()} requires
-holding the read permission; using
-{@link android.content.ContentResolver#insert ContentResolver.insert()},
-{@link android.content.ContentResolver#update ContentResolver.update()},
-{@link android.content.ContentResolver#delete ContentResolver.delete()}
-requires the write permission.
-In all of these cases, not holding the required permission results in a
-{@link java.lang.SecurityException} being thrown from the call.</p>
-
-
-<a name="broadcasts"></a>
-<h3>Enforcing Permissions when Sending Broadcasts</h3>
-
-<p>In addition to the permission enforcing who can send Intents to a
-registered {@link android.content.BroadcastReceiver} (as described above), you
-can also specify a required permission when sending a broadcast. By calling {@link
-android.content.Context#sendBroadcast(android.content.Intent,String)
-Context.sendBroadcast()} with a
-permission string, you require that a receiver's application must hold that
-permission in order to receive your broadcast.</p>
-
-<p>Note that both a receiver and a broadcaster can require a permission. When
-this happens, both permission checks must pass for the Intent to be delivered
-to the associated target.</p>
-
-
-<a name="enforcement"></a>
-<h3>Other Permission Enforcement</h3>
-
-<p>Arbitrarily fine-grained permissions can be enforced at any call into a
-service. This is accomplished with the {@link
-android.content.Context#checkCallingPermission Context.checkCallingPermission()}
-method. Call with a desired
-permission string and it will return an integer indicating whether that
-permission has been granted to the current calling process. Note that this can
-only be used when you are executing a call coming in from another process,
-usually through an IDL interface published from a service or in some other way
-given to another process.</p>
-
-<p>There are a number of other useful ways to check permissions. If you have
-the pid of another process, you can use the Context method {@link
-android.content.Context#checkPermission(String, int, int) Context.checkPermission(String, int, int)}
-to check a permission against that pid. If you have the package name of another
-application, you can use the direct PackageManager method {@link
-android.content.pm.PackageManager#checkPermission(String, String)
-PackageManager.checkPermission(String, String)}
-to find out whether that particular package has been granted a specific permission.</p>
-
-
-<a name="uri"></a>
-<h2>URI Permissions</h2>
-
-<p>The standard permission system described so far is often not sufficient
-when used with content providers. A content provider may want to
-protect itself with read and write permissions, while its direct clients
-also need to hand specific URIs to other applications for them to operate on.
-A typical example is attachments in a mail application. Access to the mail
-should be protected by permissions, since this is sensitive user data. However,
-if a URI to an image attachment is given to an image viewer, that image viewer
-will not have permission to open the attachment since it has no reason to hold
-a permission to access all e-mail.</p>
-
-<p>The solution to this problem is per-URI permissions: when starting an
-activity or returning a result to an activity, the caller can set
-{@link android.content.Intent#FLAG_GRANT_READ_URI_PERMISSION
-Intent.FLAG_GRANT_READ_URI_PERMISSION} and/or
-{@link android.content.Intent#FLAG_GRANT_WRITE_URI_PERMISSION
-Intent.FLAG_GRANT_WRITE_URI_PERMISSION}. This grants the receiving activity
-permission access the specific data URI in the Intent, regardless of whether
-it has any permission to access data in the content provider corresponding
-to the Intent.</p>
-
-<p>This mechanism allows a common capability-style model where user interaction
-(opening an attachment, selecting a contact from a list, etc) drives ad-hoc
-granting of fine-grained permission. This can be a key facility for reducing
-the permissions needed by applications to only those directly related to their
-behavior.</p>
-
-<p>The granting of fine-grained URI permissions does, however, require some
-cooperation with the content provider holding those URIs. It is strongly
-recommended that content providers implement this facility, and declare that
-they support it through the
-{@link android.R.styleable#AndroidManifestProvider_grantUriPermissions
-android:grantUriPermissions} attribute or
-{@link android.R.styleable#AndroidManifestGrantUriPermission
-&lt;grant-uri-permissions&gt;} tag.</p>
-
-<p>More information can be found in the
-{@link android.content.Context#grantUriPermission Context.grantUriPermission()},
-{@link android.content.Context#revokeUriPermission Context.revokeUriPermission()}, and
-{@link android.content.Context#checkUriPermission Context.checkUriPermission()}
-methods.</p>
-
+<li>The permission must have a string that concisely expresses to a user the
+security decision they will be required to make.</li>
+<li>The permission string must be localized to many different languages.</li>
+<li>Uses may choose not to install an application because a permission is
+confusing or perceived as risky.</li>
+<li>Applications may request the permission when the creator of the permission
+has not been installed.</li>
+</ul></p>
+
+<p>Each of these poses a significant non-technical challenge for an application
+developer, which is why we discourage the use of Dangerous permission.</p>
+
+<a name="Networking"></a>
+<h2>Using Networking</h2>
+
+<h3>Using IP Networking</h3>
+
+<p>Networking on Android is not significantly different from Linux
+environments. The key consideration is making sure that appropriate protocols
+are used for sensitive data, such as <a
+href="{@docRoot}reference/javax/net/ssl/HttpsURLConnection.html">HTTPS</a> for
+web traffic. We prefer use of HTTPS over HTTP anywhere that HTTPS is
+supported on the server, since mobile devices frequently connect on networks
+that are not secured, such as public WiFi hotspots.</p>
+
+<p>Authenticated, encrypted socket-level communication can be easily
+implemented using the <code><a
+href="{@docRoot}reference/javax/net/ssl/SSLSocket.html">SSLSocket</a></code>
+class. Given the frequency with which Android devices connect to unsecured
+wireless networks using WiFi, the use of secure networking is strongly
+encouraged for all applications.</p>
+
+<p>We have seen some applications use <a
+href="http://en.wikipedia.org/wiki/Localhost">localhost</a> network ports for
+handling sensitive IPC. We discourage this approach since these interfaces are
+accessible by other applications on the device. Instead, use an Android IPC
+mechanism where authentication is possible such as a Service and Binder. (Even
+worse than using loopback is to bind to INADDR_ANY since then your application
+may receive requests from anywhere. We’ve seen that, too.)</p>
+
+<p>Also, one common issue that warrants repeating is to make sure that you do
+not trust data downloaded from HTTP or other insecure protocols. This includes
+validation of input in <code><a
+href="{@docRoot}reference/android/webkit/WebView.html">WebView</a></code> and
+any responses to intents issued against HTTP.</p>
+
+<h3>Using Telephony Networking</h3>
+
+<p>SMS is the telephony protocol most frequently used by Android developers.
+Developers should keep in mind that this protocol was primarily designed for
+user-to-user communication and is not well-suited for some application
+purposes. Due to the limitations of SMS, we strongly recommend the use of <a
+href="http://code.google.com/android/c2dm/">C2DM</a> and IP networking for
+sending data messages to devices.</p>
+
+<p>Many developers do not realize that SMS is not encrypted or strongly
+authenticated on the network or on the device. In particular, any SMS receiver
+should expect that a malicious user may have sent the SMS to your application
+-- do not rely on unauthenticated SMS data to perform sensitive commands.
+Also, you should be aware that SMS may be subject to spoofing and/or
+interception on the network. On the Android-powered device itself, SMS
+messages are transmitted as Broadcast intents, so they may be read or captured
+by other applications that have the READ_SMS permission.</p>
+
+<a name="DynamicCode"></a>
+<h2>Dynamically Loading Code</h2>
+
+<p>We strongly discourage loading code from outside of the application APK.
+Doing so significantly increases the likelihood of application compromise due
+to code injection or code tampering. It also adds complexity around version
+management and application testing. Finally, it can make it impossible to
+verify the behavior of an application, so it may be prohibited in some
+environments.</p>
+
+<p>If your application does dynamically load code, the most important thing to
+keep in mind about dynamically loaded code is that it runs with the same
+security permissions as the application APK. The user made a decision to
+install your application based on your identity, and they are expecting that
+you provide any code run within the application, including code that is
+dynamically loaded.</p>
+
+<p>The major security risk associated with dynamically loading code is that the
+code needs to come from a verifiable source. If the modules are included
+directly within your APK, then they cannot be modified by other applications.
+This is true whether the code is a native library or a class being loaded using
+<a href="{@docRoot}reference/dalvik/system/DexClassLoader.html">
+<code>DexClassLoader</code></a>. We have seen many instances of applications
+attempting to load code from insecure locations, such as downloaded from the
+network over unencrypted protocols or from world writable locations such as
+external storage. These locations could allow someone on the network to modify
+the content in transit, or another application on a users device to modify the
+content, respectively.</p>
+
+
+<h3>Using WebView</h3>
+
+<p>Since WebView consumes web content that can include HTML and JavaScript,
+improper use can introduce common web security issues such as <a
+href="http://en.wikipedia.org/wiki/Cross_site_scripting">cross-site-scripting</a
+> (JavaScript injection). Android includes a number of mechanisms to reduce
+the scope of these potential issues by limiting the capability of WebView to
+the minimum functionality required by your application.</p>
+
+<p>If your application does not directly use JavaScript within a <code><a
+href="{@docRoot}reference/android/webkit/WebView.html">WebView</a></code>, do
+not call
+<a href="{@docRoot}reference/android/webkit/WebSettings.html#setJavaScriptEnabled(boolean)">
+<code>setJavaScriptEnabled()</code></a>. We have seen this method invoked
+in sample code that might be repurposed in production application -- so
+remove it if necessary. By default, <code><a
+href="{@docRoot}reference/android/webkit/WebView.html">WebView</a></code> does
+not execute JavaScript so cross-site-scripting is not possible.</p>
+
+<p>Use <code><a
+href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> with
+particular care because it allows JavaScript to invoke operations that are
+normally reserved for Android applications. Only expose <code><a
+href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> to
+sources from which all input is trustworthy. If untrusted input is allowed,
+untrusted JavaScript may be able to invoke Android methods. In general, we
+recommend only exposing <code><a
+href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> to
+JavaScript that is contained within your application APK.</p>
+
+<p>Do not trust information downloaded over HTTP, use HTTPS instead. Even if
+you are connecting only to a single website that you trust or control, HTTP is
+subject to <a
+href="http://en.wikipedia.org/wiki/Man-in-the-middle_attack">MiTM</a> attacks
+and interception of data. Sensitive capabilities using <code><a
+href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> should
+not ever be exposed to unverified script downloaded over HTTP. Note that even
+with the use of HTTPS,
+<code><a
+href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code>
+increases the attack surface of your application to include the server
+infrastructure and all CAs trusted by the Android-powered device.</p>
+
+<p>If your application accesses sensitive data with a <code><a
+href="{@docRoot}reference/android/webkit/WebView.html">WebView</a></code>, you
+may want to use the <code><a
+href="{@docRoot}reference/android/webkit/WebView.html#clearCache(boolean)">
+clearCache()</a></code> method to delete any files stored locally. Server side
+headers like no-cache can also be used to indicate that an application should
+not cache particular content.</p>
+
+<a name="Input"></a>
+<h2>Performing Input Validation</h2>
+
+<p>Insufficient input validation is one of the most common security problems
+affecting applications, regardless of what platform they run on. Android does
+have platform-level countermeasures that reduce the exposure of applications to
+input validation issues, you should use those features where possible. Also
+note that selection of type-safe languages tends to reduce the likelihood of
+input validation issues. We strongly recommend building your applications with
+the Android SDK.</p>
+
+<p>If you are using native code, then any data read from files, received over
+the network, or received from an IPC has the potential to introduce a security
+issue. The most common problems are <a
+href="http://en.wikipedia.org/wiki/Buffer_overflow">buffer overflows</a>, <a
+href="http://en.wikipedia.org/wiki/Double_free#Use_after_free">use after
+free</a>, and <a
+href="http://en.wikipedia.org/wiki/Off-by-one_error">off-by-one errors</a>.
+Android provides a number of technologies like ASLR and DEP that reduce the
+exploitability of these errors, but they do not solve the underlying problem.
+These can be prevented by careful handling of pointers and managing of
+buffers.</p>
+
+<p>Dynamic, string based languages such as JavaScript and SQL are also subject
+to input validation problems due to escape characters and <a
+href="http://en.wikipedia.org/wiki/Code_injection">script injection</a>.</p>
+
+<p>If you are using data within queries that are submitted to SQL Database or a
+Content Provider, SQL Injection may be an issue. The best defense is to use
+parameterized queries, as is discussed in the ContentProviders section.
+Limiting permissions to read-only or write-only can also reduce the potential
+for harm related to SQL Injection.</p>
+
+<p>If you are using <code><a
+href="{@docRoot}reference/android/webkit/WebView.html">WebView</a></code>, then
+you must consider the possibility of XSS. If your application does not
+directly use JavaScript within a <code><a
+href="{@docRoot}reference/android/webkit/WebView.html">WebView</a></code>, do
+not call setJavaScriptEnabled() and XSS is no longer possible. If you must
+enable JavaScript then the WebView section provides other security best
+practices.</p>
+
+<p>If you cannot use the security features above, we strongly recommend the use
+of well-structured data formats and verifying that the data conforms to the
+expected format. While blacklisting of characters or character-replacement can
+be an effective strategy, these techniques are error-prone in practice and
+should be avoided when possible.</p>
+
+<a name="UserData"></a>
+<h2>Handling User Data</h2>
+
+<p>In general, the best approach is to minimize use of APIs that access
+sensitive or personal user data. If you have access to data and can avoid
+storing or transmitting the information, do not store or transmit the data.
+Finally, consider if there is a way that your application logic can be
+implemented using a hash or non-reversible form of the data. For example, your
+application might use the hash of an an email address as a primary key, to
+avoid transmitting or storing the email address. This reduces the chances of
+inadvertently exposing data, and it also reduces the chance of attackers
+attempting to exploit your application.</p>
+
+<p>If your application accesses personal information such as passwords or
+usernames, keep in mind that some jurisdictions may require you to provide a
+privacy policy explaining your use and storage of that data. So following the
+security best practice of minimizing access to user data may also simplify
+compliance.</p>
+
+<p>You should also consider whether your application might be inadvertently
+exposing personal information to other parties such as third-party components
+for advertising or third-party services used by your application. If you don't
+know why a component or service requires a personal information, don’t
+provide it. In general, reducing the access to personal information by your
+application will reduce the potential for problems in this area.</p>
+
+<p>If access to sensitive data is required, evaluate whether that information
+must be transmitted to a server, or whether the operation can be performed on
+the client. Consider running any code using sensitive data on the client to
+avoid transmitting user data.</p>
+
+<p>Also, make sure that you do not inadvertently expose user data to other
+application on the device through overly permissive IPC, world writable files,
+or network sockets. This is a special case of permission redelegation,
+discussed in the Requesting Permissions section.</p>
+
+<p>If a GUID is required, create a large, unique number and store it. Do not
+use phone identifiers such as the phone number or IMEI which may be associated
+with personal information. This topic is discussed in more detail in the <a
+href="http://android-developers.blogspot.com/2011/03/identifying-app-installations.html">Android Developer Blog</a>.</p>
+
+<p>Application developers should be careful writing to on-device logs.
+In Android, logs are a shared resource, and are available
+to an application with the
+<a href="{@docRoot}reference/android/Manifest.permission.html#READ_LOGS">
+<code>READ_LOGS</code></a> permission. Even though the phone log data
+is temporary and erased on reboot, inappropriate logging of user information
+could inadvertently leak user data to other applications.</p>
+
+
+<h3>Handling Credentials</h3>
+
+<p>In general, we recommend minimizing the frequency of asking for user
+credentials -- to make phishing attacks more conspicuous, and less likely to be
+successful. Instead use an authorization token and refresh it.</p>
+
+<p>Where possible, username and password should not be stored on the device.
+Instead, perform initial authentication using the username and password
+supplied by the user, and then use a short-lived, service-specific
+authorization token.</p>
+
+<p>Services that will be accessible to multiple applications should be accessed
+using <code>
+<a href="{@docRoot}reference/android/accounts/AccountManager.html">
+AccountManager</a></code>. If possible, use the <code><a
+href="{@docRoot}reference/android/accounts/AccountManager.html">
+AccountManager</a></code> class to invoke a cloud-based service and do not store
+passwords on the device.</p>
+
+<p>After using <code><a
+href="{@docRoot}reference/android/accounts/AccountManager.html">
+AccountManager</a></code> to retrieve an Account, check the <code><a
+href="{@docRoot}reference/android/accounts/Account.html#CREATOR">CREATOR</a>
+</code> before passing in any credentials, so that you do not inadvertently pass
+credentials to the wrong application.</p>
+
+<p>If credentials are to be used only by applications that you create, then you
+can verify the application which accesses the <code><a
+href="{@docRoot}reference/android/accounts/AccountManager.html">
+AccountManager</a></code> using <code><a
+href="{@docRoot}reference/android/content/pm/PackageManager.html#checkSignatures(java.lang.String,%20java.lang.String)">checkSignature()</a></code>.
+Alternatively, if only one application will use the credential, you might use a
+<code><a
+href={@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> for
+storage.</p>
+
+<a name="Crypto"></a>
+<h2>Using Cryptography</h2>
+
+<p>In addition to providing data isolation, supporting full-filesystem
+encryption, and providing secure communications channels Android provides a
+wide array of algorithms for protecting data using cryptography.</p>
+
+<p>In general, try to use the highest level of pre-existing framework
+implementation that can support your use case. If you need to securely
+retrieve a file from a known location, a simple HTTPS URI may be adequate and
+require no knowledge of cryptography on your part. If you need a secure
+tunnel, consider using
+<a href="{@docRoot}reference/javax/net/ssl/HttpsURLConnection.html">
+<code>HttpsURLConnection</code></a> or <code><a
+href="{@docRoot}reference/javax/net/ssl/SSLSocket.html">SSLSocket</a></code>,
+rather than writing your own protocol.</p>
+
+<p>If you do find yourself needing to implement your own protocol, we strongly
+recommend that you not implement your own cryptographic algorithms. Use
+existing cryptographic algorithms such as those in the implementation of AES or
+RSA provided in the <code><a
+href="{@docRoot}reference/javax/crypto/Cipher.html">Cipher</a></code> class.</p>
+
+<p>Use a secure random number generator (
+<a href="{@docRoot}reference/java/security/SecureRandom.html">
+<code>SecureRandom</code></a>) to initialize any cryptographic keys (<a
+href="{@docRoot}reference/javax/crypto/KeyGenerator.html">
+<code>KeyGenerator</code></a>). Use of a key that is not generated with a secure random
+number generator significantly weakens the strength of the algorithm, and may
+allow offline attacks.</p>
+
+<p>If you need to store a key for repeated use, use a mechanism like <code><a
+href="{@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> that
+provides a mechanism for long term storage and retrieval of cryptographic
+keys.</p>
+
+<h2>Conclusion</h2>
+
+<p>Android provides developers with the ability to design applications with a
+broad range of security requirements. These best practices will help you make
+sure that your application takes advantage of the security benefits provided by
+the platform.</p>
+
+<p>You can receive more information on these topics and discuss security best
+practices with other developers in the <a
+href="http://groups.google.com/group/android-security-discuss">Android Security
+Discuss</a> Google Group</p>
diff --git a/docs/html/guide/topics/sensors/index.jd b/docs/html/guide/topics/sensors/index.jd
index 43903dcf735a..a0458994d36d 100644
--- a/docs/html/guide/topics/sensors/index.jd
+++ b/docs/html/guide/topics/sensors/index.jd
@@ -1,88 +1,40 @@
-page.title=Sensors
-@jd:body
-
-<div id="qv-wrapper">
- <div id="qv">
- <h2>Topics</h2>
- <ol>
- <li><a href="{@docRoot}guide/topics/sensors/sensors_overview.html">Sensors Overview</a></li>
- <li><a href="{@docRoot}guide/topics/sensors/sensors_motion.html">Motion Sensors</a></li>
- <li><a href="{@docRoot}guide/topics/sensors/sensors_position.html">Position
- Sensors</a></li>
- <li><a href="{@docRoot}guide/topics/sensors/sensors_environment.html">Environment
- Sensors</a></li>
- </ol>
- <h2>Key classes and interfaces</h2>
- <ol>
- <li>{@link android.hardware.Sensor}</li>
- <li>{@link android.hardware.SensorEvent}</li>
- <li>{@link android.hardware.SensorManager}</li>
- <li>{@link android.hardware.SensorEventListener}</li>
- </ol>
- <h2>Related samples</h2>
- <ol>
- <li><a href="{@docRoot}resources/samples/AccelerometerPlay/index.html">Accelerometer
- Play</a></li>
- <li><a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/os/RotationVectorDemo.html">
-API Demos (OS - RotationVectorDemo)</a></li>
- <li><a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/os/Sensors.html">API Demos
-(OS - Sensors)</a></li>
- </ol>
- </div>
-</div>
+page.title=Location and Sensors
+page.landing=true
+page.landing.intro=Use sensors on the device to add rich location and motion capabilities to your app, from GPS or network location to accelerometer, gyroscope, temperature, barometer, and more.
+page.landing.image=
-<p>Most Android-powered devices have built-in sensors that measure motion, orientation,
-and various environmental conditions. These sensors are capable of providing raw data with high
-precision and accuracy, and are useful if you want to monitor three-dimensional device movement or
-positioning, or you want to monitor changes in the ambient environment near a device. For example, a
-game might track readings from a device's gravity sensor to infer complex user gestures
-and motions, such as tilt, shake, rotation, or swing. Likewise, a weather application might use a
-device's temperature sensor and humidity sensor to calculate and report the dewpoint, or a travel
-application might use the geomagnetic field sensor and accelerometer to report a compass
-bearing.</p>
+@jd:body
-<p>The Android platform supports three broad categories of sensors:</p>
+<div class="landing-docs">
-<ul>
- <li>Motion sensors
- <p>These sensors measure acceleration forces and rotational forces along three axes. This
- category includes accelerometers, gravity sensors, gyroscopes, and rotational vector
- sensors.</p>
- </li>
- <li>Environmental sensors
- <p>These sensors measure various environmental parameters, such as ambient air temperature
- and pressure, illumination, and humidity. This category includes barometers, photometers, and
- thermometers.</p>
- </li>
- <li>Position sensors
- <p>These sensors measure the physical position of a device. This category includes
- orientation sensors and magnetometers.</p>
- </li>
-</ul>
+ <div class="col-6">
+ <h3>Blog Articles</h3>
+
+ <a href="http://android-developers.blogspot.com/2010/09/one-screen-turn-deserves-another.html">
+ <h4>One Screen Turn Deserves Another</h4>
+ <p>However, there’s a new wrinkle: recently, a few devices have shipped (see here and here)
+that run Android on screens that are naturally landscape in their orientation. That is, when held in
+the default position, the screens are wider than they are tall. This introduces a few fairly subtle
+issues that we’ve noticed causing problems in some apps.</p>
+ </a>
+
+ <a href="android-developers.blogspot.com/2011/06/deep-dive-into-location.html">
+ <h4>A Deep Dive Into Location</h4>
+ <p>I’ve written an open-source reference app that incorporates all of the tips, tricks, and
+cheats I know to reduce the time between opening an app and seeing an up-to-date list of nearby
+venues - as well as providing a reasonable level of offline support</p>
+ </a>
+ </div>
-<p>To access these sensors, you can use the Android sensor framework. The sensor framework provides
-several classes and interfaces that help you perform a wide variety of sensor-related tasks. To
-learn more about the framework and the sensors that are supported on the Android system, read the
-following documents:</p>
+ <div class="col-6">
+ <h3>Training</h3>
+
+ <a href="http://developer.android.com/training/basics/location/index.html">
+ <h4>Making Your App Location Aware</h4>
+ <p>This class teaches you how to incorporate location based services in your Android
+application. You'll learn a number of methods to receive location updates and related best
+practices.</p>
+ </a>
+ </div>
-<dl>
- <dt><strong><a href="{@docRoot}guide/topics/sensors/sensors_overview.html">Sensors
- Overview</a></strong></dt>
- <dd>Learn how to list the sensors that are on a device, set up sensor event listeners, and
- acquire sensor data. Also learn best practices for accessing and using sensors.</dd>
- <dt><strong><a href="{@docRoot}guide/topics/sensors/sensors_motion.html">Motion
- Sensors</a></strong></dt>
- <dd>Learn how to use the sensors that provide acceleration data, such as the accelerometer,
- gravity sensor, and linear acceleration sensor. Also learn how to use the sensors that
- provide rotational data, such as gyroscopes and rotational vector sensors.</dd>
- <dt><strong><a href="{@docRoot}guide/topics/sensors/sensors_position.html">Position
- Sensors</a></strong></dt>
- <dd>Learn how to use the sensors that provide orientation and compass data, such as the
- orientation sensor and the geomagnetic field sensor.</dd>
- <dt><strong><a href="{@docRoot}guide/topics/sensors/sensors_environment.html">Environment
- Sensors</a></strong></dt>
- <dd>Learn how to use the sensors that provide environmental data, such as the light,
- humidity, pressure, temperature, and proximity sensors.</dd>
-</dl>
+</div> \ No newline at end of file
diff --git a/docs/html/guide/topics/sensors/sensors_overview.jd b/docs/html/guide/topics/sensors/sensors_overview.jd
index 543872ce57fb..e38a8430a878 100644
--- a/docs/html/guide/topics/sensors/sensors_overview.jd
+++ b/docs/html/guide/topics/sensors/sensors_overview.jd
@@ -50,13 +50,39 @@ href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/os/Senso
</div>
</div>
-<p>Most Android-powered devices have sensors that let you monitor changes in device
-position and motion. Many devices also have sensors that let you determine ambient environmental
-conditions, such as temperature, pressure, humidity, and lighting. You can access these
-sensors and acquire raw sensor data by using the Android sensor framework.</p>
+<p>Most Android-powered devices have built-in sensors that measure motion, orientation,
+and various environmental conditions. These sensors are capable of providing raw data with high
+precision and accuracy, and are useful if you want to monitor three-dimensional device movement or
+positioning, or you want to monitor changes in the ambient environment near a device. For example, a
+game might track readings from a device's gravity sensor to infer complex user gestures
+and motions, such as tilt, shake, rotation, or swing. Likewise, a weather application might use a
+device's temperature sensor and humidity sensor to calculate and report the dewpoint, or a travel
+application might use the geomagnetic field sensor and accelerometer to report a compass
+bearing.</p>
+
+<p>The Android platform supports three broad categories of sensors:</p>
-<p>The sensor framework provides several classes and interfaces that help you perform a wide variety
-of sensor-related tasks. For example, you can use the sensor framework to do the following:</p>
+<ul>
+ <li>Motion sensors
+ <p>These sensors measure acceleration forces and rotational forces along three axes. This
+ category includes accelerometers, gravity sensors, gyroscopes, and rotational vector
+ sensors.</p>
+ </li>
+ <li>Environmental sensors
+ <p>These sensors measure various environmental parameters, such as ambient air temperature
+ and pressure, illumination, and humidity. This category includes barometers, photometers, and
+ thermometers.</p>
+ </li>
+ <li>Position sensors
+ <p>These sensors measure the physical position of a device. This category includes
+ orientation sensors and magnetometers.</p>
+ </li>
+</ul>
+
+
+<p>You can access sensors available on the device and acquire raw sensor data by using the Android
+sensor framework. The sensor framework provides several classes and interfaces that help you perform a wide
+variety of sensor-related tasks. For example, you can use the sensor framework to do the following:</p>
<ul>
<li>Determine which sensors are available on a device.</li>
diff --git a/docs/html/guide/topics/testing/index.jd b/docs/html/guide/topics/testing/index.jd
deleted file mode 100644
index cf87187aa012..000000000000
--- a/docs/html/guide/topics/testing/index.jd
+++ /dev/null
@@ -1,86 +0,0 @@
-page.title=Testing
-@jd:body
-<p>
- The Android development environment includes an integrated testing framework that helps you
- test all aspects of your application.
-</p>
-<h4>Fundamentals</h4>
-<p>
- To start learning how to use the framework to create tests for your applications, please
- read the topic <a href="{@docRoot}guide/topics/testing/testing_android.html">
- Testing Fundamentals</a>.
-</p>
-<h4>Concepts</h4>
-<ul>
- <li>
- <a href="{@docRoot}guide/topics/testing/activity_testing.html">
- Activity Testing</a> focuses on testing activities. It describes how instrumentation allows
- you to control activities outside the normal application lifecycle. It also lists
- activity-specific features you should test, and it provides tips for testing Android
- user interfaces.
- </li>
- <li>
- <a href="{@docRoot}guide/topics/testing/contentprovider_testing.html">
- Content Provider Testing</a> focuses on testing content providers. It describes the
- mock system objects you can use, provides tips for designing providers so that they
- can be tested, and lists provider-specific features you should test.
- </li>
- <li>
- <a href="{@docRoot}guide/topics/testing/service_testing.html">
- Service Testing</a> focuses on testing services. It also lists service-specific features
- you should test.
- </li>
- <li>
- <a href="{@docRoot}guide/topics/testing/what_to_test.html">What to Test</a>
- is an overview of the types of testing you should do. It focuses on testing
- system-wide aspects of Android that can affect every component in your application.
- </li>
-</ul>
-<h4>Procedures</h4>
-<ul>
- <li>
- The topic <a href="{@docRoot}guide/developing/testing/testing_eclipse.html">
- Testing in Eclipse, with ADT</a> describes how to create and run tests in Eclipse with ADT.
- </li>
- <li>
- The topic <a href="{@docRoot}guide/developing/testing/testing_otheride.html">
- Testing in other IDEs</a> describes how to create and run tests with command-line tools.
- </li>
-</ul>
-<h4>Tutorials</h4>
-<ul>
- <li>
- The <a href="{@docRoot}resources/tutorials/testing/helloandroid_test.html">
- Hello, Testing</a> tutorial introduces basic testing concepts and procedures.
- </li>
- <li>
- For a more advanced tutorial, try
- <a href="{@docRoot}resources/tutorials/testing/activity_test.html">Activity Testing</a>,
- which guides you through a more complex testing scenario.
- </li>
-</ul>
-<h4>Tools</h4>
-<ul>
- <li>
- The
- <a href="{@docRoot}guide/developing/tools/monkey.html">UI/Application Exerciser Monkey</a>,
- usually called Monkey, is a command-line tool that sends pseudo-random
- streams of keystrokes, touches, and gestures to a device.
- </li>
- <li>
- The <a href="{@docRoot}guide/developing/tools/monkeyrunner_concepts.html">monkeyrunner</a> tool
- is an API and execution environment. You use monkeyrunner with Python programs
- to test applications and devices.
- </li>
-</ul>
-<!--
-<h4>Samples</h4>
-<ul>
- <li>
- The <a href="{@docRoot}resources/samples/AlarmServiceTest.html">Alarm Service Test</a>
- is a test package for the <a href="{@docRoot}resources/samples/Alarm.html">Alarm</a>
- sample application. It provides a simple example of unit
- testing a {@link android.app.Service}.
- </li>
-</ul>
--->
diff --git a/docs/html/guide/topics/clipboard/copy-paste.jd b/docs/html/guide/topics/text/copy-paste.jd
index 6c86f478cbf6..6c86f478cbf6 100644
--- a/docs/html/guide/topics/clipboard/copy-paste.jd
+++ b/docs/html/guide/topics/text/copy-paste.jd
diff --git a/docs/html/resources/articles/creating-input-method.jd b/docs/html/guide/topics/text/creating-input-method.jd
index 84c2704f5568..e49610f6f34e 100644
--- a/docs/html/resources/articles/creating-input-method.jd
+++ b/docs/html/guide/topics/text/creating-input-method.jd
@@ -8,7 +8,7 @@ parent.link=../browser.html?tag=article
<h2>See also</h2>
<ol>
<li>
- <a href="{@docRoot}resources/articles/on-screen-inputs.html">Onscreen Input Methods</a>
+ <a href="http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html">Onscreen Input Methods</a>
</li>
<li>
<a href="{@docRoot}resources/samples/SoftKeyboard/index.html">Soft Keyboard sample</a>
@@ -40,7 +40,7 @@ parent.link=../browser.html?tag=article
</ul>
<p>
If you haven't worked with IMEs before, you should read the introductory article
- <a href="{@docRoot}resources/articles/on-screen-inputs.html">Onscreen Input Methods</a> first.
+ <a href="http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html">Onscreen Input Methods</a> first.
Also, the Soft Keyboard sample app included in the SDK contains sample code that you can modify
to start building your own IME.
</p>
diff --git a/docs/html/guide/topics/text/index.jd b/docs/html/guide/topics/text/index.jd
new file mode 100644
index 000000000000..3865f25aee71
--- /dev/null
+++ b/docs/html/guide/topics/text/index.jd
@@ -0,0 +1,40 @@
+page.title=Text and Input
+page.landing=true
+page.landing.intro=Use text services to add conventient features such as copy/paste and spell checking to your app. You can also develop your own text services to offer custom IMEs, dictionaries, and spelling checkers that you can distribute to users as applications.
+page.landing.image=
+
+@jd:body
+
+<div class="landing-docs">
+
+ <div class="col-12">
+ <h3>Blog Articles</h3>
+
+ <a href="http://android-developers.blogspot.com/2011/12/add-voice-typing-to-your-ime.html">
+ <h4>Add Voice Typing To Your IME</h4>
+ <p>A new feature available in Android 4.0 is voice typing: the difference for users is that
+the recognition results appear in the text box while they are still speaking. If you are an IME
+developer, you can easily integrate with voice typing.</p>
+ </a>
+
+ <a href="http://android-developers.blogspot.com/2010/03/speech-input-api-for-android.html">
+ <h4>Speech Input API for Android</h4>
+ <p>We believe speech can fundamentally change the mobile experience. We would like to invite
+every Android application developer to consider integrating speech input capabilities via the
+Android SDK.</p>
+ </a>
+
+ <a href="http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html">
+ <h4>Making Sense of Multitouch</h4>
+ <p>The word "multitouch" gets thrown around quite a bit and it’s not always clear what people
+are referring to. For some it’s about hardware capability, for others it refers to specific gesture
+support in software. Whatever you decide to call it, today we’re going to look at how to make your
+apps and views behave nicely with multiple fingers on the screen.</p>
+ </a>
+ </div>
+
+ <div class="col-6">
+
+ </div>
+
+</div> \ No newline at end of file
diff --git a/docs/html/resources/articles/spell-checker-framework.jd b/docs/html/guide/topics/text/spell-checker-framework.jd
index 8d57b4eb09cd..05b68907bdf5 100644
--- a/docs/html/resources/articles/spell-checker-framework.jd
+++ b/docs/html/guide/topics/text/spell-checker-framework.jd
@@ -1,4 +1,4 @@
-page.title=Using the Spell Checker Framework
+page.title=Spelling Checker Framework
parent.title=Articles
parent.link=../browser.html?tag=article
@jd:body
@@ -31,37 +31,37 @@ parent.link=../browser.html?tag=article
</div>
<p>
- The Android platform offers a spell checker framework that lets you implement
+ The Android platform offers a spelling checker framework that lets you implement
and access spell checking in your application. The framework is one of the
Text Service APIs offered by the Android platform.
</p>
<p>
To use the framework in your app, you create a special type of Android service that
- generates a spell checker <strong>session</strong> object. Based on text you provide,
- the session object returns spelling suggestions generated by the spell checker.
+ generates a spelling checker <strong>session</strong> object. Based on text you provide,
+ the session object returns spelling suggestions generated by the spelling checker.
</p>
<h2 id="SpellCheckLifeCycle">Spell Checker Lifecycle</h2>
<p>
- The following diagram shows the lifecycle of the spell checker service:
+ The following diagram shows the lifecycle of the spelling checker service:
</p>
<img src="{@docRoot}resources/articles/images/spellcheck_lifecycle.png" alt="" height="596"
id="figure1" />
<p class="img-caption">
- <strong>Figure 1.</strong> The spell checker service lifecycle.
+ <strong>Figure 1.</strong> The spelling checker service lifecycle.
</p>
<p>
- To initiate spell checking, your app starts its implementation of the spell checker
+ To initiate spell checking, your app starts its implementation of the spelling checker
service. Clients in your app, such as activities or individual UI elements, request a
- spell checker session from the service, then use the session to get suggestions for text.
- As a client terminates its operation, it closes its spell checker session. If necessary, your
- app can shut down the spell checker service at any time.
+ spelling checker session from the service, then use the session to get suggestions for text.
+ As a client terminates its operation, it closes its spelling checker session. If necessary, your
+ app can shut down the spelling checker service at any time.
</p>
<h2 id="SpellCheckImplementation">Implementing a Spell Checker Service</h2>
<p>
- To use the spell checker framework in your app, add a spell checker service component including
+ To use the spelling checker framework in your app, add a spelling checker service component including
the session object definition. You can also add to your app an optional activity that
controls settings. You must also add an XML metadata file that describes
- the spell checker service, and add the appropriate elements to your manifest file.
+ the spelling checker service, and add the appropriate elements to your manifest file.
</p>
<h3 id="SpellCheckCode">Spell checker classes</h3>
<p>
@@ -73,7 +73,7 @@ parent.link=../browser.html?tag=article
</dt>
<dd>
The {@link android.service.textservice.SpellCheckerService} implements both the
- {@link android.app.Service} class and the spell checker framework interface. Within your
+ {@link android.app.Service} class and the spelling checker framework interface. Within your
subclass, you must implement the following method:
<dl>
<dt>{@link android.service.textservice.SpellCheckerService#createSession()}</dt>
@@ -93,8 +93,8 @@ parent.link=../browser.html?tag=article
An implementation of {@link android.service.textservice.SpellCheckerService.Session}
</dt>
<dd>
- An object that the spell checker service provides to clients, to let them pass text to
- the spell checker and receive suggestions. Within this class, you must implement the
+ An object that the spelling checker service provides to clients, to let them pass text to
+ the spelling checker and receive suggestions. Within this class, you must implement the
following methods:
<dl>
<dt>
@@ -132,7 +132,7 @@ onGetSuggestionsMultiple()}, which handles batches of suggestion requests, or bo
</dl>
<p class="note">
<strong>Note:</strong> You must implement all aspects of spell checking as asynchronous and
- thread-safe. A spell checker may be called simultaneously by different threads running on
+ thread-safe. A spelling checker may be called simultaneously by different threads running on
different cores. The {@link android.service.textservice.SpellCheckerService} and
{@link android.service.textservice.SpellCheckerService.Session} take care of this
automatically.
@@ -140,7 +140,7 @@ onGetSuggestionsMultiple()}, which handles batches of suggestion requests, or bo
<h3 id="SpellCheckXML">Spell checker manifest and metadata</h3>
<p>
In addition to code, you need to provide the appropriate manifest file and a metadata file for
- the spell checker.
+ the spelling checker.
</p>
<p>
The manifest file defines the application, the service, and the activity for controlling
@@ -198,9 +198,9 @@ onGetSuggestionsMultiple()}, which handles batches of suggestion requests, or bo
&lt;/spell-checker&gt;
</pre>
<p>
- The metadata specifies the activity that the spell checker uses for controlling settings. It
- also defines subtypes for the spell checker; in this case, the subtypes define locales that
- the spell checker can handle.
+ The metadata specifies the activity that the spelling checker uses for controlling settings. It
+ also defines subtypes for the spelling checker; in this case, the subtypes define locales that
+ the spelling checker can handle.
</p>
@@ -208,7 +208,7 @@ onGetSuggestionsMultiple()}, which handles batches of suggestion requests, or bo
<h2 id="SpellCheckClient">Accessing the Spell Checker Service from a Client</h2>
<p>
Applications that use {@link android.widget.TextView} views automatically benefit from spell
- checking, because {@link android.widget.TextView} automatically uses a spell checker. The
+ checking, because {@link android.widget.TextView} automatically uses a spelling checker. The
following screenshots show this:
</p>
<img src="{@docRoot}resources/articles/images/textview_spellcheck_screenshot_1.png" alt=""
@@ -220,17 +220,17 @@ onGetSuggestionsMultiple()}, which handles batches of suggestion requests, or bo
<strong>Figure 2.</strong> Spell checking in TextView.
</p>
<p>
- However, you may want to interact directly with a spell checker service in other cases as well.
- The following diagram shows the flow of control for interacting with a spell checker service:
+ However, you may want to interact directly with a spelling checker service in other cases as well.
+ The following diagram shows the flow of control for interacting with a spelling checker service:
</p>
<img src="{@docRoot}resources/articles/images/spellcheck_client_flow.png" alt=""
height="394" id="figure3" />
<p class="img-caption">
- <strong>Figure 3.</strong> Interacting with a spell checker service.
+ <strong>Figure 3.</strong> Interacting with a spelling checker service.
</p>
<p>
The <a href="{@docRoot}resources/samples/SpellChecker/HelloSpellChecker/index.html">
- Spell Checker Client</a> sample app shows how to interact with a spell checker service. The
+ Spell Checker Client</a> sample app shows how to interact with a spelling checker service. The
LatinIME input method editor in the Android Open Source Project also contains an example of
spell checking.
</p> \ No newline at end of file
diff --git a/docs/html/guide/topics/ui/accessibility/apps.jd b/docs/html/guide/topics/ui/accessibility/apps.jd
index dc916385b5de..d23512b3e115 100644
--- a/docs/html/guide/topics/ui/accessibility/apps.jd
+++ b/docs/html/guide/topics/ui/accessibility/apps.jd
@@ -328,7 +328,7 @@ following approaches:</p>
<li>If your application targets Android 4.0 (API level 14) and higher, override and implement the
accessibility methods listed above directly in your custom view class.</li>
<li>If your custom view is intended to be compatible with Android 1.6 (API Level 4) and above, add
-the Android <a href="{@docRoot}sdk/compatibility-library.html">Support Library</a>, revision 5 or
+the Android <a href="{@docRoot}tools/extras/support-library.html">Support Library</a>, revision 5 or
higher, to your project. Then, within your custom view class, call the
{@link android.support.v4.view.ViewCompat#setAccessibilityDelegate
ViewCompat.setAccessibilityDelegate()} method to implement the accessibility methods
@@ -467,7 +467,7 @@ appropriate feedback to users.</p>
<p>The example code below shows how override these three methods by using
{@link android.support.v4.view.ViewCompat#setAccessibilityDelegate
ViewCompat.setAccessibilityDelegate()}. Note that this sample code requires that the Android
-<a href="{@docRoot}sdk/compatibility-library.html">Support Library</a> for API Level 4 (revision 5
+<a href="{@docRoot}tools/extras/support-library.html">Support Library</a> for API Level 4 (revision 5
or higher) is added to your project.</p>
<pre>
@@ -511,7 +511,7 @@ ViewCompat.setAccessibilityDelegate(new AccessibilityDelegateCompat() {
<p>On applications targeting Android 4.0 (API Level 14) and higher, these methods can be implemented
directly in your custom view class. For another example of this approach, see the Android
-<a href="{@docRoot}sdk/compatibility-library.html">Support Library</a> (revision 5 or higher) sample
+<a href="{@docRoot}tools/extras/support-library.html">Support Library</a> (revision 5 or higher) sample
{@code AccessibilityDelegateSupportActivity} in
({@code &lt;sdk&gt;/extras/android/support/v4/samples/Support4Demos/}).</p>
@@ -567,7 +567,7 @@ option is not available.</p>
<p>As part of your accessibility testing, you can test navigation of your application using focus,
even if your test devices does not have a directional controller. The <a
-href="{@docRoot}guide/developing/tools/emulator.html">Android Emulator</a> provides a
+href="{@docRoot}tools/help/emulator.html">Android Emulator</a> provides a
simulated directional controller that you can easily use to test navigation. You can also use a
software-based directional controller, such as the one provided by the
<a href="https://play.google.com/store/apps/details?id=com.googlecode.eyesfree.inputmethod.latin">
diff --git a/docs/html/guide/topics/ui/accessibility/index.jd b/docs/html/guide/topics/ui/accessibility/index.jd
index 414d5f3ec6e7..6fd71e2c9ad7 100644
--- a/docs/html/guide/topics/ui/accessibility/index.jd
+++ b/docs/html/guide/topics/ui/accessibility/index.jd
@@ -47,9 +47,9 @@ Accessible</a></strong>
<dd>Development practices and API features to ensure your application is accessible to users with
disabilities.</dd>
- <dt><strong><a href="{@docRoot}guide/topics/ui/accessibility/service.html">Building Accessibility
+ <dt><strong><a href="{@docRoot}guide/topics/ui/accessibility/services.html">Building Accessibility
Services</a></strong>
</dt>
<dd>How to use API features to build services that make other applications more accessible for
users.</dd>
-</dl> \ No newline at end of file
+</dl>
diff --git a/docs/html/guide/topics/ui/accessibility/services.jd b/docs/html/guide/topics/ui/accessibility/services.jd
index 0dad4ec5c851..0c1d06512128 100644
--- a/docs/html/guide/topics/ui/accessibility/services.jd
+++ b/docs/html/guide/topics/ui/accessibility/services.jd
@@ -50,7 +50,7 @@ accessibility service.</p>
Support Library was also updated with the release of Android 4.0 to provide support for these
enhanced accessibility features back to Android 1.6. Developers aiming for widely compatible
accessibility services are encouraged to use the
-<a href="{@docRoot}sdk/compatibility-library.html">Support Library</a> and develop for the more
+<a href="{@docRoot}tools/extras/support-library.html">Support Library</a> and develop for the more
advanced accessibility features introduced in Android 4.0.</p>
@@ -279,7 +279,7 @@ android.accessibilityservice.AccessibilityService} and can be used as a base for
accessibility services that are compatible with Android 1.6 (API Level 4) and higher.</li>
<li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/accessibility/TaskBackService.html">TaskBackService</a>
- This service is based on the enhanced accessibility APIs introduced in Android 4.0 (API Level
-14). However, you can use the Android <a href="{@docRoot}sdk/compatibility-library.html">Support
+14). However, you can use the Android <a href="{@docRoot}tools/extras/support-library.html">Support
Libary</a> to substitute classes introduced in later API levels (e.g.,
{@link android.view.accessibility.AccessibilityRecord},
{@link android.view.accessibility.AccessibilityNodeInfo}
diff --git a/docs/html/guide/topics/ui/actionbar.jd b/docs/html/guide/topics/ui/actionbar.jd
index bf7369adb21f..4842000fe238 100644
--- a/docs/html/guide/topics/ui/actionbar.jd
+++ b/docs/html/guide/topics/ui/actionbar.jd
@@ -6,13 +6,6 @@ parent.link=index.html
<div id="qv-wrapper">
<div id="qv">
- <h2>Quickview</h2>
- <ul>
- <li>A title bar that includes the application icon and activity title</li>
- <li>Provides access to menu items and navigation modes such as tabs</li>
- <li>Requires API level 11 or greater</li>
- </ul>
-
<h2>In this document</h2>
<ol>
<li><a href="#Adding">Adding the Action Bar</a>
@@ -102,7 +95,7 @@ navigation label, such as the currently selected tab.</p></li>
<li>Provide consistent navigation and view refinement across different applications.
<p>The action bar provides built-in tab navigation for switching between <a
-href="{@docRoot}guide/topics/fundamentals/fragments.html">fragments</a>. It also offers a drop-down
+href="{@docRoot}guide/components/fragments.html">fragments</a>. It also offers a drop-down
list you can use as an alternative navigation mode or to refine the current view (such as to sort
a list by different criteria).</p>
</li>
@@ -120,7 +113,7 @@ include a <em>Menu</em> button).</p>
</li>
</ul>
-<img src="{@docRoot}images/ui/actionbar.png" alt="" />
+<img src="{@docRoot}images/ui/actionbar.png" alt="" width="440" />
<p class="img-caption"><strong>Figure 1.</strong> Action bar from the <a
href="{@docRoot}resources/samples/HoneycombGallery/index.html">Honeycomb Gallery</a> app (on a
landscape handset), showing the logo on the left, navigation tabs, and an action item on the
@@ -510,7 +503,7 @@ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
</pre>
<p>For more information about these flags and other back stack behaviors, read the <a
-href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a>
+href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks and Back Stack</a>
developer guide.</p>
<p class="note"><strong>Note:</strong> If you're using the icon to navigate to the home
@@ -955,7 +948,7 @@ when the screen is too narrow, as shown in figures 9 and 10.</p>
<p>To switch between fragments using the tabs, you must perform a fragment
transaction each time a tab is selected. If you're not familiar with how to change fragments
using {@link android.app.FragmentTransaction}, first read the <a
-href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a> developer guide.</p>
+href="{@docRoot}guide/components/fragments.html">Fragments</a> developer guide.</p>
<p>To get started, your layout must include a {@link android.view.ViewGroup} in which you place each
{@link android.app.Fragment} associated with a tab. Be sure the {@link android.view.ViewGroup} has a
@@ -1092,7 +1085,7 @@ href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/Frag
<p>If your activity stops, you should retain the currently selected tab with the <a
-href="{@docRoot}guide/topics/fundamentals/activities.html#SavingActivityState">saved instance
+href="{@docRoot}guide/components/activities.html#SavingActivityState">saved instance
state</a> so you can open the appropriate tab when the user returns. When it's time to save the
state, you can query the currently selected tab with {@link
android.app.ActionBar#getSelectedNavigationIndex()}. This returns the index position of the selected
@@ -1101,7 +1094,7 @@ tab.</p>
<p class="caution"><strong>Caution:</strong> It's important that you save the state of each fragment
as necessary, so that when users switch fragments with the tabs and then return to a previous
fragment, it looks the way it did when they left. For information about saving the state of your
-fragment, see the <a href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a>
+fragment, see the <a href="{@docRoot}guide/components/fragments.html">Fragments</a>
developer guide.</p>
diff --git a/docs/html/guide/topics/ui/binding.jd b/docs/html/guide/topics/ui/binding.jd
index 26364ee8e4c9..e8b49d553ebc 100644
--- a/docs/html/guide/topics/ui/binding.jd
+++ b/docs/html/guide/topics/ui/binding.jd
@@ -1,4 +1,4 @@
-page.title=Binding to Data with AdapterView
+page.title=AdapterView
parent.title=User Interface
parent.link=index.html
@jd:body
@@ -20,32 +20,7 @@ parent.link=index.html
</div>
</div>
-<p>The {@link android.widget.AdapterView} is a ViewGroup subclass whose child Views are determined by an {@link android.widget.Adapter Adapter} that
-binds to data of some type. AdapterView is useful whenever you need to display stored data (as opposed to resource strings or drawables) in your layout.</p>
-<p>{@link android.widget.Gallery Gallery}, {@link android.widget.ListView ListView}, and {@link android.widget.Spinner Spinner} are examples of AdapterView subclasses that you can use to bind to a specific type of data and display it in a certain way. </p>
-
-
-<p>AdapterView objects have two main responsibilities: </p>
-<ul>
- <li>Filling the layout with data
- </li>
- <li>Handling user selections
- </li>
-</ul>
-
-
-<h2 id="FillingTheLayout">Filling the Layout with Data</h2>
-<p>Inserting data into the layout is typically done by binding the AdapterView class to an {@link
-android.widget.Adapter}, which retrieves data from an external source (perhaps a list that
-the code supplies or query results from the device's database). </p>
-<p>The following code sample does the following:</p>
-<ol>
- <li>Creates a {@link android.widget.Spinner Spinner} with an existing View and binds it to a new ArrayAdapter
-that reads an array of colors from the local resources.</li>
- <li>Creates another Spinner object from a View and binds it to a new SimpleCursorAdapter that will read
-people's names from the device contacts (see {@link android.provider.Contacts.People}).</li>
-</ol>
<pre>
// Get a Spinner and bind it to an ArrayAdapter that
diff --git a/docs/html/guide/topics/ui/controls.jd b/docs/html/guide/topics/ui/controls.jd
new file mode 100644
index 000000000000..83bb0c8e64fa
--- /dev/null
+++ b/docs/html/guide/topics/ui/controls.jd
@@ -0,0 +1,92 @@
+page.title=Input Controls
+parent.title=User Interface
+parent.link=index.html
+@jd:body
+
+<div class="figure" style="margin:0">
+ <img src="{@docRoot}images/ui/ui-controls.png" alt="" style="margin:0" />
+</div>
+
+<p>Input controls are the interactive components in your app's user interface. Android provides a
+wide variety of controls you can use in your UI, such as buttons, text fields, seek bars,
+checkboxes, zoom buttons, toggle buttons, and many more.</p>
+
+<p>Adding an input control to your UI is as simple as adding an XML element to your <a
+href="{@docRoot}guide/topics/ui/declaring-layout.html">XML layout</a>. For example, here's a
+layout with a text field and button:</p>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?>
+&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="horizontal">
+ &lt;EditText android:id="@+id/edit_message"
+ android:layout_weight="1"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:hint="@string/edit_message" />
+ &lt;Button android:id="@+id/button_send"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/button_send"
+ android:onClick="sendMessage" />
+&lt;/LinearLayout>
+</pre>
+
+<p>Each input control supports a specific set of input events so you can handle events such as when
+the user enters text or touches a button.</p>
+
+
+<h2 id="CommonControls">Common Controls</h2>
+<p>Here's a list of some common controls that you can use in your app. Follow the links to learn
+more about using each one.</p>
+
+<p class="note"><strong>Note:</strong> Android provides several more controls than are listed
+here. Browse the {@link android.widget} package to discover more. If your app requires a
+specific kind of input control, you can build your own <a
+href="{@docRoot}guide/topics/ui/custom-components.html">custom components</a>.</p>
+
+<table>
+ <tr>
+ <th scope="col">Control Type</th>
+ <th scope="col">Description</th>
+ <th scope="col">Related Classes</th>
+ </tr>
+ <tr>
+ <td><a href="controls/button.html">Button</a></td>
+ <td>A push-button that can be pressed, or clicked, by the user to perform an action.</td>
+ <td>{@link android.widget.Button Button} </td>
+ </tr>
+ <tr>
+ <td><a href="controls/text.html">Text field</a></td>
+ <td>An editable text field. You can use the <code>AutoCompleteTextView</code> widget to create a text entry widget that provides auto-complete suggestions</td>
+ <td>{@link android.widget.EditText EditText}, {@link android.widget.AutoCompleteTextView}</td>
+ </tr>
+ <tr>
+ <td><a href="controls/checkbox.html">Checkbox</a></td>
+ <td>An on/off switch that can be toggled by the user. You should use checkboxes when presenting users with a group of selectable options that are not mutually exclusive.</td>
+ <td>{@link android.widget.CheckBox CheckBox} </td>
+ </tr>
+ <tr>
+ <td><a href="controls/radiobutton.html">Radio button</a></td>
+ <td>Similar to checkboxes, except that only one option can be selected in the group.</td>
+ <td>{@link android.widget.RadioGroup RadioGroup}
+ <br>{@link android.widget.RadioButton RadioButton} </td>
+ </tr>
+ <tr>
+ <td><a href="controls/togglebutton.html" style="white-space:nowrap">Toggle button</a></td>
+ <td>An on/off button with a light indicator.</td>
+ <td>{@link android.widget.ToggleButton ToggleButton} </td>
+ </tr>
+ <tr>
+ <td><a href="controls/spinner.html">Spinner</a></td>
+ <td>A drop-down list that allows users to select one value from a set.</td>
+ <td>{@link android.widget.Spinner Spinner} </td>
+ </tr>
+ <tr>
+ <td><a href="controls/pickers.html">Pickers</a></td>
+ <td>A dialog for users to select a single value for a set by using up/down buttons or via a swipe gesture. Use a <code>DatePicker</code>code> widget to enter the values for the date (month, day, year) or a <code>TimePicker</code> widget to enter the values for a time (hour, minute, AM/PM), which will be formatted automatically for the user's locale.</td>
+ <td>{@link android.widget.DatePicker}, {@link android.widget.TimePicker}</td>
+ </tr>
+</table>
diff --git a/docs/html/guide/topics/ui/controls/button.jd b/docs/html/guide/topics/ui/controls/button.jd
new file mode 100644
index 000000000000..8d48e9cb5dac
--- /dev/null
+++ b/docs/html/guide/topics/ui/controls/button.jd
@@ -0,0 +1,245 @@
+page.title=Buttons
+parent.title=Input Controls
+parent.link=../controls.html
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+<ol>
+ <li><a href="#HandlingEvents">Responding to Click Events</a>
+ <ol>
+ <li><a href="#ClickListener">Using an OnClickListener</a></li>
+ </ol>
+ </li>
+ <li><a href="#Style">Styling Your Button</a>
+ <ol>
+ <li><a href="#Borderless">Borderless button</a></li>
+ <li><a href="#CustomBackground">Custom background</a></li>
+ </ol>
+ </li>
+</ol>
+ <h2>Key classes</h2>
+ <ol>
+ <li>{@link android.widget.Button}</li>
+ <li>{@link android.widget.ImageButton}</li>
+ </ol>
+</div>
+</div>
+
+
+<p>A button consists of text or an icon (or both text and an icon) that communicates what action
+occurs when the user touches it.</p>
+
+<img src="{@docRoot}images/ui/button-types.png" alt="" />
+
+<p>Depending on whether you want a button with text, an icon, or both, you can create the
+button in your layout in three ways:</p>
+<ul>
+ <li>With text, using the {@link android.widget.Button} class:
+<pre>
+&lt;Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/button_text"
+ ... />
+</pre>
+ </li>
+ <li>With an icon, using the {@link android.widget.ImageButton} class:
+<pre>
+&lt;ImageButton
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/button_icon"
+ ... />
+</pre>
+ </li>
+ <li>With text and an icon, using the {@link android.widget.Button} class with the <a
+href="{@docRoot}reference/android/widget/TextView.html#attr_android:drawableLeft">{@code
+android:drawableLeft}</a> attribute:
+<pre>
+&lt;Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/button_text"
+ android:drawableLeft="@drawable/button_icon"
+ ... />
+</pre>
+</li>
+</ul>
+
+<h2 id="HandlingEvents">Responding to Click Events</h2>
+
+<p>When the user clicks a button, the {@link android.widget.Button} object receives
+an on-click event.</p>
+
+<p>To define the click event handler for a button, add the {@link
+android.R.attr#onClick android:onClick} attribute to the {@code &lt;Button&gt;} element in your XML
+layout. The value for this attribute must be the name of the method you want to call in response
+to a click event. The {@link android.app.Activity} hosting the layout must then implement the
+corresponding method.</p>
+
+<p>For example, here's a layout with a button using {@link
+android.R.attr#onClick android:onClick}:</p>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?>
+&lt;Button xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/button_send"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/button_send"
+ android:onClick="sendMessage" />
+</pre>
+
+<p>Within the {@link android.app.Activity} that hosts this layout, the following method handles
+the click event:</p>
+
+<pre>
+/** Called when the user touches the button */
+public void sendMessage(View view) {
+ // Do something in response to button click
+}
+</pre>
+
+<p>The method you declare in the {@link android.R.attr#onClick android:onClick} attribute must have
+a signature exactly as shown above. Specifically, the method must:</p>
+<ul>
+ <li>Be public</li>
+ <li>Return void</li>
+ <li>Define a {@link android.view.View} as its only parameter (this will be the {@link
+android.view.View} that was clicked)</li>
+</ul>
+
+
+<h3 id="ClickListener">Using an OnClickListener</h3>
+
+<p>You can also declare the click event handler pragmatically rather than in an XML layout. This
+might be necessary if you instantiate the {@link android.widget.Button} at runtime or you need to
+declare the click behavior in a {@link android.app.Fragment} subclass.</p>
+
+<p>To declare the event handler programmatically, create an {@link
+android.view.View.OnClickListener} object and assign it to the button by calling {@link
+android.view.View#setOnClickListener}. For example:</p>
+
+<pre>
+Button button = (Button) findViewById(R.id.button_send);
+button.setOnClickListener(new View.OnClickListener() {
+ public void onClick(View v) {
+ // Do something in response to button click
+ }
+});
+</pre>
+
+
+<h2 id="Style">Styling Your Button</h2>
+
+<p>The appearance of your button (background image and font) may vary from one device to
+another, because devices by different manufacturers often have different default styles for
+input controls.</p>
+
+<p>You can control exactly how your controls are styled using a theme that you apply to your
+entire application. For instance, to ensure that all devices running Android 4.0 and higher use
+the Holo theme in your app, declare {@code android:theme="@android:style/Theme.Holo"} in your
+manifest's {@code &lt;application&gt;} element. Also read the blog post, <a
+href="http://android-developers.blogspot.com/2012/01/holo-everywhere.html">Holo Everywhere</a>
+for information about using the Holo theme while supporting older devices.</p>
+
+<p>To customize individual buttons with a different background, specify the {@link
+android.R.attr#background android:background} attribute with a drawable or color resource.
+Alternatively, you can apply a <em>style</em> for the button, which works in a manner similar to
+HTML styles to define multiple style properties such as the background, font, size, and others.
+For more information about applying styles, see <a
+href="{@docRoot}guide/topics/ui/themes.html">Styles and Themes</a>.</p>
+
+
+<h3 id="Borderless">Borderless button</h3>
+
+<p>One design that can be useful is a "borderless" button. Borderless buttons resemble
+basic buttons except that they have no borders or background but still change appearance during
+different states, such as when clicked.</p>
+
+<p>To create a borderless button, apply the {@link android.R.attr#borderlessButtonStyle}
+style to the button. For example:</p>
+
+<pre>
+&lt;Button
+ android:id="@+id/button_send"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/button_send"
+ android:onClick="sendMessage"
+ style="?android:attr/borderlessButtonStyle" />
+</pre>
+
+
+
+<h3 id="CustomBackground">Custom background</h3>
+
+<p>If you want to truly redefine the appearance of your button, you can specify a custom
+background. Instead of supplying a simple bitmap or color, however, your background should be a
+state list resource that changes appearance depending on the button's current state.</p>
+
+<p>You can define the state list in an XML file that defines three different images or colors to use
+for the different button states.</p>
+
+<p>To create a state list drawable for your button background:</p>
+
+<ol>
+ <li>Create three bitmaps for the button background that represent the default, pressed, and
+focused button states.
+ <p>To ensure that your images fit buttons of various sizes, create the bitmaps as <a
+href="{@docRoot}guide/topics/graphics/2d-graphics.html#nine-patch">Nine-patch</a> bitmaps.</p>
+ </li>
+ <li>Place the bitmaps into the <code>res/drawable/</code> directory of
+your project. Be sure each bitmap is named properly to reflect the button state that they each
+represent, such as {@code button_default.9.png}, {@code button_pressed.9.png}, and {@code
+button_focused.9.png}.</li>
+ <li>Create a new XML file in the <code>res/drawable/</code> directory (name it something like
+<code>button_custom.xml</code>). Insert the following XML:
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?>
+&lt;selector xmlns:android="http://schemas.android.com/apk/res/android">
+ &lt;item android:drawable="@drawable/button_pressed"
+ android:state_pressed="true" />
+ &lt;item android:drawable="@drawable/button_focused"
+ android:state_focused="true" />
+ &lt;item android:drawable="@drawable/button_default" />
+&lt;/selector>
+</pre>
+ <p>This defines a single drawable resource, which will change its image based on the current
+state of the button.</p>
+<ul>
+ <li>The first <code>&lt;item></code> defines the bitmap to use when the button is
+pressed (activated).</li>
+ <li>The second <code>&lt;item></code> defines the bitmap to use when the button is
+focused (when the button is highlighted using the trackball or directional
+pad).</li>
+ <li>The third <code>&lt;item></code> defines the bitmap to use when the button is in the
+default state (it's neither pressed nor focused).</li>
+</ul>
+ <p class="note"><strong>Note:</strong> The order of the <code>&lt;item></code> elements is
+important. When this drawable is referenced, the <code>&lt;item></code> elements are traversed
+in-order to determine which one is appropriate for the current button state. Because the default
+bitmap is last, it is only applied when the conditions <code>android:state_pressed</code> and
+<code>android:state_focused</code> have both evaluated as false.</p>
+ <p>This XML file now represents a single
+drawable resource and when referenced by a {@link android.widget.Button} for its background,
+the image displayed will change based on these three states.</p>
+</li>
+ <li>Then simply apply the drawable XML file as the button background:
+<pre>
+&lt;Button
+ android:id="@+id/button_send"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/button_send"
+ android:onClick="sendMessage"
+ android:background="@drawable/button_custom" />
+</pre>
+</ol>
+
+ <p>For more information about this XML syntax, including how to define a disabled, hovered, or
+other button states, read about <a
+href="{@docRoot}guide/topics/resources/drawable-resource.html#StateList">State List
+Drawable</a>.</p> \ No newline at end of file
diff --git a/docs/html/guide/topics/ui/controls/checkbox.jd b/docs/html/guide/topics/ui/controls/checkbox.jd
new file mode 100644
index 000000000000..35b8f560b15c
--- /dev/null
+++ b/docs/html/guide/topics/ui/controls/checkbox.jd
@@ -0,0 +1,101 @@
+page.title=Checkboxes
+parent.title=Input Controls
+parent.link=../controls.html
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+<ol>
+ <li><a href="#HandlingEvents">Responding to Click Events</a></li>
+</ol>
+
+<h2>Key classes</h2>
+<ol>
+ <li>{@link android.widget.CheckBox}</li>
+</ol>
+</div>
+</div>
+
+<p>Checkboxes allow the user to select one or more options from a set. Typically, you should
+present each checkbox option in a vertical list.</p>
+
+<img src="{@docRoot}images/ui/checkboxes.png" alt="" />
+
+<p>To create each checkbox option, create a {@link android.widget.CheckBox} in your layout. Because
+a set of checkbox options allows the user to select multiple items, each checkbox is managed
+separately and you must register a click listener for each one.</p>
+
+<h2 id="HandlingEvents">Responding to Click Events</h2>
+
+<p>When the user selects a checkbox, the {@link android.widget.CheckBox} object receives an
+on-click event.</p>
+
+<p>To define the click event handler for a checkbox, add the <code><a
+href="/reference/android/R.attr.html#onClick">android:onClick</a></code> attribute to the
+<code>&lt;CheckBox&gt;</code> element in your XML
+layout. The value for this attribute must be the name of the method you want to call in response
+to a click event. The {@link android.app.Activity} hosting the layout must then implement the
+corresponding method.</p>
+
+<p>For example, here are a couple {@link android.widget.CheckBox} objects in a list:</p>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?>
+&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+ &lt;CheckBox android:id="&#64;+id/checkbox_meat"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="&#64;string/meat"
+ android:onClick="onCheckboxClicked"/>
+ &lt;CheckBox android:id="&#64;+id/checkbox_cheese"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="&#64;string/cheese"
+ android:onClick="onCheckboxClicked"/>
+&lt;/LinearLayout>
+</pre>
+
+<p>Within the {@link android.app.Activity} that hosts this layout, the following method handles the
+click event for both checkboxes:</p>
+
+<pre>
+public void onCheckboxClicked(View view) {
+ // Is the view now checked?
+ boolean checked = (CheckBox) view).isChecked();
+
+ // Check which checkbox was clicked
+ switch(view.getId()) {
+ case R.id.checkbox_meat:
+ if (checked)
+ // Put some meat on the sandwich
+ else
+ // Remove the meat
+ break;
+ case R.id.checkbox_cheese:
+ if (checked)
+ // Cheese me
+ else
+ // I'm lactose intolerant
+ break;
+ // TODO: Veggie sandwich
+ }
+}
+</pre>
+
+<p>The method you declare in the {@link android.R.attr#onClick android:onClick} attribute
+must have a signature exactly as shown above. Specifically, the method must:</p>
+<ul>
+ <li>Be public</li>
+ <li>Return void</li>
+ <li>Define a {@link android.view.View} as its only parameter (this will be the {@link
+android.view.View} that was clicked)</li>
+</ul>
+
+<p class="note"><strong>Tip:</strong> If you need to change the radio button state
+yourself (such as when loading a saved {@link android.preference.CheckBoxPreference}),
+use the {@link android.widget.CompoundButton#setChecked(boolean)} or {@link
+android.widget.CompoundButton#toggle()} method.</p> \ No newline at end of file
diff --git a/docs/html/guide/topics/ui/controls/pickers.jd b/docs/html/guide/topics/ui/controls/pickers.jd
new file mode 100644
index 000000000000..cf90f1d6d482
--- /dev/null
+++ b/docs/html/guide/topics/ui/controls/pickers.jd
@@ -0,0 +1,259 @@
+page.title= Pickers
+parent.title=Form Controls
+parent.link=controls-form.html
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+<ol>
+ <li><a href="#TimePicker">Creating a Time Picker</a>
+ <ol>
+ <li><a href="#TimePickerFragment">Extending DialogFragment for a time picker</a></li>
+ <li><a href="#ShowingTheTimePicker">Showing the time picker</a></li>
+ </ol>
+ </li>
+ <li><a href="#DatePicker">Creating a Date Picker</a>
+ <ol>
+ <li><a href="#DatePickerFragment">Extending DialogFragment for a date picker</a></li>
+ <li><a href="#ShowingTheDatePicker">Showing the date picker</a></li>
+ </ol>
+ </li>
+</ol>
+ <h2>Key classes</h2>
+ <ol>
+ <li>{@link android.app.DatePickerDialog}</li>
+ <li>{@link android.app.TimePickerDialog}</li>
+ <li>{@link android.support.v4.app.DialogFragment}</li>
+ </ol>
+ <h2>See also</h2>
+ <ol>
+ <li><a href="{@docRoot}guide/components/fragments.html">Fragments</a></li>
+ </ol>
+</div>
+</div>
+
+<p>Android provides controls for the user to pick a time or pick a date as ready-to-use dialogs.
+Each picker provides controls for selecting each part of the time (hour, minute, AM/PM) or date
+(month, day, year). Using these pickers helps ensure that your users can pick a time or date that
+is valid, formatted correctly, and adjusted to the user's locale.</p>
+
+<img src="{@docRoot}images/ui/pickers.png" alt="" />
+
+<p>We recommend that you use {@link android.support.v4.app.DialogFragment} to host each time or date
+picker. The {@link android.support.v4.app.DialogFragment} manages the dialog lifecycle for you and
+allows you to display the pickers in different layout configurations,
+such as in a basic dialog on handsets or as an embedded part of the layout on large screens.</p>
+
+<p>Although {@link android.app.DialogFragment} was first added to the platform in Android 3.0 (API
+level 11), if your app supports versions of Android older than 3.0&mdash;even as low as Android
+1.6&mdash;you can use the {@link android.support.v4.app.DialogFragment} class that's available in
+the <a href="{@docRoot}tools/extras/support-library.html">support library</a> for backward
+compatibility.</p>
+
+<p class="note"><strong>Note:</strong> The code samples below show how to create dialogs for a time
+picker and date picker using the <a href="{@docRoot}tools/extras/support-library.html">support
+library</a> APIs for {@link android.support.v4.app.DialogFragment}. If your app's <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a> is 11 or
+higher, you can instead use the platform version of {@link android.app.DialogFragment}.</p>
+
+
+
+<h2 id="TimePicker">Creating a Time Picker</h2>
+
+<p>To display a {@link android.app.TimePickerDialog} using {@link
+android.support.v4.app.DialogFragment}, you need to define a fragment class that extends {@link
+android.support.v4.app.DialogFragment} and return a {@link android.app.TimePickerDialog} from the
+fragment's {@link android.support.v4.app.DialogFragment#onCreateDialog onCreateDialog()} method.</p>
+
+<p class="note"><strong>Note:</strong> If your app supports versions of Android older than 3.0,
+be sure you've set up your Android project with the support library as described in <a
+href="{@docRoot}tools/extras/support-library.html#SettingUp">Setting Up a Project to Use a
+Library</a>.</p>
+
+<h3 id="TimePickerFragment">Extending DialogFragment for a time picker</h3>
+
+<p>To define a {@link
+android.support.v4.app.DialogFragment} for a {@link android.app.TimePickerDialog}, you
+must:</p>
+<ul>
+ <li>Define the {@link android.support.v4.app.DialogFragment#onCreateDialog onCreateDialog()}
+method to return an instance of {@link android.app.TimePickerDialog}</li>
+ <li>Implement the
+{@link android.app.TimePickerDialog.OnTimeSetListener} interface to receive a callback when the user
+sets the time.</li>
+</ul>
+
+<p>Here's an example:</p>
+
+<pre>
+public static class TimePickerFragment extends DialogFragment
+ implements TimePickerDialog.OnTimeSetListener {
+
+ &#64;Override
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ // Use the current time as the default values for the picker
+ final Calendar c = Calendar.getInstance();
+ int hour = c.get(Calendar.HOUR_OF_DAY);
+ int minute = c.get(Calendar.MINUTE);
+
+ // Create a new instance of TimePickerDialog and return it
+ return new TimePickerDialog(getActivity(), this, hour, minute,
+ DateFormat.is24HourFormat(getActivity()));
+ }
+
+ public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
+ // Do something with the time chosen by the user
+ }
+}
+</pre>
+
+<p>See the {@link android.app.TimePickerDialog} class for information about the constructor
+arguments.</p>
+
+<p>Now all you need is an event that adds an instance of this fragment to your activity.</p>
+
+
+<h3 id="ShowingTheTimePicker">Showing the time picker</h3>
+
+<p>Once you've defined a {@link android.support.v4.app.DialogFragment} like the one shown above,
+you can display the time picker by creating an instance of the {@link
+android.support.v4.app.DialogFragment} and calling {@link
+android.support.v4.app.DialogFragment#show show()}.</p>
+
+<p>For example, here's a button that, when clicked, calls a method to show the dialog:</p>
+
+<pre>
+&lt;Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/pick_time"
+ android:onClick="showTimePickerDialog" />
+</pre>
+
+<p>When the user clicks this button, the system calls the following method:</p>
+
+<pre>
+public void showTimePickerDialog(View v) {
+ DialogFragment newFragment = new TimePickerFragment();
+ newFragment.show(getSupportFragmentManager(), "timePicker");
+}
+</pre>
+
+<p>This method calls {@link
+android.support.v4.app.DialogFragment#show show()} on a new instance of the {@link
+android.support.v4.app.DialogFragment} defined above. The {@link
+android.support.v4.app.DialogFragment#show show()} method requires an instance of {@link
+android.support.v4.app.FragmentManager} and a unique tag name for the fragment.</p>
+
+<p class="caution"><strong>Caution:</strong> If your app supports versions of Android lower than
+3.0, be sure that you call {@link
+android.support.v4.app.FragmentActivity#getSupportFragmentManager()} to acquire an instance of
+{@link android.support.v4.app.FragmentManager}. Also make sure that your activity that displays the
+time picker extends {@link android.support.v4.app.FragmentActivity} instead of the standard {@link
+android.app.Activity} class.</p>
+
+
+
+
+
+
+
+
+
+<h2 id="DatePicker">Creating a Date Picker</h2>
+
+<p>Creating a {@link android.app.DatePickerDialog} is just like creating a {@link
+android.app.TimePickerDialog}. The only difference is the dialog you create for the fragment.</p>
+
+<p>To display a {@link android.app.DatePickerDialog} using {@link
+android.support.v4.app.DialogFragment}, you need to define a fragment class that extends {@link
+android.support.v4.app.DialogFragment} and return a {@link android.app.DatePickerDialog} from the
+fragment's {@link android.support.v4.app.DialogFragment#onCreateDialog onCreateDialog()} method.</p>
+
+<p class="note"><strong>Note:</strong> If your app supports versions of Android older than 3.0,
+be sure you've set up your Android project with the support library as described in <a
+href="{@docRoot}tools/extras/support-library.html#SettingUp">Setting Up a Project to Use a
+Library</a>.</p>
+
+<h3 id="DatePickerFragment">Extending DialogFragment for a date picker</h3>
+
+<p>To define a {@link
+android.support.v4.app.DialogFragment} for a {@link android.app.DatePickerDialog}, you
+must:</p>
+<ul>
+ <li>Define the {@link android.support.v4.app.DialogFragment#onCreateDialog onCreateDialog()}
+method to return an instance of {@link android.app.DatePickerDialog}</li>
+ <li>Implement the
+{@link android.app.DatePickerDialog.OnDateSetListener} interface to receive a callback when the user
+sets the date.</li>
+</ul>
+
+<p>Here's an example:</p>
+
+<pre>
+public static class DatePickerFragment extends DialogFragment
+ implements DatePickerDialog.OnDateSetListener {
+
+ &#64;Override
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ // Use the current date as the default date in the picker
+ final Calendar c = Calendar.getInstance();
+ int year = c.get(Calendar.YEAR);
+ int month = c.get(Calendar.MONTH);
+ int day = c.get(Calendar.DAY_OF_MONTH);
+
+ // Create a new instance of DatePickerDialog and return it
+ return new DatePickerDialog(getActivity(), this, year, month, day);
+ }
+
+ public void onDateSet(DatePicker view, int year, int month, int day) {
+ // Do something with the date chosen by the user
+ }
+}
+</pre>
+
+<p>See the {@link android.app.DatePickerDialog} class for information about the constructor
+arguments.</p>
+
+<p>Now all you need is an event that adds an instance of this fragment to your activity.</p>
+
+
+<h3 id="ShowingTheDatePicker">Showing the date picker</h3>
+
+<p>Once you've defined a {@link android.support.v4.app.DialogFragment} like the one shown above,
+you can display the date picker by creating an instance of the {@link
+android.support.v4.app.DialogFragment} and calling {@link
+android.support.v4.app.DialogFragment#show show()}.</p>
+
+<p>For example, here's a button that, when clicked, calls a method to show the dialog:</p>
+
+<pre>
+&lt;Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/pick_date"
+ android:onClick="showDatePickerDialog" />
+</pre>
+
+<p>When the user clicks this button, the system calls the following method:</p>
+
+<pre>
+public void showDatePickerDialog(View v) {
+ DialogFragment newFragment = new DatePickerFragment();
+ newFragment.show(getSupportFragmentManager(), "datePicker");
+}
+</pre>
+
+<p>This method calls {@link
+android.support.v4.app.DialogFragment#show show()} on a new instance of the {@link
+android.support.v4.app.DialogFragment} defined above. The {@link
+android.support.v4.app.DialogFragment#show show()} method requires an instance of {@link
+android.support.v4.app.FragmentManager} and a unique tag name for the fragment.</p>
+
+<p class="caution"><strong>Caution:</strong> If your app supports versions of Android lower than
+3.0, be sure that you call {@link
+android.support.v4.app.FragmentActivity#getSupportFragmentManager()} to acquire an instance of
+{@link android.support.v4.app.FragmentManager}. Also make sure that your activity that displays the
+time picker extends {@link android.support.v4.app.FragmentActivity} instead of the standard {@link
+android.app.Activity} class.</p>
diff --git a/docs/html/guide/topics/ui/controls/radiobutton.jd b/docs/html/guide/topics/ui/controls/radiobutton.jd
new file mode 100644
index 000000000000..f6f6d49f7294
--- /dev/null
+++ b/docs/html/guide/topics/ui/controls/radiobutton.jd
@@ -0,0 +1,103 @@
+page.title=Radio Buttons
+parent.title=Input Controls
+parent.link=../controls.html
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+<ol>
+ <li><a href="#HandlingEvents">Responding to Click Events</a></li>
+</ol>
+
+<h2>Key classes</h2>
+<ol>
+ <li>{@link android.widget.RadioButton}</li>
+ <li>{@link android.widget.RadioGroup}</li>
+</ol>
+</div>
+</div>
+
+<p>Radio buttons allow the user to select one option from a set. You should use radio buttons for
+optional sets that are mutually exclusive if you think that the user needs to see all available
+options side-by-side. If it's not necessary to show all options side-by-side, use a <a
+href="{@docRoot}guide/topics/ui/controls/spinner.html">spinner</a> instead.</p>
+
+<img src="{@docRoot}images/ui/radiobuttons.png" alt="" />
+
+<p>To create each radio button option, create a {@link android.widget.RadioButton} in your layout.
+However, because radio buttons are mutually exclusive, you must group them together inside a
+{@link android.widget.RadioGroup}. By grouping them together, the system ensures that only one
+radio button can be selected at a time.</p>
+
+<h2 id="HandlingEvents">Responding to Click Events</h2>
+
+<p>When the user selects one of the radio buttons, the corresponding {@link
+android.widget.RadioButton} object receives an on-click event.</p>
+
+<p>To define the click event handler for a button, add the <code><a
+href="/reference/android/R.attr.html#onClick">android:onClick</a></code> attribute to the
+<code>&lt;RadioButton&gt;</code> element in your XML
+layout. The value for this attribute must be the name of the method you want to call in response
+to a click event. The {@link android.app.Activity} hosting the layout must then implement the
+corresponding method.</p>
+
+<p>For example, here are a couple {@link android.widget.RadioButton} objects:</p>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?>
+&lt;RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+ &lt;RadioButton android:id="@+id/radio_pirates"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/pirates"
+ android:onClick="onRadioButtonClicked"/>
+ &lt;RadioButton android:id="@+id/radio_ninjas"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/ninjas"
+ android:onClick="onRadioButtonClicked"/>
+&lt;/RadioGroup>
+</pre>
+
+<p class="note"><strong>Note:</strong> The {@link android.widget.RadioGroup} is a subclass of
+{@link android.widget.LinearLayout} that has a vertical orientation by default.</p>
+
+<p>Within the {@link android.app.Activity} that hosts this layout, the following method handles the
+click event for both radio buttons:</p>
+
+<pre>
+public void onRadioButtonClicked(View view) {
+ // Is the button now checked?
+ boolean checked = (RadioButton) view).isChecked();
+
+ // Check which radio button was clicked
+ switch(view.getId()) {
+ case R.id.radio_pirates:
+ if (checked)
+ // Pirates are the best
+ break;
+ case R.id.radio_ninjas:
+ if (checked)
+ // Ninjas rule
+ break;
+ }
+}
+</pre>
+
+<p>The method you declare in the {@link android.R.attr#onClick android:onClick} attribute
+must have a signature exactly as shown above. Specifically, the method must:</p>
+<ul>
+ <li>Be public</li>
+ <li>Return void</li>
+ <li>Define a {@link android.view.View} as its only parameter (this will be the {@link
+android.view.View} that was clicked)</li>
+</ul>
+
+<p class="note"><strong>Tip:</strong> If you need to change the radio button state
+yourself (such as when loading a saved {@link android.preference.CheckBoxPreference}),
+use the {@link android.widget.CompoundButton#setChecked(boolean)} or {@link
+android.widget.CompoundButton#toggle()} method.</p>
diff --git a/docs/html/guide/topics/ui/controls/spinner.jd b/docs/html/guide/topics/ui/controls/spinner.jd
new file mode 100644
index 000000000000..deba3e609469
--- /dev/null
+++ b/docs/html/guide/topics/ui/controls/spinner.jd
@@ -0,0 +1,147 @@
+page.title= Spinners
+parent.title=Input Controls
+parent.link=../controls.html
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+ <li><a href="#Populate">Populate the Spinner with User Choices</a></li>
+ <li><a href="#SelectListener">Responding to User Selections</a></li>
+</ol>
+<h2>Key classes</h2>
+<ol>
+ <li>{@link android.widget.Spinner}</li>
+ <li>{@link android.widget.SpinnerAdapter}</li>
+ <li>{@link android.widget.AdapterView.OnItemSelectedListener}</li>
+</ol>
+
+</div>
+</div>
+
+<p>Spinners provide a quick way to select one value from a set. In the default state, a spinner
+shows its currently selected value. Touching the spinner displays a dropdown menu with all other
+available values, from which the user can select a new one.</p>
+
+<img src="{@docRoot}images/ui/spinner.png" alt="" />
+
+<p>You can add a spinner to your layout with the {@link android.widget.Spinner} object. You
+should usually do so in your XML layout with a {@code &lt;Spinner&gt;} element. For example:</p>
+
+<pre>
+&lt;Spinner
+ android:id="@+id/planets_spinner"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content" />
+</pre>
+
+<p>To populate the spinner with a list of choices, you then need to specify a {@link
+android.widget.SpinnerAdapter} in your {@link android.app.Activity} or {@link android.app.Fragment}
+source code.</p>
+
+<h2 id="Populate">Populate the Spinner with User Choices</h2>
+
+<p>The choices you provide for the spinner can come from any source, but must be provided through
+an {@link android.widget.SpinnerAdapter}, such as an {@link android.widget.ArrayAdapter} if the
+choices are available in an array or a {@link android.widget.CursorAdapter} if the choices are
+available from a database query.</p>
+
+<p>For instance, if the available choices for your spinner are pre-determined, you can provide
+them with a string array defined in a <a
+href="{@docRoot}guide/topics/resources/string-resource.html">string
+resource file</a>:</p>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?>
+&lt;resources>
+ &lt;string-array name="planets_array">
+ &lt;item>Mercury&lt;/item>
+ &lt;item>Venus&lt;/item>
+ &lt;item>Earth&lt;/item>
+ &lt;item>Mars&lt;/item>
+ &lt;item>Jupiter&lt;/item>
+ &lt;item>Saturn&lt;/item>
+ &lt;item>Uranus&lt;/item>
+ &lt;item>Neptune&lt;/item>
+ &lt;/string-array>
+&lt;/resources>
+</pre>
+
+ <p>With an array such as this one, you can use the following code in your {@link
+android.app.Activity} or {@link android.app.Fragment} to supply the spinner with the array using
+an instance of {@link android.widget.ArrayAdapter}:
+
+<pre>
+Spinner spinner = (Spinner) findViewById(R.id.spinner);
+// Create an ArrayAdapter using the string array and a default spinner layout
+ArrayAdapter&lt;CharSequence> adapter = ArrayAdapter.createFromResource(this,
+ R.array.planets_array, android.R.layout.simple_spinner_item);
+// Specify the layout to use when the list of choices appears
+adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+// Apply the adapter to the spinner
+spinner.setAdapter(adapter);
+</pre>
+
+<p>The {@link
+android.widget.ArrayAdapter#createFromResource(Context,int,int) createFromResource()} method allows
+you to create an {@link android.widget.ArrayAdapter} from the string array. The third argument for
+this method is a layout resource that defines how the selected choice appears in the
+spinner control. The {@link android.R.layout#simple_spinner_item} layout is provided by the
+platform and is the default layout you should use unless you'd like to define your own layout
+for the spinner's appearance.</p>
+
+<p>You should then call {@link android.widget.ArrayAdapter#setDropDownViewResource(int)} to specify
+the layout the adapter should use to display the list of spinner choices ({@link
+android.R.layout#simple_spinner_dropdown_item} is another standard layout defined by the
+platform).</p>
+
+<p>Call {@link android.widget.AdapterView#setAdapter setAdapter()} to apply the adapter to your
+{@link android.widget.Spinner}.</p>
+
+
+<h2 id="SelectListener">Responding to User Selections</h2>
+
+<p>When the user selects an item from the drop-down, the {@link android.widget.Spinner} object
+receives an on-item-selected event.</p>
+
+<p>To define the selection event handler for a spinner, implement the {@link
+android.widget.AdapterView.OnItemSelectedListener} interface and the corresponding {@link
+android.widget.AdapterView.OnItemSelectedListener#onItemSelected onItemSelected()} callback method.
+For example, here's an implementation of the interface in an {@link android.app.Activity}:</p>
+
+<pre>
+public class SpinnerActivity extends Activity implements OnItemSelectedListener {
+ ...
+
+ public void onItemSelected(AdapterView&lt;?> parent, View view,
+ int pos, long id) {
+ // An item was selected. You can retrieve the selected item using
+ // parent.getItemAtPosition(pos)
+ }
+
+ public void onNothingSelected(AdapterView&lt;?> parent) {
+ // Another interface callback
+ }
+}
+</pre>
+
+<p>The {@link android.widget.AdapterView.OnItemSelectedListener} requires the {@link
+android.widget.AdapterView.OnItemSelectedListener#onItemSelected(AdapterView,View,int,long)
+onItemSelected()} and {@link
+android.widget.AdapterView.OnItemSelectedListener#onNothingSelected(AdapterView)
+onNothingSelected()} callback methods.</p>
+
+<p>Then you need to specify the interface implementation by calling {@link
+android.widget.AdapterView#setOnItemSelectedListener setOnItemSelectedListener()}:</p>
+
+<pre>
+Spinner spinner = (Spinner) findViewById(R.id.spinner);
+spinner.setOnItemSelectedListener(this);
+</pre>
+
+<p>If you implement the {@link
+android.widget.AdapterView.OnItemSelectedListener} interface with your {@link
+android.app.Activity} or {@link android.app.Fragment} (such as in the example above), you can pass
+<code>this</code> as the interface instance.</p> \ No newline at end of file
diff --git a/docs/html/guide/topics/ui/controls/text.jd b/docs/html/guide/topics/ui/controls/text.jd
new file mode 100644
index 000000000000..2d9d2158f1ad
--- /dev/null
+++ b/docs/html/guide/topics/ui/controls/text.jd
@@ -0,0 +1,306 @@
+page.title=Text Fields
+parent.title=Input Controls
+parent.link=../controls.html
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+ <li><a href="#Keyboard">Specifying the Keyboard Type</a>
+ <ol>
+ <li><a href="#Behaviors">Controlling other behaviors</a></li>
+ </ol>
+ </li>
+ <li><a href="#Actions">Specifying Keyboard Actions</a>
+ <ol>
+ <li><a href="#ActionEvent">Responding to action button events</a></li>
+ <li><a href="#ActionLabel">Setting a custom action button label</a></li>
+ </ol>
+ </li>
+ <li><a href="#Flags">Adding Other Keyboard Flags</a></li>
+ <li><a href="#AutoComplete">Providing Auto-complete Suggestions</a></li>
+</ol>
+<h2>Key classes</h2>
+<ol>
+ <li>{@link android.widget.EditText}</li>
+ <li>{@link android.widget.AutoCompleteTextView}</li>
+</ol>
+
+</div>
+</div>
+
+<p>A text field allows the user to type text into your app. It can be either single line or
+multi-line. Touching a text field places the cursor and automatically displays the keyboard. In
+addition to typing, text fields allow for a variety of other activities, such as text selection
+(cut, copy, paste) and data look-up via auto-completion.</p>
+
+<p>You can add a text field to you layout with the {@link android.widget.EditText} object. You
+should usually do so in your XML layout with a {@code &lt;EditText&gt;} element.</p>
+
+<img src="{@docRoot}images/ui/edittext-noextract.png" alt="" />
+
+
+
+<h2 id="Keyboard">Specifying the Keyboard Type</h2>
+
+<div class="figure" style="width:300px;margin-top:0">
+<img src="{@docRoot}images/ui/edittext-text.png" alt="" />
+<p class="img-caption"><strong>Figure 1.</strong> The default {@code text} input type.</p>
+</div>
+
+<div class="figure" style="width:300px">
+<img src="{@docRoot}images/ui/edittext-email.png" alt="" />
+<p class="img-caption"><strong>Figure 2.</strong> The {@code textEmailAddress} input type.</p>
+</div>
+
+<div class="figure" style="width:300px">
+<img src="{@docRoot}images/ui/edittext-phone.png" alt="" />
+<p class="img-caption"><strong>Figure 3.</strong> The {@code phone} input type.</p>
+</div>
+
+<p>Text fields can have different input types, such as number, date, password, or email address. The
+type determines what kind of characters are allowed inside the field, and may prompt the virtual
+keyboard to optimize its layout for frequently used characters.</p>
+
+<p>You can specify the type of keyboard you want for your {@link android.widget.EditText} object
+with the <a href="{@docRoot}reference/android/widget/TextView.html#attr_android:inputType">{@code
+android:inputType}</a> attribute. For example, if you want the user to input an email address, you
+should use the {@code textEmailAddress} input type:</p>
+
+<pre>
+&lt;EditText
+ android:id="&#64;+id/email_address"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:hint="&#64;string/email_hint"
+ android:inputType="textEmailAddress" />
+</pre>
+
+
+<p>There are several different input types available for different situations. You can find
+them all listed with the documentation for <a
+href="{@docRoot}reference/android/widget/TextView.html#attr_android:inputType">{@code
+android:inputType}</a>.</p>
+
+<p class="note"><strong>Tip:</strong> To allow users to input long strings of text with line
+breaks, use the {@code "textMultiLine"} input type. By default, an {@link android.widget.EditText}
+object is restricted to one line of text and scrolls horizontally when the text exceeds the
+available width.</p>
+
+
+<h3 id="Behaviors">Controlling other behaviors</h3>
+
+<p>The <a href="{@docRoot}reference/android/widget/TextView.html#attr_android:inputType">{@code
+android:inputType}</a> also allows you to specify certain keyboard behaviors, such as whether to
+capitalize all new words or use features like auto-complete and spelling suggestions.</p>
+
+<p>The <a href="{@docRoot}reference/android/widget/TextView.html#attr_android:inputType">{@code
+android:inputType}</a> attribute allows bitwise combinations so you can specify both a keyboard
+layout and one or more behaviors at once. For example, here's how you can collect a postal
+address, capitalize each word, and disable text suggestions:</p>
+
+<pre>
+&lt;EditText
+ android:id="@+id/postal_address"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:hint="&#64;string/postal_address_hint"
+ android:inputType="textPostalAddress|
+ textCapWords|
+ textNoSuggestions" />
+</pre>
+
+<p>All behaviors are also listed with the <a
+href="{@docRoot}reference/android/widget/TextView.html#attr_android:inputType">{@code
+android:inputType}</a> documentation.</p>
+
+
+<h2 id="Actions">Specifying Keyboard Actions</h2>
+
+<div class="figure" style="width:300px">
+<img src="{@docRoot}images/ui/edittext-actionsend.png" alt="" />
+<p class="img-caption"><strong>Figure 4.</strong> If you declare {@code
+android:imeOptions="actionSend"}, the keyboard includes the Send action.</p>
+</div>
+
+<p>In addition to changing the keyboard's input type, Android allows you to specify an action to be
+made when users have completed their input. The action specifies the button that appears in place of
+the carriage return key and the action to be made, such as "Search" or "Send."</p>
+
+<p>You can specify the action by setting the <a
+href="{@docRoot}reference/android/widget/TextView.html#attr_android:imeOptions">{@code
+android:imeOptions}</a> attribute. For example, here's how you can specify the Send action:</p>
+
+<pre>
+&lt;EditText
+ android:id="@+id/search"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/search_hint"
+ android:inputType="text"
+ android:imeOptions="actionSend" />
+</pre>
+
+<p>If you do not explicitly specify an input action then the system attempts to determine if there
+are any subsequent <a
+href="{@docRoot}reference/android/view/View.html#attr_android:focusable">{@code
+android:focusable}</a> fields. If any focusable fields are found following this one, the system
+applies the (@code actionNext} action to the current {@link android.widget.EditText} so the user can
+select Next to move to the next field. If there's no subsequent focusable field, the system applies
+the {@code "actionDone"} action. You can override this by setting the <a
+href="{@docRoot}reference/android/widget/TextView.html#attr_android:imeOptions">{@code
+android:imeOptions}</a> attribute to any other value such as {@code "actionSend"} or {@code
+"actionSearch"} or suppress the default behavior by using the {@code "actionNone"} action.</p>
+
+
+<h3 id="ActionEvent">Responding to action button events</h3>
+
+<p>If you have specified a keyboard action for the input method using <a
+href="{@docRoot}reference/android/widget/TextView.html#attr_android:imeOptions">{@code
+android:imeOptions}</a> attribute (such as {@code "actionSend"}), you can listen for the specific
+action event using an {@link android.widget.TextView.OnEditorActionListener}. The {@link
+android.widget.TextView.OnEditorActionListener} interface provides a callback method called {@link
+android.widget.TextView.OnEditorActionListener#onEditorAction onEditorAction()} that indicates the
+action type invoked with an action ID such as {@link
+android.view.inputmethod.EditorInfo#IME_ACTION_SEND} or {@link
+android.view.inputmethod.EditorInfo#IME_ACTION_SEARCH}.</p>
+
+<p>For example, here's how you can listen for when the user clicks the Send button on the
+keyboard:</p>
+
+<pre>
+EditText editText = (EditText) findViewById(R.id.search);
+editText.setOnEditorActionListener(new OnEditorActionListener() {
+ &#64;Override
+ public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+ boolean handled = false;
+ if (actionId == EditorInfo.IME_ACTION_SEND) {
+ // Send the user message
+ handled = true;
+ }
+ return handled;
+ }
+});
+</pre>
+
+
+<h3 id="ActionLabel">Setting a custom action button label</h3>
+
+<p>If the keyboard is too large to reasonably share space with the underlying application (such as
+when a handset device is in landscape orientation) then fullscreen ("extract mode") is triggered. In
+this mode, a labeled action button is displayed next to the input. You can customize the text of
+this button by setting the <a
+href="{@docRoot}reference/android/widget/TextView.html#attr_android:imeActionLabel">{@code
+android:imeActionLabel}</a> attribute:</p>
+
+<pre>
+&lt;EditText
+ android:id="&#64;+id/launch_codes"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:hint="&#64;string/enter_launch_codes"
+ android:inputType="number"
+ android:imeActionLabel="&#64;string/launch" />
+</pre>
+
+<img src="{@docRoot}images/ui/edittext-actionlabel.png" alt="" />
+<p class="img-caption"><strong>Figure 5.</strong> A custom action label with <a
+href="{@docRoot}reference/android/widget/TextView.html#attr_android:imeActionLabel">{@code
+android:imeActionLabel}</a>.</p>
+
+
+
+<h2 id="Flags">Adding Other Keyboard Flags</h2>
+
+<p>In addition to the actions you can specify with the <a
+href="{@docRoot}reference/android/widget/TextView.html#attr_android:imeOptions">{@code
+android:imeOptions}</a> attribute, you can add additional flags to specify other keyboard
+behaviors. All available flags are listed along with the actions in the <a
+href="{@docRoot}reference/android/widget/TextView.html#attr_android:imeOptions">{@code
+android:imeOptions}</a> documentation.</p>
+
+<p>For example, figure 5 shows how the system enables a fullscreen text field when a handset device
+is in landscape orientation (or the screen space is otherwise constrained for space). You can
+disable the fullscreen input mode with {@code flagNoExtractUi} in the <a
+href="{@docRoot}reference/android/widget/TextView.html#attr_android:imeOptions">{@code
+android:imeOptions}</a> attribute, as shown in figure 6.</p>
+
+<img src="{@docRoot}images/ui/edittext-noextract.png" alt="" />
+<p class="img-caption"><strong>Figure 6.</strong> The fullscreen text field ("extract mode") is
+disabled with {@code android:imeOptions="flagNoExtractUi"}.</p>
+
+
+
+
+<h2 id="AutoComplete">Providing Auto-complete Suggestions</h2>
+
+<p>If you want to provide suggestions to users as they type, you can use a subclass of {@link
+android.widget.EditText} called {@link android.widget.AutoCompleteTextView}. To implement
+auto-complete, you must specify an (@link android.widget.Adapter) that provides the text
+suggestions. There are several kinds of adapters available, depending on where the data is coming
+from, such as from a database or an array.</p>
+
+<img src="{@docRoot}images/ui/edittext-autocomplete.png" alt="" />
+<p class="img-caption"><strong>Figure 7.</strong> Example of {@link
+android.widget.AutoCompleteTextView} with text suggestions.</p>
+
+<p>The following procedure describes how to set up an {@link android.widget.AutoCompleteTextView}
+that provides suggestions from an array, using {@link android.widget.ArrayAdapter}:
+
+<ol>
+ <li>Add the {@link android.widget.AutoCompleteTextView} to your layout. Here's a
+layout with only the text field:
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?>
+&lt;AutoCompleteTextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="&#64;+id/autocomplete_country"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content" />
+</pre>
+</li>
+
+<li>Define the array that contains all text suggestions. For example, here's an array of country
+names that's defined in an XML resource file ({@code res/values/strings.xml}):
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?>
+&lt;resources>
+ &lt;string-array name="countries_array">
+ &lt;item>Afghanistan&lt;/item>
+ &lt;item>Albania&lt;/item>
+ &lt;item>Algeria&lt;/item>
+ &lt;item>American Samoa&lt;/item>
+ &lt;item>Andorra&lt;/item>
+ &lt;item>Angola&lt;/item>
+ &lt;item>Anguilla&lt;/item>
+ &lt;item>Antarctica&lt;/item>
+ ...
+ &lt;/string-array>
+&lt;/resources>
+</pre>
+</li>
+
+<li>In your {@link android.app.Activity} or {@link android.app.Fragment}, use the following
+code to specify the adapter that supplies the suggestions:
+<pre>
+// Get a reference to the AutoCompleteTextView in the layout
+AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.autocomplete_country);
+// Get the string array
+String[] countries = getResources().getStringArray(R.array.countries_array);
+// Create the adapter and set it to the AutoCompleteTextView
+ArrayAdapter&lt;String> adapter =
+ new ArrayAdapter&lt;String>(this, android.R.layout.simple_list_item_1, countries);
+textView.setAdapter(adapter);
+</pre>
+
+<p>Here, a new {@link
+android.widget.ArrayAdapter} is initialized to bind each item in the <code>COUNTRIES</code>
+string array to a {@link android.widget.TextView} that exists in the {@code simple_list_item_1}
+layout (this is a layout provided by Android that provides a standard appearance for text in a
+list).</p>
+<p>Then assign the adapter to the {@link android.widget.AutoCompleteTextView} by
+calling {@link android.widget.AutoCompleteTextView#setAdapter setAdapter()}.</p>
+</li>
+</ol>
+
diff --git a/docs/html/guide/topics/ui/controls/togglebutton.jd b/docs/html/guide/topics/ui/controls/togglebutton.jd
new file mode 100644
index 000000000000..dd7634be3e60
--- /dev/null
+++ b/docs/html/guide/topics/ui/controls/togglebutton.jd
@@ -0,0 +1,124 @@
+page.title=Toggle Buttons
+parent.title=Input Controls
+parent.link=../controls.html
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+<ol>
+ <li><a href="#HandlingEvents">Responding to Click Events</a>
+ <ol>
+ <li><a href="#ClickListener">Using an OnCheckedChangeListener</a></li>
+ </ol>
+ </li>
+</ol>
+ <h2>Key classes</h2>
+ <ol>
+ <li>{@link android.widget.ToggleButton}</li>
+ <li>{@link android.widget.Switch}</li>
+ </ol>
+</div>
+</div>
+
+<p>A toggle button allows the user to change a setting between two states.</p>
+
+<p>You can add a basic toggle button to your layout with the {@link android.widget.ToggleButton}
+object. Android 4.0 (API level 14) introduces another kind of toggle button called a switch that
+provides a slider control, which you can add with a {@link android.widget.Switch} object.</p>
+
+<div style="float:left;width:200px">
+<img src="{@docRoot}images/ui/togglebutton.png" alt="" />
+<p class="img-caption"><em>Toggle buttons</em></p>
+</div>
+
+<div style="float:left;width:200px;margin-top:24px">
+<img src="{@docRoot}images/ui/switch.png" alt="" />
+<p class="img-caption"><em>Switches (in Android 4.0+)</em></p>
+</div>
+
+<p style="clear:left">The {@link android.widget.ToggleButton} and {@link android.widget.Switch}
+controls are subclasses of {@link android.widget.CompoundButton} and function in the same manner, so
+you can implement their behavior the same way.</p>
+
+<h2 id="HandlingEvents">Responding to Click Events</h2>
+
+<p>When the user selects a {@link android.widget.ToggleButton} and {@link android.widget.Switch},
+the object receives an on-click event.</p>
+
+<p>To define the click event handler, add the <code><a
+href="/reference/android/R.attr.html#onClick">android:onClick</a></code> attribute to the
+<code>&lt;ToggleButton&gt;</code> or <code>&lt;Switch&gt;</code> element in your XML
+layout. The value for this attribute must be the name of the method you want to call in response
+to a click event. The {@link android.app.Activity} hosting the layout must then implement the
+corresponding method.</p>
+
+<p>For example, here's a {@link android.widget.ToggleButton} with the <code><a
+href="/reference/android/R.attr.html#onClick">android:onClick</a></code> attribute:</p>
+
+<pre>
+&lt;ToggleButton
+ android:id="@+id/togglebutton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textOn="Vibrate on"
+ android:textOff="Vibrate off"
+ android:onClick="onToggleClicked"/>
+</pre>
+
+<p>Within the {@link android.app.Activity} that hosts this layout, the following method handles the
+click event:</p>
+
+<pre>
+public void onToggleClicked(View view) {
+ // Is the toggle on?
+ boolean on = ((ToggleButton) view).isChecked();
+
+ if (on) {
+ // Enable vibrate
+ } else {
+ // Disable vibrate
+ }
+}
+</pre>
+
+<p>The method you declare in the {@link android.R.attr#onClick android:onClick} attribute
+must have a signature exactly as shown above. Specifically, the method must:</p>
+<ul>
+ <li>Be public</li>
+ <li>Return void</li>
+ <li>Define a {@link android.view.View} as its only parameter (this will be the {@link
+android.view.View} that was clicked)</li>
+</ul>
+
+<p class="note"><strong>Tip:</strong> If you need to change the state
+yourself,
+use the {@link android.widget.CompoundButton#setChecked(boolean)} or {@link
+android.widget.CompoundButton#toggle()} method to change the state.</p>
+
+
+
+<h3 id="ClickListener">Using an OnCheckedChangeListener</h3>
+
+<p>You can also declare a click event handler pragmatically rather than in an XML layout. This
+might be necessary if you instantiate the {@link android.widget.ToggleButton} or {@link
+android.widget.Switch} at runtime or you need to
+declare the click behavior in a {@link android.app.Fragment} subclass.</p>
+
+<p>To declare the event handler programmatically, create an {@link
+android.widget.CompoundButton.OnCheckedChangeListener} object and assign it to the button by calling
+{@link
+android.widget.CompoundButton#setOnCheckedChangeListener}. For example:</p>
+
+<pre>
+ToggleButton toggle = (ToggleButton) findViewById(R.id.togglebutton);
+toggle.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ if (isChecked) {
+ // The toggle is enabled
+ } else {
+ // The toggle is disabled
+ }
+ }
+});
+</pre>
diff --git a/docs/html/guide/topics/ui/declaring-layout.jd b/docs/html/guide/topics/ui/declaring-layout.jd
index 8af4a1cd143e..3c9faa8b2cee 100644
--- a/docs/html/guide/topics/ui/declaring-layout.jd
+++ b/docs/html/guide/topics/ui/declaring-layout.jd
@@ -1,4 +1,4 @@
-page.title=XML Layouts
+page.title=Layouts
parent.title=User Interface
parent.link=index.html
@jd:body
@@ -6,18 +6,25 @@ parent.link=index.html
<div id="qv-wrapper">
<div id="qv">
<h2>In this document</h2>
- <ol>
- <li><a href="#write">Write the XML</a></li>
- <li><a href="#load">Load the XML Resource</a></li>
- <li><a href="#attributes">Attributes</a>
- <ol>
- <li><a href="#id">ID</a></li>
- <li><a href="#layout-params">Layout Parameters</a></li>
- </ol>
- </li>
- <li><a href="#Position">Position</a></li>
- <li><a href="#SizePaddingMargins">Size, Padding and Margins</a></li>
- </ol>
+<ol>
+ <li><a href="#write">Write the XML</a></li>
+ <li><a href="#load">Load the XML Resource</a></li>
+ <li><a href="#attributes">Attributes</a>
+ <ol>
+ <li><a href="#id">ID</a></li>
+ <li><a href="#layout-params">Layout Parameters</a></li>
+ </ol>
+ </li>
+ <li><a href="#Position">Layout Position</a></li>
+ <li><a href="#SizePaddingMargins">Size, Padding and Margins</a></li>
+ <li><a href="#CommonLayouts">Common Layouts</a></li>
+ <li><a href="#AdapterViews">Building Layouts with an Adapter</a>
+ <ol>
+ <li><a href="#FillingTheLayout">Filling an adapter view with data</a></li>
+ <li><a href="#HandlingUserSelections">Handling click events</a></li>
+ </ol>
+ </li>
+</ol>
<h2>Key classes</h2>
<ol>
@@ -43,15 +50,15 @@ application can create View and ViewGroup objects (and manipulate their properti
<div class="sidebox-wrapper">
<div class="sidebox">
<ul>
- <li>The <a href="{@docRoot}sdk/eclipse-adt.html">ADT
+ <li>The <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT
Plugin for Eclipse</a> offers a layout preview of your XML &mdash;
with the XML file opened, select the <strong>Layout</strong> tab.</li>
<li>You should also try the
- <a href="{@docRoot}guide/developing/debugging/debugging-ui.html#hierarchyViewer">Hierarchy Viewer</a> tool,
+ <a href="{@docRoot}tools/debugging/debugging-ui.html#hierarchyViewer">Hierarchy Viewer</a> tool,
for debugging layouts &mdash; it reveals layout property values,
draws wireframes with padding/margin indicators, and full rendered views while
you debug on the emulator or device.</li>
- <li>The <a href="{@docRoot}guide/developing/debugging/debugging-ui.html#layoutopt">layoutopt</a> tool lets
+ <li>The <a href="{@docRoot}tools/debugging/debugging-ui.html#layoutopt">layoutopt</a> tool lets
you quickly analyze your layouts and hierarchies for inefficiencies or other problems.</li>
</div>
</div>
@@ -125,7 +132,7 @@ public void onCreate(Bundle savedInstanceState) {
<p>The <code>onCreate()</code> callback method in your Activity is called by the Android framework when
your Activity is launched (see the discussion about lifecycles, in the
-<a href="{@docRoot}guide/topics/fundamentals/activities.html#Lifecycle">Activities</a>
+<a href="{@docRoot}guide/components/activities.html#Lifecycle">Activities</a>
document).</p>
@@ -300,5 +307,213 @@ Available Resources</a> document.</p>
</p>
+
+
+
+
+<style type="text/css">
+div.layout {
+ float:left;
+ width:200px;
+ margin:0 0 20px 20px;
+}
+div.layout.first {
+ margin-left:0;
+ clear:left;
+}
+</style>
+
+
+
+
+<h2 id="CommonLayouts">Common Layouts</h2>
+
+<p>Each subclass of the {@link android.view.ViewGroup} class provides a unique way to display
+the views you nest within it. Below are some of the more common layout types that are built
+into the Android platform.</p>
+
+<p class="note"><strong>Note:</strong> Although you can nest one or more layouts within another
+layout to acheive your UI design, you should strive to keep your layout hierarchy as shallow as
+possible. Your layout draws faster if it has fewer nested layouts (a wide view hierarchy is
+better than a deep view hierarchy).</p>
+
+<!--
+<h2 id="framelayout">FrameLayout</h2>
+<p>{@link android.widget.FrameLayout FrameLayout} is the simplest type of layout
+object. It's basically a blank space on your screen that you can
+later fill with a single object &mdash; for example, a picture that you'll swap in and out.
+All child elements of the FrameLayout are pinned to the top left corner of the screen; you cannot
+specify a different location for a child view. Subsequent child views will simply be drawn over
+previous ones,
+partially or totally obscuring them (unless the newer object is transparent).
+</p>
+-->
+
+
+<div class="layout first">
+ <h4><a href="layout/linear.html">Linear Layout</a></h4>
+ <a href="layout/linear.html"><img src="{@docRoot}images/ui/linearlayout-small.png" alt="" /></a>
+ <p>A layout that organizes its children into a single horizontal or vertical row. It
+ creates a scrollbar if the length of the window exceeds the length of the screen.</p>
+</div>
+
+<div class="layout">
+ <h4><a href="layout/relative.html">Relative Layout</a></h4>
+ <a href="layout/relative.html"><img src="{@docRoot}images/ui/relativelayout-small.png" alt=""
+/></a>
+ <p>Enables you to specify the location of child objects relative to each other (child A to
+the left of child B) or to the parent (aligned to the top of the parent).</p>
+</div>
+
+<!--
+<div class="layout">
+ <h4><a href="layout/tabs.html">Tabs</a></h4>
+ <a href="layout/tabs.html"><img src="{@docRoot}images/ui/tabs-small.png" alt="" /></a>
+ <p>Provides a tab selection list that monitors clicks and enables the application to change
+the screen whenever a tab is clicked.</p>
+</div>
+
+<div class="layout first">
+ <h4><a href="layout/grid.html">Table Layout</a></h4>
+ <a href="layout/table.html"><img src="{@docRoot}images/ui/gridlayout-small.png" alt="" /></a>
+ <p>A tabular layout with an arbitrary number of rows and columns, each cell holding the
+widget of your choice. The rows resize to fit the largest column. The cell borders are not
+visible.</p>
+</div>
+-->
+
+<div class="layout">
+ <h4><a href="{@docRoot}guide/webapps/webview.html">Web View</a></h4>
+ <a href="{@docRoot}guide/webapps/webview.html"><img src="{@docRoot}images/ui/webview-small.png"
+alt="" /></a>
+ <p>Displays web pages.</p>
+</div>
+
+
+
+
+<h2 id="AdapterViews" style="clear:left">Building Layouts with an Adapter</h2>
+
+<p>When the content for your layout is dynamic or not pre-determined, you can use a layout that
+subclasses {@link android.widget.AdapterView} to populate the layout with views at runtime. A
+subclass of the {@link android.widget.AdapterView} class uses an {@link android.widget.Adapter} to
+bind data to its layout. The {@link android.widget.Adapter} behaves as a middle-man between the data
+source and the {@link android.widget.AdapterView} layout&mdash;the {@link android.widget.Adapter}
+retreives the data (from a source such as an array or a database query) and converts each entry
+into a view that can be added into the {@link android.widget.AdapterView} layout.</p>
+
+<p>Common layouts backed by an adapter include:</p>
+
+<div class="layout first">
+ <h4><a href="layout/listview.html">List View</a></h4>
+ <a href="layout/list.html"><img src="{@docRoot}images/ui/listview-small.png" alt="" /></a>
+ <p>Displays a scrolling single column list.</p>
+</div>
+
+<div class="layout">
+ <h4><a href="layout/gridview.html">Grid View</a></h4>
+ <a href="layout/grid.html"><img src="{@docRoot}images/ui/gridview-small.png" alt="" /></a>
+ <p>Displays a scrolling grid of columns and rows.</p>
+</div>
+
+
+
+<h3 id="FillingTheLayout" style="clear:left">Filling an adapter view with data</h3>
+
+<p>You can populate an {@link android.widget.AdapterView} such as {@link android.widget.ListView} or
+{@link android.widget.GridView} by binding the {@link android.widget.AdapterView} instance to an
+{@link android.widget.Adapter}, which retrieves data from an external source and creates a {@link
+android.view.View} that represents each data entry.</p>
+
+<p>Android provides several subclasses of {@link android.widget.Adapter} that are useful for
+retrieving different kinds of data and building views for an {@link android.widget.AdapterView}. The
+two most common adapters are:</p>
+
+<dl>
+ <dt>{@link android.widget.ArrayAdapter}</dt>
+ <dd>Use this adapter when your data source is an array. By default, {@link
+android.widget.ArrayAdapter} creates a view for each array item by calling {@link
+java.lang.Object#toString()} on each item and placing the contents in a {@link
+android.widget.TextView}.
+ <p>For example, if you have an array of strings you want to display in a {@link
+android.widget.ListView}, initialize a new {@link android.widget.ArrayAdapter} using a
+constructor to specify the layout for each string and the string array:</p>
+<pre>
+ArrayAdapter adapter = new ArrayAdapter&lt;String>(this,
+ android.R.layout.simple_list_item_1, myStringArray);
+</pre>
+<p>The arguments for this constructor are:</p>
+<ul>
+ <li>Your app {@link android.content.Context}</li>
+ <li>The layout that contains a {@link android.widget.TextView} for each string in the array</li>
+ <li>The string array</li>
+</ul>
+<p>Then simply call
+{@link android.widget.ListView#setAdapter setAdapter()} on your {@link android.widget.ListView}:</p>
+<pre>
+ListView listView = (ListView) findViewById(R.id.listview);
+listView.setAdapter(adapter);
+</pre>
+
+ <p>To customize the appearance of each item you can override the {@link
+java.lang.Object#toString()} method for the objects in your array. Or, to create a view for each
+item that's something other than a {@link android.widget.TextView} (for example, if you want an
+{@link android.widget.ImageView} for each array item), extend the {@link
+android.widget.ArrayAdapter} class and override {@link android.widget.ArrayAdapter#getView
+getView()} to return the type of view you want for each item.</p>
+
+</dd>
+
+ <dt>{@link android.widget.SimpleCursorAdapter}</dt>
+ <dd>Use this adapter when your data comes from a {@link android.database.Cursor}. When
+using {@link android.widget.SimpleCursorAdapter}, you must specify a layout to use for each
+row in the {@link android.database.Cursor} and which columns in the {@link android.database.Cursor}
+should be inserted into which views of the layout. For example, if you want to create a list of
+people's names and phone numbers, you can perform a query that returns a {@link
+android.database.Cursor} containing a row for each person and columns for the names and
+numbers. You then create a string array specifying which columns from the {@link
+android.database.Cursor} you want in the layout for each result and an integer array specifying the
+corresponding views that each column should be placed:</p>
+<pre>
+String[] fromColumns = {ContactsContract.Data.DISPLAY_NAME,
+ ContactsContract.CommonDataKinds.Phone.NUMBER};
+int[] toViews = {R.id.display_name, R.id.phone_number};
+</pre>
+<p>When you instantiate the {@link android.widget.SimpleCursorAdapter}, pass the layout to use for
+each result, the {@link android.database.Cursor} containing the results, and these two arrays:</p>
+<pre>
+SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
+ R.layout.person_name_and_number, cursor, fromColumns, toViews, 0);
+ListView listView = getListView();
+listView.setAdapter(adapter);
+</pre>
+<p>The {@link android.widget.SimpleCursorAdapter} then creates a view for each row in the
+{@link android.database.Cursor} using the provided layout by inserting each {@code
+fromColumns} item into the corresponding {@code toViews} view.</p>.</dd>
+</dl>
+
+
+<p>If, during the course of your application's life, you change the underlying data that is read by
+your adapter, you should call {@link android.widget.ArrayAdapter#notifyDataSetChanged()}. This will
+notify the attached view that the data has been changed and it should refresh itself.</p>
+
+
+
+<h3 id="HandlingUserSelections">Handling click events</h3>
+
+<p>You can respond to click events on each item in an {@link android.widget.AdapterView} by
+implementing the {@link android.widget.AdapterView.OnItemClickListener} interface. For example:</p>
+
+<pre>
+// Create a message handling object as an anonymous class.
+private OnItemClickListener mMessageClickedHandler = new OnItemClickListener() {
+ public void onItemClick(AdapterView parent, View v, int position, long id) {
+ // Do something in response to the click
+ }
+};
+
+listView.setOnItemClickListener(mMessageClickedHandler);
+</pre>
+
diff --git a/docs/html/guide/topics/ui/dialogs.jd b/docs/html/guide/topics/ui/dialogs.jd
index 82cbfd161b6b..9c2805817288 100644
--- a/docs/html/guide/topics/ui/dialogs.jd
+++ b/docs/html/guide/topics/ui/dialogs.jd
@@ -313,7 +313,7 @@ Activity, the selection is lost.
<p class="note"><strong>Note:</strong> To save the selection when the user leaves or
pauses the Activity, you must properly save and restore the setting throughout
-the <a href="{@docRoot}guide/topics/fundamentals/activities.html#Lifecycle">activity lifecycle</a>.
+the <a href="{@docRoot}guide/components/activities.html#Lifecycle">activity lifecycle</a>.
To permanently save the selections, even when the Activity process is completely shutdown,
you need to save the settings
with one of the <a href="{@docRoot}guide/topics/data/data-storage.html">Data
diff --git a/docs/html/resources/tutorials/views/images/android_focused.png b/docs/html/guide/topics/ui/images/android_focused.png
index f84d0fe4a5e4..f84d0fe4a5e4 100644
--- a/docs/html/resources/tutorials/views/images/android_focused.png
+++ b/docs/html/guide/topics/ui/images/android_focused.png
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/android_normal.png b/docs/html/guide/topics/ui/images/android_normal.png
index 94a708425300..94a708425300 100644
--- a/docs/html/resources/tutorials/views/images/android_normal.png
+++ b/docs/html/guide/topics/ui/images/android_normal.png
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/android_pressed.png b/docs/html/guide/topics/ui/images/android_pressed.png
index fe81ff9e279c..fe81ff9e279c 100644
--- a/docs/html/resources/tutorials/views/images/android_pressed.png
+++ b/docs/html/guide/topics/ui/images/android_pressed.png
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/hello-gallery.png b/docs/html/guide/topics/ui/images/hello-gallery.png
index 22d1eaf6d145..22d1eaf6d145 100755
--- a/docs/html/guide/tutorials/views/images/hello-gallery.png
+++ b/docs/html/guide/topics/ui/images/hello-gallery.png
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/hello-gridview.png b/docs/html/guide/topics/ui/images/hello-gridview.png
index 2def0df666a4..2def0df666a4 100755
--- a/docs/html/guide/tutorials/views/images/hello-gridview.png
+++ b/docs/html/guide/topics/ui/images/hello-gridview.png
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/hello-linearlayout.png b/docs/html/guide/topics/ui/images/hello-linearlayout.png
index dfef819ef9d1..dfef819ef9d1 100755
--- a/docs/html/guide/tutorials/views/images/hello-linearlayout.png
+++ b/docs/html/guide/topics/ui/images/hello-linearlayout.png
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/hello-listview.png b/docs/html/guide/topics/ui/images/hello-listview.png
index 165b1ac69725..165b1ac69725 100644
--- a/docs/html/resources/tutorials/views/images/hello-listview.png
+++ b/docs/html/guide/topics/ui/images/hello-listview.png
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/hello-mapview.png b/docs/html/guide/topics/ui/images/hello-mapview.png
index 6bd97400c29b..6bd97400c29b 100644
--- a/docs/html/resources/tutorials/views/images/hello-mapview.png
+++ b/docs/html/guide/topics/ui/images/hello-mapview.png
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/hello-relativelayout.png b/docs/html/guide/topics/ui/images/hello-relativelayout.png
index ec4d9d44b0c6..ec4d9d44b0c6 100755
--- a/docs/html/guide/tutorials/views/images/hello-relativelayout.png
+++ b/docs/html/guide/topics/ui/images/hello-relativelayout.png
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/hello-tablelayout.png b/docs/html/guide/topics/ui/images/hello-tablelayout.png
index 3d80e7f8a55a..3d80e7f8a55a 100755
--- a/docs/html/guide/tutorials/views/images/hello-tablelayout.png
+++ b/docs/html/guide/topics/ui/images/hello-tablelayout.png
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/hello-tabwidget.png b/docs/html/guide/topics/ui/images/hello-tabwidget.png
index 6580c5b067ff..6580c5b067ff 100644
--- a/docs/html/resources/tutorials/views/images/hello-tabwidget.png
+++ b/docs/html/guide/topics/ui/images/hello-tabwidget.png
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/hello-webview.png b/docs/html/guide/topics/ui/images/hello-webview.png
index 248c6d4d1ff5..248c6d4d1ff5 100644
--- a/docs/html/resources/tutorials/views/images/hello-webview.png
+++ b/docs/html/guide/topics/ui/images/hello-webview.png
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/ic_tab_artists_grey.png b/docs/html/guide/topics/ui/images/ic_tab_artists_grey.png
index 9baa30eac584..9baa30eac584 100644
--- a/docs/html/resources/tutorials/views/images/ic_tab_artists_grey.png
+++ b/docs/html/guide/topics/ui/images/ic_tab_artists_grey.png
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/ic_tab_artists_white.png b/docs/html/guide/topics/ui/images/ic_tab_artists_white.png
index 3b010d536ade..3b010d536ade 100644
--- a/docs/html/resources/tutorials/views/images/ic_tab_artists_white.png
+++ b/docs/html/guide/topics/ui/images/ic_tab_artists_white.png
Binary files differ
diff --git a/docs/html/guide/topics/ui/index.jd b/docs/html/guide/topics/ui/index.jd
index be07249a4e1e..f342b0652f5b 100644
--- a/docs/html/guide/topics/ui/index.jd
+++ b/docs/html/guide/topics/ui/index.jd
@@ -1,236 +1,61 @@
page.title=User Interface
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-
- <h2>In this document</h2>
- <ol>
- <li><a href="#ViewHierarchy">View Hierarchy</a></li>
- <li><a href="#Layout">Layout</a></li>
- <li><a href="#Widgets">Widgets</a></li>
- <li><a href="#Events">Input Events</a></li>
- <li><a href="#Menus">Menus</a></li>
- <li><a href="#Advanced">Advanced Topics</a>
- <ol>
- <li><a href="#Adapters">Adapters</a></li>
- <li><a href="#StylesAndThemes">Styles and Themes</a></li>
- </ol>
- </li>
- </ol>
-
- <h2>Key classes</h2>
- <ol>
- <li>{@link android.view.View}</li>
- <li>{@link android.view.ViewGroup}</li>
- <li>{@link android.widget Widget classes}</li>
- </ol>
-</div>
-</div>
-
-<p>In an Android application, the user interface is built using {@link android.view.View} and
-{@link android.view.ViewGroup} objects. There are many types of views and view groups, each of which
-is a descendant of the {@link android.view.View} class.</p>
-
-<p>View objects are the basic units of user interface expression on the Android platform.
-The View class serves as the base for subclasses called "widgets," which offer fully implemented
-UI objects, like text fields and buttons. The ViewGroup class serves as the base for subclasses called "layouts,"
-which offer different kinds of layout architecture, like linear, tabular and relative.</p>
-
-<p>A View object is a data structure whose properties store the layout parameters and content for a specific
-rectangular area of the screen. A View object handles its own measurement, layout, drawing, focus change,
-scrolling, and key/gesture interactions for the rectangular area of the screen in which it resides. As an
-object in the user interface, a View is also a point of interaction for the user and the receiver
-of the interaction events.</p>
-
-
-<h2 id="ViewHierarchy">View Hierarchy</h2>
-
-<p>On the Android platform, you define an Activity's UI using a hierarchy of View and ViewGroup nodes,
-as shown in the diagram below. This hierarchy tree can be as simple or complex as you need it to be, and you
-can build it up using Android's set of predefined widgets and layouts, or with custom Views that you
-create yourself.</p>
+page.landing=true
+page.landing.intro=Your app's user interface is everything that the user can see and interact with. Android provides a variety of pre-build UI components such as structured layout objects and UI controls that allow you to build the graphical user interface for your app. Android also provides other UI modules for special interfaces such as dialogs, notifications, and menus.
+page.landing.image=images/ui/ui_index.png
+page.landing.next=overview.html
-<img src="{@docRoot}images/viewgroup.png" alt="" />
-
-<p>
-In order to attach the view hierarchy tree to the screen for rendering, your Activity must call the
-<code>{@link android.app.Activity#setContentView(int) setContentView()}</code>
-method and pass a reference to the root node object. The Android system
-receives this reference and uses it to invalidate, measure, and draw the tree. The root node of the hierarchy requests
-that its child nodes draw themselves &mdash; in turn, each view group node is responsible for calling
-upon each of its own child views to draw themselves.
-The children may request a size and location within the parent, but the parent object has the final
-decision on where how big each child can be. Android parses
-the elements of your layout in-order (from the top of the hierarchy tree), instantiating the Views and
-adding them to their parent(s). Because these are drawn in-order, if there are elements that
-overlap positions, the last one to be drawn will lie on top of others previously drawn to that space.</p>
-
-<p>For a more detailed discussion on how view hierarchies are measured
-and drawn, read <a href="how-android-draws.html">How Android Draws Views</a>.</p>
-
-
-<h2 id="Layout">Layout</h2>
-
-<p>The most common way to define your layout and express the view hierarchy is with an XML layout file.
-XML offers a human-readable structure for the layout, much like HTML. Each element in XML is
-either a View or ViewGroup object (or descendant thereof). View objects are leaves in the tree,
-ViewGroup objects are branches in the tree (see the View Hierarchy figure above).</p>
-<p>The name of an XML element
-is respective to the Java class that it represents. So a <code>&lt;TextView></code> element creates
-a {@link android.widget.TextView} in your UI, and a <code>&lt;LinearLayout></code> element creates
-a {@link android.widget.LinearLayout} view group. When you load a layout resource,
-the Android system initializes these run-time objects, corresponding to the elements in your layout.</p>
-
-<p>For example, a simple vertical layout with a text view and a button looks like this:</p>
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
- &lt;TextView android:id="@+id/text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Hello, I am a TextView" />
- &lt;Button android:id="@+id/button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Hello, I am a Button" />
-&lt;/LinearLayout>
-</pre>
-
-<p>Notice that the LinearLayout element contains both the TextView and the Button. You can nest
-another LinearLayout (or other type of view group) inside here, to lengthen the view hierarchy and create a more
-complex layout.</p>
+@jd:body
-<p>For more on building a UI layout, read <a href="declaring-layout.html">XML Layouts</a>.
+<div class="landing-docs">
+
+ <div class="col-6">
+ <h3>Blog Articles</h3>
+
+ <a href="http://android-developers.blogspot.com/2012/01/say-goodbye-to-menu-button.html">
+ <h4>Say Goodbye to the Menu Button</h4>
+ <p>As Ice Cream Sandwich rolls out to more devices, it’s important that you begin to migrate
+your designs to the action bar in order to promote a consistent Android user experience.</p> </a>
+
+ <a href="http://android-developers.blogspot.com/2011/11/new-layout-widgets-space-and-gridlayout.html">
+ <h4>New Layout Widgets: Space and GridLayout</h4>
+ <p>Ice Cream Sandwich (ICS) sports two new widgets that have been designed to support the
+richer user interfaces made possible by larger displays: Space and GridLayout.</p> </a>
+
+ <a href="http://android-developers.blogspot.com/2011/04/customizing-action-bar.html">
+ <h4>Customizing the Action Bar</h4>
+ <p>By using the Action Bar in your Honeycomb-targeted apps, you'll give your users a familiar
+way to interact with your application.</p> </a>
+
+ <a href="http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html">
+ <h4>Horizontal View Swiping with ViewPager</h4>
+ <p>Whether you have just started out in Android app development or are a veteran of the craft,
+it probably won’t be too long before you’ll need to implement horizontally scrolling sets of views.
+</p> </a>
+ </div>
+
+ <div class="col-6">
+ <h3>Training</h3>
+
+ <a href="http://developer.android.com/training/implementing-navigation/index.html">
+ <h4>Implementing Effective Navigation</h4>
+ <p>This class shows you how to plan out the high-level screen hierarchy for your application
+and then choose appropriate forms of navigation to allow users to effectively and intuitively
+traverse your content.</p> </a>
+
+ <a href="http://developer.android.com/training/multiscreen/index.html">
+ <h4>Designing for Multiple Screens</h4>
+ <p>Android powers hundreds of device types with several different screen sizes, ranging from
+small phones to large TV sets. This class shows you how to implement a user interface that's
+optimized for several screen configurations.</p>
+ </a>
+
+ <a href="http://developer.android.com/training/improving-layouts/index.html">
+ <h4>Improving Layout Performance</h4>
+ <p>Layouts are a key part of Android applications that directly affect the user experience. If
+implemented poorly, your layout can lead to a memory hungry application with slow UIs. This
+class shows you how to avoid such problems.</p>
+ </a>
+ </div>
-<div class="sidebox-wrapper">
-<div class="sidebox">
- <p><b>Tip:</b> You can also draw View and ViewGroups objects in Java code,
- using the <code>{@link android.view.ViewGroup#addView(View)}</code> methods
- to dynamically insert new View and ViewGroup objects.</p>
-</div>
</div>
-<p>There are a variety of ways in which you can layout your views. Using more and different kinds of view groups,
-you can structure child views and view groups in an infinite number of ways.
-Some pre-defined view groups offered by Android (called layouts) include LinearLayout, RelativeLayout,
-TableLayout, GridLayout and others. Each offers a unique set of layout parameters that are used to define the
-positions of child views and layout structure.</p>
-<p>To learn about some of the different kinds of view groups used for a layout,
-read <a href="layout-objects.html">Common Layout Objects</a>.</p>
-
-
-<h2 id="Widgets">Widgets</h2>
-
-<p>A widget is a View object that serves as an interface for interaction with the user.
-Android provides a set of fully implemented
-widgets, like buttons, checkboxes, and text-entry fields, so you can quickly build your UI.
-Some widgets provided by Android are more complex, like a date picker, a clock, and zoom controls.
-But you're not limited to the kinds of widgets provided by the Android platform. If you'd
-like to do something more customized and create your own actionable elements, you can, by defining your own
-View object or by extending and combining existing widgets.</p>
-<p>Read more in the <a href="custom-components.html">Custom Components</a> developer guide.</p>
-
-<p>For a list of the widgets provided by Android, see the {@link android.widget} package.</p>
-
-
-<h2 id="Events">Input Events</h2>
-
-<p>Once you've added some Views/widgets to the UI, you probably want to know about the
-user's interaction with them, so you can perform actions. To be informed of user input events, you
-need to do one of two things:</p>
-<ul>
- <li><strong>Define an event listener and register it with the View.</strong> More often than not,
-this is how you'll listen for events. The View class contains a collection of nested interfaces named
-On<em>&lt;something></em>Listener, each with a callback method called <code>On<em>&lt;something></em>()</code>.
-For example, {@link android.view.View.OnClickListener} (for handling "clicks" on a View),
-{@link android.view.View.OnTouchListener} (for handling touch screen events in a View), and
-{@link android.view.View.OnKeyListener} if you want to handle hardware key presses within a View. So if you want your View
-to be notified when it is "clicked" (such as when a button is selected), implement OnClickListener and define
-its <code>onClick()</code> callback method (where you perform the action upon click), and register it
-to the View with <code>{@link android.view.View#setOnClickListener(View.OnClickListener) setOnClickListener()}</code>.
-</li>
- <li><strong>Override an existing callback method for the View.</strong> This is
-what you should do when you've implemented your own View class and want to listen for specific events
-that occur within it. Example events you can handle include when the
-screen is touched (<code>{@link android.view.View#onTouchEvent(MotionEvent) onTouchEvent()}</code>), when
-the trackball is moved (<code>{@link android.view.View#onTrackballEvent(MotionEvent) onTrackballEvent()}</code>),
-or when a <em>hardware</em> key on the device is pressed (<code>{@link android.view.View#onKeyDown(int, KeyEvent)
-onKeyDown()}</code>). This allows you to define the default behavior for each event inside your custom View and determine
-whether the event should be passed on to some other child View. Again, these are callbacks to the View class,
-so your only chance to define them is when you
-<a href="{@docRoot}guide/topics/ui/custom-components.html">build a custom component</a>.
-</li>
-</ul>
-
-<p>Continue reading about handling user interaction with Views in the <a
-href="ui-events.html">Input Events</a> document.</p>
-
-
-<h2 id="Menus">Menus</h2>
-
-<p>Application menus are another important part of an application's UI. Menus offers a reliable interface that reveals
-application functions and settings. The most common application menu is revealed by pressing
-the <em>Menu</em> button on the device. However, you can also add Context Menus, which may be
-revealed when the user presses
-and holds down on an item.</p>
-
-<p>Menus are also structured using a View hierarchy, but you don't define this structure yourself. Instead,
-you define the <code>{@link android.app.Activity#onCreateOptionsMenu(Menu) onCreateOptionsMenu()}</code> or
-<code>{@link android.app.Activity#onCreateContextMenu(ContextMenu,View,ContextMenu.ContextMenuInfo) onCreateContextMenu()}</code>
-callback methods for your Activity and declare the items that you want to include in your menu.
-At the appropriate time, Android will automatically create the necessary View hierarchy for the menu and
-draw each of your menu items in it.</p>
-
-<p>Menus also handle their own events, so there's no need to register event listeners on the items in your menu.
-When an item in your menu is selected, the <code>{@link android.app.Activity#onOptionsItemSelected(MenuItem)
-onOptionsItemSelected()}</code> or
-<code>{@link android.app.Activity#onContextItemSelected(MenuItem) onContextItemSelected()}</code>
-method will be called by the framework.</p>
-
-<p>And just like your application layout, you have the option to declare the items for you menu in an XML file.</p>
-
-<p>Read <a href="{@docRoot}guide/topics/ui/menus.html">Menus</a> to learn more.</p>
-
-
-<h2 id="Advanced">Advanced Topics</h2>
-
-<p>Once you've grappled the fundamentals of creating a user interface, you can explore
-some advanced features for creating a more complex application interface.</p>
-
-<h3 id="Adapters">Adapters</h3>
-
-<p>Sometimes you'll want to populate a view group with some information that can't be hard-coded, instead,
-you want to bind your view to an external source of data. To do this, you use an AdapterView as
-your view group and each child View is initialized and populated with data from the Adapter.</p>
-<p>The AdapterView object is an implementation of ViewGroup that determines its child views
-based on a given Adapter object. The Adapter acts like a courier between your data source (perhaps an
-array of external strings) and the AdapterView, which displays it. There are several implementations
-of the Adapter class, for specific tasks, such as the CursorAdapter for reading database data from a Cursor,
-or an ArrayAdapter for reading from an arbitrary array.</p>
-<p>To learn more about using an Adapter to populate your views, read
-<a href="binding.html">Binding to Data with AdapterView</a>.</p>
-
-
-<h3 id="StylesAndThemes">Styles and Themes</h3>
-
-<p>Perhaps you're not satisfied with the look of the standard widgets. To revise them, you can create some
-of your own styles and themes.</p>
-
-<ul>
- <li>A style is a set of one or more formatting attributes that you can apply as a unit to individual elements
-in your layout. For example, you could define a style that specifies a certain text size and color, then
-apply it to only specific View elements.</li>
- <li>A theme is a set of one or more formatting attributes that you can apply as a unit to all activities in
-an application, or just a single activity. For example, you could define a theme that sets specific colors for
-the window frame and the panel background, and sets text sizes and colors for menus. This theme can then be
-applied to specific activities or the entire application.</li>
-</ul>
-
-<p>Styles and themes are resources. Android provides some default style and theme resources that you can use,
-or you can declare your own custom style and theme resources.</p>
-<p>Learn more about using styles and themes in the
-<a href="themes.html">Styles and Themes</a> document.</p>
diff --git a/docs/html/guide/topics/ui/layout-objects.jd b/docs/html/guide/topics/ui/layout-objects.jd
index e251fe980b0a..1d15ad60c079 100644
--- a/docs/html/guide/topics/ui/layout-objects.jd
+++ b/docs/html/guide/topics/ui/layout-objects.jd
@@ -1,291 +1,6 @@
-page.title=Common Layout Objects
+page.title=Layouts
parent.title=User Interface
parent.link=index.html
@jd:body
-<div id="qv-wrapper">
-<div id="qv">
- <h2>In this document</h2>
- <ol>
- <li><a href="#framelayout">FrameLayout</a></li>
- <li><a href="#linearlayout">LinearLayout</a></li>
- <li><a href="#tablelayout">TableLayout</a></li>
- <li><a href="#relativelayout">RelativeLayout</a></li>
- <li><a href="#viewgroupsummary">Summary of Important View Groups</a></li>
- </ol>
-</div>
-</div>
-
-<p>This section describes some of the more common types of layout objects
-to use in your applications. Like all layouts, they are subclasses of {@link android.view.ViewGroup ViewGroup}.</p>
-
-<p>Also see the <a href="{@docRoot}resources/tutorials/views/index.html">Hello Views</a> tutorials for
-some guidance on using more Android View layouts.</p>
-
-<h2 id="framelayout">FrameLayout</h2>
-<p>{@link android.widget.FrameLayout FrameLayout} is the simplest type of layout
-object. It's basically a blank space on your screen that you can
-later fill with a single object &mdash; for example, a picture that you'll swap in and out.
-All child elements of the FrameLayout are pinned to the top left corner of the screen; you cannot
-specify a different location for a child view. Subsequent child views will simply be drawn over previous ones,
-partially or totally obscuring them (unless the newer object is transparent).
-</p>
-
-
-<h2 id="linearlayout">LinearLayout</h2>
-<p>{@link android.widget.LinearLayout LinearLayout} aligns all children in a
-single direction &mdash; vertically or horizontally, depending on how you
-define the <code>orientation</code> attribute. All children are
-stacked one after the other, so a vertical list will only have one child per
-row, no matter how wide they are, and a horizontal list will only be one row
-high (the height of the tallest child, plus padding). A {@link
-android.widget.LinearLayout LinearLayout} respects <em>margin</em>s between children
-and the <em>gravity</em> (right, center, or left alignment) of each child. </p>
-
-<p>{@link android.widget.LinearLayout LinearLayout} also supports assigning a
-<em>weight</em> to individual children. This attribute assigns an "importance" value to a view,
-and allows it to expand to fill any remaining space in the parent view.
-Child views can specify an integer weight value, and then any remaining space in the view group is
-assigned to children in the proportion of their declared weight. Default
-weight is zero. For example, if there are three text boxes and two of
-them declare a weight of 1, while the other is given no weight (0), the third text box without weight
-will not grow and will only occupy the area required by its content.
-The other two will expand equally to fill the space remaining after all three boxes are measured.
-If the third box is then given a weight of 2 (instead of 0), then it is now declared
-"more important" than both the others, so it gets half the total remaining space, while the first two
-share the rest equally.</p>
-
-<div class="sidebox-wrapper">
-<div class="sidebox">
-<p><strong>Tip</strong>: To create a proportionate size
-layout on the screen, create a container view group object with the
-<code>layout_width</code> and <code>layout_height</code> attributes set to <var>fill_parent</var>; assign
-the children <code>height</code> or <code>width</code> to <code>0</code> (zero); then assign relative
-<code>weight</code> values
-to each child, depending on what proportion of the screen each should
-have.</p>
-</div>
-</div>
-
-<p>The following two forms represent a {@link android.widget.LinearLayout LinearLayout} with a set of elements: a
-button, some labels and text boxes. The text boxes have their width set to <var>fill_parent</var>; other
-elements are set to <var>wrap_content</var>. The gravity, by default, is left.
-The difference between the two versions of the form is that the form
-on the left has weight values unset (0 by default), while the form on the right has
-the comments text box weight set to 1. If the Name textbox had also been set
-to 1, the Name and Comments text boxes would be the same height. </p>
-
-<img src="{@docRoot}images/linearlayout.png" alt="" />
-
-<p>Within a horizontal {@link android.widget.LinearLayout LinearLayout}, items are aligned by the position of
-their text base line (the first line of the first list element &mdash; topmost or
-leftmost &mdash; is considered the reference line). This is so that people scanning
-elements in a form shouldn't have to jump up and down to read element text in
-neighboring elements. This can be turned off by setting
-<code>android:baselineAligned=&quot;false&quot;</code> in the layout XML. </p>
-
-<p>To view other sample code, see the
-<a href="{@docRoot}resources/tutorials/views/hello-linearlayout.html">Hello LinearLayout</a> tutorial.</p>
-
-
-<h2 id="tablelayout">TableLayout</h2>
-<p>{@link android.widget.TableLayout} positions its children into rows
- and columns. TableLayout containers do not display border lines for their rows, columns,
- or cells. The table will have as many columns as the row with the most cells. A table can leave
-cells empty, but cells cannot span columns, as they can in HTML.</p>
-<p>{@link android.widget.TableRow} objects are the child views of a TableLayout
-(each TableRow defines a single row in the table).
-Each row has zero or more cells, each of which is defined by any kind of other View. So, the cells of a row may be
-composed of a variety of View objects, like ImageView or TextView objects.
-A cell may also be a ViewGroup object (for example, you can nest another TableLayout as a cell).</p>
-<p>The following sample layout has two rows and two cells in each. The accompanying screenshot shows the
-result, with cell borders displayed as dotted lines (added for visual effect). </p>
-
-<table class="columns">
- <tr>
- <td>
- <pre>
-&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:stretchColumns="1">
- &lt;TableRow>
- &lt;TextView
- android:text="@string/table_layout_4_open"
- android:padding="3dip" />
- &lt;TextView
- android:text="@string/table_layout_4_open_shortcut"
- android:gravity="right"
- android:padding="3dip" />
- &lt;/TableRow>
-
- &lt;TableRow>
- &lt;TextView
- android:text="@string/table_layout_4_save"
- android:padding="3dip" />
- &lt;TextView
- android:text="@string/table_layout_4_save_shortcut"
- android:gravity="right"
- android:padding="3dip" />
- &lt;/TableRow>
-&lt;/TableLayout>
-</pre></td>
- <td><img src="{@docRoot}images/table_layout.png" alt="" style="margin:0" /></td>
- </tr>
-</table>
-
-<p>Columns can be hidden, marked to stretch and fill the available screen space,
- or can be marked as shrinkable to force the column to shrink until the table
- fits the screen. See the {@link android.widget.TableLayout TableLayout reference}
-documentation for more details. </p>
-
-<p>To view sample code, see the <a href="{@docRoot}resources/tutorials/views/hello-tablelayout.html">Hello
-TableLayout</a> tutorial.</p>
-
-
-<h2 id="relativelayout">RelativeLayout</h2>
-<p>{@link android.widget.RelativeLayout} lets child views specify their
- position relative to the parent view or to each other (specified by ID). So you can
- align two elements by right border, or make one below another, centered in
- the screen, centered left, and so on. Elements are rendered in the order given, so if the first element
- is centered in the screen, other elements aligning themselves to that element
- will be aligned relative to screen center. Also, because of this ordering, if using XML to specify this layout,
- the element that you will reference (in order to position other view objects) must be listed in the XML
-file before you refer to it from the other views via its reference ID. </p>
-<p>The example below shows an XML file and the resulting screen in the UI.
-Note that the attributes that refer to relative elements (e.g., <var>layout_toLeft</var>)
-refer to the ID using the syntax of a relative resource
-(<var>@id/<em>id</em></var>). </p>
-
-<table class="columns">
- <tr>
- <td>
- <pre>
-&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android"
- android:layout_width=&quot;fill_parent&quot;
- android:layout_height=&quot;wrap_content&quot;
- android:background=&quot;@drawable/blue&quot;
- android:padding=&quot;10px&quot; &gt;
-
- &lt;TextView android:id=&quot;@+id/label&quot;
- android:layout_width=&quot;fill_parent&quot;
- android:layout_height=&quot;wrap_content&quot;
- android:text=&quot;Type here:&quot; /&gt;
-
- &lt;EditText android:id=&quot;@+id/entry&quot;
- android:layout_width=&quot;fill_parent&quot;
- android:layout_height=&quot;wrap_content&quot;
- android:background=&quot;@android:drawable/editbox_background&quot;
- android:layout_below=&quot;@id/label&quot; /&gt;
-
- &lt;Button android:id=&quot;@+id/ok&quot;
- android:layout_width=&quot;wrap_content&quot;
- android:layout_height=&quot;wrap_content&quot;
- android:layout_below=&quot;@id/entry&quot;
- android:layout_alignParentRight=&quot;true&quot;
- android:layout_marginLeft=&quot;10px&quot;
- android:text=&quot;OK&quot; /&gt;
-
- &lt;Button android:layout_width=&quot;wrap_content&quot;
- android:layout_height=&quot;wrap_content&quot;
- android:layout_toLeftOf=&quot;@id/ok&quot;
- android:layout_alignTop=&quot;@id/ok&quot;
- android:text=&quot;Cancel&quot; /&gt;
-&lt;/RelativeLayout&gt;
-</pre></td>
- <td><img src="{@docRoot}images/designing_ui_layout_example.png" alt="" style="margin:0" /></td>
- </tr>
-</table>
-
-
-<p>Some of these properties are supported directly by
- the element, and some are supported by its LayoutParams member (subclass RelativeLayout
- for all the elements in this screen, because all elements are children of a RelativeLayout
- parent object). The defined RelativeLayout parameters are: <code>width</code>, <code>height</code>,
- <code>below</code>, <code>alignTop</code>, <code>toLeft</code>, <code>padding[Bottom|Left|Right|Top]</code>,
- and <code>margin[Bottom|Left|Right|Top]</code>. Note that some of these parameters specifically support
- relative layout positions &mdash; their values must be the ID of the element to which you'd like this view laid relative.
- For example, assigning the parameter <code>toLeft="my_button"</code> to a TextView would place the TextView to
- the left of the View with the ID <var>my_button</var> (which must be written in the XML <em>before</em> the TextView). </p>
-
-<p>To view this sample code, see the <a href="{@docRoot}resources/tutorials/views/hello-relativelayout.html">Hello
-RelativeLayout</a> tutorial.</p>
-
-
-<h2 id="viewgroupsummary">Summary of Important View Groups</h2>
-<p>These objects all hold child UI elements. Some provide their own form of a visible UI, while others
- are invisible structures that only manage the layout of their child views. </p>
-<table width="100%" border="1">
- <tr>
- <th scope="col">Class</th>
- <th scope="col">Description</th>
- </tr>
- <tr>
- <td>{@link android.widget.FrameLayout FrameLayout}</td>
- <td>Layout that acts as a view frame to display
- a single object. </td>
- </tr>
- <tr>
- <td>{@link android.widget.Gallery Gallery} </td>
- <td>A horizontal scrolling display of images, from a bound list. </td>
- </tr>
- <tr>
- <td>{@link android.widget.GridView GridView} </td>
- <td>Displays a scrolling grid of m columns and n rows.</td>
- </tr>
- <tr>
- <td>{@link android.widget.LinearLayout LinearLayout} </td>
- <td>A layout that organizes its children into a single horizontal or vertical
- row. It creates a scrollbar if the length of the window exceeds the length
- of the screen. </td>
- </tr>
- <tr>
- <td>{@link android.widget.ListView ListView} </td>
- <td>Displays a scrolling single column list. </td>
- </tr>
- <tr>
- <td>{@link android.widget.RelativeLayout RelativeLayout} </td>
- <td>Enables you to specify the location of child objects relative to each
- other (child A to the left of child B) or to the parent (aligned to the
- top of the parent). </td>
- </tr>
- <tr>
- <td>{@link android.widget.ScrollView ScrollView} </td>
- <td>A vertically scrolling column of elements. </td>
- </tr>
- <tr>
- <td>{@link android.widget.Spinner Spinner} </td>
- <td>Displays a single item at a time from a bound list, inside a one-row
- textbox. Rather like a one-row listbox that can scroll either horizontally
- or vertically. </td>
- </tr>
- <tr>
- <td>{@link android.view.SurfaceView SurfaceView} </td>
- <td>Provides direct access to a dedicated drawing surface. It can hold child
- views layered on top of the surface, but is intended for applications
- that need to draw pixels, rather than using widgets. </td>
- </tr>
- <tr>
- <td>{@link android.widget.TabHost TabHost} </td>
- <td>Provides a tab selection list that monitors clicks and enables the application
- to change the screen whenever a tab is clicked. </td>
- </tr>
- <tr>
- <td>{@link android.widget.TableLayout TableLayout} </td>
- <td>A tabular layout with an arbitrary number of rows and columns, each cell
- holding the widget of your choice. The rows resize to fit the largest
- column. The cell borders are not
- visible. </td>
- </tr>
- <tr>
- <td>{@link android.widget.ViewFlipper ViewFlipper} </td>
- <td>A list that displays one item at a time, inside a one-row textbox. It
- can be set to swap items at timed intervals, like a slide show. </td>
- </tr>
- <tr>
- <td>{@link android.widget.ViewSwitcher ViewSwitcher} </td>
- <td>Same as ViewFlipper. </td>
- </tr>
-</table>
+<p>You should have been redirected to <a href="declaring-layout.html">Layouts</a>.</p> \ No newline at end of file
diff --git a/docs/html/resources/tutorials/views/hello-tablelayout.jd b/docs/html/guide/topics/ui/layout/grid.jd
index c8c59828599c..52f453bb6a33 100644
--- a/docs/html/resources/tutorials/views/hello-tablelayout.jd
+++ b/docs/html/guide/topics/ui/layout/grid.jd
@@ -1,12 +1,81 @@
-page.title=Table Layout
-parent.title=Hello, Views
-parent.link=index.html
+page.title=Table
+parent.title=Layouts
+parent.link=layout-objects.html
@jd:body
-
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+ <ol>
+ <li><a href="#example">Example</a></li>
+ </ol>
+ <h2>Key classes</h2>
+ <ol>
+ <li>{@link android.widget.TableLayout}</li>
+ <li>{@link android.widget.TableRow}</li>
+ <li>{@link android.widget.TextView}</li>
+ </ol>
+</div>
+</div>
<p>{@link android.widget.TableLayout} is a {@link android.view.ViewGroup} that
displays child {@link android.view.View} elements in rows and columns.</p>
+
+<img src="{@docRoot}images/ui/gridlayout.png" alt="" />
+
+<p>{@link android.widget.TableLayout} positions its children into rows
+ and columns. TableLayout containers do not display border lines for their rows, columns,
+ or cells. The table will have as many columns as the row with the most cells. A table can leave
+cells empty, but cells cannot span columns, as they can in HTML.</p>
+<p>{@link android.widget.TableRow} objects are the child views of a TableLayout
+(each TableRow defines a single row in the table).
+Each row has zero or more cells, each of which is defined by any kind of other View. So, the cells of a row may be
+composed of a variety of View objects, like ImageView or TextView objects.
+A cell may also be a ViewGroup object (for example, you can nest another TableLayout as a cell).</p>
+<p>The following sample layout has two rows and two cells in each. The accompanying screenshot shows the
+result, with cell borders displayed as dotted lines (added for visual effect). </p>
+
+<table class="columns">
+ <tr>
+ <td>
+ <pre>
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:stretchColumns="1">
+ &lt;TableRow>
+ &lt;TextView
+ android:text="@string/table_layout_4_open"
+ android:padding="3dip" />
+ &lt;TextView
+ android:text="@string/table_layout_4_open_shortcut"
+ android:gravity="right"
+ android:padding="3dip" />
+ &lt;/TableRow>
+
+ &lt;TableRow>
+ &lt;TextView
+ android:text="@string/table_layout_4_save"
+ android:padding="3dip" />
+ &lt;TextView
+ android:text="@string/table_layout_4_save_shortcut"
+ android:gravity="right"
+ android:padding="3dip" />
+ &lt;/TableRow>
+&lt;/TableLayout>
+</pre></td>
+ <td><img src="{@docRoot}images/table_layout.png" alt="" style="margin:0" /></td>
+ </tr>
+</table>
+
+<p>Columns can be hidden, marked to stretch and fill the available screen space,
+ or can be marked as shrinkable to force the column to shrink until the table
+ fits the screen. See the {@link android.widget.TableLayout TableLayout reference}
+documentation for more details. </p>
+
+
+<h2 id="example">Example</h2>
<ol>
<li>Start a new project named <em>HelloTableLayout</em>.</li>
<li>Open the <code>res/layout/main.xml</code> file and insert the following:
@@ -114,11 +183,5 @@ file.</p>
<p>You should see the following:</p>
<img src="images/hello-tablelayout.png" width="150px" />
-<h3>References</h3>
-<ul>
- <li>{@link android.widget.TableLayout}</li>
- <li>{@link android.widget.TableRow}</li>
- <li>{@link android.widget.TextView}</li>
-</ul>
diff --git a/docs/html/resources/tutorials/views/hello-gridview.jd b/docs/html/guide/topics/ui/layout/gridview.jd
index 03bfc5449187..284a25a5271b 100644
--- a/docs/html/resources/tutorials/views/hello-gridview.jd
+++ b/docs/html/guide/topics/ui/layout/gridview.jd
@@ -1,13 +1,31 @@
-page.title=Grid View
-parent.title=Hello, Views
-parent.link=index.html
+page.title=Grid
+parent.title=Layouts
+parent.link=layout-objects.html
@jd:body
-
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+ <ol>
+ <li><a href="#example">Example</a></li>
+ </ol>
+ <h2>Key classes</h2>
+ <ol>
+ <li>{@link android.widget.GridView}</li>
+ <li>{@link android.widget.ImageView}</li>
+ <li>{@link android.widget.BaseAdapter}</li>
+ <li>{@link android.widget.AdapterView.OnItemClickListener}</li>
+ </ol>
+</div>
+</div>
<p>{@link android.widget.GridView} is a {@link android.view.ViewGroup} that displays items in a
two-dimensional,
scrollable grid. The grid items are automatically inserted to the layout using a {@link
android.widget.ListAdapter}.</p>
+<img src="{@docRoot}images/ui/gridview.png" alt="" />
+
+
+<h2 id="example">Example</h2>
<p>In this tutorial, you'll create a grid of image thumbnails. When an item is selected, a
toast message will display the position of the image.</p>
@@ -164,19 +182,10 @@ array, which is set as the image resource for the {@link android.widget.ImageVie
</li>
<li>Run the application.</li>
</ol>
-<p>Your grid layout should look something like this:</p>
-<img src="images/hello-gridview.png" width="150px" />
<p>Try experimenting with the behaviors of the {@link android.widget.GridView} and {@link
android.widget.ImageView} elements by adjusting their properties. For example, instead of using
{@link android.view.View#setLayoutParams(ViewGroup.LayoutParams)}, try using
{@link android.widget.ImageView#setAdjustViewBounds(boolean)}. </p>
-<h3>References</h3>
-<ul>
- <li>{@link android.widget.GridView}</li>
- <li>{@link android.widget.ImageView}</li>
- <li>{@link android.widget.BaseAdapter}</li>
- <li>{@link android.widget.AdapterView.OnItemClickListener}</li>
-</ul>
diff --git a/docs/html/guide/topics/ui/layout/linear.jd b/docs/html/guide/topics/ui/layout/linear.jd
new file mode 100644
index 000000000000..8e3370642e31
--- /dev/null
+++ b/docs/html/guide/topics/ui/layout/linear.jd
@@ -0,0 +1,116 @@
+page.title=Linear Layout
+parent.title=Layouts
+parent.link=layout-objects.html
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+<ol>
+ <li><a href="#Weight">Layout Weight</a></li>
+ <li><a href="#Example">Example</a></li>
+</ol>
+
+<h2>Key classes</h2>
+<ol>
+ <li>{@link android.widget.LinearLayout}</li>
+ <li>{@link android.widget.LinearLayout.LayoutParams}</li>
+</ol>
+</div>
+</div>
+
+<p>{@link android.widget.LinearLayout} is a view group that aligns all children in a single
+direction, vertically or horizontally. You can specify the layout direction with the
+<a href="{@docRoot}reference/android/widget/LinearLayout.html#attr_android:orientation">{@code
+android:orientation}</a> attribute.</p>
+
+<img src="{@docRoot}images/ui/linearlayout.png" alt="" />
+
+<p>All children of a {@link android.widget.LinearLayout} are
+stacked one after the other, so a vertical list will only have one child per
+row, no matter how wide they are, and a horizontal list will only be one row
+high (the height of the tallest child, plus padding). A {@link
+android.widget.LinearLayout LinearLayout} respects <em>margin</em>s between children
+and the <em>gravity</em> (right, center, or left alignment) of each child. </p>
+
+
+<h2 id="Weight">Layout Weight</h2>
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+ <h3>Equally weighted children</h3>
+<p>To create a linear layout in which each child uses the same amount of
+space on the screen, set the <a
+href="{@docRoot}reference/android/view/ViewGroup.LayoutParams.html#attr_android:layout_height"
+>{@code android:layout_height}</a> of each view to {@code "0dp"} (for a
+vertical layout) or the <a
+href="{@docRoot}reference/android/view/ViewGroup.LayoutParams.html#attr_android:layout_width"
+>{@code android:layout_width}</a> of each view to {@code "0dp"} (for a
+horizontal
+layout). Then set the <a
+href="{@docRoot}reference/android/widget/LinearLayout.LayoutParams.html#attr_android:layout_weight"
+>{@code android:layout_weight}</a> of each view to {@code "1"}.</p>
+</div>
+</div>
+
+
+<p>{@link android.widget.LinearLayout} also supports assigning a
+<em>weight</em> to individual children with the <a
+href="{@docRoot}reference/android/widget/LinearLayout.LayoutParams.html#attr_android:layout_weight"
+>{@code android:layout_weight}</a> attribute.
+This attribute assigns an "importance" value to a view in
+terms of how much space is should occupy on the screen. A larger weight value allows it to expand
+to fill any remaining space in the parent view.
+Child views can specify a weight value, and then any remaining space in the view group is
+assigned to children in the proportion of their declared weight. Default
+weight is zero.</p>
+
+<p>For example, if there are three text fields and two of them declare a weight of 1, while the
+other is given no weight, the third text field without weight will not grow and will only occupy the
+area required by its content. The other two will expand equally to fill the space remaining after
+all three fields are measured. If the third field is then given a weight of 2 (instead of 0), then
+it is now declared more important than both the others, so it gets half the total remaining space,
+while the first two
+share the rest equally.</p>
+
+
+<h2 id="Example">Example</h2>
+
+<div class="figure" style="width:220px;margin-top:0">
+<img src="{@docRoot}images/ui/sample-linearlayout.png" alt="" />
+</div>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?>
+&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:orientation="vertical" >
+ &lt;EditText
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/to" />
+ &lt;EditText
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/subject" />
+ &lt;EditText
+ android:layout_width="fill_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:gravity="top"
+ android:hint="@string/message" />
+ &lt;Button
+ android:layout_width="100dp"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:text="@string/send" />
+&lt;/LinearLayout>
+</pre>
+
+<p>For details about the attributes available to each child view of a {@link
+android.widget.LinearLayout}, see {@link android.widget.LinearLayout.LayoutParams}.</p>
+
+
diff --git a/docs/html/guide/topics/ui/layout/listview.jd b/docs/html/guide/topics/ui/layout/listview.jd
new file mode 100644
index 000000000000..26a75979988d
--- /dev/null
+++ b/docs/html/guide/topics/ui/layout/listview.jd
@@ -0,0 +1,151 @@
+page.title=List View
+parent.title=Layouts
+parent.link=declaring-layout.html
+@jd:body
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+ <ol>
+ <li><a href="#Loader">Using a Loader</a></li>
+ <li><a href="#Example">Example</a></li>
+ </ol>
+ <h2>Key classes</h2>
+ <ol>
+ <li>{@link android.widget.ListView}</li>
+ <li>{@link android.widget.Adapter}</li>
+ <li>{@link android.support.v4.content.CursorLoader}</li>
+ </ol>
+ <h2>See also</h2>
+ <ol>
+ <li><a
+href="{@docRoot}guide/components/loaders.html">Loaders</a></li>
+ </ol>
+</div>
+</div>
+
+<p>{@link android.widget.ListView} is a view group that displays a list of
+scrollable items. The list items are automatically inserted to the list using an {@link
+android.widget.Adapter} that pulls content from a source such as an array or database query and
+converts each item result into a view that's placed into the list.</p>
+
+<img src="{@docRoot}images/ui/listview.png" alt="" />
+
+<h2 id="Loader">Using a Loader</h2>
+
+<p>Using a {@link
+android.support.v4.content.CursorLoader} is the standard way to query a {@link
+android.database.Cursor} as an asynchronous task in order to avoid blocking your app's main thread
+with the query. When the {@link android.support.v4.content.CursorLoader} receives the {@link
+android.database.Cursor} result, the {@link android.support.v4.app.LoaderManager.LoaderCallbacks
+LoaderCallbacks} receives a callback to {@link
+android.support.v4.app.LoaderManager.LoaderCallbacks#onLoadFinished onLoadFinished()}, which is
+where you update your {@link
+android.widget.Adapter} with the new {@link android.database.Cursor} and the list view then
+displays the results.</p>
+
+<p>Although the {@link android.support.v4.content.CursorLoader} APIs were first introduced in
+Android 3.0 (API level 11), they are also available in the <a
+href="{@docRoot}tools/extras/support-library.html">Support Library</a> so that your app may use them
+while supporting devices running Android 1.6 or higher.</p>
+
+<p>For more information about using a {@link
+android.support.v4.content.Loader} to asynchronously load data, see the <a
+href="{@docRoot}guide/components/loaders.html">Loaders</a> guide.</p>
+
+
+<h2 id="Example">Example</h2>
+
+<p>The following example uses {@link android.app.ListActivity}, which is an activity that includes
+a {@link android.widget.ListView} as its only layout element by default. It performs a query to
+the <a
+href="{@docRoot}guide/topics/providers/contacts-provider.html">Contacts
+Provider</a> for a list of names and phone numbers.</p>
+
+<p>The activity implements the {@link android.support.v4.app.LoaderManager.LoaderCallbacks
+LoaderCallbacks} interface in order to use a {@link android.support.v4.content.CursorLoader} that
+dynamically loads the data for the list view.</p>
+
+<pre>
+public class ListViewLoader extends ListActivity
+ implements LoaderManager.LoaderCallbacks&lt;Cursor> {
+
+ // This is the Adapter being used to display the list's data
+ SimpleCursorAdapter mAdapter;
+
+ // These are the Contacts rows that we will retrieve
+ static final String[] PROJECTION = new String[] {ContactsContract.Data._ID,
+ ContactsContract.Data.DISPLAY_NAME};
+
+ // This is the select criteria
+ static final String SELECTION = "((" +
+ ContactsContract.Data.DISPLAY_NAME + " NOTNULL) AND (" +
+ ContactsContract.Data.DISPLAY_NAME + " != '' ))";
+
+ &#64;Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ // Create a progress bar to display while the list loads
+ ProgressBar progressBar = new ProgressBar(this);
+ progressBar.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
+ LayoutParams.WRAP_CONTENT, Gravity.CENTER));
+ progressBar.setIndeterminate(true);
+ getListView().setEmptyView(progressBar);
+
+ // Must add the progress bar to the root of the layout
+ ViewGroup root = (ViewGroup) findViewById(android.R.id.content);
+ root.addView(progressBar);
+
+ // For the cursor adapter, specify which columns go into which views
+ String[] fromColumns = {ContactsContract.Data.DISPLAY_NAME};
+ int[] toViews = {android.R.id.text1}; // The TextView in simple_list_item_1
+
+ // Create an empty adapter we will use to display the loaded data.
+ // We pass null for the cursor, then update it in onLoadFinished()
+ mAdapter = new SimpleCursorAdapter(this,
+ android.R.layout.simple_list_item_1, null,
+ fromColumns, toViews, 0);
+ setListAdapter(mAdapter);
+
+ // Prepare the loader. Either re-connect with an existing one,
+ // or start a new one.
+ getLoaderManager().initLoader(0, null, this);
+ }
+
+ // Called when a new Loader needs to be created
+ public Loader&lt;Cursor> onCreateLoader(int id, Bundle args) {
+ // Now create and return a CursorLoader that will take care of
+ // creating a Cursor for the data being displayed.
+ return new CursorLoader(this, ContactsContract.Data.CONTENT_URI,
+ PROJECTION, SELECTION, null, null);
+ }
+
+ // Called when a previously created loader has finished loading
+ public void onLoadFinished(Loader&lt;Cursor> loader, Cursor data) {
+ // Swap the new cursor in. (The framework will take care of closing the
+ // old cursor once we return.)
+ mAdapter.swapCursor(data);
+ }
+
+ // Called when a previously created loader is reset, making the data unavailable
+ public void onLoaderReset(Loader&lt;Cursor> loader) {
+ // This is called when the last Cursor provided to onLoadFinished()
+ // above is about to be closed. We need to make sure we are no
+ // longer using it.
+ mAdapter.swapCursor(null);
+ }
+
+ &#64;Override
+ public void onListItemClick(ListView l, View v, int position, long id) {
+ // Do something when a list item is clicked
+ }
+}
+</pre>
+
+<p class="note"><strong>Note:</strong> Because this sample performs a query on the <a
+href="{@docRoot}guide/topics/providers/contacts-provider.html">Contacts
+Provider</a>, if you want to
+try this code, your app must request the {@link android.Manifest.permission#READ_CONTACTS}
+permission in the manifest file:<br/>
+<code>&lt;uses-permission android:name="android.permission.READ_CONTACTS" /></p>
+
diff --git a/docs/html/guide/topics/ui/layout/relative.jd b/docs/html/guide/topics/ui/layout/relative.jd
new file mode 100644
index 000000000000..ee6cf02bd642
--- /dev/null
+++ b/docs/html/guide/topics/ui/layout/relative.jd
@@ -0,0 +1,118 @@
+page.title=Relative Layout
+parent.title=Layouts
+parent.link=layout-objects.html
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+ <ol>
+ <li><a href="#Position">Positioning Views</a></li>
+ <li><a href="#Example">Example</a></li>
+ </ol>
+ <h2>Key classes</h2>
+ <ol>
+ <li>{@link android.widget.RelativeLayout}</li>
+ <li>{@link android.widget.RelativeLayout.LayoutParams}</li>
+ </ol>
+</div>
+</div>
+
+<p>{@link android.widget.RelativeLayout} is a view group that displays child views in relative
+positions. The position of each view can be specified as relative to sibling elements (such as to
+the left-of or below another view) or in positions relative to the parent {@link
+android.widget.RelativeLayout} area (such as aligned to the bottom, left of center).</p>
+
+<img src="{@docRoot}images/ui/relativelayout.png" alt="" />
+
+<p>A {@link android.widget.RelativeLayout} is a very powerful utility for designing a user interface
+because it can eliminate nested view groups and keep your layout hierarchy flat, which improves
+performance. If you find yourself using several nested {@link android.widget.LinearLayout} groups,
+you may be able to replace them with a single {@link android.widget.RelativeLayout}.</p>
+
+
+<h2 id="Position">Positioning Views</h2>
+
+<p>{@link android.widget.RelativeLayout} lets child views specify their position relative to the
+parent view or to each other (specified by ID). So you can align two elements by right border, or
+make one below another, centered in the screen, centered left, and so on. By default, all child
+views are drawn at the top-left of the layout, so you must define the position of each view
+using the various layout properties available from {@link
+android.widget.RelativeLayout.LayoutParams}.</p>
+
+<p>Some of the many layout properties available to views in a {@link android.widget.RelativeLayout}
+include:</p>
+<dl>
+ <dt><a
+href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignParentTop"
+>{@code android:layout_alignParentTop}</a></dt>
+ <dd>If {@code "true"}, makes the top edge of this view match the top edge of the parent. </dd>
+ <dt><a
+href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_centerVertical"
+>{@code android:layout_centerVertical}</a></dt>
+ <dd>If {@code "true"}, centers this child vertically within its parent.</dd>
+ <dt><a
+href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_below"
+>{@code android:layout_below}</a></dt>
+ <dd>Positions the top edge of this view below the view specified with a resource ID.</dd>
+ <dt><a
+href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_toRightOf"
+>{@code android:layout_toRightOf}</a></dt>
+ <dd>Positions the left edge of this view to the right of the view specified with a resource ID.</dd>
+</dl>
+
+<p>These are just a few examples. All layout attributes are documented at {@link
+android.widget.RelativeLayout.LayoutParams}.</p>
+
+<p>The value for each layout property is either a boolean to
+enable a layout position relative to the parent {@link android.widget.RelativeLayout} or an ID that
+references another view in the layout against which the view should be positioned.</p>
+
+<p>In your XML layout, dependencies against other views in the layout can be declared in any order.
+For example, you can declare that "view1" be positioned below "view2" even if "view2" is the last
+view declared in the hierarchy. The example below demonstrates such a scenario.</p>
+
+
+<h2 id="Example">Example</h2>
+
+<p>Each of the attributes that control the relative position of each view are emphasized.</p>
+<div class="figure" style="width:220px;margin-top:0">
+<img src="{@docRoot}images/ui/sample-relativelayout.png" alt="" />
+</div>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?>
+&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp" >
+ &lt;EditText
+ android:id="@+id/name"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/reminder" />
+ &lt;Spinner
+ android:id="@+id/dates"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ <strong>android:layout_below="@id/name"</strong>
+ <strong>android:layout_alignParentLeft="true"</strong>
+ <strong>android:layout_toLeftOf="@+id/times"</strong> />
+ &lt;Spinner
+ android:id="@id/times"
+ android:layout_width="96dp"
+ android:layout_height="wrap_content"
+ <strong>android:layout_below="@id/name"</strong>
+ <strong>android:layout_alignParentRight="true"</strong> />
+ &lt;Button
+ android:layout_width="96dp"
+ android:layout_height="wrap_content"
+ <strong>android:layout_below="@id/times"</strong>
+ <strong>android:layout_alignParentRight="true"</strong>
+ android:text="@string/done" />
+&lt;/RelativeLayout>
+</pre>
+
+<p>For details about all the layout attributes available to each child view of a {@link
+android.widget.RelativeLayout}, see {@link android.widget.RelativeLayout.LayoutParams}.</p> \ No newline at end of file
diff --git a/docs/html/resources/tutorials/views/hello-tabwidget.jd b/docs/html/guide/topics/ui/layout/tabs.jd
index 9bafd84e26c1..62663de8a84d 100644
--- a/docs/html/resources/tutorials/views/hello-tabwidget.jd
+++ b/docs/html/guide/topics/ui/layout/tabs.jd
@@ -1,20 +1,36 @@
-page.title=Tab Layout
-parent.title=Hello, Views
-parent.link=index.html
+page.title=Tabbed
+parent.title=Layouts
+parent.link=layout-objects.html
@jd:body
-
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+ <ol>
+ <li><a href="#example">Example</a></li>
+ </ol>
+ <h2>Key classes</h2>
+ <ol>
+<li>{@link android.widget.TabWidget}</li>
+<li>{@link android.widget.TabHost}</li>
+<li>{@link android.widget.TabHost.TabSpec}</li>
+<li>{@link android.widget.FrameLayout}</li>
+ </ol>
+</div>
+</div>
<p>To create a tabbed UI, you need to use a {@link android.widget.TabHost} and a {@link
android.widget.TabWidget}. The {@link android.widget.TabHost} must be the root node for the layout,
which contains both the {@link android.widget.TabWidget} for displaying the tabs and a {@link
android.widget.FrameLayout} for displaying the tab content.</p>
+<img src="{@docRoot}images/ui/tabs.png" alt="" />
+
<p>You can implement your tab content in one of two ways: use the tabs to swap
{@link android.view.View}s within the same {@link android.app.Activity}, or use the tabs to change
between entirely separate activities. Which method you want for your application will depend on your
demands, but if each tab provides a distinct user activity, then it probably makes sense to use
a separate {@link android.app.Activity} for each tab, so that you can better manage the application
in discrete groups, rather than one massive application and layout.</p>
-
+<h2 id="example">Example</h2>
<p>In this tutorial, you'll create a tabbed UI that uses a separate {@link
android.app.Activity} for each tab.</p>
@@ -200,11 +216,4 @@ calling {@link android.widget.TabHost#addTab(TabHost.TabSpec)}.</p>
<p>Your application should look like this (though your icons may be different):</p>
<img src="images/hello-tabwidget.png" width="150px" />
-<h3>References</h3>
-<ul>
-<li>{@link android.widget.TabWidget}</li>
-<li>{@link android.widget.TabHost}</li>
-<li>{@link android.widget.TabHost.TabSpec}</li>
-<li>{@link android.widget.FrameLayout}</li>
-</ul>
diff --git a/docs/html/guide/topics/ui/menus.jd b/docs/html/guide/topics/ui/menus.jd
index d51a378cb4a3..01d373ef2e86 100644
--- a/docs/html/guide/topics/ui/menus.jd
+++ b/docs/html/guide/topics/ui/menus.jd
@@ -1040,7 +1040,7 @@ category. For example:</p>
</pre>
<p>Read more about writing intent filters in the
-<a href="/guide/topics/intents/intents-filters.html">Intents and Intent Filters</a> document.</p>
+<a href="/guide/components/intents-filters.html">Intents and Intent Filters</a> document.</p>
<p>For a sample application using this technique, see the
<a href="{@docRoot}resources/samples/NotePad/src/com/example/android/notepad/NoteEditor.html">Note
diff --git a/docs/html/guide/topics/ui/notifiers/index.jd b/docs/html/guide/topics/ui/notifiers/index.jd
index c61d4f010f35..caf0df70edd1 100644
--- a/docs/html/guide/topics/ui/notifiers/index.jd
+++ b/docs/html/guide/topics/ui/notifiers/index.jd
@@ -21,7 +21,7 @@ the application should show a hovering progress wheel or bar.</li>
<ul>
<li>A <a href="#Toast">Toast Notification</a>, for brief messages that come
from the background.</li>
- <li>A <a href="#StatusBar">Status Bar Notification</a>, for persistent reminders
+ <li>A <a href="#StatusBar">Status Notification</a>, for persistent reminders
that come from the background and request the user's response.</li>
<li>A <a href="#Dialog">Dialog Notification</a>, for Activity-related notifications.</li>
</ul>
@@ -44,16 +44,16 @@ out, and does not accept interaction events. Because a toast can be created from
when you're fairly certain the user is paying attention
to the screen. A toast can not accept user interaction events; if you'd like
the user to respond and take action, consider using a
-<a href="#StatusBar">Status Bar Notification</a> instead.</p>
+<a href="#StatusBar">Status Notification</a> instead.</p>
<p>For more information, refer to <a href="toasts.html">Toast Notifications</a>.</p>
-<h2 id="StatusBar">Status Bar Notification</h2>
+<h2 id="StatusBar">Status Notification</h2>
<img src="{@docRoot}images/notifications_window.png" alt="" style="float:right; clear:right;" />
-<p>A status bar notification adds an icon to the system's status bar
+<p>A status notification adds an icon to the system's status bar
(with an optional ticker-text message) and an expanded message in the "Notifications" window.
When the user selects the expanded message, Android fires an
{@link android.content.Intent} that is defined by the notification (usually to launch an
@@ -68,7 +68,7 @@ while your Activity is still in focus, consider using a
<a href="#Dialog">Dialog Notification</a> instead.</p>
<p>For more information, refer to
-<a href="notifications.html">Status Bar Notifications</a>.</p>
+<a href="notifications.html">Status Notifications</a>.</p>
<h2 id="Dialog">Dialog Notification</h2>
diff --git a/docs/html/guide/topics/ui/notifiers/notifications.jd b/docs/html/guide/topics/ui/notifiers/notifications.jd
index d104b4bccd14..52092f9409cf 100644
--- a/docs/html/guide/topics/ui/notifiers/notifications.jd
+++ b/docs/html/guide/topics/ui/notifiers/notifications.jd
@@ -1,4 +1,4 @@
-page.title=Status Bar Notifications
+page.title=Status Notifications
parent.title=Notifications
parent.link=index.html
@jd:body
@@ -7,7 +7,7 @@ parent.link=index.html
<div id="qv">
<h2>Quickview</h2>
<ul>
- <li>A status bar notification allows your application to notify the user of an event
+ <li>A status notification allows your application to notify the user of an event
without interupting their current activity</li>
<li>You can attach an intent to your notification that the system will initiate when the
user clicks it</li>
@@ -43,7 +43,7 @@ Design: Notifications</a></li>
</div>
</div>
-<p>A status bar notification adds an icon to the system's status bar
+<p>A status notification adds an icon to the system's status bar
(with an optional ticker-text message) and a notification message in the notifications window.
When the user selects the notification, Android fires an
{@link android.content.Intent} that is defined by the {@link android.app.Notification} (usually to
@@ -51,11 +51,11 @@ launch an {@link android.app.Activity}).
You can also configure the notification to alert the user with a sound, a vibration, and flashing
lights on the device.</p>
-<p>A status bar notification should be used for any case in
+<p>A status notification should be used for any case in
which a background service needs to alert the user about an event that requires a response. A
background service
<strong>should never</strong> launch an activity on its own in order to receive user interaction.
-The service should instead create a status bar notification that will launch the activity
+The service should instead create a status notification that will launch the activity
when selected by the user.</p>
<p>Figure 1 shows the status bar with a notification icon on the left side.</p>
@@ -78,9 +78,9 @@ href="{@docRoot}design/patterns/notifications.html">Notifications</a> guide.</p>
<h2 id="Basics">The Basics</h2>
-<p>An {@link android.app.Activity} or {@link android.app.Service} can initiate a status bar
+<p>An {@link android.app.Activity} or {@link android.app.Service} can initiate a status
notification. Because an activity can perform actions only while it is
-running in the foreground and its window has focus, you will usually create status bar notifications
+running in the foreground and its window has focus, you will usually create status notifications
from a
service. This way, the notification can be created from the background,
while the user is using another application or
@@ -88,9 +88,9 @@ while the device is asleep. To create a notification, you must use two
classes: {@link android.app.Notification} and {@link android.app.NotificationManager}.</p>
<p>Use an instance of the {@link android.app.Notification} class to define the properties of your
-status bar notification, such as the status bar icon, the notification message, and extra settings
+status notification, such as the status icon, the notification message, and extra settings
such as a sound to play. The {@link android.app.NotificationManager} is an Android system service
-that executes and manages all status bar notifications. You do not instantiate the
+that executes and manages all status notifications. You do not instantiate the
{@link android.app.NotificationManager} directly. In order
to give it your {@link android.app.Notification}, you must retrieve a reference to the
{@link android.app.NotificationManager} with
@@ -98,7 +98,7 @@ to give it your {@link android.app.Notification}, you must retrieve a reference
then, when you want to notify the user, pass it your {@link android.app.Notification} with
{@link android.app.NotificationManager#notify(int,Notification) notify()}. </p>
-<p>To create a status bar notification:</p>
+<p>To create a status notification:</p>
<ol>
<li>Get a reference to the {@link android.app.NotificationManager}:
<pre>
@@ -277,7 +277,7 @@ String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns);
</pre>
-<p>When you want to deliver your status bar notification, pass the {@link android.app.Notification}
+<p>When you want to deliver your status notification, pass the {@link android.app.Notification}
to the {@link android.app.NotificationManager} with {@link
android.app.NotificationManager#notify(int,Notification)}.
The first parameter is the unique ID for the notification and the second is the {@link
@@ -287,7 +287,7 @@ application. The ID is necessary if you need to update the notification or (if
your application manages different kinds of notifications) select the appropriate action
when the user returns to your application via the intent defined in the notification.</p>
-<p>To clear the status bar notification when the user selects it from the notifications
+<p>To clear the status notification when the user selects it from the notifications
window, add the "FLAG_AUTO_CANCEL" flag to your {@link android.app.Notification}. You can
also clear it manually with {@link android.app.NotificationManager#cancel(int)}, passing it the
notification ID, or clear all your notifications with {@link
@@ -300,14 +300,14 @@ android.app.NotificationManager#cancelAll()}.</p>
message that is displayed in the status bar and notifications window, and any other
alert settings, such as sounds and blinking lights.</p>
-<p>A status bar notification <em>requires</em> all of the following:</p>
+<p>A status notification <em>requires</em> all of the following:</p>
<ul>
<li>An icon for the status bar</li>
<li>A title and message, unless you define a
<a href="#CustomExpandedView">custom notification layout</a></li>
<li>A {@link android.app.PendingIntent}, to be fired when the notification is selected</li>
</ul>
-<p>Optional settings for the status bar notification include:</p>
+<p>Optional settings for the status notification include:</p>
<ul>
<li>A ticker-text message for the status bar</li>
<li>An alert sound</li>
@@ -339,7 +339,7 @@ notification.setLatestEventInfo(context, contentTitle, contentText, contentInten
<h3 id="Updating">Updating the notification</h3>
-<p>You can update the information in your status bar notification as events
+<p>You can update the information in your status notification as events
continue to occur in your application. For example, when a new SMS text message arrives
before previous messages have been read, the Messaging application updates the existing
notification to display the total number of new messages received.
@@ -484,7 +484,7 @@ following:</p>
your notification is on-going.</dd>
<dt>{@link android.app.Notification#number} field</dt>
<dd>This value indicates the current number of events represented by the notification.
- The appropriate number is overlaid on top of the status bar icon.
+ The appropriate number is overlaid on top of the status icon.
If you intend to use this field, then you must start with "1" when the Notification is first
created. (If you change the value from zero to anything greater during an update, the number
is not shown.)</dd>
diff --git a/docs/html/guide/topics/ui/overview.jd b/docs/html/guide/topics/ui/overview.jd
new file mode 100644
index 000000000000..41f7cc7b3f01
--- /dev/null
+++ b/docs/html/guide/topics/ui/overview.jd
@@ -0,0 +1,74 @@
+page.title=UI Overview
+@jd:body
+
+
+<p>All user interface elements in an Android app are built using {@link android.view.View} and
+{@link android.view.ViewGroup} objects. A {@link android.view.View} is an object that draws
+something on the screen that the user can interact with. A {@link android.view.ViewGroup} is an
+object that holds other {@link android.view.View} (and {@link android.view.ViewGroup}) objects in
+order to define the layout of the interface.</p>
+
+<p>Android provides a collection of both {@link android.view.View} and {@link
+android.view.ViewGroup} subclasses that offer you common input controls (such as buttons and text
+fields) and various layout models (such as a linear or relative layout).</p>
+
+
+<h2 id="Layout">User Interface Layout</h2>
+
+<p>The user interface for each component of your app is defined using a hierarchy of {@link
+android.view.View} and {@link android.view.ViewGroup} objects, as shown in figure 1. Each view group
+is an invisible container that organizes child views, while the child views may be input
+controls or other widgets that
+draw some part of the UI. This hierarchy tree can be as simple or complex as you need
+it to be (but simplicity is best for performance).</p>
+
+<img src="{@docRoot}images/viewgroup.png" alt="" />
+<p class="img-caption"><strong>Figure 1.</strong> Illustration of a view hierarchy, which defines a
+UI layout.</p>
+
+<p>To declare your layout, you can instantiate {@link android.view.View} objects in code and start
+building a tree, but the easiest and most effective way to define your layout is with an XML file.
+XML offers a human-readable structure for the layout, similar to HTML.</p>
+
+<p>The name of an XML element for a view is respective to the Android class it represents. So a
+<code>&lt;TextView&gt;</code> element creates a {@link android.widget.TextView} widget in your UI,
+and a <code>&lt;LinearLayout&gt;</code> element creates a {@link android.widget.LinearLayout} view
+group. </p>
+
+<p>For example, a simple vertical layout with a text view and a button looks like this:</p>
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?>
+&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
+ &lt;TextView android:id="@+id/text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="I am a TextView" />
+ &lt;Button android:id="@+id/button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="I am a Button" />
+&lt;/LinearLayout>
+</pre>
+
+<p>When you load a layout resource in your app, Android initializes each node of the layout into a
+runtime object you can use to define additional behaviors, query the object state, or modify the
+layout.</p>
+
+<p>For a complete guide to creating a UI layout, see <a href="declaring-layout.html">XML
+Layouts</a>.
+
+
+<h2 id="UIComponents">User Interface Components</h2>
+
+<p>You don't have to build all of your UI using {@link android.view.View} and {@link
+android.view.ViewGroup} objects. Android provides several app components that offer
+a standard UI layout for which you simply need to define the content. These UI components each
+have a unique set of APIs that are described in their respective documents, such as <a
+href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a>, <a
+href="{@docRoot}guide/topics/ui/dialogs.html">Dialogs</a>, and <a
+href="{@docRoot}guide/topics/ui/notifiers/notifications.html">Status Notifications</a>.</p>
+
+
diff --git a/docs/html/guide/topics/ui/sharables/sample_images.zip b/docs/html/guide/topics/ui/sharables/sample_images.zip
new file mode 100644
index 000000000000..007a68aca79e
--- /dev/null
+++ b/docs/html/guide/topics/ui/sharables/sample_images.zip
Binary files differ
diff --git a/docs/html/guide/topics/views/custom-views.jd b/docs/html/guide/topics/views/custom-views.jd
deleted file mode 100644
index 8589b1a01a1a..000000000000
--- a/docs/html/guide/topics/views/custom-views.jd
+++ /dev/null
@@ -1,544 +0,0 @@
-page.title=Building Custom Views
-parent.title=Views and Layout
-parent.link=index.html
-@jd:body
-
-<p>Android offers a sophisticated and powerful componentized model for building your UI, based on the fundamental building block classes {@link android.view.View} and {@link android.view.ViewGroup}. To start with, the platform includes a variety of prebuilt View and ViewGroup subclasses &mdash; called widgets and layouts, respectively &mdash; that you can use to construct your UI. The widgets and layouts are fully implemented and handle all of their own measuring and drawing, so you can use them right away. You can make new types of UI elements simply by nesting and grouping the widgets and layouts. Using widgets and layouts is the recommended approach to building a UI for your applications.</p>
-
-<p>A partial list of available widgets includes {@link android.widget.Button Button},
-{@link android.widget.TextView TextView},
-{@link android.widget.EditText EditText},
-{@link android.widget.ListView ListView},
-{@link android.widget.CheckBox CheckBox},
-{@link android.widget.RadioButton RadioButton},
-{@link android.widget.Gallery Gallery},
-{@link android.widget.Spinner Spinner}, and the more special-purpose
-{@link android.widget.AutoCompleteTextView AutoCompleteTextView},
-{@link android.widget.ImageSwitcher ImageSwitcher}, and
-{@link android.widget.TextSwitcher TextSwitcher}. </p>
-
-<p>Among the layouts available are {@link android.widget.LinearLayout LinearLayout},
-{@link android.widget.FrameLayout FrameLayout}, {@link android.widget.AbsoluteLayout AbsoluteLayout}, and others. For more examples, see <a href="layout">Common Layout Objects</a>.</p>
-
-<p>If none of the prebuilt widgets or layouts meets your needs, you can also create your own View subclass, such as a layout group or compound control. If you only need to make small adjustments to an existing widget or layout, you can simply subclass the widget or layout and override its methods.
-</p>
-
-<p>Creating your own View subclasses gives you precise control over the appearance and function of a screen element. To give an idea of the control you get with custom views, here are some examples of what you could do with them:</p>
-
-<ul>
- <li>
- You could create a completely custom-rendered View type, for example a "volume
- control" knob rendered using 2D graphics, and which resembles an
- analog electronic control.
- </li>
- <li>
- You could combine a group of View components into a new single component, perhaps
- to make something like a ComboBox (a combination of popup list and free
- entry text field), a dual-pane selector control (a left and right pane
- with a list in each where you can re-assign which item is in which
- list), and so on.
- </li>
- <li>
- You could override the way that an EditText component is rendered on the screen
- (the <a href="{@docRoot}resources/samples/NotePad/">Notepad sample</a> uses this to good effect,
- to create a lined-notepad page).
- </li>
- <li>
- You could capture other events like key presses and handle them in some custom
- way (such as for a game).
- </li>
-</ul>
-<p>
-The sections below explain how to create custom Views and use them in your application.
-For detailed reference information, see the {@link android.view.View} class. </p>
-
-<p>This document covers the following:</p>
-<ol class="toc">
- <li><a href="#basic">The Basic Approach</a></li>
- <li><a href="#custom">Fully Customized Views</a></li>
- <li><a href="#customexample">Customized View Example</a></li>
- <li><a href="#compound">Compound Controls</a></li>
- <li><a href="#tweaking">Modifying an Existing Component Type</a></li>
-</ol>
-
-<a name="basic"></a>
-<h2>The Basic Approach
-</h2>
-<p>
-These steps provide a high level overview of
-what you need to know to get started in creating your own
-View components:</p>
-
-<ol>
- <li>
- Extend an existing {@link android.view.View View} class or subclass
- with your own class.
- </li>
- <li>
- Override some of the methods from the superclass: the superclass methods
- to override start with '<code>on</code>', for
- example, {@link android.view.View#onDraw onDraw()},
- {@link android.view.View#onMeasure onMeasure()}, and
- {@link android.view.View#onKeyDown onKeyDown()}.
- <ul>
- <li>
- This is similar to the <code>on...</code> events in {@link android.app.Activity
- Activity} or {@link android.app.ListActivity ListActivity}
- that you override for life cycle and other functionality hooks.
- </li>
- </ul>
- <li>
- Use your new extension class: once completed, your new extension class
- can be used in place of the view upon which it was based, but now with the new
- functionality.
- </li>
-</ol>
-<p class="note"><strong>Tip:</strong>
- Extension classes can be defined as inner classes inside the activities
- that use them. This is useful because it controls access to them but
- isn't necessary (perhaps you want to create a new public View for
- wider use in your application).
-</p>
-
-<a name="custom"></a>
-<h2>Fully Customized Components</h2>
-<p>
-Fully customized components can be used to create graphical components that
-appear however you wish. Perhaps a graphical VU
-meter that looks like an old analog gauge, or a sing-a-long text view where
-a bouncing ball moves along the words so you can sing along with a karaoke
-machine. Either way, you want something that the built-in components just
-won't do, no matter how you combine them.</p>
-<p>Fortunately, you can easily create components that look and behave in any
-way you like, limited perhaps only by your imagination, the size of the
-screen, and the available processing power (remember that ultimately your
-application might have to run on something with significantly less power
-than your desktop workstation).</p>
-<p>To create a fully customized component:</p>
-<ol>
- <li>
- The most generic view you can extend is, unsurprisingly, {@link
- android.view.View View}, so you will usually start by extending this to
- create your new super component.
- </li>
- <li>
- You can supply a constructor which can
- take attributes and parameters from the XML, and you can also consume
- your own such attributes and parameters (perhaps the color and range of
- the VU meter, or the width and damping of the needle, etc.)
- </li>
- <li>
- You will probably want to create your own event listeners,
- property accessors and modifiers, and possibly more sophisticated
- behavior in your component class as well.
- </li>
- <li>
- You will almost certainly want to override <code>onMeasure()</code> and
- are also likely to need to override <code>onDraw()</code> if you want
- the component to show something. While both have default behavior,
- the default <code>onDraw()</code> will do nothing, and the default
- <code>onMeasure()</code> will always set a size of 100x100 &mdash; which is
- probably not what you want.
- </li>
- <li>
- Other <code>on...</code> methods may also be overridden as required.
- </li>
-</ol>
-<h4><code>onDraw()</code> and <code>onMeasure()</code></h4>
-<p><code>onDraw()</code> delivers you a {@link android.graphics.Canvas Canvas}
-upon which you can implement anything you want: 2D graphics, other standard or
-custom components, styled text, or anything else you can think of.</p>
-<p><em>Note:</em>
-Except for 3D graphics. If you want to
-use 3D graphics, you must extend {@link android.view.SurfaceView SurfaceView}
-instead of View, and draw from a separate thread. See the
-GLSurfaceViewActivity sample
-for details.</p>
-<p><code>onMeasure()</code> is a little more involved. <code>onMeasure()</code>
-is a critical piece of the rendering contract between your component and its
-container. <code>onMeasure()</code> should be overridden to efficiently and
-accurately report the measurements of its contained parts. This is made
-slightly more complex by the requirements of limits from the parent
-(which are passed in to the <code>onMeasure()</code> method) and by the
-requirement to call the <code>setMeasuredDimension()</code> method with the
-measured width and height once they have been calculated. If you fail to
-call this method from an overridden <code>onMeasure()</code> method, the
-result will be an exception at measurement time.</p>
-<p>At a high level, implementing <code>onMeasure()</code> looks something
- like this:</p>
-
-<ol>
- <li>
- The overridden <code>onMeasure()</code> method is called with width and
- height measure specifications (<code>widthMeasureSpec</code> and
- <code>heightMeasureSpec</code> parameters, both are integer codes
- representing dimensions) which should be treated as requirements for
- the restrictions on the width and height measurements you should produce. A
- full reference to the kind of restrictions these specifications can require
- can be found in the reference documentation under {@link
- android.view.View#onMeasure View.onMeasure(int, int)} (this reference
- documentation does a pretty good job of explaining the whole measurement
- operation as well).
- </li>
- <li>
- Your component's <code>onMeasure()</code> method should calculate a
- measurement width and height which will be required to render the
- component. It should try to stay within the specifications passed in,
- although it can choose to exceed them (in this case, the parent can
- choose what to do, including clipping, scrolling, throwing an exception,
- or asking the <code>onMeasure()</code> to try again, perhaps with
- different measurement specifications).
- </li>
- <li>
- Once the width and height are calculated, the <code>setMeasuredDimension(int
- width, int height)</code> method must be called with the calculated
- measurements. Failure to do this will result in an exception being
- thrown.
- </li>
-</ol>
-
-<p>
-Here's a summary of some of the other standard methods that the framework calls on views:
-</p>
-<table border="2" width="85%" align="center" cellpadding="5">
- <thead>
- <tr><th>Category</th> <th>Methods</th> <th>Description</th></tr>
- </thead>
-
- <tbody>
- <tr>
- <td rowspan="2">Creation</td>
- <td>Constructors</td>
- <td>There is a form of the constructor that are called when the view
- is created from code and a form that is called when the view is
- inflated from a layout file. The second form should parse and apply
- any attributes defined in the layout file.
- </td>
- </tr>
- <tr>
- <td><code>{@link android.view.View#onFinishInflate()}</code></td>
- <td>Called after a view and all of its children has been inflated
- from XML.</td>
- </tr>
-
- <tr>
- <td rowspan="3">Layout</td>
- <td><code>{@link android.view.View#onMeasure}</code></td>
- <td>Called to determine the size requirements for this view and all
- of its children.
- </td>
- </tr>
- <tr>
- <td><code>{@link android.view.View#onLayout}</code></td>
- <td>Called when this view should assign a size and position to all
- of its children.
- </td>
- </tr>
- <tr>
- <td><code>{@link android.view.View#onSizeChanged}</code></td>
- <td>Called when the size of this view has changed.
- </td>
- </tr>
-
- <tr>
- <td>Drawing</td>
- <td><code>{@link android.view.View#onDraw}</code></td>
- <td>Called when the view should render its content.
- </td>
- </tr>
-
- <tr>
- <td rowspan="4">Event processing</td>
- <td><code>{@link android.view.View#onKeyDown}</code></td>
- <td>Called when a new key event occurs.
- </td>
- </tr>
- <tr>
- <td><code>{@link android.view.View#onKeyUp}</code></td>
- <td>Called when a key up event occurs.
- </td>
- </tr>
- <tr>
- <td><code>{@link android.view.View#onTrackballEvent}</code></td>
- <td>Called when a trackball motion event occurs.
- </td>
- </tr>
- <tr>
- <td><code>{@link android.view.View#onTouchEvent}</code></td>
- <td>Called when a touch screen motion event occurs.
- </td>
- </tr>
-
- <tr>
- <td rowspan="2">Focus</td>
- <td><code>{@link android.view.View#onFocusChanged}</code></td>
- <td>Called when the view gains or loses focus.
- </td>
- </tr>
-
- <tr>
- <td><code>{@link android.view.View#onWindowFocusChanged}</code></td>
- <td>Called when the window containing the view gains or loses focus.
- </td>
- </tr>
-
- <tr>
- <td rowspan="3">Attaching</td>
- <td><code>{@link android.view.View#onAttachedToWindow()}</code></td>
- <td>Called when the view is attached to a window.
- </td>
- </tr>
-
- <tr>
- <td><code>{@link android.view.View#onDetachedFromWindow}</code></td>
- <td>Called when the view is detached from its window.
- </td>
- </tr>
-
- <tr>
- <td><code>{@link android.view.View#onWindowVisibilityChanged}</code></td>
- <td>Called when the visibility of the window containing the view
- has changed.
- </td>
- </tr>
- </tbody>
-
- </table>
-
-
-<a name="customexample"></a>
-<h3>A Custom View Example</h3>
-<p>The CustomView sample in the
-<a href="{@docRoot}samples/ApiDemos/index.html">API Demos</a> provides an example
-of a customized View. The custom View is defined in the
-<a href="{@docRoot}samples/ApiDemos/src/com/example/android/apis/view/LabelView.html">LabelView</a>
-class.</p>
-<p>The LabelView sample demonstrates a number of different aspects of custom components:</p>
-<ul>
- <li>Extending the View class for a completely custom component.</li>
- <li>Parameterized constructor that takes the view inflation parameters
- (parameters defined in the XML). Some of these are passed through to the
- View superclass, but more importantly, there are some custom attributes defined
- and used for LabelView.</li>
- <li>Standard public methods of the type you would expect to see for a label
- component, for example <code>setText()</code>, <code>setTextSize()</code>,
- <code>setTextColor()</code> and so on.</li>
- <li>An overridden <code>onMeasure</code> method to determine and set the
- rendering size of the component. (Note that in LabelView, the real work is done
- by a private <code>measureWidth()</code> method.)</li>
- <li>An overridden <code>onDraw()</code> method to draw the label onto the
- provided canvas.</li>
-</ul>
-<p>You can see some sample usages of the LabelView custom View in
-<a href="{@docRoot}samples/ApiDemos/res/layout/custom_view_1.html">custom_view_1.xml</a>
-from the samples. In particular, you can see a mix of both <code>android:</code>
-namespace parameters and custom <code>app:</code> namespace parameters. These
-<code>app:</code> parameters are the custom ones that the LabelView recognizes
-and works with, and are defined in a styleable inner class inside of the
-samples R resources definition class.</p>
-
-<a name="compound"></a>
-<h2>Compound Controls
-</h2>
-<p>If you don't want to create a completely customized component, but instead
-are looking to put together a reusable component that consists of a group of
-existing controls, then creating a Compound Component (or Compound Control) might
-fit the bill. In a nutshell, this brings together a number of more atomic
-controls (or views) into a logical group of items that can be treated as a
-single thing. For example, a Combo Box can be thought of as a
-combination of a single line EditText field and an adjacent button with an attached
- PopupList. If you press the button and select
-something from the list, it populates the EditText field, but the user can
-also type something directly into the EditText if they prefer.</p>
-<p>In Android, there are actually two other Views readily available to do
-this: {@link android.widget.Spinner Spinner} and
-{@link android.widget.AutoCompleteTextView AutoCompleteTextView}, but
-regardless, the concept of a Combo Box makes an easy-to-understand
-example.</p>
-<p>To create a compound component:</p>
-<ol>
- <li>
- The usual starting point is a Layout of some kind, so create a class
- that extends a Layout. Perhaps in the case of a Combo box we might use
- a LinearLayout with horizontal orientation. Remember that other layouts
- can be nested inside, so the compound component can be arbitrarily
- complex and structured. Note that just like with an Activity, you can
- use either the declarative (XML-based) approach to creating the
- contained components, or you can nest them programmatically from your
- code.
- </li>
- <li>
- In the constructor for the new class, take whatever parameters the
- superclass expects, and pass them through to the superclass constructor
- first. Then you can set up the other views to use within your new
- component; this is where you would create the EditText field and the
- PopupList. Note that you also might introduce your own attributes and
- parameters into the XML that can be pulled out and used by your
- constructor.
- </li>
- <li>
- You can also create listeners for events that your contained views might
- generate, for example, a listener method for the List Item Click Listener
- to update the contents of the EditText if a list selection is made.
- </li>
- <li>
- You might also create your own properties with accessors and modifiers,
- for example, allow the EditText value to be set initially in the
- component and query for its contents when needed.
- </li>
- <li>
- In the case of extending a Layout, you don't need to override the
- <code>onDraw()</code> and <code>onMeasure()</code> methods since the
- layout will have default behavior that will likely work just fine. However,
- you can still override them if you need to.
- </li>
- <li>
- You might override other <code>on...</code> methods, like
- <code>onKeyDown()</code>, to perhaps choose certain default values from
- the popup list of a combo box when a certain key is pressed.
- </li>
-</ol>
-<p>
- To summarize, the use of a Layout as the basis for a Custom Control has a
-number of advantages, including:</p>
-
-<ul>
- <li>
- You can specify the layout using the declarative XML files just like
- with an activity screen, or you can create views programmatically and
- nest them into the layout from your code.
- </li>
- <li>
- The <code>onDraw()</code> and <code>onMeasure()</code> methods (plus
- most of the other <code>on...</code> methods) will likely have suitable behavior so
- you don't have to override them.
- </li>
- <li>
- In the end, you can very quickly construct arbitrarily complex compound
- views and re-use them as if they were a single component.
- </li>
-</ul>
-<h4>Examples of Compound Controls</h4>
-<p>In the API Demos project
- that comes with the SDK, there are two List
- examples &mdash; Example 4 and Example 6 under Views/Lists demonstrate a
- SpeechView which extends LinearLayout to make a component for displaying
- Speech quotes. The corresponding classes in the sample code are
- <code>List4.java</code> and <code>List6.java</code>.</p>
-
-<a name="tweaking"></a>
-<h2>Modifying an Existing View Type
-</h2>
-<p>There is an even easier option for creating a custom View which is
-useful in certain circumstances. If there is a component that is already very
-similar to what you want, you can simply extend that component and just
-override the behavior that you want to change. You can do all of the things
-you would do with a fully customized component, but by starting with a more
-specialized class in the View hierarchy, you can also get a lot of behavior for
-free that probably does exactly what you want.</p>
-<p>For example, the SDK includes a <a
-href="{@docRoot}samples/NotePad/index.html">NotePad application</a> in the
-samples. This demonstrates many aspects of using the Android platform, among
-them is extending an EditText View to make a lined notepad. This is not a
-perfect example, and the APIs for doing this might change from this early
-preview, but it does demonstrate the principles.</p>
-<p>If you haven't done so already, import the
-NotePad sample into Eclipse (or
-just look at the source using the link provided). In particular look at the definition of
-<code>MyEditText</code> in the <a
-href="{@docRoot}samples/NotePad/src/com/example/android/notepad/NoteEditor.html">NoteEditor.java</a>
-file.</p>
-<p>Some points to note here</p>
-<ol>
- <li>
- <strong>The Definition</strong>
- <p>The class is defined with the following line:</p>
- <code>public static class MyEditText extends EditText</code><br><br>
-
- <ul>
- <li>
- It is defined as an inner class within the <code>NoteEditor</code>
- activity, but it is public so that it could be accessed as
- <code>NoteEditor.MyEditText</code> from outside of the <code>NoteEditor</code>
- class if desired.
- </li>
- <li>
- It is <code>static</code>, meaning it does not generate the so-called
- "synthetic methods" that allow it to access data from the parent
- class, which in turn means that it really behaves as a separate
- class rather than something strongly related to <code>NoteEditor</code>.
- This is a cleaner way to create inner classes if they do not need
- access to state from the outer class, keeps the generated class
- small, and allows it to be used easily from other classes.
- </li>
- <li>
- It extends <code>EditText</code>, which is the View we have chosen to
- customize in this case. When we are finished, the new class will be
- able to substitute for a normal <code>EditText</code> view.<br>
- <br>
- </li>
- </ul>
- </li>
- <li>
- <strong>Class Initialization</strong>
- <p>As always, the super is called first. Furthermore,
- this is not a default constructor, but a parameterized one. The
- EditText is created with these parameters when it is inflated from an
- XML layout file, thus, our constructor needs to both take them and pass them
- to the superclass constructor as well.</p>
- </li>
- <li>
- <strong>Overridden Methods</strong>
- <p>In this example, there is only one method to be overridden:
- <code>onDraw()</code> &mdash; but there could easily be others needed when you
- create your own custom components.</p>
- <p>For the NotePad sample, overriding the <code>onDraw()</code> method allows
- us to paint the blue lines on the <code>EditText</code> view canvas (the
- canvas is passed into the overridden <code>onDraw()</code> method). The
- super.onDraw() method is called before the method ends. The
- superclass method should be invoked, but in this case, we do it at the
- end after we have painted the lines we want to include.</p>
- <li>
- <strong>Use the Custom Component</strong>
- <p>We now have our custom component, but how can we use it? In the
- NotePad example, the custom component is used directly from the
- declarative layout, so take a look at <code>note_editor.xml</code> in the
- <code>res/layout</code> folder.</p>
- <pre>
-&lt;view xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
- class=&quot;com.android.notepad.NoteEditor$MyEditText&quot;
- id=&quot;&#64;+id/note&quot;
- android:layout_width=&quot;fill_parent&quot;
- android:layout_height=&quot;fill_parent&quot;
- android:background=&quot;&#64;android:drawable/empty&quot;
- android:padding=&quot;10dip&quot;
- android:scrollbars=&quot;vertical&quot;
- android:fadingEdge=&quot;vertical&quot; /&gt; </pre>
-
- <ul>
- <li>
- The custom component is created as a generic view in the XML, and
- the class is specified using the full package. Note also that the
- inner class we defined is referenced using the
- <code>NoteEditor$MyEditText</code> notation which is a standard way to
- refer to inner classes in the Java programming language.
- </li>
- <li>
- The other attributes and parameters in the definition are the ones
- passed into the custom component constructor, and then passed
- through to the EditText constructor, so they are the same
- parameters that you would use for an EditText view. Note that it is
- possible to add your own parameters as well, and we will touch on
- this again below.
- </li>
- </ul>
- </li>
-</ol>
-<p>And that's all there is to it. Admittedly this is a simple case, but
-that's the point &mdash; creating custom components is only as complicated as you
-need it to be.</p>
-<p>A more sophisticated component may override even more <code>on...</code> methods and
-introduce some of its own helper methods, substantially customizing its properties and
-behavior. The only limit is your imagination and what you need the component to
-do.</p>
-
diff --git a/docs/html/guide/topics/views/intro.jd b/docs/html/guide/topics/views/intro.jd
deleted file mode 100644
index f49f5478bce3..000000000000
--- a/docs/html/guide/topics/views/intro.jd
+++ /dev/null
@@ -1,49 +0,0 @@
-page.title=Introduction to Views
-parent.title=Views and Layout
-parent.link=index.html
-@jd:body
-
-<p>The basic functional unit of an Android application is the <em>activity</em> &mdash; an object of the class {@link android.app.Activity android.app.Activity}. An activity can do many things, but by itself it does not have a presence on the screen. To give your activity a screen presence and design its UI, you work with <em>views</em> and <em>viewgroups</em> -- basic units of user interface expression on the Android platform.</p>
-
-<h2>Views</h2>
-<p>A view is an object of base class {@link android.view.View android.view.View}. It's a data structure whose properties store the layout and content for a specific rectangular area of the screen. A View object handles measuring and layout, drawing, focus change, scrolling, and key/gestures for the screen area it represents. </p>
-<p>The View class serves as a base class for <em>widgets </em> &mdash; a set of fully implemented subclasses that draw interactive screen elements. Widgets handle their own measuring and drawing, so you can use them to build your UI more quickly. The list of widgets available includes Text, EditText, InputMethod, MovementMethod, Button, RadioButton, Checkbox, and ScrollView.</p>
-
-<h2>Viewgroups </h2>
-
-<p>A viewgroup is an object of class {@link android.view.ViewGroup android.view.Viewgroup}. As its name indicates, a viewgroup is a special type of view object whose function is to contain and manage a subordinate set of views and other viewgroups, Viewgroups let you add structure to your UI and build up complex screen elements that can be addressed as a single entity. </p>
-
-<p>The Viewgroup class serves as a base class for <em>layouts</em> &mdash; a set of fully implemented subclasses that provide common types of screen layout. The layouts give you a way to build a structure for a set of views. </p>
-
-<h2>A Tree-Structured UI</h2>
-
-<p>On the Android platform, you define an Activity's UI using a tree of view and viewgroup nodes, as shown in the diagram below. The tree can be as simple or complex as you need to make it, and you can build it up using Android's set of predefined widgets and layouts or custom view types that you create yourself. </p>
-
-<img src={@docRoot}images/viewgroup.png alt="An example of a tree of views and viewgroups" width="312" height="211" align="center"/>
-
-<p>To attach the tree to the screen for rendering, your Activity calls its setContentView() method and passes a reference to the root node object. Once the Android system has the reference to the root node object, it can work directly with the node to invalidate, measure, and draw the tree. When your Activity becomes active and receives focus, the system notifies your activity and requests the root node to measure and draw the tree. The root node then requests that its child nodes draw themselves &mdash; in turn, each viewgroup node in the tree is responsible for drawing its direct children. </p>
-
-<p>As mentioned previously, each view group has the responsibility of
- measuring its available space, laying out its children, and calling Draw() on
- each child to let it render itself. The children may request a size and location
- in the parent, but the parent object has the final decision on where how big
- each child can be.</p>
-
-<h2>LayoutParams: How a Child Specifies Its Position and Size</h2>
-
-<p>Every viewgroup class uses a nested class that extends {@link
-android.view.ViewGroup.LayoutParams ViewGroup.LayoutParams}. This subclass
- contains property types that define a child's size and position, in properties
- appropriate for that view group class. </p>
-
-<img src={@docRoot}images/layoutparams.png alt="An example of layoutparams" width="632" height="369" align="center"/>
-
-<p>Note that every LayoutParams subclass has its own syntax for setting
-values. Each child element must define LayoutParams that are appropriate for its parent, although it may define different LayoutParams for its children. </p>
-
-<p>All viewgroups include width and height. Many also include margins and
-borders. You can specify width and height exactly, though you probably won't want
-to do this often. More often you will tell your view to size itself either to
-the dimensions of its content, or to become as big as its containing object
-will allow.</p>
-
diff --git a/docs/html/guide/topics/views/ui-xml.jd b/docs/html/guide/topics/views/ui-xml.jd
deleted file mode 100644
index bcfa56286ab5..000000000000
--- a/docs/html/guide/topics/views/ui-xml.jd
+++ /dev/null
@@ -1,138 +0,0 @@
-page.title=Declaring a UI in XML
-parent.title=Views and Layout
-parent.link=index.html
-@jd:body
-
-<p>You can create your application's user interface in two ways:
-<ul>
-<li>You can declare UI elements statically, in XML. Android provides a straightforward XML vocabulary that corresponds to the View classes and subclasses, such as those for widgets and layouts. </li>
-<li>You can instantiate screen elements dynamically, at runtime, through code in your application. Your application can refer to or create View or other class objects and manipulate their properties programmatically. </li>
-</ul>
-
-<p>One advantage of declaring your UI in XML is that it enables you to better separate the presentation of your application from the code that controls it's behavior. Your UI description is external to your application code, which means that you can modify or adapt it without having to modify your source code and recompile. For example, you can create XML layouts for different screen orientations and for a variety of device screen sizes or languages. Additionally, declaring in XML makes it easier to see the elements and structure of your UI, so it's easier to debug problems. </p>
-
-<p>The Android framework gives you the flexibility to use either or both of these ways of declaring and managing your application's UI. For example, you could declare your application's default layouts in XML, including the screen elements that will appear in them and their properties. You could then add code in your application that would modify the state of the screen objects, including those declared in XML, at run time. </p>
-
-<p>You build your application's UI in approximately the same way, whether you are declaring it in XML or programmatically. In both cases, your UI will be a tree structure that may include multiple View or Viewgroup subclasses. <p>
-
-<p>In general, the XML vocabulary for declaring UI elements closely follows the structure and naming of the framework's UI-related classes and methods, where element names correspond to class names and attribute names correspond to methods. In fact, the correspondence is often so direct that you can guess what XML attribute corresponds to a class method, or guess what class corresponds to a given xml element. </p>
-
-<p>However, note that the XML vocabulary for defining UI is not entirely identical to the framework's classes and methods. In some cases, there are slight naming differences. For
-example, the EditText element has a <code>text</code> attribute that corresponds to
-EditText.setText. </p>
-
-<div class="sidebox-wrapper">
-<div class="sidebox">
-<p>For your convenience, the API reference documentation for UI related classes
-lists the available XML attributes that correspond to the class methods, including inherited
-attributes.</p>
-
-<p>To learn more about the available XML elements and attributes, as well as the format of the XML file, see <a
-href="{@docRoot}reference/available-resources.html#layoutresources">Layout Resources</a>.</p>
-</div>
-</div>
-
-<p>Using Android's XML vocabulary, you can quickly design UI layouts and the screen elements they contain, in the same way you create HTML files &mdash; as a series of nested tags. </p>
-
-<p>Each layout file must contain exactly one root element, and the root element must be a View or ViewGroup object. Once you've defined the root element, you can add additional layout objects or controls as child elements of the root element, if needed. In the example below, the tree of XML elements evaluates to the outermost LinearLayout object.
-
-<p>After you've declared your layout in XML, you must save the file, with the <code>.xml</code> extension, in the proper location, so that it will be compiled correctly. The proper location for storing layout files is in your application's <code>res/layout/</code> directory. </p>
-
-<p>When you compile your application, each XML layout file is compiled into an
-android.view.View resource. You can then load the layout resource from your application code, by calling <code>setContentView(R.layout.<em>layout_file_name</em>)</code> in your {@link android.app.Activity#onCreate(android.os.Bundle) Activity.onCreate()}
-implementation.</p>
-
-<p>When you load a layout resource, the Android system initializes run-time objects corresponding to the elements in your layout. It parses the elements of your layout in-order (depth-first), instantiating the Views and adding them to their parent(s). </p>
-
-<p>Attributes named <code>layout_<em>something</em></code> apply to that
-object's LayoutParams member. <a href="{@docRoot}reference/available-resources.html#layoutresources">Layout
-Resources</a> also describes how to learn the syntax for specifying
-LayoutParams properties. </p>
-
-<p>Also note that Android draws elements in the order in which they
-appear in the XML. Therefore, if elements overlap, the last one in the XML
-file will probably be drawn on top of any previously listed elements in that
-same space.</p>
-
-<p>The following values are supported for dimensions (described in {@link
-android.util.TypedValue TypedValue}):</p>
-
-<ul>
- <li>px (pixels) </li>
- <li>dip (device independent pixels) </li>
- <li>sp (scaled pixels &mdash; best for text size) </li>
- <li>pt (points) </li>
- <li>in (inches) </li>
- <li>mm (millimeters) </li>
-</ul>
-
-<p>Example: <code>android:layout_width=&quot;25px&quot;</code> </p>
-
-<p>For more information about these dimensions, see <a href="{@docRoot}reference/available-resources.html#dimension">Dimension Values</a>.</p>
-
-<p>The example below shows an XML file and the resulting screen in the UI. Note that the text on the
-top of the screen was set by calling {@link
-android.app.Activity#setTitle(java.lang.CharSequence) Activity.setTitle}. Note
-that the attributes that refer to relative elements (i.e., layout_toLeft)
-refer to the ID using the syntax of a relative resource
-(@id/<em>id_number</em>). </p>
-
-<table border="1">
- <tr>
- <td>
- <pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;!-- Demonstrates using a relative layout to create a form --&gt;
-&lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android
- android:layout_width=&quot;fill_parent&quot;
- android:layout_height=&quot;wrap_content&quot;
- android:background=&quot;@drawable/blue&quot;
- android:padding=&quot;10px&quot;&gt;
-
- &lt;TextView id=&quot;@+id/label&quot;
- android:layout_width=&quot;fill_parent&quot;
- android:layout_height=&quot;wrap_content&quot;
- android:text=&quot;Type here:&quot;/&gt;
-
- &lt;EditText id=&quot;@+id/entry&quot;
- android:layout_width=&quot;fill_parent&quot;
- android:layout_height=&quot;wrap_content&quot;
- android:background=&quot;@android:drawable/editbox_background&quot;
- android:layout_below=&quot;@id/label&quot;/&gt;
-
- &lt;Button id=&quot;@+id/ok&quot;
- android:layout_width=&quot;wrap_content&quot;
- android:layout_height=&quot;wrap_content&quot;
- android:layout_below=&quot;@id/entry&quot;
- android:layout_alignParentRight=&quot;true&quot;
- android:layout_marginLeft=&quot;10px&quot;
- android:text=&quot;OK&quot; /&gt;
-
- &lt;Button android:layout_width=&quot;wrap_content&quot;
- android:layout_height=&quot;wrap_content&quot;
- android:layout_toLeftOf=&quot;@id/ok&quot;
- android:layout_alignTop=&quot;@id/ok&quot;
- android:text=&quot;Cancel&quot; /&gt;
-&lt;/RelativeLayout&gt;</pre></td>
- <td><img src="{@docRoot}images/designing_ui_layout_example.png" alt="Screen shot showing how this layout XML file is rendered." /></td>
- </tr>
-</table>
-
-<h3>Loading the XML Resource </h3>
-
-<p>Loading the compiled layout resource is very easy, and done with a single
-call in the activity's onCreate() method, as shown here:</p>
-
-<pre>
-protected void onCreate(Bundle savedValues)
-{
- // Be sure to call the super class.
- super.onCreate(savedValues);
-
- // Load the compiled layout resource into the window's
- // default ViewGroup.
- // The source file is res/layout/hello_activity.xml
- setContentView(R.layout.hello_activity);
-
- // Retrieve any important stored values.
- restoreValues(savedValues);
-} </pre>
diff --git a/docs/html/guide/topics/wireless/index.jd b/docs/html/guide/topics/wireless/index.jd
deleted file mode 100644
index 23d2f0fc4f78..000000000000
--- a/docs/html/guide/topics/wireless/index.jd
+++ /dev/null
@@ -1,23 +0,0 @@
-page.title=Wireless Controls
-@jd:body
-
-Go away.
-
-<!--
-<h2>Wi-Fi</h2>
-<p>The Wi-Fi APIs provide a means by which application can communicate with the lower-level
-wireless stack that provides Wi-Fi network access. Almost all information from the device supplicant
-is available, including the connected network's link speed, IP address, negotiation state, and more.
-It also provides information about all non-connected available networks. Some of the available network
-interactions include the ability to scan, add, dave, terminate and initiate connections.</p>
-
-
-<h2>Bluetooth</h2>
-<p>The Android platform includes support for the Bluetooth network stack, which allows a device to
-wirelessly exchange data with other Bluetooth devices. The application framework provides access to
-the Bluetooth functionality through the Android Bluetooth APIs. These APIs let applications
-wirelessly connect to other Bluetooth devices, enabling point-to-point and multipoint wireless
-features.</p>
--->
-
-
diff --git a/docs/html/guide/topics/wireless/wifi.jd b/docs/html/guide/topics/wireless/wifi.jd
deleted file mode 100644
index 761e463f0dea..000000000000
--- a/docs/html/guide/topics/wireless/wifi.jd
+++ /dev/null
@@ -1,18 +0,0 @@
-page.title=Wi-Fi
-parent.title=Wireless Controls
-parent.link=index.html
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-
- <h2>In this document</h2>
- <ol>
-
- </ol>
-
-</div>
-</div>
-
-
-Go away. \ No newline at end of file
diff --git a/docs/html/guide/tutorials/hello-world.html b/docs/html/guide/tutorials/hello-world.html
deleted file mode 100644
index 55187bd7a1a8..000000000000
--- a/docs/html/guide/tutorials/hello-world.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/resources/tutorials/hello-world.html">
-<title>Redirecting...</title>
-</head>
-<body>
-<p>You should have been redirected. Please <a
-href="http://developer.android.com/resources/tutorials/hello-world.html">click here</a>.</p>
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/guide/tutorials/images/hello_world_0.png b/docs/html/guide/tutorials/images/hello_world_0.png
deleted file mode 100644
index 330a07c74760..000000000000
--- a/docs/html/guide/tutorials/images/hello_world_0.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/images/hello_world_1.png b/docs/html/guide/tutorials/images/hello_world_1.png
deleted file mode 100644
index 1e5f7b0cdfe3..000000000000
--- a/docs/html/guide/tutorials/images/hello_world_1.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/images/hello_world_2.png b/docs/html/guide/tutorials/images/hello_world_2.png
deleted file mode 100644
index 3e9c58b2a45d..000000000000
--- a/docs/html/guide/tutorials/images/hello_world_2.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/images/hello_world_3.png b/docs/html/guide/tutorials/images/hello_world_3.png
deleted file mode 100644
index 22901a97ffde..000000000000
--- a/docs/html/guide/tutorials/images/hello_world_3.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/images/hello_world_4.png b/docs/html/guide/tutorials/images/hello_world_4.png
deleted file mode 100644
index 5c41e80ad941..000000000000
--- a/docs/html/guide/tutorials/images/hello_world_4.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/images/hello_world_5.png b/docs/html/guide/tutorials/images/hello_world_5.png
deleted file mode 100644
index 96b830a963a0..000000000000
--- a/docs/html/guide/tutorials/images/hello_world_5.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/images/hello_world_8.png b/docs/html/guide/tutorials/images/hello_world_8.png
deleted file mode 100644
index 07db36019fed..000000000000
--- a/docs/html/guide/tutorials/images/hello_world_8.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/images/hello_world_9.png b/docs/html/guide/tutorials/images/hello_world_9.png
deleted file mode 100644
index a66526ad6ca2..000000000000
--- a/docs/html/guide/tutorials/images/hello_world_9.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/index.html b/docs/html/guide/tutorials/index.html
deleted file mode 100644
index e412dec94b3b..000000000000
--- a/docs/html/guide/tutorials/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/resources/browser.html?tag=tutorial">
-<title>Redirecting...</title>
-</head>
-<body>
-<p>You should have been redirected. Please <a
-href="http://developer.android.com/resources/browser.html?tag=tutorial">click here</a>.</p>
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/guide/tutorials/localization/index.html b/docs/html/guide/tutorials/localization/index.html
deleted file mode 100644
index 2ea666182f07..000000000000
--- a/docs/html/guide/tutorials/localization/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/resources/tutorials/localization/index.html">
-<title>Redirecting...</title>
-</head>
-<body>
-<p>You should have been redirected. Please <a
-href="http://developer.android.com/resources/tutorials/localization/index.html">click here</a>.</p>
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/guide/tutorials/notepad/codelab/NotepadCodeLab.zip b/docs/html/guide/tutorials/notepad/codelab/NotepadCodeLab.zip
deleted file mode 100644
index 24fefc1a31fb..000000000000
--- a/docs/html/guide/tutorials/notepad/codelab/NotepadCodeLab.zip
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/notepad/index.html b/docs/html/guide/tutorials/notepad/index.html
deleted file mode 100644
index 01e4d098a48b..000000000000
--- a/docs/html/guide/tutorials/notepad/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/resources/tutorials/notepad/index.html">
-<title>Redirecting...</title>
-</head>
-<body>
-<p>You should have been redirected. Please <a
-href="http://developer.android.com/resources/tutorials/notepad/index.html">click here</a>.</p>
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/guide/tutorials/notepad/notepad-ex1.jd b/docs/html/guide/tutorials/notepad/notepad-ex1.jd
deleted file mode 100644
index cf7765e1693a..000000000000
--- a/docs/html/guide/tutorials/notepad/notepad-ex1.jd
+++ /dev/null
@@ -1,582 +0,0 @@
-page.title=Notepad Exercise 1
-parent.title=Notepad Tutorial
-parent.link=index.html
-@jd:body
-
-
-<p><em>In this exercise, you will construct a simple notes list that lets the
-user add new notes but not edit them. The exercise demonstrates:</em></p>
-<ul>
-<li><em>The basics of <code>ListActivities</code> and creating and handling menu
-options. </em></li>
-<li><em>How to use a SQLite database to store the notes.</em></li>
-<li><em>How to bind data from a database cursor into a ListView using a
-SimpleCursorAdapter.</em></li>
-<li><em>The basics of screen layouts, including how to lay out a list view, how
-you can add items to the activity menu, and how the activity handles those menu
-selections. </em></li>
-</ul>
-
-<div style="float:right;white-space:nowrap">
-<span style="color:#BBB;">
- [<a href="notepad-ex1.html" style="color:#BBB;">Exercise 1</a>]</span>
- [<a href="notepad-ex2.html">Exercise 2</a>]
- [<a href="notepad-ex3.html">Exercise 3</a>]
- [<a href="notepad-extra-credit.html">Extra Credit</a>]
-</div>
-
-
-
-<h2>Step 1</h2>
-
- <p>Open up the <code>Notepadv1</code> project in Eclipse.</p>
-
- <p><code>Notepadv1</code> is a project that is provided as a starting point. It
- takes care of some of the boilerplate work that you have already seen if you
- followed the <a href="{@docRoot}resources/tutorials/hello-world.html">Hello,
- World</a> tutorial.</p>
-
- <ol>
- <li>
- Start a new Android Project by clicking <strong>File</strong> >
- <strong>New</strong> > <strong>Android Project</strong>.</li>
- <li>
- In the New Android Project dialog, select <strong>Create project from existing source</strong>.</li>
- <li>
- Click <strong>Browse</strong> and navigate to where you copied the <code>NotepadCodeLab</code>
- (downloaded during <a href="{@docRoot}resources/tutorials/notepad/index.html#preparing">setup</a>)
- and select <code>Notepadv1</code>.</li>
- <li>
- The Project Name and other properties should be automatically filled for you.
- You must select the Build Target&mdash;we recommend selecting a target with the
- lowest platform version available. Also add an integer to the Min SDK Version field
- that matches the API Level of the selected Build Target.</li>
- <li>
- Click <strong>Finish</strong>. The <code>Notepadv1</code> project should open and be
- visible in your Eclipse package explorer.</li>
- </ol>
-
- <p>If you see an error about <code>AndroidManifest.xml</code>, or some
- problems related to an Android zip file, right click on the project and
- select <strong>Android Tools</strong> > <strong>Fix Project Properties</strong>.
- (The project is looking in the wrong location for the library file,
- this will fix it for you.)</p>
-
- <h2>Step 2</h2>
-
- <div class="sidebox-wrapper">
- <div class="sidebox">
- <h2>Accessing and modifying data</h2>
- <p>For this
- exercise, we are using a SQLite database to store our data. This is useful
- if only <em>your</em> application will need to access or modify the data. If you wish for
- other activities to access or modify the data, you have to expose the data using a
- {@link android.content.ContentProvider ContentProvider}.</p>
- <p>If you are interested, you can find out more about
- <a href="{@docRoot}guide/topics/providers/content-providers.html">content providers</a> or the
-whole
- subject of <a href="{@docRoot}guide/topics/data/data-storage.html">Data Storage</a>.
- The NotePad sample in the <code>samples/</code> folder of the SDK also has an example of how
- to create a ContentProvider.</p>
- </div>
- </div>
-
- <p>Take a look at the <code>NotesDbAdapter</code> class &mdash; this class is provided to
- encapsulate data access to a SQLite database that will hold our notes data
- and allow us to update it.</p>
- <p>At the top of the class are some constant definitions that will be used in the application
- to look up data from the proper field names in the database. There is also a database creation
- string defined, which is used to create a new database schema if one doesn't exist already.</p>
- <p>Our database will have the name <code>data</code>, and have a single table called
- <code>notes</code>, which in turn has three fields: <code>_id</code>, <code>title</code> and
- <code>body</code>. The <code>_id</code> is named with an underscore convention used in a number of
- places inside the Android SDK and helps keep a track of state. The <code>_id</code>
- usually has to be specified when querying or updating the database (in the column projections
- and so on). The other two fields are simple text fields that will store data.
- </p>
- <p>The constructor for <code>NotesDbAdapter</code> takes a Context, which allows it to communicate with aspects
- of the Android operating system. This is quite common for classes that need to touch the
- Android system in some way. The Activity class implements the Context class, so usually you will just pass
- <code>this</code> from your Activity, when needing a Context.</p>
- <p>The <code>open()</code> method calls up an instance of DatabaseHelper, which is our local
- implementation of the SQLiteOpenHelper class. It calls <code>getWritableDatabase()</code>,
- which handles creating/opening a database for us.</p>
- <p><code>close()</code> just closes the database, releasing resources related to the
- connection.</p>
- <p><code>createNote()</code> takes strings for the title and body of a new note,
- then creates that note in the database. Assuming the new note is created successfully, the
- method also returns the row <code>_id</code> value for the newly created note.</p>
- <p><code>deleteNote()</code> takes a <var>rowId</var> for a particular note, and deletes that note from
- the database.</p>
-
- <p><code>fetchAllNotes()</code> issues a query to return a {@link android.database.Cursor} over all notes in the
- database. The <code>query()</code> call is worth examination and understanding. The first field is the
- name of the database table to query (in this case <code>DATABASE_TABLE</code> is "notes").
- The next is the list of columns we want returned, in this case we want the <code>_id</code>,
- <code>title</code> and <code>body</code> columns so these are specified in the String array.
- The remaining fields are, in order: <code>selection</code>,
- <code>selectionArgs</code>, <code>groupBy</code>, <code>having</code> and <code>orderBy</code>.
- Having these all <code>null</code> means we want all data, need no grouping, and will take the default
- order. See {@link android.database.sqlite.SQLiteDatabase SQLiteDatabase} for more details.</p>
- <p class="note"><b>Note:</b> A Cursor is returned rather than a collection of rows. This allows
- Android to use resources efficiently -- instead of putting lots of data straight into memory
- the cursor will retrieve and release data as it is needed, which is much more efficient for
- tables with lots of rows.</p>
-
- <p><code>fetchNote()</code> is similar to <code>fetchAllNotes()</code> but just gets one note
- with the <var>rowId</var> we specify. It uses a slightly different version of the
- {@link android.database.sqlite.SQLiteDatabase} <code>query()</code> method.
- The first parameter (set <em>true</em>) indicates that we are interested
- in one distinct result. The <var>selection</var> parameter (the fourth parameter) has been specified to search
- only for the row "where _id =" the <var>rowId</var> we passed in. So we are returned a Cursor on
- the one row.</p>
- <p>And finally, <code>updateNote()</code> takes a <var>rowId</var>, <var>title</var> and <var>body</var>, and uses a
- {@link android.content.ContentValues ContentValues} instance to update the note of the given
- <var>rowId</var>.</p>
-
-<h2 style="clear:right;">Step 3</h2>
-
- <div class="sidebox-wrapper">
- <div class="sidebox">
- <h2>Layouts and activities</h2>
- <p>Most Activity classes will have a layout associated with them. The layout
- will be the "face" of the Activity to the user. In this case our layout will
- take over the whole screen and provide a list of notes.</p>
- <p>Full screen layouts are not the only option for an Activity however. You
- might also want to use a <a
-href="{@docRoot}resources/faq/commontasks.html#floatingorfull">floating
- layout</a> (for example, a <a
-href="{@docRoot}resources/faq/commontasks.html#dialogsandalerts">dialog
- or alert</a>),
- or perhaps you don't need a layout at all (the Activity will be invisible
- to the user unless you specify some kind of layout for it to use).</p>
- </div>
- </div>
-
- <p>Open the <code>notepad_list.xml</code> file in <code>res/layout</code>
-and
- take a look at it. (You may have to
- hit the <em>xml</em> tab, at the bottom, in order to view the XML markup.)</p>
-
- <p>This is a mostly-empty layout definition file. Here are some
- things you should know about a layout file:</p>
-
-
- <ul>
- <li>
- All Android layout files must start with the XML header line:
- <code>&lt;?xml version="1.0" encoding="utf-8"?&gt;</code>. </li>
- <li>
- The next definition will often (but not always) be a layout
- definition of some kind, in this case a <code>LinearLayout</code>. </li>
- <li>
- The XML namespace of Android should always be defined in
- the top level component or layout in the XML so that <code>android:</code> tags can
- be used through the rest of the file:
- <p><code>xmlns:android="http://schemas.android.com/apk/res/android"</code></p>
- </li>
- </ul>
-
- <h2 style="clear:right;">Step 4</h2>
- <p>We need to create the layout to hold our list. Add code inside
- of the <code>LinearLayout</code> element so the whole file looks like this: </p>
- <pre>
-&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
- android:layout_width=&quot;wrap_content&quot;
- android:layout_height=&quot;wrap_content&quot;&gt;
-
- &lt;ListView android:id=&quot;@android:id/list&quot;
- android:layout_width=&quot;wrap_content&quot;
- android:layout_height=&quot;wrap_content&quot;/&gt;
- &lt;TextView android:id=&quot;@android:id/empty&quot;
- android:layout_width=&quot;wrap_content&quot;
- android:layout_height=&quot;wrap_content&quot;
- android:text=&quot;@string/no_notes&quot;/&gt;
-
-&lt;/LinearLayout&gt;
-</pre>
- <ul>
- <li>
- The <strong>&#64;</strong> symbol in the id strings of the <code>ListView</code> and
- <code>TextView</code> tags means
- that the XML parser should parse and expand the rest of
- the id string and use an ID resource.</li>
- <li>
- The <code>ListView</code> and <code>TextView</code> can be
- thought as two alternative views, only one of which will be displayed at once.
- ListView will be used when there are notes to be shown, while the TextView
- (which has a default value of "No Notes Yet!" defined as a string
- resource in <code>res/values/strings.xml</code>) will be displayed if there
- aren't any notes to display.</li>
- <li>The <code>list</code> and <code>empty</code> IDs are
- provided for us by the Android platform, so, we must
- prefix the <code>id</code> with <code>android:</code> (e.g., <code>@android:id/list</code>).</li>
- <li>The View with the <code>empty</code> id is used
- automatically when the {@link android.widget.ListAdapter} has no data for the ListView. The
- ListAdapter knows to look for this name by default. Alternatively, you could change the
- default empty view by using {@link android.widget.AdapterView#setEmptyView(View)}
- on the ListView.
- <p>
- More broadly, the <code>android.R</code> class is a set of predefined
- resources provided for you by the platform, while your project's
- <code>R</code> class is the set of resources your project has defined.
- Resources found in the <code>android.R</code> resource class can be
- used in the XML files by using the <code>android:</code> name space prefix
- (as we see here).</p>
- </li>
- </ul>
-
- <h2 style="clear:right;">Step 5</h2>
-
- <div class="sidebox-wrapper">
- <div class="sidebox">
- <h2>Resources and the R class</h2>
- <p>The folders under res/ in the Eclipse project are for resources.
- There is a <a href="{@docRoot}resources/faq/commontasks.html#filelist">specific structure</a>
-to the
- folders and files under res/.</p>
- <p>Resources defined in these folders and files will have
- corresponding entries in the R class allowing them to be easily accessed
- and used from your application. The R class is automatically generated using the contents
- of the res/ folder by the eclipse plugin (or by aapt if you use the command line tools).
- Furthermore, they will be bundled and deployed for you as part of the application.</p>
- </p>
- </div>
- </div>
-
- <p>To make the list of notes in the ListView, we also need to define a View for each row:</p>
- <ol>
- <li>
- Create a new file under <code>res/layout</code> called
- <code>notes_row.xml</code>. </li>
- <li>
- Add the following contents (note: again the XML header is used, and the
- first node defines the Android XML namespace)<br>
- <pre style="overflow:auto">
-&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;TextView android:id=&quot;&#64;+id/text1&quot;
- xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
- android:layout_width=&quot;wrap_content&quot;
- android:layout_height=&quot;wrap_content&quot;/&gt;</pre>
- <p>
- This is the View that will be used for each notes title row &mdash; it has only
- one text field in it. </p>
- <p>In this case we create a new id called <code>text1</code>. The
- <strong>+</strong> after the <strong>@</strong> in the id string indicates that the id should
- be automatically created as a resource if it does not already exist, so we are defining
- <code>text1</code> on the fly and then using it.</p>
- </li>
- <li>Save the file.</li>
- </ol>
- <p>Open the <code>R.java</code> class in the
- project and look at it, you should see new definitions for
- <code>notes_row</code> and <code>text1</code> (our new definitions)
- meaning we can now gain access to these from the our code. </p>
-
- <h2 style="clear:right;">Step 6</h2>
-<p>Next, open the <code>Notepadv1</code> class in the source. In the following steps, we are going to
- alter this class to become a list adapter and display our notes, and also
- allow us to add new notes.</p>
-
-<p><code>Notepadv1</code> will inherit from a subclass
- of <code>Activity</code> called a <code>ListActivity</code>,
- which has extra functionality to accommodate the kinds of
- things you might want to do with a list, for
- example: displaying an arbitrary number of list items in rows on the screen,
- moving through the list items, and allowing them to be selected.</p>
-
-<p>Take a look through the existing code in <code>Notepadv1</code> class.
- There is a currently an unused private field called <code>mNoteNumber</code> that
- we will use to create numbered note titles.</p>
- <p>There are also three override methods defined:
- <code>onCreate</code>, <code>onCreateOptionsMenu</code> and
- <code>onOptionsItemSelected</code>; we need to fill these
- out:</p>
- <ul>
- <li><code>onCreate()</code> is called when the activity is
- started &mdash; it is a little like the "main" method for an Activity. We use
- this to set up resources and state for the activity when it is
- running.</li>
- <li><code>onCreateOptionsMenu()</code> is used to populate the
- menu for the Activity. This is shown when the user hits the menu button,
-and
- has a list of options they can select (like "Create
- Note"). </li>
- <li><code>onOptionsItemSelected()</code> is the other half of the
- menu equation, it is used to handle events generated from the menu (e.g.,
- when the user selects the "Create Note" item).
- </li>
- </ul>
-
- <h2>Step 7</h2>
- <p>Change the inheritance of <code>Notepadv1</code> from
-<code>Activity</code>
- to <code>ListActivity</code>:</p>
- <pre>public class Notepadv1 extends ListActivity</pre>
- <p>Note: you will have to import <code>ListActivity</code> into the
-Notepadv1
- class using Eclipse, <strong>ctrl-shift-O</strong> on Windows or Linux, or
- <strong>cmd-shift-O</strong> on the Mac (organize imports) will do this for you
- after you've written the above change.</p>
-
- <h2>Step 8</h2>
- <p>Fill out the body of the <code>onCreate()</code> method.</p>
- <p>Here we will set the title for the Activity (shown at the top of the
- screen), use the <code>notepad_list</code> layout we created in XML,
- set up the <code>NotesDbAdapter</code> instance that will
- access notes data, and populate the list with the available note
- titles:</p>
- <ol>
- <li>
- In the <code>onCreate</code> method, call <code>super.onCreate()</code> with the
- <code>savedInstanceState</code> parameter that's passed in.</li>
- <li>
- Call <code>setContentView()</code> and pass <code>R.layout.notepad_list</code>.</li>
- <li>
- At the top of the class, create a new private class field called <code>mDbHelper</code> of class
- <code>NotesDbAdapter</code>.
- </li>
- <li>
- Back in the <code>onCreate</code> method, construct a new
-<code>NotesDbAdapter</code>
- instance and assign it to the <code>mDbHelper</code> field (pass
- <code>this</code> into the constructor for <code>DBHelper</code>)
- </li>
- <li>
- Call the <code>open()</code> method on <code>mDbHelper</code> to open (or create) the
- database.
- </li>
- <li>
- Finally, call a new method <code>fillData()</code>, which will get the data and
- populate the ListView using the helper &mdash; we haven't defined this method yet. </li>
- </ol>
- <p>
- <code>onCreate()</code> should now look like this:</p>
- <pre>
- &#64;Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.notepad_list);
- mDbHelper = new NotesDbAdapter(this);
- mDbHelper.open();
- fillData();
- }</pre>
- <p>And be sure you have the <code>mDbHelper</code> field definition (right
- under the mNoteNumber definition): </p>
- <pre> private NotesDbAdapter mDbHelper;</pre>
-
- <h2>Step 9</h2>
-
- <div class="sidebox-wrapper">
- <div class="sidebox">
- <h2>More about menus</h2>
- <p>The notepad application we are constructing only scratches the
- surface with <a href="{@docRoot}resources/faq/commontasks.html#addmenuitems">menus</a>. </p>
- <p>You can also <a href="{@docRoot}resources/faq/commontasks.html#menukeyshortcuts">add
-shortcut keys for menu items</a>, <a
-href="{@docRoot}resources/faq/commontasks.html#menukeyshortcuts">create
-submenus</a> and even <a href="{@docRoot}resources/faq/commontasks.html#addingtoothermenus">add
-menu items to other applications!</a>. </p>
- </div>
- </div>
-
-<p>Fill out the body of the <code>onCreateOptionsMenu()</code> method.</p>
-
-<p>We will now create the "Add Item" button that can be accessed by pressing the menu
-button on the device. We'll specify that it occupy the first position in the menu.</p>
-
- <ol>
- <li>
- In <code>strings.xml</code> resource (under <code>res/values</code>), add
- a new string named "menu_insert" with its value set to <code>Add Item</code>:
- <pre>&lt;string name="menu_insert"&gt;Add Item&lt;/string&gt;</pre>
- <p>Then save the file and return to <code>Notepadv1</code>.</p>
- </li>
- <li>Create a menu position constant at the top of the class:
- <pre>public static final int INSERT_ID = Menu.FIRST;</pre>
- </li>
- <li>In the <code>onCreateOptionsMenu()</code> method, change the
- <code>super</code> call so we capture the boolean return as <code>result</code>. We'll return this value at the end.</li>
- <li>Then add the menu item with <code>menu.add()</code>.</li>
- </ol>
- <p>The whole method should now look like this:
- <pre>
- &#64;Override
- public boolean onCreateOptionsMenu(Menu menu) {
- boolean result = super.onCreateOptionsMenu(menu);
- menu.add(0, INSERT_ID, 0, R.string.menu_insert);
- return result;
- }</pre>
- <p>The arguments passed to <code>add()</code> indicate: a group identifier for this menu (none,
- in this case), a unique ID (defined above), the order of the item (zero indicates no preference),
- and the resource of the string to use for the item.</p>
-
-<h2 style="clear:right;">Step 10</h2>
- <p>Fill out the body of the <code>onOptionsItemSelected()</code> method:</p>
- <p>This is going
- to handle our new "Add Note" menu item. When this is selected, the
- <code>onOptionsItemSelected()</code> method will be called with the
- <code>item.getId()</code> set to <code>INSERT_ID</code> (the constant we
- used to identify the menu item). We can detect this, and take the
- appropriate actions:</p>
- <ol>
- <li>
- The <code>super.onOptionsItemSelected(item)</code> method call goes at the
- end of this method &mdash; we want to catch our events first! </li>
- <li>
- Write a switch statement on <code>item.getItemId()</code>.
- <p>In the case of <var>INSERT_ID</var>, call a new method, <code>createNote()</code>,
- and return true, because we have handled this event and do not want to
- propagate it through the system.</p>
- </li>
- <li>Return the result of the superclass' <code>onOptionsItemSelected()</code>
- method at the end.</li>
- </ol>
- <p>
- The whole <code>onOptionsItemSelect()</code> method should now look like
- this:</p>
- <pre>
- &#64;Override
- public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
- case INSERT_ID:
- createNote();
- return true;
- }
-
- return super.onOptionsItemSelected(item);
- }</pre>
-
-<h2>Step 11</h2>
- <p>Add a new <code>createNote()</code> method:</p>
- <p>In this first version of
- our application, <code>createNote()</code> is not going to be very useful.
-We will simply
- create a new note with a title assigned to it based on a counter ("Note 1",
- "Note 2"...) and with an empty body. At present we have no way of editing
- the contents of a note, so for now we will have to be content making one
- with some default values:</p>
- <ol>
- <li>Construct the name using "Note" and the counter we defined in the class: <code>
- String noteName = "Note " + mNoteNumber++</code></li>
- <li>
- Call <code>mDbHelper.createNote()</code> using <code>noteName</code> as the
- title and <code>""</code> for the body
- </li>
- <li>
- Call <code>fillData()</code> to populate the list of notes (inefficient but
- simple) &mdash; we'll create this method next.</li>
- </ol>
- <p>
- The whole <code>createNote()</code> method should look like this: </p>
- <pre>
- private void createNote() {
- String noteName = &quot;Note &quot; + mNoteNumber++;
- mDbHelper.createNote(noteName, &quot;&quot;);
- fillData();
- }</pre>
-
-
-<h2>Step 12</h2>
- <div class="sidebox-wrapper">
- <div class="sidebox">
- <h2>List adapters</h2>
- <p>Our example uses a {@link android.widget.SimpleCursorAdapter
- SimpleCursorAdapter} to bind a database {@link android.database.Cursor Cursor}
- into a ListView, and this is a common way to use a {@link android.widget.ListAdapter
- ListAdapter}. Other options exist like {@link android.widget.ArrayAdapter ArrayAdapter} which
- can be used to take a List or Array of in-memory data and bind it in to
- a list as well.</p>
- </div>
- </div>
-
- <p>Define the <code>fillData()</code> method:</p>
- <p>This
- method uses <code>SimpleCursorAdapter,</code> which takes a database <code>Cursor</code>
- and binds it to fields provided in the layout. These fields define the row elements of our list
- (in this case we use the <code>text1</code> field in our
- <code>notes_row.xml</code> layout), so this allows us to easily populate the list with
- entries from our database.</p>
- <p>To do this we have to provide a mapping from the <code>title</code> field in the returned Cursor, to
- our <code>text1</code> TextView, which is done by defining two arrays: the first a string array
- with the list of columns to map <em>from</em> (just "title" in this case, from the constant
- <code>NotesDbAdapter.KEY_TITLE</code>) and, the second, an int array
- containing references to the views that we'll bind the data <em>into</em>
- (the <code>R.id.text1</code> TextView).</p>
- <p>This is a bigger chunk of code, so let's first take a look at it:</p>
-
- <pre>
- private void fillData() {
- // Get all of the notes from the database and create the item list
- Cursor c = mDbHelper.fetchAllNotes();
- startManagingCursor(c);
-
- String[] from = new String[] { NotesDbAdapter.KEY_TITLE };
- int[] to = new int[] { R.id.text1 };
-
- // Now create an array adapter and set it to display using our row
- SimpleCursorAdapter notes =
- new SimpleCursorAdapter(this, R.layout.notes_row, c, from, to);
- setListAdapter(notes);
- }</pre>
-
- <p>Here's what we've done:</p>
- <ol>
- <li>
- After obtaining the Cursor from <code>mDbHelper.fetchAllNotes()</code>, we
- use an Activity method called
- <code>startManagingCursor()</code> that allows Android to take care of the
- Cursor lifecycle instead of us needing to worry about it. (We will cover the implications
- of the lifecycle in exercise 3, but for now just know that this allows Android to do some
- of our resource management work for us.)</li>
- <li>
- Then we create a string array in which we declare the column(s) we want
- (just the title, in this case), and an int array that defines the View(s)
- to which we'd like to bind the columns (these should be in order, respective to
- the string array, but here we only have one for each).</li>
- <li>
- Next is the SimpleCursorAdapter instantiation.
- Like many classes in Android, the SimpleCursorAdapter needs a Context in order to do its
- work, so we pass in <code>this</code> for the context (since subclasses of Activity
- implement Context). We pass the <code>notes_row</code> View we created as the receptacle
- for the data, the Cursor we just created, and then our arrays.</li>
- </ol>
- <p>
- In the future, remember that the mapping between the <strong>from</strong> columns and <strong>to</strong> resources
- is done using the respective ordering of the two arrays. If we had more columns we wanted
- to bind, and more Views to bind them in to, we would specify them in order, for example we
- might use <code>{ NotesDbAdapter.KEY_TITLE, NotesDbAdapter.KEY_BODY }</code> and
- <code>{ R.id.text1, R.id.text2 }</code> to bind two fields into the row (and we would also need
- to define text2 in the notes_row.xml, for the body text). This is how you can bind multiple fields
- into a single row (and get a custom row layout as well).</p>
- <p>
- If you get compiler errors about classes not being found, ctrl-shift-O or
- (cmd-shift-O on the mac) to organize imports.
- </p>
-
-<h2 style="clear:right;">Step 13</h2>
- <p>Run it!
- <ol>
- <li>
- Right click on the <code>Notepadv1</code> project.</li>
- <li>
- From the popup menu, select <strong>Run As</strong> &gt;
- <strong>Android Application</strong>.</li>
- <li>
- If you see a dialog come up, select Android Launcher as the way of running
- the application (you can also use the link near the top of the dialog to
- set this as your default for the workspace; this is recommended as it will
- stop the plugin from asking you this every time).</li>
- <li>Add new notes by hitting the menu button and selecting <em>Add
- Item</em> from the menu.</li>
- </ol>
-
-<h2 style="clear:right;">Solution and Next Steps</h2>
- <p>You can see the solution to this class in <code>Notepadv1Solution</code>
-from
-the zip file to compare with your own.</p>
-
-<p>Once you are ready, move on to <a href="notepad-ex2.html">Tutorial
-Exercise 2</a> to add the ability to create, edit and delete notes.</p>
-
diff --git a/docs/html/guide/tutorials/notepad/notepad-ex2.jd b/docs/html/guide/tutorials/notepad/notepad-ex2.jd
deleted file mode 100644
index fed40abb267e..000000000000
--- a/docs/html/guide/tutorials/notepad/notepad-ex2.jd
+++ /dev/null
@@ -1,642 +0,0 @@
-Rpage.title=Notepad Exercise 2
-parent.title=Notepad Tutorial
-parent.link=index.html
-@jd:body
-
-
-<p><em>In this exercise, you will add a second Activity to your notepad application, to let the user
-create and edit notes. You will also allow the user to delete existing notes through a context menu.
-The new Activity assumes responsibility for creating new notes by
-collecting user input and packing it into a return Bundle provided by the intent. This exercise
-demonstrates:</em></p>
-<ul>
-<li><em>Constructing a new Activity and adding it to the Android manifest</em></li>
-<li><em>Invoking another Activity asynchronously using <code>startActivityForResult()</code></em></li>
-<li><em>Passing data between Activity in Bundle objects</em></li>
-<li><em>How to use a more advanced screen layout</em></li>
-<li><em>How to create a context menu</em></li>
-</ul>
-
-<div style="float:right;white-space:nowrap">
- [<a href="notepad-ex1.html">Exercise 1</a>]
- <span style="color:#BBB;">
- [<a href="notepad-ex2.html" style="color:#DDD;">Exercise 2</a>]
- </span>
- [<a href="notepad-ex3.html">Exercise 3</a>]
- [<a href="notepad-extra-credit.html">Extra Credit</a>]
-</div>
-
-<h2>Step 1</h2>
-
-<p>Create a new Android project using the sources from <code>Notepadv2</code> under the
-<code>NotepadCodeLab</code> folder, just like you did for the first exercise. If you see an error about
-<code>AndroidManifest.xml</code>, or some problems related to an
-<code>android.zip</code> file, right click on the project and select <strong>Android
-Tools</strong> &gt; <strong>Fix Project Properties</strong>.</p>
-
-<p>Open the <code>Notepadv2</code> project and take a look around:</p>
-<ul>
- <li>
- Open and look at the <code>strings.xml</code> file under
- <code>res/values</code> &mdash; there are several new strings which we will use
- for our new functionality
- </li>
- <li>
- Also, open and take a look at the top of the <code>Notepadv2</code> class,
- you will notice several new constants have been defined along with a new <code>mNotesCursor</code>
- field used to hold the cursor we are using.
- </li>
- <li>
- Note also that the <code>fillData()</code> method has a few more comments and now uses
- the new field to store the notes Cursor. The <code>onCreate()</code> method is
- unchanged from the first exercise. Also notice that the member field used to store the
- notes Cursor is now called <code>mNotesCursor</code>. The <code>m</code> denotes a member
- field and is part of the Android coding style standards.
- </li>
- <li>
- There are also a couple of new overridden methods
- (<code>onCreateContextMenu()</code>, <code>onContextItemSelected()</code>,
- <code>onListItemClick()</code> and <code>onActivityResult()</code>)
- which we will be filling in below.
- </li>
-</ul>
-
-
-<h2>Step 2</h2>
-<div class="sidebox-wrapper">
-<div class="sidebox">
-<p>Context menus should always be used when performing actions upon specific elements in the UI.
-When you register a View to a context menu, the context menu is revealed by performing a "long-click"
-on the UI component (press and hold the touchscreen or highlight and hold down the selection key for about two seconds).</p>
-</div>
-</div>
-
-<p>First, let's create the context menu that will allow users to delete individual notes.
-Open the Notepadv2 class.</p>
-
-<ol>
- <li>In order for each list item in the ListView to register for the context menu, we call
- <code>registerForContextMenu()</code> and pass it our ListView. So, at the very end of
- the <code>onCreate()</code> method add this line:
- <pre>registerForContextMenu(getListView());</pre>
- <p>Because our Activity extends the ListActivity class, <code>getListView()</code> will return us
- the local ListView object for the Activity. Now, each list item in this ListView will activate the
- context menu.
- <li>
- Now fill in the <code>onCreateContextMenu()</code> method. This callback is similar to the other
- menu callback used for the options menu. Here, we add just one line, which will add a menu item
- to delete a note. Call <code>menu.add()</code> like so:
- <pre>
-public void onCreateContextMenu(Menu menu, View v,
- ContextMenu.ContextMenuInfo menuInfo) {
- super.onCreateContextMenu(menu, v, menuInfo);
- menu.add(0, DELETE_ID, 0, R.string.menu_delete);
-}</pre>
- <p>The <code>onCreateContextMenu()</code> callback passes some other information in addition to the Menu object,
- such as the View that has been triggered for the menu and
- an extra object that may contain additional information about the object selected. However, we don't care about
- these here, because we only have one kind of object in the Activity that uses context menus. In the next
- step, we'll handle the menu item selection.</p>
- </li>
-</ol>
-
-<h2>Step 3</h2>
- <p>Now that the we've registered our ListView for a context menu and defined our context menu item, we need
- to handle the callback when it is selected. For this, we need to identify the list ID of the
- selected item, then delete it. So fill in the
- <code>onContextItemSelected()</code> method like this:</p>
-<pre>
-public boolean onContextItemSelected(MenuItem item) {
- switch(item.getItemId()) {
- case DELETE_ID:
- AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
- mDbHelper.deleteNote(info.id);
- fillData();
- return true;
- }
- return super.onContextItemSelected(item);
-}</pre>
-<p>Here, we retrieve the {@link android.widget.AdapterView.AdapterContextMenuInfo AdapterContextMenuInfo}
-with {@link android.view.MenuItem#getMenuInfo()}. The <var>id</var> field of this object tells us
-the position of the item in the ListView. We then pass this to the <code>deleteNote()</code>
-method of our NotesDbAdapter and the note is deleted. That's it for the context menu &mdash; notes
-can now be deleted.</p>
-
-<h2 style="clear:right;">Step 4</h2>
- <div class="sidebox-wrapper">
- <div class="sidebox">
- <h2>Starting Other Activities</h2>
- <p>In this example our Intent uses a class name specifically.
- As well as
- <a href="{@docRoot}resources/faq/commontasks.html#intentexamples">starting intents</a> in
- classes we already know about, be they in our own application or another
- application, we can also create Intents without knowing exactly which
- application will handle it.</p>
- <p>For example, we might want to open a page in a
- browser, and for this we still use
- an Intent. But instead of specifying a class to handle it, we use
- a predefined Intent constant, and a content URI that describes what we
- want to do. See {@link android.content.Intent
- android.content.Intent} for more information.</p>
- </div>
- </div>
-
- <p>Fill in the body of the <code>createNote()</code> method:
- <p>Create a new <code>Intent</code> to create a note
- (<code>ACTIVITY_CREATE</code>) using the <code>NoteEdit</code> class.
- Then fire the Intent using the <code>startActivityForResult()</code> method
- call:</p>
- <pre style="overflow:auto">
-Intent i = new Intent(this, NoteEdit.class);
-startActivityForResult(i, ACTIVITY_CREATE);</pre>
- <p>This form of the Intent call targets a specific class in our Activity, in this case
- <code>NoteEdit</code>. Since the Intent class will need to communicate with the Android
- operating system to route requests, we also have to provide a Context (<code>this</code>).</p>
- <p>The <code>startActivityForResult()</code> method fires the Intent in a way that causes a method
- in our Activity to be called when the new Activity is completed. The method in our Activity
- that receives the callback is called
- <code>onActivityResult()</code> and we will implement it in a later step. The other way
- to call an Activity is using <code>startActivity()</code> but this is a "fire-and-forget" way
- of calling it &mdash; in this manner, our Activity is not informed when the Activity is completed, and there is
- no way to return result information from the called Activity with <code>startActivity()</code>.
- <p>Don't worry about the fact that <code>NoteEdit</code> doesn't exist yet,
- we will fix that soon. </p>
- </li>
-
-
-<h2>Step 5</h2>
-
- <p>Fill in the body of the <code>onListItemClick()</code> override.</p>
- <p><code>onListItemClick()</code> is a callback method that we'll override. It is called when
- the user selects an item from the list. It is passed four parameters: the
- <code>ListView</code> object it was invoked from, the <code>View</code>
- inside the <code>ListView</code> that was clicked on, the
- <code>position</code> in the list that was clicked, and the
- <code>mRowId</code> of the item that was clicked. In this instance we can
- ignore the first two parameters (we only have one <code>ListView</code> it
- could be), and we ignore the <code>mRowId</code> as well. All we are
- interested in is the <code>position</code> that the user selected. We use
- this to get the data from the correct row, and bundle it up to send to
- the <code>NoteEdit</code> Activity.</p>
- <p>In our implementation of the callback, the method creates an
- <code>Intent</code> to edit the note using
- the <code>NoteEdit</code> class. It then adds data into the extras Bundle of
- the Intent, which will be passed to the called Activity. We use it
- to pass in the title and body text, and the <code>mRowId</code> for the note we are
- editing. Finally, it will fire the Intent using the
- <code>startActivityForResult()</code> method call. Here's the code that
- belongs in <code>onListItemClick()</code>:</p>
- <pre>
-super.onListItemClick(l, v, position, id);
-Cursor c = mNotesCursor;
-c.moveToPosition(position);
-Intent i = new Intent(this, NoteEdit.class);
-i.putExtra(NotesDbAdapter.KEY_ROWID, id);
-i.putExtra(NotesDbAdapter.KEY_TITLE, c.getString(
- c.getColumnIndexOrThrow(NotesDbAdapter.KEY_TITLE)));
-i.putExtra(NotesDbAdapter.KEY_BODY, c.getString(
- c.getColumnIndexOrThrow(NotesDbAdapter.KEY_BODY)));
-startActivityForResult(i, ACTIVITY_EDIT);</pre>
- <ul>
- <li>
- <code>putExtra()</code> is the method to add items into the extras Bundle
- to pass in to intent invocations. Here, we are
- using the Bundle to pass in the title, body and mRowId of the note we want to edit.
- </li>
- <li>
- The details of the note are pulled out from our query Cursor, which we move to the
- proper position for the element that was selected in the list, with
- the <code>moveToPosition()</code> method.</li>
- <li>With the extras added to the Intent, we invoke the Intent on the
- <code>NoteEdit</code> class by passing <code>startActivityForResult()</code>
- the Intent and the request code. (The request code will be
- returned to <code>onActivityResult</code> as the <code>requestCode</code> parameter.)</li>
- </ul>
- <p class="note"><b>Note:</b> We assign the mNotesCursor field to a local variable at the
- start of the method. This is done as an optimization of the Android code. Accessing a local
- variable is much more efficient than accessing a field in the Dalvik VM, so by doing this
- we make only one access to the field, and five accesses to the local variable, making the
- routine much more efficient. It is recommended that you use this optimization when possible.</p>
-
-
-<h2>Step 6</h2>
-
-<p>The above <code>createNote()</code> and <code>onListItemClick()</code>
- methods use an asynchronous Intent invocation. We need a handler for the callback, so here we fill
- in the body of the <code>onActivityResult()</code>. </p>
-<p><code>onActivityResult()</code> is the overridden method
- which will be called when an Activity returns with a result. (Remember, an Activity
- will only return a result if launched with <code>startActivityForResult</code>.) The parameters provided
- to the callback are: </p>
- <ul>
- <li><code>requestCode</code> &mdash; the original request code
- specified in the Intent invocation (either <code>ACTIVITY_CREATE</code> or
- <code>ACTIVITY_EDIT</code> for us).
- </li>
- <li><code>resultCode</code> &mdash; the result (or error code) of the call, this
- should be zero if everything was OK, but may have a non-zero code indicating
- that something failed. There are standard result codes available, and you
- can also create your own constants to indicate specific problems.
- </li>
- <li><code>intent</code> &mdash; this is an Intent created by the Activity returning
- results. It can be used to return data in the Intent "extras."
- </li>
- </ul>
- <p>The combination of <code>startActivityForResult()</code> and
- <code>onActivityResult()</code> can be thought of as an asynchronous RPC
- (remote procedure call) and forms the recommended way for an Activity to invoke
- another and share services.</p>
- <p>Here's the code that belongs in your <code>onActivityResult()</code>:</p>
- <pre>
-super.onActivityResult(requestCode, resultCode, intent);
-Bundle extras = intent.getExtras();
-
-switch(requestCode) {
-case ACTIVITY_CREATE:
- String title = extras.getString(NotesDbAdapter.KEY_TITLE);
- String body = extras.getString(NotesDbAdapter.KEY_BODY);
- mDbHelper.createNote(title, body);
- fillData();
- break;
-case ACTIVITY_EDIT:
- Long mRowId = extras.getLong(NotesDbAdapter.KEY_ROWID);
- if (mRowId != null) {
- String editTitle = extras.getString(NotesDbAdapter.KEY_TITLE);
- String editBody = extras.getString(NotesDbAdapter.KEY_BODY);
- mDbHelper.updateNote(mRowId, editTitle, editBody);
- }
- fillData();
- break;
-}</pre>
-
- <ul>
- <li>
- We are handling both the <code>ACTIVITY_CREATE</code> and
- <code>ACTIVITY_EDIT</code> activity results in this method.
- </li>
- <li>
- In the case of a create, we pull the title and body from the extras (retrieved from the
- returned Intent) and use them to create a new note.
- </li>
- <li>
- In the case of an edit, we pull the mRowId as well, and use that to update
- the note in the database.
- </li>
- <li>
- <code>fillData()</code> at the end ensures everything is up to date .
- </li>
- </ul>
-
-
-<h2>Step 7</h2>
-
- <div class="sidebox-wrapper">
- <div class="sidebox">
- <h2>The Art of Layout</h2>
- <p>The provided
- note_edit.xml layout file is the most sophisticated one in the application we will be building,
- but that doesn't mean it is even close to the kind of sophistication you will be likely to want
- in real Android applications.</p>
- <p>Creating a
- good UI is part art and part science, and the rest is work. Mastery of <a
- href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layouts</a> is an essential part of
-creating
- a good looking Android application.</p>
- <p>Take a look at the
- <a href="{@docRoot}resources/tutorials/views/index.html">Hello Views</a>
- for some example layouts and how to use them. The ApiDemos sample project is also a
- great resource from which to learn how to create different layouts.</p>
- </div>
- </div>
-
-<p>Open the file <code>note_edit.xml</code> that has been provided and take a
- look at it. This is the UI code for the Note Editor.</p>
- <p>This is the most
- sophisticated UI we have dealt with yet. The file is given to you to avoid
- problems that may sneak in when typing the code. (The XML is very strict
- about case sensitivity and structure, mistakes in these are the usual cause
- of problems with layout.)</p>
- <p>There is a new parameter used
- here that we haven't seen before: <code>android:layout_weight</code> (in
- this case set to use the value 1 in each case).</p>
- <p><code>layout_weight</code> is used in LinearLayouts
- to assign "importance" to Views within the layout. All Views have a default
- <code>layout_weight</code> of zero, meaning they take up only as much room
- on the screen as they need to be displayed. Assigning a value higher than
- zero will split up the rest of the available space in the parent View, according
- to the value of each View's <code>layout_weight</code> and its ratio to the
- overall <code>layout_weight</code> specified in the current layout for this
- and other View elements.</p>
- <p>To give an example: let's say we have a text label
- and two text edit elements in a horizontal row. The label has no
- <code>layout_weight</code> specified, so it takes up the minimum space
- required to render. If the <code>layout_weight</code> of each of the two
- text edit elements is set to 1, the remaining width in the parent layout will
- be split equally between them (because we claim they are equally important).
- If the first one has a <code>layout_weight</code> of 1
- and the second has a <code>layout_weight</code> of 2, then one third of the
- remaining space will be given to the first, and two thirds to the
- second (because we claim the second one is more important).</p>
- <p>This layout also demonstrates how to nest multiple layouts
- inside each other to achieve a more complex and pleasant layout. In this
- example, a horizontal linear layout is nested inside the vertical one to
- allow the title label and text field to be alongside each other,
- horizontally.</p>
-
-
-<h2 style="clear:right;">Step 8</h2>
-
- <p>Create a <code>NoteEdit</code> class that extends
- <code>android.app.Activity</code>.</p>
- <p>This is the first time we will have
- created an Activity without the Android Eclipse plugin doing it for us. When
- you do so, the <code>onCreate()</code> method is not automatically
- overridden for you. It is hard to imagine an Activity that doesn't override
- the <code>onCreate()</code> method, so this should be the first thing you do.</p>
- <ol>
- <li>Right click on the <code>com.android.demo.notepad2</code> package
- in the Package Explorer, and select <strong>New</strong> &gt; <strong>Class</strong> from the popup
- menu.</li>
- <li>Fill in <code>NoteEdit</code> for the <code>Name:</code> field in the
- dialog.</li>
- <li>In the <code>Superclass:</code> field, enter
- <code>android.app.Activity</code> (you can also just type Activity and hit
- Ctrl-Space on Windows and Linux or Cmd-Space on the Mac, to invoke code
- assist and find the right package and class).</li>
- <li>Click <strong>Finish</strong>.</li>
- <li>In the resulting <code>NoteEdit</code> class, right click in the editor
- window and select <strong>Source</strong> &gt; <strong>Override/Implement Methods...</strong></li>
- <li>Scroll down through the checklist in the dialog until you see
- <code>onCreate(Bundle)</code> &mdash; and check the box next to it.</li>
- <li>Click <strong>OK</strong>.<p>The method should now appear in your class.</p></li>
- </ol>
-
-<h2>Step 9</h2>
-
-<p>Fill in the body of the <code>onCreate()</code> method for <code>NoteEdit</code>.</p>
-
-<p>This will set the title of our new Activity to say "Edit Note" (one
- of the strings defined in <code>strings.xml</code>). It will also set the
- content view to use our <code>note_edit.xml</code> layout file. We can then
- grab handles to the title and body text edit views, and the confirm button,
- so that our class can use them to set and get the note title and body,
- and attach an event to the confirm button for when it is pressed by the
- user.</p>
- <p>We can then unbundle the values that were passed in to the Activity
- with the extras Bundle attached to the calling Intent. We'll use them to pre-populate
- the title and body text edit views so that the user can edit them.
- Then we will grab and store the <code>mRowId</code> so we can keep
- track of what note the user is editing.</p>
-
- <ol>
- <li>
- Inside <code>onCreate()</code>, set up the layout:<br>
- <pre>setContentView(R.layout.note_edit);</pre>
- </li>
- <li>
- Find the edit and button components we need:
- <p>These are found by the
- IDs associated to them in the R class, and need to be cast to the right
- type of <code>View</code> (<code>EditText</code> for the two text views,
- and <code>Button</code> for the confirm button):</p>
- <pre>
-mTitleText = (EditText) findViewById(R.id.title);
-mBodyText = (EditText) findViewById(R.id.body);
-Button confirmButton = (Button) findViewById(R.id.confirm);</pre>
- <p>Note that <code>mTitleText</code> and <code>mBodyText</code> are member
- fields (you need to declare them at the top of the class definition).</p>
- </li>
- <li>At the top of the class, declare a <code>Long mRowId</code> private field to store
- the current <code>mRowId</code> being edited (if any).
- </li>
- <li>Continuing inside <code>onCreate()</code>,
- add code to initialize the <code>title</code>, <code>body</code> and
- <code>mRowId</code> from the extras Bundle in
- the Intent (if it is present):<br>
- <pre>
-mRowId = null;
-Bundle extras = getIntent().getExtras();
-if (extras != null) {
- String title = extras.getString(NotesDbAdapter.KEY_TITLE);
- String body = extras.getString(NotesDbAdapter.KEY_BODY);
- mRowId = extras.getLong(NotesDbAdapter.KEY_ROWID);
-
- if (title != null) {
- mTitleText.setText(title);
- }
- if (body != null) {
- mBodyText.setText(body);
- }
-}</pre>
- <ul>
- <li>
- We are pulling the <code>title</code> and
- <code>body</code> out of the
- <code>extras</code> Bundle that was set from the
- Intent invocation.
- </li><li>
- We also null-protect the text field setting (i.e., we don't want to set
- the text fields to null accidentally).</li>
- </ul>
- </li>
- <li>
- Create an <code>onClickListener()</code> for the button:
- <p>Listeners can be one of the more confusing aspects of UI
- implementation, but
- what we are trying to achieve in this case is simple. We want an
- <code>onClick()</code> method to be called when the user presses the
- confirm button, and use that to do some work and return the values
- of the edited note to the Intent caller. We do this using something called
- an anonymous inner class. This is a bit confusing to look at unless you
- have seen them before, but all you really need to take away from this is
- that you can refer to this code in the future to see how to create a
- listener and attach it to a button. (Listeners are a common idiom
- in Java development, particularly for user interfaces.) Here's the empty listener:<br>
- <pre>
-confirmButton.setOnClickListener(new View.OnClickListener() {
-
- public void onClick(View view) {
-
- }
-
-});</pre>
- </li>
- </ol>
-<h2>Step 10</h2>
-
-<p>Fill in the body of the <code>onClick()</code> method of the <code>OnClickListener</code> created in the last step.</p>
-
- <p>This is the code that will be run when the user clicks on the
- confirm button. We want this to grab the title and body text from the edit
- text fields, and put them into the return Bundle so that they can be passed
- back to the Activity that invoked this <code>NoteEdit</code> Activity. If the
- operation is an edit rather than a create, we also want to put the
- <code>mRowId</code> into the Bundle so that the
- <code>Notepadv2</code> class can save the changes back to the correct
- note.</p>
- <ol>
- <li>
- Create a <code>Bundle</code> and put the title and body text into it using the
- constants defined in Notepadv2 as keys:<br>
- <pre>
-Bundle bundle = new Bundle();
-
-bundle.putString(NotesDbAdapter.KEY_TITLE, mTitleText.getText().toString());
-bundle.putString(NotesDbAdapter.KEY_BODY, mBodyText.getText().toString());
-if (mRowId != null) {
- bundle.putLong(NotesDbAdapter.KEY_ROWID, mRowId);
-}</pre>
- </li>
- <li>
- Set the result information (the Bundle) in a new Intent and finish the Activity:
- <pre>
-Intent mIntent = new Intent();
-mIntent.putExtras(bundle);
-setResult(RESULT_OK, mIntent);
-finish();</pre>
- <ul>
- <li>The Intent is simply our data carrier that carries our Bundle
- (with the title, body and mRowId).</li>
- <li>The <code>setResult()</code> method is used to set the result
- code and return Intent to be passed back to the
- Intent caller. In this case everything worked, so we return RESULT_OK for the
- result code.</li>
- <li>The <code>finish()</code> call is used to signal that the Activity
- is done (like a return call). Anything set in the Result will then be
- returned to the caller, along with execution control.</li>
- </ul>
- </li>
- </ol>
- <p>The full <code>onCreate()</code> method (plus supporting class fields) should
- now look like this:</p>
- <pre>
-private EditText mTitleText;
-private EditText mBodyText;
-private Long mRowId;
-
-&#64;Override
-protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.note_edit);
-
- mTitleText = (EditText) findViewById(R.id.title);
- mBodyText = (EditText) findViewById(R.id.body);
-
- Button confirmButton = (Button) findViewById(R.id.confirm);
-
- mRowId = null;
- Bundle extras = getIntent().getExtras();
- if (extras != null) {
- String title = extras.getString(NotesDbAdapter.KEY_TITLE);
- String body = extras.getString(NotesDbAdapter.KEY_BODY);
- mRowId = extras.getLong(NotesDbAdapter.KEY_ROWID);
-
- if (title != null) {
- mTitleText.setText(title);
- }
- if (body != null) {
- mBodyText.setText(body);
- }
- }
-
- confirmButton.setOnClickListener(new View.OnClickListener() {
-
- public void onClick(View view) {
- Bundle bundle = new Bundle();
-
- bundle.putString(NotesDbAdapter.KEY_TITLE, mTitleText.getText().toString());
- bundle.putString(NotesDbAdapter.KEY_BODY, mBodyText.getText().toString());
- if (mRowId != null) {
- bundle.putLong(NotesDbAdapter.KEY_ROWID, mRowId);
- }
-
- Intent mIntent = new Intent();
- mIntent.putExtras(bundle);
- setResult(RESULT_OK, mIntent);
- finish();
- }
- });
-}</pre>
- </li>
- </ol>
-
-<h2>Step 11</h2>
-
- <div class="sidebox-wrapper">
- <div class="sidebox">
- <h2>The All-Important Android Manifest File</h2>
- <p>The AndroidManifest.xml file is the way in which Android sees your
- application. This file defines the category of the application, where
- it shows up (or even if it shows up) in the launcher or settings, what
- activities, services, and content providers it defines, what intents it can
- receive, and more. </p>
- <p>For more information, see the reference document
- <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">The AndroidManifest.xml
-File</a></p>
- </div>
- </div>
-
-<p>Finally, the new Activity has to be defined in the manifest file:</p>
- <p>Before the new Activity can be seen by Android, it needs its own
- Activity entry in the <code>AndroidManifest.xml</code> file. This is to let
- the system know that it is there and can be called. We could also specify
- which IntentFilters the activity implements here, but we are going to skip
- this for now and just let Android know that the Activity is
- defined.</p>
- <p>There is a Manifest editor included in the Eclipse plugin that makes it much easier
- to edit the AndroidManifest file, and we will use this. If you prefer to edit the file directly
- or are not using the Eclipse plugin, see the box at the end for information on how to do this
- without using the new Manifest editor.<p>
- <ol>
- <li>Double click on the <code>AndroidManifest.xml</code> file in the package explorer to open it.
- </li>
- <li>Click the <strong>Application</strong> tab at the bottom of the Manifest editor.</li>
- <li>Click <strong>Add...</strong> in the Application Nodes section.
- <p>If you see a dialog with radiobuttons at the top, select the top radio button:
- "Create a new element at the top level, in Application".</p></li>
- <li>Make sure "(A) Activity" is selected in the selection pane of the dialog, and click <strong>OK</strong>.</li>
- <li>Click on the new "Activity" node, in the Application Nodes section, then
- type <code>.NoteEdit</code> into the <em>Name*</em>
- field to the right. Press Return/Enter.</li>
- </ol>
- <p>The Android Manifest editor helps you add more complex entries into the AndroidManifest.xml
- file, have a look around at some of the other options available (but be careful not to select
- them otherwise they will be added to your Manifest). This editor should help you understand
- and alter the AndroidManifest.xml file as you move on to more advanced Android applications.</p>
-
- <p class="note">If you prefer to edit this file directly, simply open the
- <code>AndroidManifest.xml</code> file and look at the source (use the
- <code>AndroidManifest.xml</code> tab in the eclipse editor to see the source code directly).
- Then edit the file as follows:<br>
- <code>&lt;activity android:name=".NoteEdit" /&gt;</code><br><br>
- This should be placed just below the line that reads:<br>
- <code>&lt;/activity&gt;</code> for the <code>.Notepadv2</code> activity.</p>
-
-<h2 style="clear:right;">Step 12</h2>
-
-<p>Now Run it!</p>
-<p>You should now be able to add real notes from
-the menu, as well as delete an existing one. Notice that in order to delete, you must
-first use the directional controls on the device to highlight the note.
-Furthermore, selecting a note title from the list should bring up the note
-editor to let you edit it. Press confirm when finished to save the changes
-back to the database.
-
-<h2>Solution and Next Steps</h2>
-
-<p>You can see the solution to this exercise in <code>Notepadv2Solution</code>
-from the zip file to compare with your own.</p>
-<p>Now try editing a note, and then hitting the back button on the emulator
-instead of the confirm button (the back button is below the menu button). You
-will see an error come up. Clearly our application still has some problems.
-Worse still, if you did make some changes and hit the back button, when you go
-back into the notepad to look at the note you changed, you will find that all
-your changes have been lost. In the next exercise we will fix these
-problems.</p>
-
-<p>
-Once you are ready, move on to <a href="notepad-ex3.html">Tutorial
-Exercise 3</a> where you will fix the problems with the back button and lost
-edits by introducing a proper life cycle into the NoteEdit Activity.</p>
-
-
diff --git a/docs/html/guide/tutorials/notepad/notepad-ex3.jd b/docs/html/guide/tutorials/notepad/notepad-ex3.jd
deleted file mode 100644
index 557738e4c105..000000000000
--- a/docs/html/guide/tutorials/notepad/notepad-ex3.jd
+++ /dev/null
@@ -1,366 +0,0 @@
-page.title=Notepad Exercise 3
-parent.title=Notepad Tutorial
-parent.link=index.html
-@jd:body
-
-
-<p><em>In this exercise, you will use life-cycle event callbacks to store and
-retrieve application state data. This exercise demonstrates:</em></p>
-<ul>
-<li><em>Life-cycle events and how your application can use them</em></li>
-<li><em>Techniques for maintaining application state</em></li>
-</ul>
-
-<div style="float:right;white-space:nowrap">
- [<a href="notepad-ex1.html">Exercise 1</a>]
- [<a href="notepad-ex2.html">Exercise 2</a>]
- <span style="color:#BBB;">
- [<a href="notepad-ex3.html" style="color:#BBB;">Exercise 3</a>]
- </span>
- [<a href="notepad-extra-credit.html">Extra Credit</a>]
-</div>
-
-<h2>Step 1</h2>
-
-<p>Import <code>Notepadv3</code> into Eclipse. If you see an error about
-<code>AndroidManifest.xml,</code> or some problems related to an Android zip
-file, right click on the project and select <strong>Android Tools</strong> &gt;
-<strong>Fix Project Properties</strong> from the popup menu. The starting point for this exercise is
-exactly where we left off at the end of the Notepadv2. </p>
-<p>The current application has some problems &mdash; hitting the back button when editing
-causes a crash, and anything else that happens during editing will cause the
-edits to be lost.</p>
-<p>To fix this, we will move most of the functionality for creating and editing
-the note into the NoteEdit class, and introduce a full life cycle for editing
-notes.</p>
-
- <ol>
- <li>Remove the code in <code>NoteEdit</code> that parses the title and body
- from the extras Bundle.
- <p>Instead, we are going to use the <code>DBHelper</code> class
- to access the notes from the database directly. All we need passed into the
- NoteEdit Activity is a <code>mRowId</code> (but only if we are editing, if creating we pass
- nothing). Remove these lines:</p>
- <pre>
-String title = extras.getString(NotesDbAdapter.KEY_TITLE);
-String body = extras.getString(NotesDbAdapter.KEY_BODY);</pre>
- </li>
- <li>We will also get rid of the properties that were being passed in
- the <code>extras</code> Bundle, which we were using to set the title
- and body text edit values in the UI. So delete:
- <pre>
-if (title != null) {
- mTitleText.setText(title);
-}
-if (body != null) {
- mBodyText.setText(body);
-}</pre>
- </li>
- </ol>
-
-<h2>Step 2</h2>
-
-<p>Create a class field for a <code>NotesDbAdapter</code> at the top of the NoteEdit class:</p>
- <pre>&nbsp;&nbsp;&nbsp; private NotesDbAdapter mDbHelper;</pre>
-<p>Also add an instance of <code>NotesDbAdapter</code> in the
- <code>onCreate()</code> method (right below the <code>super.onCreate()</code> call):</p>
- <pre>
-&nbsp;&nbsp;&nbsp; mDbHelper = new NotesDbAdapter(this);<br>
-&nbsp;&nbsp;&nbsp; mDbHelper.open();</pre>
-
-<h2>Step 3</h2>
-
-<p>In <code>NoteEdit</code>, we need to check the <var>savedInstanceState</var> for the
-<code>mRowId</code>, in case the note
- editing contains a saved state in the Bundle, which we should recover (this would happen
- if our Activity lost focus and then restarted).</p>
- <ol>
- <li>
- Replace the code that currently initializes the <code>mRowId</code>:<br>
- <pre>
- mRowId = null;
-
- Bundle extras = getIntent().getExtras();
- if (extras != null) {
- mRowId = extras.getLong(NotesDbAdapter.KEY_ROWID);
- }
- </pre>
- with this:
- <pre>
- mRowId = (savedInstanceState == null) ? null :
- (Long) savedInstanceState.getSerializable(NotesDbAdapter.KEY_ROWID);
- if (mRowId == null) {
- Bundle extras = getIntent().getExtras();
- mRowId = extras != null ? extras.getLong(NotesDbAdapter.KEY_ROWID)
- : null;
- }
- </pre>
- </li>
- <li>
- Note the null check for <code>savedInstanceState</code>, and we still need to load up
- <code>mRowId</code> from the <code>extras</code> Bundle if it is not
- provided by the <code>savedInstanceState</code>. This is a ternary operator shorthand
- to safely either use the value or null if it is not present.
- </li>
- <li>
- Note the use of <code>Bundle.getSerializable()</code> instead of
- <code>Bundle.getLong()</code>. The latter encoding returns a <code>long</code> primitive and
- so can not be used to represent the case when <code>mRowId</code> is <code>null</code>.
- </li>
- </ol>
-
-<h2>Step 4</h2>
-
-<p>Next, we need to populate the fields based on the <code>mRowId</code> if we
- have it:</p>
- <pre>populateFields();</pre>
- <p>This goes before the <code>confirmButton.setOnClickListener()</code> line.
- We'll define this method in a moment.</p>
-
-<h2>Step 5</h2>
-
-<p>Get rid of the Bundle creation and Bundle value settings from the
- <code>onClick()</code> handler method. The Activity no longer needs to
- return any extra information to the caller. And because we no longer have
- an Intent to return, we'll use the shorter version
- of <code>setResult()</code>:</p>
- <pre>
-public void onClick(View view) {
- setResult(RESULT_OK);
- finish();
-}</pre>
- <p>We will take care of storing the updates or new notes in the database
- ourselves, using the life-cycle methods.</p>
-
- <p>The whole <code>onCreate()</code> method should now look like this:</p>
- <pre>
-super.onCreate(savedInstanceState);
-
-mDbHelper = new NotesDbAdapter(this);
-mDbHelper.open();
-
-setContentView(R.layout.note_edit);
-
-mTitleText = (EditText) findViewById(R.id.title);
-mBodyText = (EditText) findViewById(R.id.body);
-
-Button confirmButton = (Button) findViewById(R.id.confirm);
-
-mRowId = (savedInstanceState == null) ? null :
- (Long) savedInstanceState.getSerializable(NotesDbAdapter.KEY_ROWID);
-if (mRowId == null) {
- Bundle extras = getIntent().getExtras();
- mRowId = extras != null ? extras.getLong(NotesDbAdapter.KEY_ROWID)
- : null;
-}
-
-populateFields();
-
-confirmButton.setOnClickListener(new View.OnClickListener() {
-
- public void onClick(View view) {
- setResult(RESULT_OK);
- finish();
- }
-
-});</pre>
-
-<h2>Step 6</h2>
-
-<p>Define the <code>populateFields()</code> method.</p>
- <pre>
-private void populateFields() {
- if (mRowId != null) {
- Cursor note = mDbHelper.fetchNote(mRowId);
- startManagingCursor(note);
- mTitleText.setText(note.getString(
- note.getColumnIndexOrThrow(NotesDbAdapter.KEY_TITLE)));
- mBodyText.setText(note.getString(
- note.getColumnIndexOrThrow(NotesDbAdapter.KEY_BODY)));
- }
-}</pre>
-<p>This method uses the <code>NotesDbAdapter.fetchNote()</code> method to find the right note to
-edit, then it calls <code>startManagingCursor()</code> from the <code>Activity</code> class, which
-is an Android convenience method provided to take care of the Cursor life-cycle. This will release
-and re-create resources as dictated by the Activity life-cycle, so we don't need to worry about
-doing that ourselves. After that, we just look up the title and body values from the Cursor
-and populate the View elements with them.</p>
-
-
-<h2>Step 7</h2>
-
- <div class="sidebox-wrapper">
- <div class="sidebox">
- <h2>Why handling life-cycle events is important</h2>
- <p>If you are used to always having control in your applications, you
- might not understand why all this life-cycle work is necessary. The reason
- is that in Android, you are not in control of your Activity, the
- operating system is!</p>
- <p>As we have already seen, the Android model is based around activities
- calling each other. When one Activity calls another, the current Activity
- is paused at the very least, and may be killed altogether if the
- system starts to run low on resources. If this happens, your Activity will
- have to store enough state to come back up later, preferably in the same
- state it was in when it was killed.</p>
- <p>
- Activities have a <a
-href="{@docRoot}guide/topics/fundamentals/activities.html#Lifecycle">well-defined life
-cycle</a>.
- Lifecycle events can happen even if you are not handing off control to
- another Activity explicitly. For example, perhaps a call comes in to the
- handset. If this happens, and your Activity is running, it will be swapped
- out while the call Activity takes over.</p>
- </div>
- </div>
-
-<p>Still in the <code>NoteEdit</code> class, we now override the methods
- <code>onSaveInstanceState()</code>, <code>onPause()</code> and
- <code>onResume()</code>. These are our life-cycle methods
- (along with <code>onCreate()</code> which we already have).</p>
-
-<p><code>onSaveInstanceState()</code> is called by Android if the
- Activity is being stopped and <strong>may be killed before it is
- resumed!</strong> This means it should store any state necessary to
- re-initialize to the same condition when the Activity is restarted. It is
- the counterpart to the <code>onCreate()</code> method, and in fact the
- <code>savedInstanceState</code> Bundle passed in to <code>onCreate()</code> is the same
- Bundle that you construct as <code>outState</code> in the
- <code>onSaveInstanceState()</code> method.</p>
-
-<p><code>onPause()</code> and <code>onResume()</code> are also
- complimentary methods. <code>onPause()</code> is always called when the
- Activity ends, even if we instigated that (with a <code>finish()</code> call for example).
- We will use this to save the current note back to the database. Good
- practice is to release any resources that can be released during an
- <code>onPause()</code> as well, to take up less resources when in the
- passive state. <code>onResume()</code> will call our <code>populateFields()</code> method
- to read the note out of the database again and populate the fields.</p>
-
-<p>So, add some space after the <code>populateFields()</code> method
- and add the following life-cycle methods:</p>
- <ol type="a">
- <li><code>
- onSaveInstanceState()</code>:
- <pre>
- &#64;Override
- protected void onSaveInstanceState(Bundle outState) {
- super.onSaveInstanceState(outState);
- saveState();
- outState.putSerializable(NotesDbAdapter.KEY_ROWID, mRowId);
- }</pre>
- <p>We'll define <code>saveState()</code> next.</p>
- </li>
- <li><code>
- onPause()</code>:
- <pre>
- &#64;Override
- protected void onPause() {
- super.onPause();
- saveState();
- }</pre>
- </li>
- <li><code>
- onResume()</code>:
- <pre>
- &#64;Override
- protected void onResume() {
- super.onResume();
- populateFields();
- }</pre>
- </li>
- </ol>
-<p>Note that <code>saveState()</code> must be called in both <code>onSaveInstanceState()</code>
-and <code>onPause()</code> to ensure that the data is saved. This is because there is no
-guarantee that <code>onSaveInstanceState()</code> will be called and because when it <em>is</em>
-called, it is called before <code>onPause()</code>.</p>
-
-
-<h2 style="clear:right;">Step 8</h2>
-
-<p>Define the <code>saveState()</code> method to put the data out to the
-database.</p>
- <pre>
- private void saveState() {
- String title = mTitleText.getText().toString();
- String body = mBodyText.getText().toString();
-
- if (mRowId == null) {
- long id = mDbHelper.createNote(title, body);
- if (id > 0) {
- mRowId = id;
- }
- } else {
- mDbHelper.updateNote(mRowId, title, body);
- }
- }</pre>
- <p>Note that we capture the return value from <code>createNote()</code> and if a valid row ID is
- returned, we store it in the <code>mRowId</code> field so that we can update the note in future
- rather than create a new one (which otherwise might happen if the life-cycle events are
- triggered).</p>
-
-
-<h2 style="clear:right;">Step 9</h2>
-
-<p>Now pull out the previous handling code from the
- <code>onActivityResult()</code> method in the <code>Notepadv3</code>
- class.</p>
-<p>All of the note retrieval and updating now happens within the
- <code>NoteEdit</code> life cycle, so all the <code>onActivityResult()</code>
- method needs to do is update its view of the data, no other work is
- necessary. The resulting method should look like this:</p>
-<pre>
-&#64;Override
-protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
- super.onActivityResult(requestCode, resultCode, intent);
- fillData();
-}</pre>
-
-<p>Because the other class now does the work, all this has to do is refresh
- the data.</p>
-
-<h2>Step 10</h2>
-
-<p>Also remove the lines which set the title and body from the
- <code>onListItemClick()</code> method (again they are no longer needed,
- only the <code>mRowId</code> is):</p>
-<pre>
- Cursor c = mNotesCursor;
- c.moveToPosition(position);</pre>
-<br>
-and also remove:
-<br>
-<pre>
- i.putExtra(NotesDbAdapter.KEY_TITLE, c.getString(
- c.getColumnIndex(NotesDbAdapter.KEY_TITLE)));
- i.putExtra(NotesDbAdapter.KEY_BODY, c.getString(
- c.getColumnIndex(NotesDbAdapter.KEY_BODY)));</pre>
-<br>
-so that all that should be left in that method is:
-<br>
-<pre>
- super.onListItemClick(l, v, position, id);
- Intent i = new Intent(this, NoteEdit.class);
- i.putExtra(NotesDbAdapter.KEY_ROWID, id);
- startActivityForResult(i, ACTIVITY_EDIT);</pre>
-
- <p>You can also now remove the mNotesCursor field from the class, and set it back to using
- a local variable in the <code>fillData()</code> method:
-<br><pre>
- Cursor notesCursor = mDbHelper.fetchAllNotes();</pre></p>
- <p>Note that the <code>m</code> in <code>mNotesCursor</code> denotes a member field, so when we
- make <code>notesCursor</code> a local variable, we drop the <code>m</code>. Remember to rename the
- other occurrences of <code>mNotesCursor</code> in your <code>fillData()</code> method.
-</ol>
-<p>
-Run it! (use <em>Run As -&gt; Android Application</em> on the project right
-click menu again)</p>
-
-<h2>Solution and Next Steps</h2>
-
-<p>You can see the solution to this exercise in <code>Notepadv3Solution</code>
-from
-the zip file to compare with your own.</p>
-<p>
-When you are ready, move on to the <a href="notepad-extra-credit.html">Tutorial
-Extra Credit</a> exercise, where you can use the Eclipse debugger to
-examine the life-cycle events as they happen.</p>
diff --git a/docs/html/guide/tutorials/notepad/notepad-extra-credit.jd b/docs/html/guide/tutorials/notepad/notepad-extra-credit.jd
deleted file mode 100644
index 34f7063dfa01..000000000000
--- a/docs/html/guide/tutorials/notepad/notepad-extra-credit.jd
+++ /dev/null
@@ -1,70 +0,0 @@
-page.title=Notepad Extra Credit
-parent.title=Notepad Tutorial
-parent.link=index.html
-@jd:body
-
-
-<p><em>In this exercise, you will use the debugger to look at the work you did
-in Exercise 3. This exercise demonstrates:</em></p>
-<ul>
-<li><em>How to set breakpoints to observe execution</em> </li>
-<li><em>How to run your application in debug mode</code></em></li>
-</ul>
-
-<div style="float:right;white-space:nowrap">
-
- [<a href="notepad-ex1.html">Exercise 1</a>]
- [<a href="notepad-ex2.html">Exercise 2</a>]
- [<a href="notepad-ex3.html">Exercise 3</a>]
- <span style="color:#BBB;">
- [<a href="notepad-extra-credit.html" style="color:#BBB;">Extra Credit</a>]
- </span>
-</div>
-
-<h2>Step 1</h2>
-
-<p>Using the working <code>Notepadv3</code>, put breakpoints in the code at the
- beginning of the <code>onCreate()</code>, <code>onPause()</code>,
- <code>onSaveInstanceState()</code> and <code>onResume()</code> methods in the
- <code>NoteEdit</code> class (if you are not familiar with Eclipse, just
- right click in the narrow grey border on the left of the edit window at the
- line you want a breakpoint, and select <em>Toggle Breakpoint</em>, you
-should see a blue dot appear).</p>
-
-<h2>Step 2</h2>
-
-<p>Now start the notepad demo in debug mode:</p>
-
-<ol type="a">
- <li>
- Right click on the <code>Notepadv3</code> project and from the Debug menu
- select <em>Debug As -&gt; Android Application.</em></li>
- <li>
- The Android emulator should say <em>"waiting for debugger to connect"</em>
- briefly and then run the application.</li>
- <li>
- If it gets stuck on the waiting... screen, quit the emulator and Eclipse,
- from the command line do an <code>adb kill-server</code>, and then restart
-Eclipse and try again.</li></ol>
-
- <h2>Step 3</h2>
-
-<p>When you edit or create a new note you should see the breakpoints getting
- hit and the execution stopping.</p>
-
- <h2>Step 4</h2>
-
-<p>Hit the Resume button to let execution continue (yellow rectangle with a
-green triangle to its right in the Eclipse toolbars near the top).</p>
-
-<h2>Step 5</h2>
-
-<p>Experiment a bit with the confirm and back buttons, and try pressing Home and
- making other mode changes. Watch what life-cycle events are generated and
-when.</p>
-
-<p>The Android Eclipse plugin not only offers excellent debugging support for
-your application development, but also superb profiling support. You can also
-try using <a href="{@docRoot}guide/developing/debugging/debugging-tracing.html">Traceview</a> to profile your application. If your application is running too slow, this can help you
-find the bottlenecks and fix them.</p>
-
diff --git a/docs/html/guide/tutorials/notepad/notepad-index.jd b/docs/html/guide/tutorials/notepad/notepad-index.jd
deleted file mode 100644
index 151c50dcda67..000000000000
--- a/docs/html/guide/tutorials/notepad/notepad-index.jd
+++ /dev/null
@@ -1,143 +0,0 @@
-page.title=Notepad Tutorial
-@jd:body
-
-
-<p>The tutorial in this section gives you a &quot;hands-on&quot; introduction
-to the Android framework and the tools you use to build applications on it.
-Starting from a preconfigured project file, it guides you through the process of
-developing a simple notepad application and provides concrete examples of how to
-set up the project, develop the application logic and user interface, and then
-compile and run the application. </p>
-
-<p>The tutorial presents the notepad application development as a set of
-exercises (see below), each consisting of several steps. You can follow along
-with the steps in each exercise and gradually build up and refine your
-application. The exercises explain each step in detail and provide all the
-sample code you need to complete the application. </p>
-
-<p>When you are finished with the tutorial, you will have created a functioning
-Android application and learned in depth about many of the most important
-concepts in Android development. If you want to add more complex features to
-your application, you can examine the code in an alternative implementation
-of a notepad application, in the
-<a href="{@docRoot}samples/NotePad/index.html">Sample Code</a> documentation. </p>
-
-
-<a name="who"></a>
-<h2>Who Should Use this Tutorial</h2>
-
-<p>This tutorial is designed for experienced developers, especially those with
-knowledge of the Java programming language. If you haven't written Java
-applications before, you can still use the tutorial, but you might need to work
-at a slower pace. </p>
-
-<p>The tutorial assumes that you have some familiarity with the basic Android
-application concepts and terminology. If you aren't yet familiar with those, you
-should read <a href="{@docRoot}intro/anatomy.html">Overview of an Android
-Application</a> before continuing. </p>
-
-<p>Also note that this tutorial uses
-the Eclipse development environment, with the Android plugin installed. If you
-are not using Eclipse, you can follow the exercises and build the application,
-but you will need to determine how to accomplish the Eclipse-specific
-steps in your environment. </p>
-
-<a name="preparing"></a>
-<h2>Preparing for the Exercises</h2>
-
-<p>This tutorial builds on the information provided in the <a
-href="{@docRoot}intro/installing.html">Installing the SDK</a> and <a
-href="{@docRoot}intro/hello-android.html">Hello Android</a>
-documents, which explain in detail how to set up your development environment
-for building Android applications. Before you start this tutorial, you should
-read both these documents, have the SDK installed, and your work environment set up.</p>
-
-<p>To prepare for this lesson:</p>
-
-<ol>
- <li>Download the <a href="codelab/NotepadCodeLab.zip">project
- exercises archive (.zip)</a></li>
- <li>Unpack the archive file to a suitable location on your machine</li>
- <li>Open the <code>NotepadCodeLab</code> folder</li>
-</ol>
-
-<p>Inside the <code>NotepadCodeLab</code> folder, you should see six project
-files: <code>Notepadv1</code>,
- <code>Notepadv2</code>, <code>Notepadv3</code>,
- <code>Notepadv1Solution</code>, <code>Notepadv2Solution</code>
- and <code>Notepadv3Solution</code>. The <code>Notepadv#</code> projects are
-the starting points for each of the exercises, while the
-<code>Notepadv#Solution</code> projects are the exercise
- solutions. If you are having trouble with a particular exercise, you
- can compare your current work against the exercise solution.</p>
-
-<a name="exercises"></a>
-<h2> Exercises</h2>
-
- <p>The table below lists the tutorial exercises and describes the development
-areas that each covers. Each exercise assumes that you have completed any
-previous exercises.</p>
-
- <table border="0" style="padding:4px;spacing:2px;" summary="This
-table lists the
-tutorial examples and describes what each covers. ">
- <tr>
- <th width="120"><a href="{@docRoot}intro/tutorial-ex1.html">Exercise
-1</a></th>
- <td>Start here. Construct a simple notes list that lets the user add new notes but not
-edit them. Demonstrates the basics of <code>ListActivity</code> and creating
-and handling
- menu options. Uses a SQLite database to store the notes.</td>
- </tr>
- <tr>
- <th><a href="{@docRoot}intro/tutorial-ex2.html">Exercise 2</a></th>
- <td>Add a second Activity to the
-application. Demonstrates constructing a
-new Activity, adding it to the Android manifest, passing data between the
-activities, and using more advanced screen layout. Also shows how to
-invoke another Activity to return a result, using
-<code>startActivityForResult()</code>.</td>
- </tr>
- <tr>
- <th><a href="{@docRoot}intro/tutorial-ex3.html">Exercise 3</a></th>
- <td>Add handling of life-cycle events to
-the application, to let it
-maintain application state across the life cycle. </td>
- </tr>
- <tr>
- <th><a href="{@docRoot}intro/tutorial-extra-credit.html">Extra
-Credit</a></th>
- <td>Demonstrates how to use the Eclipse
-debugger and how you can use it to
-view life-cycle events as they are generated. This section is optional but
-highly recommended.</td>
- </tr>
-</table>
-
-
-<a name="other"></a>
-<h2>Other Resources and Further Learning</h2>
-<ul>
-<li>For a lighter but broader introduction to concepts not covered in the
-tutorial,
-take a look at <a href="{@docRoot}kb/commontasks.html">Common Android Tasks</a>.</li>
-<li>The Android SDK includes a variety of fully functioning sample applications
-that make excellent opportunities for further learning. You can find the sample
-applications in the <code>samples/</code> directory of your downloaded SDK.</li>
-<li>This tutorial draws from the full Notepad application included in the
-<code>samples/</code> directory of the SDK, though it does not match it exactly.
-When you are done with the tutorial,
-it is highly recommended that you take a closer look at this version of the Notepad
-application,
-as it demonstrates a variety of interesting additions for your application,
-such as:</li>
- <ul>
- <li>Setting up a custom striped list for the list of notes.</li>
- <li>Creating a custom text edit view that overrides the <code>draw()</code>
-method to
- make it look like a lined notepad.</li>
- <li>Implementing a full <code>ContentProvider</code> for notes.</li>
- <li>Reverting and discarding edits instead of just automatically saving
-them.</li>
-</ul>
-</ul>
diff --git a/docs/html/guide/tutorials/views/hello-autocomplete.jd b/docs/html/guide/tutorials/views/hello-autocomplete.jd
deleted file mode 100644
index 07235a14ab48..000000000000
--- a/docs/html/guide/tutorials/views/hello-autocomplete.jd
+++ /dev/null
@@ -1,116 +0,0 @@
-page.title=Hello, AutoCompleteTextView
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>{@link android.widget.AutoCompleteTextView} is an implementation of the EditText widget that will provide
-auto-complete suggestions as the user types. The suggestions are extracted from a collection of strings.</p>
-
-
-<ol>
- <li>Start a new project/Activity called HelloAutoComplete.</li>
- <li>Open the layout file.
- Make it like so:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
-
- &lt;TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Country" />
-
- &lt;AutoCompleteTextView android:id="@+id/edit"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"/>
-
-&lt;/LinearLayout>
-</pre>
-</li>
-
-<li>Open HelloAutoComplete.java and insert the following as the <code>onCreate</code> method:
-<pre>
-&#64;Override
-protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.edit);
- ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
- android.R.layout.simple_dropdown_item_1line, COUNTRIES);
- textView.setAdapter(adapter);
-}
-</pre>
- <p>Here, we create an AutoCompleteTextView from our layout. We then
- create an {@link android.widget.ArrayAdapter} that binds a <code>simple_dropdown_item_1line</code>
- layout item to each entry in the <code>COUNTRIES</code> array (which we'll add next).
- The last part sets the ArrayAdapter to associate with our AutoCompleteTextView.</p>
-</li>
-
-<li>After the <code>onCreate()</code> method, add the String array:
-<pre>
-static final String[] COUNTRIES = new String[] {
- "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra",
- "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina",
- "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan",
- "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium",
- "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia",
- "Bosnia and Herzegovina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory",
- "British Virgin Islands", "Brunei", "Bulgaria", "Burkina Faso", "Burundi",
- "Cote d'Ivoire", "Cambodia", "Cameroon", "Canada", "Cape Verde",
- "Cayman Islands", "Central African Republic", "Chad", "Chile", "China",
- "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo",
- "Cook Islands", "Costa Rica", "Croatia", "Cuba", "Cyprus", "Czech Republic",
- "Democratic Republic of the Congo", "Denmark", "Djibouti", "Dominica", "Dominican Republic",
- "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea",
- "Estonia", "Ethiopia", "Faeroe Islands", "Falkland Islands", "Fiji", "Finland",
- "Former Yugoslav Republic of Macedonia", "France", "French Guiana", "French Polynesia",
- "French Southern Territories", "Gabon", "Georgia", "Germany", "Ghana", "Gibraltar",
- "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau",
- "Guyana", "Haiti", "Heard Island and McDonald Islands", "Honduras", "Hong Kong", "Hungary",
- "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica",
- "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Kuwait", "Kyrgyzstan", "Laos",
- "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg",
- "Macau", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands",
- "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia", "Moldova",
- "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia",
- "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand",
- "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "North Korea", "Northern Marianas",
- "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru",
- "Philippines", "Pitcairn Islands", "Poland", "Portugal", "Puerto Rico", "Qatar",
- "Reunion", "Romania", "Russia", "Rwanda", "Sqo Tome and Principe", "Saint Helena",
- "Saint Kitts and Nevis", "Saint Lucia", "Saint Pierre and Miquelon",
- "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Saudi Arabia", "Senegal",
- "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands",
- "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "South Korea",
- "Spain", "Sri Lanka", "Sudan", "Suriname", "Svalbard and Jan Mayen", "Swaziland", "Sweden",
- "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "The Bahamas",
- "The Gambia", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey",
- "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Virgin Islands", "Uganda",
- "Ukraine", "United Arab Emirates", "United Kingdom",
- "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan",
- "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Wallis and Futuna", "Western Sahara",
- "Yemen", "Yugoslavia", "Zambia", "Zimbabwe"
-};
-</pre>
- <p>This is the list of suggestions that will be offered as the user types into the
- AutoCompleteTextView.</p>
-</li>
-
-<li>Now run it.</li>
-</ol>
-<p>As you type, you should see something like this:</p>
-<img src="images/hello-autocomplete.png" width="150px" />
-
-
-<h3>References</h3>
-<ul>
- <li>{@link android.R.layout}</li>
- <li>{@link android.widget.ArrayAdapter}</li>
- <li>{@link android.widget.AutoCompleteTextView}</li>
-</ul>
-
-
diff --git a/docs/html/guide/tutorials/views/hello-datepicker.jd b/docs/html/guide/tutorials/views/hello-datepicker.jd
deleted file mode 100644
index fcd43f3f890f..000000000000
--- a/docs/html/guide/tutorials/views/hello-datepicker.jd
+++ /dev/null
@@ -1,151 +0,0 @@
-page.title=Hello, DatePicker
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>A {@link android.widget.DatePicker} is a widget that allows the user to select a month, day and year.</p>
-
-
-<ol>
- <li>Start a new project/Activity called HelloDatePicker.</li>
- <li>Open the layout file and make it like so:
- <pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- &lt;TextView android:id="@+id/dateDisplay"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text=""/>
-
- &lt;Button android:id="@+id/pickDate"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Change the date"/>
-
-&lt;/LinearLayout>
-</pre>
- <p>For the layout, we're using a vertical LinearLayout, with a {@link android.widget.TextView} that
- will display the date and a {@link android.widget.Button} that will initiate the DatePicker dialog.
- With this layout, the TextView will sit above the Button.
- The text value in the TextView is set empty, as it will be filled
- with the current date when our Activity runs.</p>
- </li>
-
- <li>Open HelloDatePicker.java. Insert the following to the HelloDatePicker class:
-<pre>
- private TextView mDateDisplay;
- private Button mPickDate;
-
- private int mYear;
- private int mMonth;
- private int mDay;
-
- static final int DATE_DIALOG_ID = 0;
-
- &#64;Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- // capture our View elements
- mDateDisplay = (TextView) findViewById(R.id.dateDisplay);
- mPickDate = (Button) findViewById(R.id.pickDate);
-
- // add a click listener to the button
- mPickDate.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- showDialog(DATE_DIALOG_ID);
- }
- });
-
- // get the current date
- final Calendar c = Calendar.getInstance();
- mYear = c.get(Calendar.YEAR);
- mMonth = c.get(Calendar.MONTH);
- mDay = c.get(Calendar.DAY_OF_MONTH);
-
- // display the current date
- updateDisplay();
- }
-</pre>
-<p class="note"><strong>Tip:</strong> Press Ctrl(or Cmd) + Shift + O to import all needed packages.</p>
- <p>We start by instantiating variables for our Views and date fields.
- The <code>DATE_DIALOG_ID</code> is a static integer that uniquely identifies the Dialog. In the
- <code>onCreate()</code> method, we get prepared by setting the layout and capturing the View elements.
- Then we create an on-click listener for the Button, so that when it is clicked it will
- show our DatePicker dialog. The <code>showDialog()</code> method will pop-up the date picker dialog
- by calling the <code>onCreateDialog()</code> callback method
- (which we'll define in the next section). We then create an
- instance of {@link java.util.Calendar} and get the current year, month and day. Finally, we call
- <code>updateDisplay()</code>&mdash;our own method (defined later) that will fill the TextView.</p>
-</li>
-
-<li>After the <code>onCreate()</code> method, add the <code>onCreateDialog()</code> callback method
-(which is called by <code>showDialog()</code>)
-<pre>
-&#64;Override
-protected Dialog onCreateDialog(int id) {
- switch (id) {
- case DATE_DIALOG_ID:
- return new DatePickerDialog(this,
- mDateSetListener,
- mYear, mMonth, mDay);
- }
- return null;
-}
-</pre>
- <p>This method is passed the identifier we gave <code>showDialog()</code> and initializes
- the DatePicker to the date we retrieved from our Calendar instance.</p>
-</li>
-
-<li>Following that, add the <code>updateDisplay()</code> method:
-<pre>
- // updates the date we display in the TextView
- private void updateDisplay() {
- mDateDisplay.setText(
- new StringBuilder()
- // Month is 0 based so add 1
- .append(mMonth + 1).append("-")
- .append(mDay).append("-")
- .append(mYear).append(" "));
- }
-</pre>
-<p>This uses the member date values to write the date to our TextView.</p>
-</li>
-<li>Finally, add a listener that will be called when the user sets a new date:
-<pre>
- // the callback received when the user "sets" the date in the dialog
- private DatePickerDialog.OnDateSetListener mDateSetListener =
- new DatePickerDialog.OnDateSetListener() {
-
- public void onDateSet(DatePicker view, int year,
- int monthOfYear, int dayOfMonth) {
- mYear = year;
- mMonth = monthOfYear;
- mDay = dayOfMonth;
- updateDisplay();
- }
- };
-</pre>
- <p>This <code>OnDateSetListener</code> method listens for when the user is done setting the date
- (clicks the "Set" button). At that time, this fires and we update our member fields with
- the new date defined by the user and update our TextView by calling <code>updateDisplay()</code>.</p>
-</li>
-
-<li>Now run it.</li>
-</ol>
-<p>When you press the "Change the date" button, you should see the following:</p>
-<img src="images/hello-datepicker.png" width="150px" />
-
-<h3>References</h3>
-<ul>
-<li>{@link android.widget.DatePicker}</li>
-<li>{@link android.widget.Button}</li>
-<li>{@link android.widget.TextView}</li>
-<li>{@link java.util.Calendar}</li>
-</ul>
-
diff --git a/docs/html/guide/tutorials/views/hello-formstuff.jd b/docs/html/guide/tutorials/views/hello-formstuff.jd
deleted file mode 100644
index b554001b8bf4..000000000000
--- a/docs/html/guide/tutorials/views/hello-formstuff.jd
+++ /dev/null
@@ -1,262 +0,0 @@
-page.title=Hello, Form Stuff
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>This page introduces a variety of widgets, like image buttons,
-text fields, checkboxes and radio buttons.</p>
-
-
-<ol>
- <li>Start a new project/Activity called HelloFormStuff.</li>
- <li>Your layout file should have a basic LinearLayout:
- <pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" >
-
-&lt;/LinearLayout>
-</pre>
- <p>For each widget you want to add, just put the respective View inside here.</p>
-</li>
-</ol>
-<p class="note"><strong>Tip:</strong> As you add new Android code, press Ctrl(or Cmd) + Shift + O
-to import all needed packages.</p>
-
-
-<h2>ImageButton</h2>
-<p>A button with a custom image on it.
-We'll make it display a message when pressed.</p>
-<ol>
- <li><img src="images/android.png" align="right"/>
- Drag the Android image on the right (or your own image) into the
- res/drawable/ directory of your project.
- We'll use this for the button.</li>
- <li>Open the layout file and, inside the LinearLayout, add the {@link android.widget.ImageButton} element:
-<pre>
-&lt;ImageButton
- android:id="@+id/android_button"
- android:layout_width="100dip"
- android:layout_height="wrap_content"
- android:src="@drawable/android" />
-</pre>
- <p>The source of the button
- is from the res/drawable/ directory, where we've placed the android.png.</p>
- <p class="note"><strong>Tip:</strong> You can also reference some of the many built-in
- images from the Android {@link android.R.drawable} resources,
- like <code>ic_media_play</code>, for a "play" button image. To do so, change the source
- attribute to <code>android:src="@android:drawable/ic_media_play"</code>.</p>
-</li>
-<li>To make the button to actually do something, add the following
-code at the end of the <code>onCreate()</code> method:
-<pre>
-final ImageButton button = (ImageButton) findViewById(R.id.android_button);
-button.setOnClickListener(new OnClickListener() {
- public void onClick(View v) {
- // Perform action on clicks
- Toast.makeText(HelloFormStuff.this, "Beep Bop", Toast.LENGTH_SHORT).show();
- }
-});
-</pre>
-<p>This captures our ImageButton from the layout, then adds an on-click listener to it.
-The {@link android.view.View.OnClickListener} must define the <code>onClick()</code> method, which
-defines the action to be made when the button is clicked. Here, we show a
-{@link android.widget.Toast} message when clicked.</p>
-</li>
-<li>Run it.</li>
-</ol>
-
-
-<h2>EditText</h2>
-<p>A text field for user input. We'll make it display the text entered so far when the "Enter" key is pressed.</p>
-
-<ol>
- <li>Open the layout file and, inside the LinearLayout, add the {@link android.widget.EditText} element:
-<pre>
-&lt;EditText
- android:id="@+id/edittext"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"/>
-</pre>
-</li>
-<li>To do something with the text that the user enters, add the following code
-to the end of the <code>onCreate()</code> method:
-<pre>
-final EditText edittext = (EditText) findViewById(R.id.edittext);
-edittext.setOnKeyListener(new OnKeyListener() {
- public boolean onKey(View v, int keyCode, KeyEvent event) {
- if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) {
- // Perform action on key press
- Toast.makeText(HelloFormStuff.this, edittext.getText(), Toast.LENGTH_SHORT).show();
- return true;
- }
- return false;
- }
-});
-</pre>
-<p>This captures our EditText element from the layout, then adds an on-key listener to it.
-The {@link android.view.View.OnKeyListener} must define the <code>onKey()</code> method, which
-defines the action to be made when a key is pressed. In this case, we want to listen for the
-Enter key (when pressed down), then pop up a {@link android.widget.Toast} message with the
-text from the EditText field. Be sure to return <var>true</var> after the event is handled,
-so that the event doesn't bubble-up and get handled by the View (which would result in a
-carriage return in the text field).</p>
-<li>Run it.</li>
-</ol>
-
-
-<h2>CheckBox</h2>
-<p>A checkbox for selecting items. We'll make it display the the current state when pressed.</p>
-
-<ol>
- <li>Open the layout file and, inside the LinearLayout, add the {@link android.widget.CheckBox} element:
-<pre>
-&lt;CheckBox android:id="@+id/checkbox"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="check it out" />
-</pre>
-</li>
-<li>To do something when the state is changed, add the following code
-to the end of the <code>onCreate()</code> method:
-<pre>
-final CheckBox checkbox = (CheckBox) findViewById(R.id.checkbox);
-checkbox.setOnClickListener(new OnClickListener() {
- public void onClick(View v) {
- // Perform action on clicks
- if (checkbox.isChecked()) {
- Toast.makeText(HelloFormStuff.this, "Selected", Toast.LENGTH_SHORT).show();
- } else {
- Toast.makeText(HelloFormStuff.this, "Not selected", Toast.LENGTH_SHORT).show();
- }
- }
-});
-</pre>
-<p>This captures our CheckBox element from the layout, then adds an on-click listener to it.
-The {@link android.view.View.OnClickListener} must define the <code>onClick()</code> method, which
-defines the action to be made when the checkbox is clicked. Here, we query the current state of the
-checkbox, then pop up a {@link android.widget.Toast} message that displays the current state.
-Notice that the CheckBox handles its own state change between checked and un-checked, so we just
-ask which it currently is.</p>
-<li>Run it.</li>
-</ol>
-<p class="note"><strong>Tip:</strong> If you find that you need to change the state
-in another way (such as when loading a saved {@link android.preference.CheckBoxPreference}),
-use <code>setChecked(true)</code> or <code>toggle()</code>.</p>
-
-
-<h2>RadioButton</h2>
-<p>Two mutually-exclusive radio buttons&mdash;enabling one disables the other.
-When each is pressed, we'll pop up a message.</p>
-
-<ol>
- <li>Open the layout file and, inside the LinearLayout, add two {@link android.widget.RadioButton}s,
-inside a {@link android.widget.RadioGroup}:
-<pre>
-&lt;RadioGroup
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- &lt;RadioButton android:id="@+id/radio_red"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Red" />
-
- &lt;RadioButton android:id="@+id/radio_blue"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Blue" />
-
-&lt;/RadioGroup>
-</pre>
-</li>
-<li>To do something when each is selected, we'll need an OnClickListener. Unlike the other
-listeners we've created, instead of creating this one as an anonymous inner class,
-we'll create it as a new object. This way, we can re-use the OnClickListener for
-both RadioButtons. So, add the following code in the HelloFormStuff Activity
-(<em>outside</em> the <code>onCreate()</code> method):
-<pre>
-OnClickListener radio_listener = new OnClickListener() {
- public void onClick(View v) {
- // Perform action on clicks
- RadioButton rb = (RadioButton) v;
- Toast.makeText(HelloFormStuff.this, rb.getText(), Toast.LENGTH_SHORT).show();
- }
-};
-</pre>
-<p>Our <code>onClick()</code> method will be handed the View clicked, so the first thing to do
-is cast it into a RadioButton. Then we pop up a
-{@link android.widget.Toast} message that displays the selection.</p>
-<li>Now, at the bottom of the <code>onCreate()</code> method, add the following:
-<pre>
- final RadioButton radio_red = (RadioButton) findViewById(R.id.radio_red);
- final RadioButton radio_blue = (RadioButton) findViewById(R.id.radio_blue);
- radio_red.setOnClickListener(radio_listener);
- radio_blue.setOnClickListener(radio_listener);
-</pre>
-<p>This captures each of the RadioButtons from our layout and adds the newly-created
-OnClickListener to each.</p>
-<li>Run it.</li>
-</ol>
-<p class="note"><strong>Tip:</strong> If you find that you need to change the state of a
-RadioButton in another way (such as when loading a saved {@link android.preference.CheckBoxPreference}),
-use <code>setChecked(true)</code> or <code>toggle()</code>.</p>
-
-
-<h2>ToggleButton</h2>
-<p>A button used specifically for toggling something on and off.</p>
-
-<ol>
- <li>Open the layout file and, inside the LinearLayout, add the {@link android.widget.ToggleButton} element:
-<pre>
-&lt;ToggleButton android:id="@+id/togglebutton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-</pre>
-</li>
-<li>To do something when the state is changed, add the following code
-to the end of the <code>onCreate()</code> method:
-<pre>
-final ToggleButton togglebutton = (ToggleButton) findViewById(R.id.togglebutton);
-togglebutton.setOnClickListener(new OnClickListener() {
- public void onClick(View v) {
- // Perform action on clicks
- if (togglebutton.isChecked()) {
- Toast.makeText(HelloFormStuff.this, "ON", Toast.LENGTH_SHORT).show();
- } else {
- Toast.makeText(HelloFormStuff.this, "OFF", Toast.LENGTH_SHORT).show();
- }
- }
-});
-</pre>
-<p>This captures our ToggleButton element from the layout, then adds an on-click listener to it.
-The {@link android.view.View.OnClickListener} must define the <code>onClick()</code> method, which
-defines the action to be made when the button is clicked. Here, we query the current state of the
-ToggleButton, then pop up a {@link android.widget.Toast} message that displays the current state.
-Notice that the ToggleButton handles its own state change between checked and un-checked, so we just
-ask which it is.</p>
-<li>Run it.</li>
-</ol>
-
-<p class="note"><strong>Tip:</strong> By default, the text on the button is "ON" and "OFF", but
-you can change each of these with <code>setTextOn(<var>CharSequence</var>)</code> and
-<code>setTextOff(<var>CharSequence</var>)</code>. And, if you find that you need to change the state
-in another way (such as when loading a saved {@link android.preference.CheckBoxPreference}),
-use <code>setChecked(true)</code> or <code>toggle()</code>. </p>
-
-
-<p>If you've added all the form items above, your application should look something like this:</p>
-<img src="images/hello-formstuff.png" width="150px" />
-
-<h3>References</h3>
-<ul>
- <li>{@link android.widget.ImageButton}</li>
- <li>{@link android.widget.EditText}</li>
- <li>{@link android.widget.CheckBox}</li>
- <li>{@link android.widget.RadioButton}</li>
- <li>{@link android.widget.ToggleButton}</li>
-</ul>
-
diff --git a/docs/html/guide/tutorials/views/hello-gallery.jd b/docs/html/guide/tutorials/views/hello-gallery.jd
deleted file mode 100644
index 084f912ca646..000000000000
--- a/docs/html/guide/tutorials/views/hello-gallery.jd
+++ /dev/null
@@ -1,135 +0,0 @@
-page.title=Hello, Gallery
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>A {@link android.widget.Gallery} is a View commonly used to display items in a horizontally scrolling list
-that locks the current selection at the center. When one is selected, we'll show a message.</p>
-
-
-<ol>
- <li>Start a new project/Activity called HelloGallery.</li>
- <li>Add some images to your res/drawable/ directory.</li>
- <li>Open the layout file and make it like so:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;Gallery xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/gallery"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
-/>
-</pre>
-</li>
-
-
-<li>Open the HelloGallery.java file. Insert the following for the <code>onCreate()</code> method:
-<pre>
-&#64;Override
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- Gallery g = (Gallery) findViewById(R.id.gallery);
- g.setAdapter(new ImageAdapter(this));
-
- g.setOnItemClickListener(new OnItemClickListener() {
- public void onItemClick(AdapterView parent, View v, int position, long id) {
- Toast.makeText(HelloGallery.this, "" + position, Toast.LENGTH_SHORT).show();
- }
- });
-}
-</pre>
- <p>We start as usual: set the layout and capture the View we want (our Gallery).
-We then set an Adapter, called ImageAdapter for the Gallery&mdash;this is a new class that
-we'll create next. Then we create an item click listener for the Gallery. This is like a normal
-on-click listener (which you might be familiar with for buttons), but it listens to each item
-that we've added to the Gallery. The <code>onItemClick()</code> callback method
-receives the AdapterView where the click occurred, the specific View that received the click, the
-position of the View clicked (zero-based), and the row id of the item clicked (if applicable). All
-that we care about is the position, so that we can pop up a {@link android.widget.Toast} message that
-tells us the index position of the item clicked. We do this with <code>Toast.makeText().show()</code>.
-</p>
-</li>
-
-<li>After the <code>onCreate()</code> method, add the <code>ImageAdapter</code> class:
-<pre>
-public class ImageAdapter extends BaseAdapter {
- int mGalleryItemBackground;
- private Context mContext;
-
- private Integer[] mImageIds = {
- R.drawable.sample_1,
- R.drawable.sample_2,
- R.drawable.sample_3,
- R.drawable.sample_4,
- R.drawable.sample_5,
- R.drawable.sample_6,
- R.drawable.sample_7
- };
-
- public ImageAdapter(Context c) {
- mContext = c;
- TypedArray a = obtainStyledAttributes(android.R.styleable.Theme);
- mGalleryItemBackground = a.getResourceId(
- android.R.styleable.Theme_galleryItemBackground, 0);
- a.recycle();
- }
-
- public int getCount() {
- return mImageIds.length;
- }
-
- public Object getItem(int position) {
- return position;
- }
-
- public long getItemId(int position) {
- return position;
- }
-
- public View getView(int position, View convertView, ViewGroup parent) {
- ImageView i = new ImageView(mContext);
-
- i.setImageResource(mImageIds[position]);
- i.setLayoutParams(new Gallery.LayoutParams(150, 100));
- i.setScaleType(ImageView.ScaleType.FIT_XY);
- i.setBackgroundResource(mGalleryItemBackground);
-
- return i;
- }
-}
-</pre>
-<p>First, there are a few member variables, including an array of IDs that reference
-the images we placed in our drawable resources directory.</p>
-<p>Next is the constructor, where we define the member Context. The rest of the constructor
-sets up a reference for our Gallery them, which adds the nice framing for each Gallery item.
-Once we have our <code>mGalleryItemBackground</code>, it's important to recycle the
-StyledAttribute for later re-use.</p>
-<p>The next three methods are required for basic member queries.
-But then we have the <code>getView()</code> method, which is called
-for each item read by our ImageAdapter, when the Gallery is being built. Here, we
-use our member Context to create a new {@link android.widget.ImageView}. We then define
-the image resource with the current position of the Gallery items (corresponding to our
-array of drawables), set the dimensions for the ImageView,
-set the image scaling to fit the ImageView dimensions, then finally set the
-background theme for the ImageView.</p>
-
-<p>See {@link android.widget.ImageView.ScaleType}
-for other image scaling options, in case you want to avoid stretching images that don't
-exactly match the ImageView dimensions.</p>
-
-<li>Now run it.</li>
-</ol>
-<p>You should see something like this:</p>
-<img src="images/hello-gallery.png" width="150px" />
-
-
-<h3>References</h3>
-<ul>
- <li>{@link android.widget.BaseAdapter}</li>
- <li>{@link android.widget.Gallery}</li>
- <li>{@link android.widget.ImageView}</li>
- <li>{@link android.widget.Toast}</li>
-</ul>
-
-
diff --git a/docs/html/guide/tutorials/views/hello-gridview.jd b/docs/html/guide/tutorials/views/hello-gridview.jd
deleted file mode 100644
index 186c4e7513a6..000000000000
--- a/docs/html/guide/tutorials/views/hello-gridview.jd
+++ /dev/null
@@ -1,129 +0,0 @@
-page.title=Hello, GridView
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>A {@link android.widget.GridView} displays items in a two-dimensional, scrolling grid. The items
-are acquired from a {@link android.widget.ListAdapter}.</p>
-
-
-<ol>
- <li>Start a new project/Activity called HelloGridView.</li>
- <li>Find some photos you'd like to use, or copy some from the SDK samples res/drawable/
- folder of your project.</li>
- <li>Open the layout and make it like so:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;GridView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/gridview"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:numColumns="auto_fit"
- android:verticalSpacing="10dp"
- android:horizontalSpacing="10dp"
- android:columnWidth="90dp"
- android:stretchMode="columnWidth"
- android:gravity="center"
-/>
-</pre>
-</li>
- <li>Open the HelloGridView Java file. Insert the following for the <code>onCreate()</code> method:
-<pre>
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- GridView gridview = (GridView) findViewById(R.id.gridview);
- gridview.setAdapter(new ImageAdapter(this));
-}
-</pre>
- <p>Here, we get a handle on our GridView, from the layout, and give it an Adapter.
- We're actually going to create our own Adapter called ImageAdapter.</p>
-</li>
-<li>Create a new class (nested or otherwise), called ImageAdapter, which extends {@link android.widget.BaseAdapter}:
-<pre>
-public class ImageAdapter extends BaseAdapter {
- private Context mContext;
-
- public ImageAdapter(Context c) {
- mContext = c;
- }
-
- public int getCount() {
- return mThumbIds.length;
- }
-
- public Object getItem(int position) {
- return null;
- }
-
- public long getItemId(int position) {
- return 0;
- }
-
- // create a new ImageView for each item referenced by the Adapter
- public View getView(int position, View convertView, ViewGroup parent) {
- ImageView imageView;
- if (convertView == null) { // if it's not recycled, initialize some attributes
- imageView = new ImageView(mContext);
- imageView.setLayoutParams(new GridView.LayoutParams(85, 85));
- imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
- imageView.setPadding(8, 8, 8, 8);
- } else {
- imageView = (ImageView) convertView;
- }
-
- imageView.setImageResource(mThumbIds[position]);
- return imageView;
- }
-
- // references to our images
- private Integer[] mThumbIds = {
- R.drawable.sample_2, R.drawable.sample_3,
- R.drawable.sample_4, R.drawable.sample_5,
- R.drawable.sample_6, R.drawable.sample_7,
- R.drawable.sample_0, R.drawable.sample_1,
- R.drawable.sample_2, R.drawable.sample_3,
- R.drawable.sample_4, R.drawable.sample_5,
- R.drawable.sample_6, R.drawable.sample_7,
- R.drawable.sample_0, R.drawable.sample_1,
- R.drawable.sample_2, R.drawable.sample_3,
- R.drawable.sample_4, R.drawable.sample_5,
- R.drawable.sample_6, R.drawable.sample_7
- };
-}
-</pre>
- <p>First we take care of some required methods inherited from BaseAdapter.
- The constructor and <code>getCount()</code> are self-explanatory. Normally, <code>getItem()</code>
- should return the actual object at the specified position in our Adapter, but for this Hello World,
- we're not going to bother. Likewise, <code>getItemId()</code> should return the row id of
- the item, but right now we don't care.</p>
- <p>However, <code>getView()</code> is the method we care about. This one creates a new View for each image that we
- put in our ImageAdapter. So we're going to create an ImageView each time. When this is called, we're
- going to receive a View, which is likely a recycled View object (at least after the first call), so we
- check for this&mdash;if it's null, we initialize the ImageView and setup all the properties we want.
- The <code>LayoutParams()</code> initialization sets the height and width of the View&mdash;this ensures
- that no matter the drawable size, each image is resized and cropped to fit in the ImageView (if necessary).
- With <code>setScaleType()</code>, we say that images should be cropped toward the center (if necessary).
- And finally, we set the padding within the ImageView. (Note that, if the images have various aspect-ratios,
- as they do in this demo, then less padding will cause for more cropping of the image, if it does not match
- the dimensions given to the ImageView.) At the end of <code>getView()</code> we set the image resource and
- return the ImageView.</p>
- <p>All that's left is our array or drawable resources at the bottom.</p>
-</li>
-<li>Run it.</li>
-</ol>
-<p>Your grid layout should look something like this:</p>
-<img src="images/hello-gridview.png" width="150px" />
-
-<p>Try experimenting with the behaviors of the GridView and ImageView by adjusting their properties. For example,
- instead of setting the ImageView LayoutParams, you can try using
- {@link android.widget.ImageView#setAdjustViewBounds(boolean)}. </p>
-
-<h3>References</h3>
-<ul>
- <li>{@link android.widget.GridView}</li>
- <li>{@link android.widget.ImageView}</li>
- <li>{@link android.widget.BaseAdapter}</li>
-</ul>
-
diff --git a/docs/html/guide/tutorials/views/hello-linearlayout.jd b/docs/html/guide/tutorials/views/hello-linearlayout.jd
deleted file mode 100644
index 0e8947c10e3a..000000000000
--- a/docs/html/guide/tutorials/views/hello-linearlayout.jd
+++ /dev/null
@@ -1,130 +0,0 @@
-page.title=Hello, LinearLayout
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>A {@link android.widget.LinearLayout} is a GroupView that will lay child View elements
-vertically or horizontally.</p>
-
-
-<ol>
- <li>Start a new project/Activity called HelloLinearLayout.</li>
- <li>Open the layout file.
- Make it like so:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
-
- &lt;LinearLayout
- android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_weight="1">
-
- &lt;TextView
- android:text="red"
- android:gravity="center_horizontal"
- android:background="#aa0000"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_weight="1"/>
-
- &lt;TextView
- android:text="green"
- android:gravity="center_horizontal"
- android:background="#00aa00"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_weight="1"/>
-
- &lt;TextView
- android:text="blue"
- android:gravity="center_horizontal"
- android:background="#0000aa"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_weight="1"/>
-
- &lt;TextView
- android:text="yellow"
- android:gravity="center_horizontal"
- android:background="#aaaa00"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_weight="1"/>
-
- &lt;/LinearLayout>
-
- &lt;LinearLayout
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_weight="1">
-
- &lt;TextView
- android:text="row one"
- android:textSize="15pt"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
-
- &lt;TextView
- android:text="row two"
- android:textSize="15pt"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
-
- &lt;TextView
- android:text="row three"
- android:textSize="15pt"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
-
- &lt;TextView
- android:text="row four"
- android:textSize="15pt"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
-
- &lt;/LinearLayout>
-
-&lt;/LinearLayout>
-</pre>
- <p>Carefully inspect the XML. You'll notice how this layout works a lot like
- an HTML layout. There is one parent LinearLayout that is defined to lay
- its child elements vertically. The first child is another LinearLayout that uses a horizontal layout
- and the second uses a vertical layout. Each LinearLayout contains several {@link android.widget.TextView}
- elements.</p>
-</li>
-<li>Now open the HelloLinearLayout Activity and be sure it loads this layout in the <code>onCreate()</code> method:</p>
-<pre>
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-}
-</pre>
-<p><code>R.layout.main</code> refers to the <code>main.xml</code> layout file.</p>
-</li>
-<li>Run it.</li>
-</ol>
-<p>You should see the following:</p>
-<img src="images/hello-linearlayout.png" width="150px" />
-
-<p>Notice how the various XML attributes define the View's behavior.
-Pay attention to the effect of the <code>layout_weight</code>. Try
- experimenting with different values to see how the screen real estate is
- distributed based on the weight of each element.</p>
-
-<h3>References</h3>
-<ul>
- <li>{@link android.widget.LinearLayout}</li>
-<li>{@link android.widget.TextView}</li>
-</ul>
-
-
diff --git a/docs/html/guide/tutorials/views/hello-listview.jd b/docs/html/guide/tutorials/views/hello-listview.jd
deleted file mode 100644
index d90005bb4e5f..000000000000
--- a/docs/html/guide/tutorials/views/hello-listview.jd
+++ /dev/null
@@ -1,90 +0,0 @@
-page.title=Hello, ListView
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>A {@link android.widget.ListView} is a View that shows items in a vertically scrolling list. The items are
- acquired from a {@link android.widget.ListAdapter}.</p>
-
-
-<ol>
- <li>Start a new project/ListActivity called HelloListView.</li>
- <li>Open the HelloListView Java file. Make the class extend ListActivity (instead of Activity).
- <pre>public class HelloListView extends ListActivity {</pre>
- </li>
- <li>Insert the following for the <code>onCreate()</code> method:
-<pre>
-&#64;Override
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- setListAdapter(new ArrayAdapter&lt;String>(this,
- android.R.layout.simple_list_item_1, COUNTRIES));
- getListView().setTextFilterEnabled(true);
-}
-</pre>
- <p>Notice that we don't need to load a layout (at least, not in this case, because we're using
- the whole screen for our list). Instead, we just call <code>setListAdapter()</code> (which automatically
- adds a ListView to the ListActivity), and provide it with an ArrayAdapter that binds a
- <code>simple_list_item_1</code> layout item to each entry in the <code>COUNTRIES</code>
- array (added next). The next line of code adds a text filter to the ListView, so that when the user
- begins typing, the list will filter the entire view to display only the items that match the entry.</p>
- </li>
- <li>Following the <code>onCreate()</code> method, add the String array:
-<pre>
- static final String[] COUNTRIES = new String[] {
- "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra",
- "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina",
- "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan",
- "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium",
- "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia",
- "Bosnia and Herzegovina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory",
- "British Virgin Islands", "Brunei", "Bulgaria", "Burkina Faso", "Burundi",
- "Cote d'Ivoire", "Cambodia", "Cameroon", "Canada", "Cape Verde",
- "Cayman Islands", "Central African Republic", "Chad", "Chile", "China",
- "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo",
- "Cook Islands", "Costa Rica", "Croatia", "Cuba", "Cyprus", "Czech Republic",
- "Democratic Republic of the Congo", "Denmark", "Djibouti", "Dominica", "Dominican Republic",
- "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea",
- "Estonia", "Ethiopia", "Faeroe Islands", "Falkland Islands", "Fiji", "Finland",
- "Former Yugoslav Republic of Macedonia", "France", "French Guiana", "French Polynesia",
- "French Southern Territories", "Gabon", "Georgia", "Germany", "Ghana", "Gibraltar",
- "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau",
- "Guyana", "Haiti", "Heard Island and McDonald Islands", "Honduras", "Hong Kong", "Hungary",
- "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica",
- "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Kuwait", "Kyrgyzstan", "Laos",
- "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg",
- "Macau", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands",
- "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia", "Moldova",
- "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia",
- "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand",
- "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "North Korea", "Northern Marianas",
- "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru",
- "Philippines", "Pitcairn Islands", "Poland", "Portugal", "Puerto Rico", "Qatar",
- "Reunion", "Romania", "Russia", "Rwanda", "Sqo Tome and Principe", "Saint Helena",
- "Saint Kitts and Nevis", "Saint Lucia", "Saint Pierre and Miquelon",
- "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Saudi Arabia", "Senegal",
- "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands",
- "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "South Korea",
- "Spain", "Sri Lanka", "Sudan", "Suriname", "Svalbard and Jan Mayen", "Swaziland", "Sweden",
- "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "The Bahamas",
- "The Gambia", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey",
- "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Virgin Islands", "Uganda",
- "Ukraine", "United Arab Emirates", "United Kingdom",
- "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan",
- "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Wallis and Futuna", "Western Sahara",
- "Yemen", "Yugoslavia", "Zambia", "Zimbabwe"
- };
-</pre>
-</li>
-<li> Run it.</li>
-</ol>
-<p>You can scroll the list, or type to filter it. You should see something like this:</p>
-<img src="images/hello-listview.png" width="150px" />
-
-<h3>References</h3>
-<ul>
- <li>{@link android.widget.ListView}</li>
- <li>{@link android.widget.ListAdapter}</li>
-</ul>
-
diff --git a/docs/html/guide/tutorials/views/hello-mapview.jd b/docs/html/guide/tutorials/views/hello-mapview.jd
deleted file mode 100644
index 5217b6b20e9f..000000000000
--- a/docs/html/guide/tutorials/views/hello-mapview.jd
+++ /dev/null
@@ -1,245 +0,0 @@
-page.title=Hello, MapView
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<div class="special">
-<p>This tutorial requires that you have the Google Maps external library
-installed in your SDK environment. By default the Android SDK includes the
-Google APIs add-on, which in turn includes the Maps external library. If you
-don't have the Google APIs SDK add-on, you can download it from this
-location:</p>
-
-<p style="margin-left:2em;"><a
-href="http://code.google.com/android/add-ons/google-apis">http://code.google.com/android/add-ons/google-apis</a></p>
-
-<p>The Google APIs add-on requires Android 1.5 SDK or later release. After
-installing the add-on in your SDK, set your project properties to use a <strong>Google
-APIs</strong> build target. See the instructions for setting a build
-target in <a href="{@docRoot}guide/developing/eclipse-adt.html">Developing in
-Eclipse with ADT</a> or <a
-href="{@docRoot}guide/developing/other-ide.html">Developing in Other IDEs</a>,
-as appropriate for your environment. </p>
-
-<p>You will also need to use the android tool to set up an AVD that uses the
-Google APIs deployment target. See <a
-href="{@docRoot}guide/developing/tools/avd.html">Android Virtual Devices</a> for
-more information. Once you have set up your environment, you will be able to
-build and run the project described in this tutorial</a></p>
-
-</div>
-
-<p>A MapView allows you to create your own map-viewing Activity.
-First, we'll create a simple Activity that can view and navigate a map. Then we will add some overlay items.</p>
-
-<ol>
- <li>Start a new project/Activity called HelloMapView.
-
- <li>Because we're using the Google Maps library,
- which is not a part of the standard Android library, we need to
- declare it in the Android Manifest. Open the AndroidManifest.xml
- file and add the following as a child of the <code>&lt;application></code> element:
-
- <pre>&lt;uses-library android:name="com.google.android.maps" /></pre>
- </li>
- <li>We also need access to the internet in order to retrieve the Google Maps tiles,
- so the application must request the {@link android.Manifest.permission#INTERNET INTERNET} permissions.
- In the manifest file, add the following as a child of the <code>&lt;manifest></code> element:
- <pre>&lt;uses-permission android:name="android.permission.INTERNET" /></pre>
- </li>
- <li>Now open the main layout file for your project. Define a layout with a com.google.android.maps.MapView
- inside a android.widget.RelativeLayout:
-
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/mainlayout"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" >
-
- &lt;com.google.android.maps.MapView
- android:id="@+id/mapview"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:clickable="true"
- android:apiKey="<em>Your Maps API Key</em>"
- />
-
-&lt;/RelativeLayout>
-</pre>
- <p>The <code>clickable</code> attribute defines whether you want to allow user-interaction with the map.
- In this case, we set it "true" so that the user can navigate.</p>
-
- <p>The <code>apiKey</code> attribute holds the Google Maps API Key that proves your application and signer
- certificate has been registered with the Google Maps service. Because MapView uses Google Maps data, this key is required
- in order to receive the map data, even while you are developing. Registration is free and it only takes a couple
- minutes to register your certificate and receive a Maps API Key. For instructions on getting a key, read
- <a href="http://code.google.com/android/add-ons/google-apis/mapkey.html">Obtaining a Maps API Key</a>.
- (For the purpose of this tutorial, you should register with the fingerprint of the SDK debug certificate.)
- Once you've acquired the Maps API Key, insert it for the <code>apiKey</code> value.</p></li>
-
- <li>Now open the HelloMapView.java file. For this Activity, we're going to extend the special sub-class of
- Activity called MapActivity, so change the class declaration to extend
- MapActivity, instead of Activity:</p>
-
- <pre>public class HelloMapView extends MapActivity {</pre>
-
- <li>The <code>isRouteDisplayed()</code> method is required, so add it inside the class:
-<pre>
-&#64;Override
-protected boolean isRouteDisplayed() {
- return false;
-}
-</pre>
-<p>You can actually run this now, but all it does is allow you to pan around the map.</p>
-
- <li>Now go back to the HelloMapView class. We'll now retrieve the ZoomControls object from
- the MapView and add it to our new layout element. First, at the top of the HelloMapView,
- instantiate handles for the MapView and LinearLayout, plus a ZoomControl object:
-<pre>
-LinearLayout linearLayout;
-MapView mapView;
-</pre>
-
- <li>Then initialize each of these in <code>onCreate()</code>. We'll capture the LinearLayout and
- MapView through their layout resources. Then get the ZoomControls from the MapView::
-<pre>
-mapView = (MapView) findViewById(R.id.mapview);
-mapView.setBuiltInZoomControls(true);
-</pre>
-
- <p>By using the built-in zoom control provided by MapView, we don't have to do any of the work
- required to actually perform the zoom operations. The controls will appear whenever the user
- touches the map, then disappear after a few moments of inactivity.</p></li>
-
- <li>Run it.</li>
-</ol>
-
-<hr/>
-
-<p>So, we now have full interaction controls. All well and good, but what we really want our map
-for is custom markers and layovers. Let's add some Overlay
-objects to our map. To do this, we're going to
-implement the ItemizedOverlay
-class, which can manage a whole set of Overlay items for us.</p>
-
-<ol>
- <li>Create a new Java class named HelloItemizedOverlay that implements ItemizedOverlay.
-
- <p>When using Eclipse, right-click the package name in the Eclipse Package Explorer, and select New > Class. Fill-in
- the Name field as <em>HelloItemizedOverlay</em>. For the Superclass, enter
- <em>com.google.android.maps.ItemizedOverlay</em>. Click the checkbox for <em>Constructors from
- superclass</em>. Click Finish.</p></li>
-
- <li> First thing, we need an OverlayItem ArrayList, in which we'll put each of the OverlayItem
- objects we want on our map. Add this at the top of the HelloItemizedOverlay class:
-
- <pre>private ArrayList&lt;OverlayItem> mOverlays = new ArrayList&lt;OverlayItem>();</pre></li>
-
- <li>All the constructor does is define the default marker to be used on each of the OverlayItems.
- In order for the Drawable to actually get drawn, it must have its bounds defined. And we want the
- center-point at the bottom of the image to be the point at which it's attached to the map
- coordinates. We handle all this with the boundCenterBottom() method. Wrap this around our
- defaultMarker, so the super constructor call looks like this:
-
- <pre>super(boundCenterBottom(defaultMarker));</pre></li>
-
- <li>In order to add new OverlayItems to our ArrayList, we need a new public method. We'll handle
- this with the following method:
-
-<pre>
-public void addOverlay(OverlayItem overlay) {
- mOverlays.add(overlay);
- populate();
-}</pre>
-
- <p>Each time we add a new OverlayItem, we must call <code>populate()</code>, which will read each of out
- OverlayItems and prepare them to be drawn.</p></li>
-
- <li>In order for the <code>populate()</code> method to read each OverlayItem, it will make a request to
- <code>createItem(int)</code>. We must define this method to properly read from our ArrayList. Replace the
- existing contents of the createItem method with a <code>get()</code> call to our ArrayList:
-
-<pre>
-&#64;Override
-protected OverlayItem createItem(int i) {
- return mOverlays.get(i);
-}
-</pre></li>
-
- <li>We're also required to override the <code>size()</code> method. Replace the existing contents of the
- method with a size request to our ArrayList:
-
- <pre>return mOverlays.size();</pre></li>
-</ol>
-
-
-<p>That's it for the HelloItemizedOverlay class. We're now ready to use it.</p>
-
-<hr/>
-<p>Go back to the HelloMapView
-class. We'll start by creating one OverlayItem, adding to an instance of our HelloItemizedOverlay,
-and then adding this to the MapView.</p>
-
-<img src="images/androidmarker.png" align="right" />
-<p>First, we need the image that we'll use for our map overlay. Here, we'll use the Android on the
-right as our marker. Drag this image (or your own) to the res/drawable/ directory of your project workspace.</p>
-
-<p>Now we're ready to work in the HelloMapView:</p>
-
-<ol>
- <li>First we need some more types. Add the following at the top of the HelloMapView class:
-
-<pre>
-List&lt;Overlay> mapOverlays;
-Drawable drawable;
-HelloItemizedOverlay itemizedOverlay;</pre></li>
-
- <li>Now pick up where we left off in the <code>onCreate()</code> method. Instantiate the
- new fields:
-
-<pre>
-mapOverlays = mapView.getOverlays();
-drawable = this.getResources().getDrawable(R.drawable.androidmarker);
-itemizedoverlay = new HelloItemizedOverlay(drawable);</pre>
-
- <p>All overlay elements on a map are held by the MapView, so when we want to add some, we must
- first retrieve the List with <code>getOverlays()</code> methods. We instantiate the Drawable, which will
- be used as our map marker, by using our Context resources to get the Drawable we placed in
- the res/drawable/ directory (androidmarker.png). Our HelloItemizedOverlay takes the Drawable in order to set the
- default marker.</p></li>
-
- <li>Now let's make our first OverlayItem by creating a GeoPoint
- that defines our map coordinates, then pass it to a new OverlayItem:
-
-<pre>
-GeoPoint point = new GeoPoint(19240000,-99120000);
-OverlayItem overlayitem = new OverlayItem(point, "", "");</pre>
-
- <p>GeoPoint coordinates are based in microdegrees (degrees * 1e6). The OverlayItem takes this
- GeoPoint and two strings. Here, we won't concern ourselves with the strings, which can display
- text when we click our marker, because we haven't yet written the click handler for the OverlayItem.</p></li>
-
- <li>All that's left is for us to add this OverlayItem to our collection in the HelloItemizedOverlay,
- and add this to the List of Overlay objects retrieved from the MapView:
-
-<pre>
-itemizedoverlay.addOverlay(overlayitem);
-mapOverlays.add(itemizedoverlay);</pre></li>
-
- <li>Run it!</li>
-</ol>
-
-<p>We've sent our droid to Mexico City. Hola, Mundo!</p>
-<p>You should see the following:</p>
-<img src="images/hello-mapview.png" width="150px" />
-
-<p>Because we created our ItemizedOverlay class with an ArrayList, we can continue adding new
-OverlayItems. Try adding another one. Before the <code>addOverlay()</code> method is called, add these lines:</p>
-<pre>
-GeoPoint point2 = new GeoPoint(35410000, 139460000);
-OverlayItem overlayitem2 = new OverlayItem(point2, "", "");
-</pre>
-<p>Run it again... We've sent a new droid to Tokyo. Sekai, konichiwa!</p>
-
diff --git a/docs/html/guide/tutorials/views/hello-relativelayout.jd b/docs/html/guide/tutorials/views/hello-relativelayout.jd
deleted file mode 100644
index 1b915379739c..000000000000
--- a/docs/html/guide/tutorials/views/hello-relativelayout.jd
+++ /dev/null
@@ -1,75 +0,0 @@
-page.title=Hello, RelativeLayout
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>A {@link android.widget.RelativeLayout} is a ViewGroup that allows you to layout child elements
-in positions relative to the parent or siblings elements.</p>
-
-<ol>
- <li>Start a new project/Activity called HelloRelativeLayout.</li>
- <li>Open the layout file. Make it like so:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
-
- &lt;TextView
- android:id="@+id/label"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Type here:"/>
-
- &lt;EditText
- android:id="@+id/entry"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="@android:drawable/editbox_background"
- android:layout_below="@id/label"/>
-
- &lt;Button
- android:id="@+id/ok"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/entry"
- android:layout_alignParentRight="true"
- android:layout_marginLeft="10dip"
- android:text="OK" />
-
- &lt;Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@id/ok"
- android:layout_alignTop="@id/ok"
- android:text="Cancel" />
-
-&lt;/RelativeLayout>
-</pre>
-<p>Pay attention to each of the additional <code>layout_*</code> attributes (besides the
-usual width and height, which are required for all elements). When using relative layout,
-we use attributes like <code>layout_below</code> and <code>layout_toLeftOf</code> to describe
-how we'd like to position each View. Naturally, these are different relative positions, and the
-value of the attribute is the id of the element we want the position relative to.</p>
-</li>
-<li>Make sure your Activity loads this layout in the <code>onCreate()</code> method:</p>
-<pre>
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-}
-</pre>
-<p><code>R.layout.main</code> refers to the <code>main.xml</code> layout file.</p>
-</li>
-<li>Run it.</li>
-</ol>
-<p>You should see the following:</p>
-<img src="images/hello-relativelayout.png" width="150px" />
-
-<h3>Resources</h3>
-<ul>
- <li>{@link android.widget.RelativeLayout}</li>
- <li>{@link android.widget.TextView}</li>
- <li>{@link android.widget.EditText}</li>
- <li>{@link android.widget.Button}</li>
-</ul>
diff --git a/docs/html/guide/tutorials/views/hello-spinner.jd b/docs/html/guide/tutorials/views/hello-spinner.jd
deleted file mode 100644
index 3a04214a1f3d..000000000000
--- a/docs/html/guide/tutorials/views/hello-spinner.jd
+++ /dev/null
@@ -1,106 +0,0 @@
-page.title=Hello, Spinner
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>A {@link android.widget.Spinner} is a widget that allows the user to select an item from a group.
-It is similar to a dropdown list and will allow scrolling when the
-list exceeds the available vertical space on the screen.</p>
-
-
-<ol>
- <li>Start a new project/Activity called HelloSpinner.</li>
- <li>Open the layout file.
- Make it like so:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:padding="10dip"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
-
- &lt;TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="10dip"
- android:text="Please select a planet:"
- />
-
- &lt;Spinner
- android:id="@+id/spinner"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:drawSelectorOnTop="true"
- android:prompt="@string/planet_prompt"
- />
-
-&lt;/LinearLayout>
-</pre>
- <p>Notice that the Spinner's <code>android:prompt</code> is a string resource. In
- this case, Android does not allow it to be a string, it must be a reference to a resource.
- So...</p>
-</li>
-
-<li>Open the strings.xml file in res/values/ and add the following <code>&lt;string></code>
-element inside the <code>&lt;resources></code> element:
-<pre>
-&lt;string name="planet_prompt">Choose a planet&lt;/string>
-</pre>
-</li>
-
-<li>Create a new XML file in res/values/ called arrays.xml. Insert the following:
-<pre>
-&lt;resources>
-
- &lt;string-array name="planets">
- &lt;item>Mercury&lt;/item>
- &lt;item>Venus&lt;/item>
- &lt;item>Earth&lt;/item>
- &lt;item>Mars&lt;/item>
- &lt;item>Jupiter&lt;/item>
- &lt;item>Saturn&lt;/item>
- &lt;item>Uranus&lt;/item>
- &lt;item>Neptune&lt;/item>
- &lt;/string-array>
-
-&lt;/resources>
-</pre>
- <p>This is the list of items (planets) that the user can select from in the Spinner widget.</p>
-</li>
-
-<li>Now open the HelloSpinner.java file. Insert the following code into the HelloSpinner class:
-<pre>
-&#64;Override
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- Spinner s = (Spinner) findViewById(R.id.spinner);
- ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
- this, R.array.planets, android.R.layout.simple_spinner_item);
- adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
- s.setAdapter(adapter);
-}
-</pre>
- <p>That's it. We start by creating a Spinner from our layout. We then create an {@link android.widget.ArrayAdapter}
- that binds each element of our string array to a layout view&mdash;we pass <code>createFromResource</code> our Context,
- the array of selectable items and the type of layout we'd like each one bound to. We then call
- <code>setDropDownViewResource()</code> to define the type of layout in which to present the
- entire collection. Finally, we set this Adapter to associate with our Spinner,
- so the string items have a place to go.</p>
-</li>
-
-<li>Now run it.</li>
-</ol>
-<p>It should look like this:</p>
-<img src="images/hello-spinner.png" width="150px" />
-
-
-<h3>Resources</h3>
-<ul>
- <li>{@link android.R.layout}</li>
- <li>{@link android.widget.ArrayAdapter}</li>
- <li>{@link android.widget.Spinner}</li>
-</ul>
-
diff --git a/docs/html/guide/tutorials/views/hello-tablelayout.jd b/docs/html/guide/tutorials/views/hello-tablelayout.jd
deleted file mode 100644
index 83d6f5d46be5..000000000000
--- a/docs/html/guide/tutorials/views/hello-tablelayout.jd
+++ /dev/null
@@ -1,118 +0,0 @@
-page.title=Hello, TableLayout
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>A {@link android.widget.TableLayout} is a ViewGroup that
-will lay child View elements into rows and columns.</p>
-
-
-<ol>
- <li>Start a new project/Activity called HelloTableLayout.</li>
- <li>Open the layout file.
- Make it like so:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:stretchColumns="1">
-
- &lt;TableRow>
- &lt;TextView
- android:layout_column="1"
- android:text="Open..."
- android:padding="3dip" />
- &lt;TextView
- android:text="Ctrl-O"
- android:gravity="right"
- android:padding="3dip" />
- &lt;/TableRow>
-
- &lt;TableRow>
- &lt;TextView
- android:layout_column="1"
- android:text="Save..."
- android:padding="3dip" />
- &lt;TextView
- android:text="Ctrl-S"
- android:gravity="right"
- android:padding="3dip" />
- &lt;/TableRow>
-
- &lt;TableRow>
- &lt;TextView
- android:layout_column="1"
- android:text="Save As..."
- android:padding="3dip" />
- &lt;TextView
- android:text="Ctrl-Shift-S"
- android:gravity="right"
- android:padding="3dip" />
- &lt;/TableRow>
-
- &lt;View
- android:layout_height="2dip"
- android:background="#FF909090" />
-
- &lt;TableRow>
- &lt;TextView
- android:text="X"
- android:padding="3dip" />
- &lt;TextView
- android:text="Import..."
- android:padding="3dip" />
- &lt;/TableRow>
-
- &lt;TableRow>
- &lt;TextView
- android:text="X"
- android:padding="3dip" />
- &lt;TextView
- android:text="Export..."
- android:padding="3dip" />
- &lt;TextView
- android:text="Ctrl-E"
- android:gravity="right"
- android:padding="3dip" />
- &lt;/TableRow>
-
- &lt;View
- android:layout_height="2dip"
- android:background="#FF909090" />
-
- &lt;TableRow>
- &lt;TextView
- android:layout_column="1"
- android:text="Quit"
- android:padding="3dip" />
- &lt;/TableRow>
-&lt;/TableLayout>
-</pre>
-<p>Notice how this resembles the structure of an HTML table. <code>TableLayout</code> is like the
-<code>table</code> element; <code>TableRow</code> is like a <code>tr</code> element; but for our cells like
-the html <code>td</code> element, we can use any kind of View. Here, we use <code>TextView</code> for the cells.</p>
-
-</li>
-<li>Make sure your Activity loads this layout in the <code>onCreate()</code> method:
-<pre>
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-}
-</pre>
-<p><code>R.layout.main</code> refers to the <code>main.xml</code> layout file.</p>
-</li>
-<li>Run it.</li>
-</ol>
-<p>You should see the following:</p>
-<img src="images/hello-tablelayout.png" width="150px" />
-
-<h3>References</h3>
-<ul>
- <li>{@link android.widget.TableLayout}</li>
- <li>{@link android.widget.TableRow}</li>
- <li>{@link android.widget.TextView}</li>
-</ul>
-
-
diff --git a/docs/html/guide/tutorials/views/hello-tabwidget.jd b/docs/html/guide/tutorials/views/hello-tabwidget.jd
deleted file mode 100644
index 98dddf539049..000000000000
--- a/docs/html/guide/tutorials/views/hello-tabwidget.jd
+++ /dev/null
@@ -1,124 +0,0 @@
-page.title=Hello, TabWidget
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>A {@link android.widget.TabWidget} offers the ability to easily draw an interface that uses
-tabs to navigate between different views.</p>
-
-<ol>
- <li>Start a new project/Activity called HelloTabWidget.</li>
- <li>Open the layout file and make it like so:</li>
- <pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;TabHost xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@android:id/tabhost"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- &lt;LinearLayout
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- &lt;TabWidget
- android:id="@android:id/tabs"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content" />
- &lt;FrameLayout
- android:id="@android:id/tabcontent"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- &lt;TextView
- android:id="@+id/textview1"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:text="this is a tab" />
- &lt;TextView
- android:id="@+id/textview2"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:text="this is another tab" />
- &lt;TextView
- android:id="@+id/textview3"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:text="this is a third tab" />
- &lt;/FrameLayout>
- &lt;/LinearLayout>
-&lt;/TabHost>
-</pre>
- <p>Here, we've created a {@link android.widget.TabHost} that contains the entire layout of the Activity.
- A TabHost requires two descendant elements: a {@link android.widget.TabWidget} and a {@link android.widget.FrameLayout}.
- In order to properly layout these elements, we've put them inside a vertical {@link android.widget.LinearLayout}.
- The FrameLayout is where we keep the content that will change with each tab. Each child in the FrameLayout will
- be associated with a different tab.
- In this case, each tab simply shows a different {@link android.widget.TextView} with some text. </p>
- <p>Notice that the TabWidget and the FrameLayout elements have specific <code>android</code> namespace IDs. These are necessary
- so that the TabHost can automatically retrieve references to them, populate the TabWidget with the tabs that we'll define
- in our code, and swap the views in the FrameLayout. We've also defined our own IDs for each TextView, which we'll use to
- associate each tab with the view that it should reveal.</p>
- <p>Of course, you can
- make these child views as large as complex as you'd like &mdash; instead of the TextView elements,
- you could start with other layout views and build a unique layout hierarchy for each tab.</p>
- </li>
- <li>Now we'll add our code. Open HelloTabWidget.java and make it a <code>TabActivity</code>.
- <p>By default, Eclipse creates a class that extends <code>Activity</code>. Change it to
- extend <code>TabActivity</code>:</p>
- <pre>
-public class HelloTabWidget extends TabActivity {
-</pre>
- </li>
- <li>Now fill in the the <code>onCreate</code> method like this:
- <pre>
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- mTabHost = getTabHost();
-
- mTabHost.addTab(mTabHost.newTabSpec("tab_test1").setIndicator("TAB 1").setContent(R.id.textview1));
- mTabHost.addTab(mTabHost.newTabSpec("tab_test2").setIndicator("TAB 2").setContent(R.id.textview2));
- mTabHost.addTab(mTabHost.newTabSpec("tab_test3").setIndicator("TAB 3").setContent(R.id.textview3));
-
- mTabHost.setCurrentTab(0);
-}
-</pre>
- <p>As usual, we start by setting our layout.</p>
- <p>We then call the TabActivity method <code>getTabHost()</code>,
- which returns us a reference to the TabHost we created in our layout. Upon our TabHost, we call <code>addTab()</code>
- for each of the tabs that we want to add to the TabWidget. Each time we call this, we pass a
- {@link android.widget.TabHost.TabSpec} that we build on the fly, and with it, chain together two necessary methods:
- <code>setIndicator()</code> to set the text for the tab button, and <code>setContent()</code> to define
- which View we want to associate with the tab and reveal when pressed. Our indicator is just a text string and
- our content is an ID reference to the TextView elements we inserted in the FrameLayout.</p>
- <p>At the end, we call <code>setCurrentTab()</code> to define which tab should be opened by default. The tabs
- are saved like a zero-based array, so to open the first tab, we pass zero (<var>0</var>).</p>
- </li>
- <li>To clean-up the presentation a bit more, let's remove the window title that appears at the top of the layout.
- Android includes a theme that removes that title for us. To add it, open the Android Manifest file and add
- the <var>NoTitleBar</var> theme to the <code>&lt;application></code> tag. It should end up like this:
- <pre>
-&lt;application android:icon="&#64;drawable/icon" android:theme="&#64;android:style/Theme.NoTitleBar">
-</pre>
- </li>
- <li>That's it. Run your application.</li>
-
-</ol>
-
-
-<p>Your application should look like this:</p>
-<img src="images/hello-tabwidget.png" width="150px" />
-
-<div class="special"><p>You can include icons in your tabs by passing a
-{@link android.graphics.drawable.Drawable} when you call <code>setIndicator()</code>. Here's an example
-that uses a Drawable created from an image in the project resources:</p>
-<pre>setIndicator("TAB 1", getResources().getDrawable(R.drawable.tab_icon))</pre>
-</div>
-
-<h3>References</h3>
-<ul>
-<li>{@link android.widget.TabWidget}</li>
-<li>{@link android.widget.TabHost}</li>
-<li>{@link android.widget.TabHost.TabSpec}</li>
-<li>{@link android.widget.FrameLayout}</li>
-</ul>
-
diff --git a/docs/html/guide/tutorials/views/hello-timepicker.jd b/docs/html/guide/tutorials/views/hello-timepicker.jd
deleted file mode 100644
index 1a6c8f9eeb29..000000000000
--- a/docs/html/guide/tutorials/views/hello-timepicker.jd
+++ /dev/null
@@ -1,159 +0,0 @@
-page.title=Hello, TimePicker
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>A {@link android.widget.TimePicker} is a widget that allows the
-user to select the time by hour, minute and AM or PM.</p>
-
-
-<ol>
- <li>Start a new project/Activity called HelloTimePicker.</li>
- <li>Open the layout file and make it like so:
- <pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- &lt;TextView android:id="@+id/timeDisplay"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text=""/>
-
- &lt;Button android:id="@+id/pickTime"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Change the time"/>
-
-&lt;/LinearLayout>
-</pre>
- <p>For the layout, we're using a vertical LinearLayout, with a {@link android.widget.TextView} that
- will display the time and a {@link android.widget.Button} that will initiate the
- {@link android.widget.TimePicker} dialog.
- With this layout, the TextView will sit above the Button.
- The text value in the TextView is set empty, as it will be filled by our Activity
- with the current time.</p>
- </li>
-
- <li>Open HelloTimePicker.java. Insert the following to the HelloTimePicker class:
-<pre>
-private TextView mTimeDisplay;
-private Button mPickTime;
-
-private int mHour;
-private int mMinute;
-
-static final int TIME_DIALOG_ID = 0;
-
-&#64;Override
-protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- // capture our View elements
- mTimeDisplay = (TextView) findViewById(R.id.timeDisplay);
- mPickTime = (Button) findViewById(R.id.pickTime);
-
- // add a click listener to the button
- mPickTime.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- showDialog(TIME_DIALOG_ID);
- }
- });
-
- // get the current time
- final Calendar c = Calendar.getInstance();
- mHour = c.get(Calendar.HOUR_OF_DAY);
- mMinute = c.get(Calendar.MINUTE);
-
- // display the current date
- updateDisplay();
-}
-</pre>
-<p class="note"><strong>Tip:</strong> Press Ctrl(or Cmd) + Shift + O to import all needed packages.</p>
- <p>We start by instantiating variables for our View elements and time fields.
- The <code>TIME_DIALOG_ID</code> is a static integer that uniquely identifies the dialog. In the
- <code>onCreate()</code> method, we get prepared by setting the layout and capturing the View elements.
- We then set an on-click listener for the Button, so that when it is clicked, it will
- show our TimePicker dialog. The <code>showDialog()</code> method will perform a callback
- to our Activity. (We'll define this callback in the next section.) We then create an
- instance of {@link java.util.Calendar} and get the current hour and minute. Finally, we call
- <code>updateDisplay()</code>&mdash;our own method that will fill the TextView with the time.</p>
-</li>
-
-<li>After the <code>onCreate()</code> method, add the <code>onCreateDialog()</code> callback method:
-<pre>
-&#64;Override
-protected Dialog onCreateDialog(int id) {
- switch (id) {
- case TIME_DIALOG_ID:
- return new TimePickerDialog(this,
- mTimeSetListener, mHour, mMinute, false);
- }
- return null;
-}
-</pre>
- <p>This is passed the identifier we gave <code>showDialog()</code> and initializes
- the TimePicker to the time we retrieved from our Calendar instance. It will be called by
- <code>showDialog()</code>.</p>
-</li>
-
-<li>Now add our <code>updateDisplay()</code> method:
-<pre>
-// updates the time we display in the TextView
-private void updateDisplay() {
- mTimeDisplay.setText(
- new StringBuilder()
- .append(pad(mHour)).append(":")
- .append(pad(mMinute)));
-}
-</pre>
- <p>This simply takes our member fields for the time and inserts them in
- the <code>mTimeDisplay</code> TextView. Note that we call a new method, <code>pad()</code>,
- on the hour and minute. (We'll create this method in the last step.)</p>
-</li>
-
-<li>Next, add a listener to be called when the time is reset:
-<pre>
-// the callback received when the user "sets" the time in the dialog
-private TimePickerDialog.OnTimeSetListener mTimeSetListener =
- new TimePickerDialog.OnTimeSetListener() {
- public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
- mHour = hourOfDay;
- mMinute = minute;
- updateDisplay();
- }
- };
-</pre>
- <p>Now when the user is done setting the time (clicks the "Set" button), we update our member fields with
- the new time and update our TextView.</p>
-</li>
-<li>Finally, add the <code>pad()</code> method that we called from the <code>updateDisplay()</code>:
-<pre>
-private static String pad(int c) {
- if (c >= 10)
- return String.valueOf(c);
- else
- return "0" + String.valueOf(c);
-}
-</pre>
- <p>This method returns the appropriate String representation of the hour or minute.
- It will prefix a zero to the number if it's a single digit.
- </p>
-</li>
-
-<li>Now run it.</li>
-</ol>
-<p>When you press the "Change the time" button, you should see the following:</p>
-<img src="images/hello-timepicker.png" width="150px" />
-
-<h3>References</h3>
-<ol>
- <li>{@link android.widget.TimePicker}</li>
- <li>{@link android.widget.Button}</li>
- <li>{@link android.widget.TextView}</li>
- <li>{@link java.util.Calendar}</li>
-</ol>
-
diff --git a/docs/html/guide/tutorials/views/hello-webview.jd b/docs/html/guide/tutorials/views/hello-webview.jd
deleted file mode 100644
index a927b0497dde..000000000000
--- a/docs/html/guide/tutorials/views/hello-webview.jd
+++ /dev/null
@@ -1,118 +0,0 @@
-page.title=Hello, WebView
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>A {@link android.webkit.WebView} allows you to create your own web browser Activity. In this tutorial,
-we'll create a simple Activity that can view web pages.</p>
-
-<ol>
- <li>Create a new project/Activity called HelloWebView.</li>
- <li>Open the layout file. Insert a WebView so it looks like so:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical">
-
- &lt;WebView
- android:id="@+id/webview"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- />
-
-&lt;/LinearLayout>
-</pre></li>
-
- <li>Now open the HelloWebView.java file.
- At the top of the class, instantiate a WebView object:
-<pre>WebView webview;</pre>
- <p> Then add the following at the end of the <code>onCreate()</code> method:</p>
-<pre>
-webview = (WebView) findViewById(R.id.webview);
-webview.getSettings().setJavaScriptEnabled(true);
-webview.loadUrl("http://www.google.com");
-</pre>
-
- <p>This captures the WebView we created in our layout, then requests a
- {@link android.webkit.WebSettings} object and enables JavaScript.
- Then we load a URL.</p></li>
-
- <li>Because we're accessing the internet, we need to add the appropriate
- permissions to the Android manifest file. So open the AndroidManifest.xml file
- and, add the following as a child of the <code>&lt;manifest></code> element:
-
- <pre>&lt;uses-permission android:name="android.permission.INTERNET" /></pre></li>
-
- <li>Now run it.</li>
-</ol>
-<p> You now have the world's simplest web page viewer.
- It's not quite a browser yet. It only loads the page we've requested.</p>
-
-<hr/>
-
-<p>We can load a page, but as soon as we click a link, the default Android web browser
-handles the Intent, instead of our own WebView handling the action. So now we'll
-override the {@link android.webkit.WebViewClient} to enable us to handle our own URL loading.</p>
-
-<ol>
- <li>In the HelloAndroid Activity, add this nested private class:
-<pre>
-private class HelloWebViewClient extends WebViewClient {
- &#64;Override
- public boolean shouldOverrideUrlLoading(WebView view, String url) {
- view.loadUrl(url);
- return true;
- }
-}</pre></li>
-
- <li>Now, in the <code>onCreate()</code> method, set an instance of the <code>HelloWebViewClient</code>
- as our WebViewClient:
- <pre>webview.setWebViewClient(new HelloWebViewClient());</pre>
-
- <p>This line should immediately follow the initialization of our WebView object.</p>
- <p>What we've done is create a WebViewClient that will load any URL selected in our
-WebView in the same WebView. You can see this in the <code>shouldOverrideUrlLoading()</code>
-method, above&mdash;it is passed the current WebView and the URL, so all we do
-is load the URL in the given view. Returning <var>true</var> says that we've handled the URL
-ourselves and the event should not bubble-up.</p>
- <p>If you try it again, new pages will now load in the HelloWebView Activity. However, you'll notice that
-we can't navigate back. We need to handle the back button
-on the device, so that it will return to the previous page, rather than exit the application.</p>
- </li>
-
- <li>To handle the back button key press, add the following method inside the HelloWebView
-Activity:
-<pre>
-&#64;Override
-public boolean onKeyDown(int keyCode, KeyEvent event) {
- if ((keyCode == KeyEvent.KEYCODE_BACK) && webview.canGoBack()) {
- webview.goBack();
- return true;
- }
- return super.onKeyDown(keyCode, event);
-}</pre>
- <p>The condition uses a {@link android.view.KeyEvent} to check
- whether the key pressed is the BACK button and whether the
- WebView is actually capable of navigating back (if it has a history). If both are
- <em>not</em> true, then we send the event up the chain (and the Activity will close).
- But if both <em>are</em> true, then we call <code>goBack()</code>,
- which will navigate back one step in the history. We then return true to indicate
- that we've handled the event.</p>
-</li>
-</ol>
-<p>When you open the application, it should look like this:</p>
-<img src="images/hello-webview.png" width="150px" />
-
-<h3>Resource</h3>
-<ul>
-<li>{@link android.webkit.WebView}</li>
-<li>{@link android.webkit.WebViewClient}</li>
-<li>{@link android.view.KeyEvent}</li>
-</ul>
-
-
-
-
-
diff --git a/docs/html/guide/tutorials/views/images/android.png b/docs/html/guide/tutorials/views/images/android.png
deleted file mode 100755
index 39a1ac729394..000000000000
--- a/docs/html/guide/tutorials/views/images/android.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/androidmarker.png b/docs/html/guide/tutorials/views/images/androidmarker.png
deleted file mode 100755
index 8c43d4668218..000000000000
--- a/docs/html/guide/tutorials/views/images/androidmarker.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/hello-autocomplete.png b/docs/html/guide/tutorials/views/images/hello-autocomplete.png
deleted file mode 100755
index e1fd80dfbf8b..000000000000
--- a/docs/html/guide/tutorials/views/images/hello-autocomplete.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/hello-datepicker.png b/docs/html/guide/tutorials/views/images/hello-datepicker.png
deleted file mode 100755
index 2075066bfdc1..000000000000
--- a/docs/html/guide/tutorials/views/images/hello-datepicker.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/hello-formstuff.png b/docs/html/guide/tutorials/views/images/hello-formstuff.png
deleted file mode 100755
index 3b4bf54d10dd..000000000000
--- a/docs/html/guide/tutorials/views/images/hello-formstuff.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/hello-listview.png b/docs/html/guide/tutorials/views/images/hello-listview.png
deleted file mode 100755
index a1cf7aa6e90b..000000000000
--- a/docs/html/guide/tutorials/views/images/hello-listview.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/hello-mapview.png b/docs/html/guide/tutorials/views/images/hello-mapview.png
deleted file mode 100755
index 0956760a39c3..000000000000
--- a/docs/html/guide/tutorials/views/images/hello-mapview.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/hello-spinner.png b/docs/html/guide/tutorials/views/images/hello-spinner.png
deleted file mode 100755
index 42e2a915cb47..000000000000
--- a/docs/html/guide/tutorials/views/images/hello-spinner.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/hello-tabwidget.png b/docs/html/guide/tutorials/views/images/hello-tabwidget.png
deleted file mode 100644
index 6a52356c8f99..000000000000
--- a/docs/html/guide/tutorials/views/images/hello-tabwidget.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/hello-timepicker.png b/docs/html/guide/tutorials/views/images/hello-timepicker.png
deleted file mode 100755
index bd5a1eeadaae..000000000000
--- a/docs/html/guide/tutorials/views/images/hello-timepicker.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/views/images/hello-webview.png b/docs/html/guide/tutorials/views/images/hello-webview.png
deleted file mode 100755
index 283ce7d0f4d6..000000000000
--- a/docs/html/guide/tutorials/views/images/hello-webview.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/guide/tutorials/views/index.html b/docs/html/guide/tutorials/views/index.html
deleted file mode 100644
index 41d67965e59b..000000000000
--- a/docs/html/guide/tutorials/views/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/resources/tutorials/views/index.html">
-<title>Redirecting...</title>
-</head>
-<body>
-<p>You should have been redirected. Please <a
-href="http://developer.android.com/resources/tutorials/views/index.html">click here</a>.</p>
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/guide/webapps/debugging.jd b/docs/html/guide/webapps/debugging.jd
index c0dce48813c0..1eef1ae1c839 100644
--- a/docs/html/guide/webapps/debugging.jd
+++ b/docs/html/guide/webapps/debugging.jd
@@ -18,7 +18,7 @@ messages</li>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/developing/debugging/index.html">Debugging</a></li>
+ <li><a href="{@docRoot}tools/debugging/index.html">Debugging</a></li>
</ol>
</div>
@@ -43,10 +43,10 @@ the device throws an error, as well as log messages written from your applicatio
those written using JavaScript {@code console} APIs.</p>
<p>To run logcat and view messages, execute
{@code adb logcat} from your Android SDK {@code tools/} directory, or, from DDMS, select
-<strong>Device > Run logcat</strong>. When using the <a href="{@docRoot}sdk/eclipse-adt.html">ADT
+<strong>Device > Run logcat</strong>. When using the <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT
plugin for Eclipse</a>, you can also view logcat messages by opening the Logcat view, available from
<strong>Window > Show View > Other > Android > Logcat</strong>.</p>
- <p>See <a href="{@docRoot}guide/developing/debugging/debugging-log.html">Debugging</a>
+ <p>See <a href="{@docRoot}tools/debugging/debugging-log.html">Debugging</a>
for more information about <codelogcat</code>.</p>
</div>
</div>
diff --git a/docs/html/guide/webapps/index.jd b/docs/html/guide/webapps/index.jd
index 069290ae9352..df7ddbe7b102 100644
--- a/docs/html/guide/webapps/index.jd
+++ b/docs/html/guide/webapps/index.jd
@@ -1,71 +1,16 @@
-page.title=Web Apps Overview
-@jd:body
-
-<div class="figure" style="width:327px">
- <img src="{@docRoot}images/webapps/webapps.png" alt="" />
- <p class="img-caption"><strong>Figure 1.</strong> You can make your web content available to
-users in two ways: in a traditional web browser and in an Android application, by
-including a WebView in the layout.</p>
-</div>
-
-<p>There are essentially two ways to deliver an application on Android: as a
-client-side application (developed using the Android SDK and installed on user devices as an {@code
-.apk}) or as a web application (developed using web standards and accessed through a web
-browser&mdash;there's nothing to install on user devices).</p>
+page.title=Web Apps
+page.landing=true
+page.landing.intro=Android has always been about connectivity and providing a great web browsing experience, so building your app with web technologies can be a great opportunity. Not only can you build an app on the web and still optimize your designs for Android's various screen sizes and densities, but you can also embed web-based content into your Android app using WebView.
+page.landing.image=
-<p>The approach you choose for your application could depend on several factors, but Android makes
-the decision to develop a web application easier by providing:</p>
-<ul>
- <li>Support for viewport properties that allow you to properly size your web application
-based on the screen size</li>
- <li>CSS and JavaScript features that allow you to provide different styles and images
-based on the screen's pixel density (screen resolution)</li>
-</ul>
-
-<p>Thus, your decision to develop a web application for Android can exclude consideration for
-screen support, because it's already easy to make your web pages look good on all types of screens
-powered by Android.</p>
-
-<p>Another great feature of Android is that you don't have to build your application purely on
-the client or purely on the web. You can mix the two together by developing a client-side Android
-application that embeds some web pages (using a {@link android.webkit.WebView} in your Android
-application layout). Figure 1 visualizes how you can provide access to your web pages from either
-a web browser or your Android application. However, you shouldn't develop an Android
-application simply as a means to launch your web site. Rather, the web pages you embed in your
-Android application should be designed especially for that environment. You can even define an
-interface between your Android application and your web pages that allows JavaScript in the web
-pages to call upon APIs in your Android application&mdash;providing Android APIs to your web-based
-application.</p>
+@jd:body
-<p>Since Android 1.0, {@link android.webkit.WebView} has been available for Android
-applications to embed web content in their layout and bind JavaScript to Android APIs. After
-Android added support for more screen densities (adding support for high and low-density
-screens), Android 2.0 added features to the WebKit framework to allow web pages to specify
-viewport properties and query the screen density in order to modify styles
-and image assets, as mentioned above. Because these features are a part of Android's WebKit
-framework, both the Android Browser (the default web browser provided with the platform) and
-{@link android.webkit.WebView} support the same viewport and screen density features.</p>
+<div class="landing-docs">
-<p>To develop a web application for Android-powered devices, you should read the
-following documents:</p>
+ <div class="col-6">
+ </div>
-<dl>
- <dt><a href="{@docRoot}guide/webapps/targeting.html"><strong>Targeting Screens from Web
-Apps</strong></a></dt>
- <dd>How to properly size your web app on Android-powered devices and support
-multiple screen densities. The information in this document is important if you're building a web
-application that you at least expect to be available on Android-powered devices (which you should
-assume for anything you publish on the web), but especially if you're targeting mobile devices
-or using {@link android.webkit.WebView}.</dd>
- <dt><a href="{@docRoot}guide/webapps/webview.html"><strong>Building Web Apps in
-WebView</strong></a></dt>
- <dd>How to embed web pages into your Android application using {@link android.webkit.WebView} and
-bind JavaScript to Android APIs.</dd>
- <dt><a href="{@docRoot}guide/webapps/debugging.html"><strong>Debugging Web Apps</strong></a></dt>
- <dd>How to debug web apps using JavaScript Console APIs.</dd>
- <dt><a href="{@docRoot}guide/webapps/best-practices.html"><strong>Best Practices for Web
-Apps</strong></a></dt>
- <dd>A list of practices you should follow, in order to provide an effective web application on
-Android-powered devices.</dd>
-</dl>
+ <div class="col-6">
+ </div>
+</div> \ No newline at end of file
diff --git a/docs/html/guide/webapps/overview.jd b/docs/html/guide/webapps/overview.jd
new file mode 100644
index 000000000000..069290ae9352
--- /dev/null
+++ b/docs/html/guide/webapps/overview.jd
@@ -0,0 +1,71 @@
+page.title=Web Apps Overview
+@jd:body
+
+<div class="figure" style="width:327px">
+ <img src="{@docRoot}images/webapps/webapps.png" alt="" />
+ <p class="img-caption"><strong>Figure 1.</strong> You can make your web content available to
+users in two ways: in a traditional web browser and in an Android application, by
+including a WebView in the layout.</p>
+</div>
+
+<p>There are essentially two ways to deliver an application on Android: as a
+client-side application (developed using the Android SDK and installed on user devices as an {@code
+.apk}) or as a web application (developed using web standards and accessed through a web
+browser&mdash;there's nothing to install on user devices).</p>
+
+<p>The approach you choose for your application could depend on several factors, but Android makes
+the decision to develop a web application easier by providing:</p>
+<ul>
+ <li>Support for viewport properties that allow you to properly size your web application
+based on the screen size</li>
+ <li>CSS and JavaScript features that allow you to provide different styles and images
+based on the screen's pixel density (screen resolution)</li>
+</ul>
+
+<p>Thus, your decision to develop a web application for Android can exclude consideration for
+screen support, because it's already easy to make your web pages look good on all types of screens
+powered by Android.</p>
+
+<p>Another great feature of Android is that you don't have to build your application purely on
+the client or purely on the web. You can mix the two together by developing a client-side Android
+application that embeds some web pages (using a {@link android.webkit.WebView} in your Android
+application layout). Figure 1 visualizes how you can provide access to your web pages from either
+a web browser or your Android application. However, you shouldn't develop an Android
+application simply as a means to launch your web site. Rather, the web pages you embed in your
+Android application should be designed especially for that environment. You can even define an
+interface between your Android application and your web pages that allows JavaScript in the web
+pages to call upon APIs in your Android application&mdash;providing Android APIs to your web-based
+application.</p>
+
+<p>Since Android 1.0, {@link android.webkit.WebView} has been available for Android
+applications to embed web content in their layout and bind JavaScript to Android APIs. After
+Android added support for more screen densities (adding support for high and low-density
+screens), Android 2.0 added features to the WebKit framework to allow web pages to specify
+viewport properties and query the screen density in order to modify styles
+and image assets, as mentioned above. Because these features are a part of Android's WebKit
+framework, both the Android Browser (the default web browser provided with the platform) and
+{@link android.webkit.WebView} support the same viewport and screen density features.</p>
+
+<p>To develop a web application for Android-powered devices, you should read the
+following documents:</p>
+
+<dl>
+ <dt><a href="{@docRoot}guide/webapps/targeting.html"><strong>Targeting Screens from Web
+Apps</strong></a></dt>
+ <dd>How to properly size your web app on Android-powered devices and support
+multiple screen densities. The information in this document is important if you're building a web
+application that you at least expect to be available on Android-powered devices (which you should
+assume for anything you publish on the web), but especially if you're targeting mobile devices
+or using {@link android.webkit.WebView}.</dd>
+ <dt><a href="{@docRoot}guide/webapps/webview.html"><strong>Building Web Apps in
+WebView</strong></a></dt>
+ <dd>How to embed web pages into your Android application using {@link android.webkit.WebView} and
+bind JavaScript to Android APIs.</dd>
+ <dt><a href="{@docRoot}guide/webapps/debugging.html"><strong>Debugging Web Apps</strong></a></dt>
+ <dd>How to debug web apps using JavaScript Console APIs.</dd>
+ <dt><a href="{@docRoot}guide/webapps/best-practices.html"><strong>Best Practices for Web
+Apps</strong></a></dt>
+ <dd>A list of practices you should follow, in order to provide an effective web application on
+Android-powered devices.</dd>
+</dl>
+
diff --git a/docs/html/images/about/growth-chart.png b/docs/html/images/about/growth-chart.png
new file mode 100644
index 000000000000..fee4e0942545
--- /dev/null
+++ b/docs/html/images/about/growth-chart.png
Binary files differ
diff --git a/docs/html/images/activity_fragment_lifecycle.png b/docs/html/images/activity_fragment_lifecycle.png
index bab957960df1..c44777493cfa 100644
--- a/docs/html/images/activity_fragment_lifecycle.png
+++ b/docs/html/images/activity_fragment_lifecycle.png
Binary files differ
diff --git a/docs/html/images/activity_lifecycle.png b/docs/html/images/activity_lifecycle.png
index 357349c44254..879f51f6e8fa 100644
--- a/docs/html/images/activity_lifecycle.png
+++ b/docs/html/images/activity_lifecycle.png
Binary files differ
diff --git a/docs/html/images/android-logo.png b/docs/html/images/android-logo.png
new file mode 100644
index 000000000000..d72fed1b2b31
--- /dev/null
+++ b/docs/html/images/android-logo.png
Binary files differ
diff --git a/docs/html/images/billing_subscription_flow.png b/docs/html/images/billing_subscription_flow.png
new file mode 100644
index 000000000000..a293228bd7b9
--- /dev/null
+++ b/docs/html/images/billing_subscription_flow.png
Binary files differ
diff --git a/docs/html/images/brand/android_app_on_play_logo_large.png b/docs/html/images/brand/android_app_on_play_logo_large.png
new file mode 100644
index 000000000000..a46bf3538c4e
--- /dev/null
+++ b/docs/html/images/brand/android_app_on_play_logo_large.png
Binary files differ
diff --git a/docs/html/images/brand/android_app_on_play_logo_small.png b/docs/html/images/brand/android_app_on_play_logo_small.png
new file mode 100644
index 000000000000..2d8ef525df08
--- /dev/null
+++ b/docs/html/images/brand/android_app_on_play_logo_small.png
Binary files differ
diff --git a/docs/html/images/brand/droid.gif b/docs/html/images/brand/droid.gif
new file mode 100644
index 000000000000..7c7b941218c9
--- /dev/null
+++ b/docs/html/images/brand/droid.gif
Binary files differ
diff --git a/docs/html/images/brand/get_it_on_play_logo_large.png b/docs/html/images/brand/get_it_on_play_logo_large.png
new file mode 100644
index 000000000000..8b48767fc561
--- /dev/null
+++ b/docs/html/images/brand/get_it_on_play_logo_large.png
Binary files differ
diff --git a/docs/html/images/brand/get_it_on_play_logo_small.png b/docs/html/images/brand/get_it_on_play_logo_small.png
new file mode 100644
index 000000000000..1fcbec86b925
--- /dev/null
+++ b/docs/html/images/brand/get_it_on_play_logo_small.png
Binary files differ
diff --git a/docs/html/images/brand/google_play_logo_450.png b/docs/html/images/brand/google_play_logo_450.png
new file mode 100644
index 000000000000..59a1fcfdad1d
--- /dev/null
+++ b/docs/html/images/brand/google_play_logo_450.png
Binary files differ
diff --git a/docs/html/images/brand/learnmore.gif b/docs/html/images/brand/learnmore.gif
new file mode 100644
index 000000000000..70a8e6bc4579
--- /dev/null
+++ b/docs/html/images/brand/learnmore.gif
Binary files differ
diff --git a/docs/html/images/brand/logo_android.gif b/docs/html/images/brand/logo_android.gif
new file mode 100644
index 000000000000..169c764c0976
--- /dev/null
+++ b/docs/html/images/brand/logo_android.gif
Binary files differ
diff --git a/docs/html/images/brand/mediaplayer.gif b/docs/html/images/brand/mediaplayer.gif
new file mode 100644
index 000000000000..860d110866fa
--- /dev/null
+++ b/docs/html/images/brand/mediaplayer.gif
Binary files differ
diff --git a/docs/html/images/brand/norad.gif b/docs/html/images/brand/norad.gif
new file mode 100644
index 000000000000..d8707bdd871a
--- /dev/null
+++ b/docs/html/images/brand/norad.gif
Binary files differ
diff --git a/docs/html/images/dac-design-icon.png b/docs/html/images/dac-design-icon.png
new file mode 100644
index 000000000000..245f08011347
--- /dev/null
+++ b/docs/html/images/dac-design-icon.png
Binary files differ
diff --git a/docs/html/images/debugging-tall.png b/docs/html/images/debugging-tall.png
new file mode 100644
index 000000000000..d29c4d151148
--- /dev/null
+++ b/docs/html/images/debugging-tall.png
Binary files differ
diff --git a/docs/html/images/develop-placeholder.png b/docs/html/images/develop-placeholder.png
new file mode 100644
index 000000000000..35a8767892ac
--- /dev/null
+++ b/docs/html/images/develop-placeholder.png
Binary files differ
diff --git a/docs/html/images/develop/app_components.png b/docs/html/images/develop/app_components.png
new file mode 100644
index 000000000000..0e3460d8046c
--- /dev/null
+++ b/docs/html/images/develop/app_components.png
Binary files differ
diff --git a/docs/html/images/develop/auth-code.png b/docs/html/images/develop/auth-code.png
new file mode 100644
index 000000000000..6dfabf9cc35f
--- /dev/null
+++ b/docs/html/images/develop/auth-code.png
Binary files differ
diff --git a/docs/html/images/develop/connectivity.png b/docs/html/images/develop/connectivity.png
new file mode 100644
index 000000000000..2c9dadb2d9e0
--- /dev/null
+++ b/docs/html/images/develop/connectivity.png
Binary files differ
diff --git a/docs/html/images/develop/marquee-play.png b/docs/html/images/develop/marquee-play.png
new file mode 100644
index 000000000000..de8802d349e2
--- /dev/null
+++ b/docs/html/images/develop/marquee-play.png
Binary files differ
diff --git a/docs/html/images/develop/resources.png b/docs/html/images/develop/resources.png
new file mode 100644
index 000000000000..f6cbf5d2bdde
--- /dev/null
+++ b/docs/html/images/develop/resources.png
Binary files differ
diff --git a/docs/html/images/distribute/feature-market.png b/docs/html/images/distribute/feature-market.png
new file mode 100644
index 000000000000..e9d3abf1e6a8
--- /dev/null
+++ b/docs/html/images/distribute/feature-market.png
Binary files differ
diff --git a/docs/html/images/distribute/feature-monetize.png b/docs/html/images/distribute/feature-monetize.png
new file mode 100644
index 000000000000..4b1b5095cbf4
--- /dev/null
+++ b/docs/html/images/distribute/feature-monetize.png
Binary files differ
diff --git a/docs/html/images/distribute/feature-register.png b/docs/html/images/distribute/feature-register.png
new file mode 100644
index 000000000000..ad387bf2da2d
--- /dev/null
+++ b/docs/html/images/distribute/feature-register.png
Binary files differ
diff --git a/docs/html/images/distribute/marquee-play.png b/docs/html/images/distribute/marquee-play.png
new file mode 100644
index 000000000000..1aa4823c6af7
--- /dev/null
+++ b/docs/html/images/distribute/marquee-play.png
Binary files differ
diff --git a/docs/html/images/editorschoice_ann.png b/docs/html/images/editorschoice_ann.png
new file mode 100644
index 000000000000..c4f2c06834c8
--- /dev/null
+++ b/docs/html/images/editorschoice_ann.png
Binary files differ
diff --git a/docs/html/images/fragment_lifecycle.png b/docs/html/images/fragment_lifecycle.png
index d207db42514f..fcaa63b646b0 100644
--- a/docs/html/images/fragment_lifecycle.png
+++ b/docs/html/images/fragment_lifecycle.png
Binary files differ
diff --git a/docs/html/images/fundamentals/diagram_backstack.png b/docs/html/images/fundamentals/diagram_backstack.png
index bdb689304741..5ddadcbe4f47 100644
--- a/docs/html/images/fundamentals/diagram_backstack.png
+++ b/docs/html/images/fundamentals/diagram_backstack.png
Binary files differ
diff --git a/docs/html/images/fundamentals/diagram_backstack_singletask_multiactivity.png b/docs/html/images/fundamentals/diagram_backstack_singletask_multiactivity.png
index aab324ddd5fd..b9e5ed48f697 100644
--- a/docs/html/images/fundamentals/diagram_backstack_singletask_multiactivity.png
+++ b/docs/html/images/fundamentals/diagram_backstack_singletask_multiactivity.png
Binary files differ
diff --git a/docs/html/images/fundamentals/diagram_multiple_instances.png b/docs/html/images/fundamentals/diagram_multiple_instances.png
index 64b476ff436e..606f540955c5 100644
--- a/docs/html/images/fundamentals/diagram_multiple_instances.png
+++ b/docs/html/images/fundamentals/diagram_multiple_instances.png
Binary files differ
diff --git a/docs/html/images/fundamentals/diagram_multitasking.png b/docs/html/images/fundamentals/diagram_multitasking.png
index e21959992bd6..ffe5c65151d8 100644
--- a/docs/html/images/fundamentals/diagram_multitasking.png
+++ b/docs/html/images/fundamentals/diagram_multitasking.png
Binary files differ
diff --git a/docs/html/images/fundamentals/fragments.png b/docs/html/images/fundamentals/fragments.png
index bf986b1abb30..cb7204b46227 100644
--- a/docs/html/images/fundamentals/fragments.png
+++ b/docs/html/images/fundamentals/fragments.png
Binary files differ
diff --git a/docs/html/images/fundamentals/restore_instance.png b/docs/html/images/fundamentals/restore_instance.png
index 57a95eca6f99..698b83a8149c 100644
--- a/docs/html/images/fundamentals/restore_instance.png
+++ b/docs/html/images/fundamentals/restore_instance.png
Binary files differ
diff --git a/docs/html/images/fundamentals/service_binding_tree_lifecycle.png b/docs/html/images/fundamentals/service_binding_tree_lifecycle.png
index 526521625b5a..8b826f677bab 100644
--- a/docs/html/images/fundamentals/service_binding_tree_lifecycle.png
+++ b/docs/html/images/fundamentals/service_binding_tree_lifecycle.png
Binary files differ
diff --git a/docs/html/images/gp-apps-home.png b/docs/html/images/gp-apps-home.png
new file mode 100644
index 000000000000..851f7227fb79
--- /dev/null
+++ b/docs/html/images/gp-apps-home.png
Binary files differ
diff --git a/docs/html/images/gp-buyer-currency.png b/docs/html/images/gp-buyer-currency.png
new file mode 100644
index 000000000000..51b810857194
--- /dev/null
+++ b/docs/html/images/gp-buyer-currency.png
Binary files differ
diff --git a/docs/html/images/gp-collectibles.png b/docs/html/images/gp-collectibles.png
new file mode 100644
index 000000000000..a63cd505114b
--- /dev/null
+++ b/docs/html/images/gp-collectibles.png
Binary files differ
diff --git a/docs/html/images/gp-dc-countries.png b/docs/html/images/gp-dc-countries.png
new file mode 100644
index 000000000000..00d0d5e3ff74
--- /dev/null
+++ b/docs/html/images/gp-dc-countries.png
Binary files differ
diff --git a/docs/html/images/gp-dc-details.png b/docs/html/images/gp-dc-details.png
new file mode 100644
index 000000000000..567567e65503
--- /dev/null
+++ b/docs/html/images/gp-dc-details.png
Binary files differ
diff --git a/docs/html/images/gp-dc-home.png b/docs/html/images/gp-dc-home.png
new file mode 100644
index 000000000000..381d0db017c4
--- /dev/null
+++ b/docs/html/images/gp-dc-home.png
Binary files differ
diff --git a/docs/html/images/gp-dc-profile.png b/docs/html/images/gp-dc-profile.png
new file mode 100644
index 000000000000..e52636970d35
--- /dev/null
+++ b/docs/html/images/gp-dc-profile.png
Binary files differ
diff --git a/docs/html/images/gp-dc-reviews.png b/docs/html/images/gp-dc-reviews.png
new file mode 100644
index 000000000000..cab175a7d8d5
--- /dev/null
+++ b/docs/html/images/gp-dc-reviews.png
Binary files differ
diff --git a/docs/html/images/gp-dc-stats-mini.png b/docs/html/images/gp-dc-stats-mini.png
new file mode 100644
index 000000000000..d29a270bfd81
--- /dev/null
+++ b/docs/html/images/gp-dc-stats-mini.png
Binary files differ
diff --git a/docs/html/images/gp-dc-stats.png b/docs/html/images/gp-dc-stats.png
new file mode 100644
index 000000000000..06f88e56d0bf
--- /dev/null
+++ b/docs/html/images/gp-dc-stats.png
Binary files differ
diff --git a/docs/html/images/gp-details-pages-magicpiano.png b/docs/html/images/gp-details-pages-magicpiano.png
new file mode 100644
index 000000000000..4bb196273d8c
--- /dev/null
+++ b/docs/html/images/gp-details-pages-magicpiano.png
Binary files differ
diff --git a/docs/html/images/gp-details-ww-purchase.png b/docs/html/images/gp-details-ww-purchase.png
new file mode 100644
index 000000000000..46df4434f8ed
--- /dev/null
+++ b/docs/html/images/gp-details-ww-purchase.png
Binary files differ
diff --git a/docs/html/images/gp-details-ww.png b/docs/html/images/gp-details-ww.png
new file mode 100644
index 000000000000..ccc522c79e71
--- /dev/null
+++ b/docs/html/images/gp-details-ww.png
Binary files differ
diff --git a/docs/html/images/gp-devconsole-home.png b/docs/html/images/gp-devconsole-home.png
new file mode 100644
index 000000000000..1d758fd97a88
--- /dev/null
+++ b/docs/html/images/gp-devconsole-home.png
Binary files differ
diff --git a/docs/html/images/gp-device.png b/docs/html/images/gp-device.png
new file mode 100644
index 000000000000..86e46e5da746
--- /dev/null
+++ b/docs/html/images/gp-device.png
Binary files differ
diff --git a/docs/html/images/gp-games-home.png b/docs/html/images/gp-games-home.png
new file mode 100644
index 000000000000..81b7f7a2897b
--- /dev/null
+++ b/docs/html/images/gp-games-home.png
Binary files differ
diff --git a/docs/html/images/gp-growth-downloads.png b/docs/html/images/gp-growth-downloads.png
new file mode 100644
index 000000000000..4a4b194a0476
--- /dev/null
+++ b/docs/html/images/gp-growth-downloads.png
Binary files differ
diff --git a/docs/html/images/gp-rating-web.png b/docs/html/images/gp-rating-web.png
new file mode 100644
index 000000000000..0885826995dc
--- /dev/null
+++ b/docs/html/images/gp-rating-web.png
Binary files differ
diff --git a/docs/html/images/gp-sendto.png b/docs/html/images/gp-sendto.png
new file mode 100644
index 000000000000..7409c140c05a
--- /dev/null
+++ b/docs/html/images/gp-sendto.png
Binary files differ
diff --git a/docs/html/images/gp-subs.png b/docs/html/images/gp-subs.png
new file mode 100644
index 000000000000..9b3a7df3f1a1
--- /dev/null
+++ b/docs/html/images/gp-subs.png
Binary files differ
diff --git a/docs/html/images/gp-supported-dev-requirements.png b/docs/html/images/gp-supported-dev-requirements.png
new file mode 100644
index 000000000000..d84f34efe089
--- /dev/null
+++ b/docs/html/images/gp-supported-dev-requirements.png
Binary files differ
diff --git a/docs/html/images/gp-tab.png b/docs/html/images/gp-tab.png
new file mode 100644
index 000000000000..4673d21d7622
--- /dev/null
+++ b/docs/html/images/gp-tab.png
Binary files differ
diff --git a/docs/html/images/gp-top-new-paid.png b/docs/html/images/gp-top-new-paid.png
new file mode 100644
index 000000000000..d98d6cad4e67
--- /dev/null
+++ b/docs/html/images/gp-top-new-paid.png
Binary files differ
diff --git a/docs/html/images/gpp-cat-feature280-photo.png b/docs/html/images/gpp-cat-feature280-photo.png
new file mode 100644
index 000000000000..ae2749b88caf
--- /dev/null
+++ b/docs/html/images/gpp-cat-feature280-photo.png
Binary files differ
diff --git a/docs/html/images/gpp-cat-feature280-puzzle.png b/docs/html/images/gpp-cat-feature280-puzzle.png
new file mode 100644
index 000000000000..db203c6f1e54
--- /dev/null
+++ b/docs/html/images/gpp-cat-feature280-puzzle.png
Binary files differ
diff --git a/docs/html/images/gpp-cat-feature280-sports.png b/docs/html/images/gpp-cat-feature280-sports.png
new file mode 100644
index 000000000000..dcd70aaf7a96
--- /dev/null
+++ b/docs/html/images/gpp-cat-feature280-sports.png
Binary files differ
diff --git a/docs/html/images/home-marquee.jpg b/docs/html/images/home-marquee.jpg
new file mode 100644
index 000000000000..94d83d738da0
--- /dev/null
+++ b/docs/html/images/home-marquee.jpg
Binary files differ
diff --git a/docs/html/images/home/design.png b/docs/html/images/home/design.png
new file mode 100644
index 000000000000..bbaa767b9aa8
--- /dev/null
+++ b/docs/html/images/home/design.png
Binary files differ
diff --git a/docs/html/images/home/developers_live.png b/docs/html/images/home/developers_live.png
new file mode 100644
index 000000000000..13dbb5c580e9
--- /dev/null
+++ b/docs/html/images/home/developers_live.png
Binary files differ
diff --git a/docs/html/images/home/google-io.png b/docs/html/images/home/google-io.png
new file mode 100644
index 000000000000..d21a24da46bd
--- /dev/null
+++ b/docs/html/images/home/google-io.png
Binary files differ
diff --git a/docs/html/images/home/google-play.png b/docs/html/images/home/google-play.png
new file mode 100644
index 000000000000..20321542fe40
--- /dev/null
+++ b/docs/html/images/home/google-play.png
Binary files differ
diff --git a/docs/html/images/home/ics-android.png b/docs/html/images/home/ics-android.png
new file mode 100644
index 000000000000..f4c3b5bee165
--- /dev/null
+++ b/docs/html/images/home/ics-android.png
Binary files differ
diff --git a/docs/html/images/layoutparams.png b/docs/html/images/layoutparams.png
index d99625e2efa9..ac31e44a65f0 100644
--- a/docs/html/images/layoutparams.png
+++ b/docs/html/images/layoutparams.png
Binary files differ
diff --git a/docs/html/images/market/version-codes.png b/docs/html/images/market/version-codes.png
index c0c985864fa9..aa4fd4193ef3 100644
--- a/docs/html/images/market/version-codes.png
+++ b/docs/html/images/market/version-codes.png
Binary files differ
diff --git a/docs/html/images/opengl/ccw-square.png b/docs/html/images/opengl/ccw-square.png
new file mode 100644
index 000000000000..010def9537bd
--- /dev/null
+++ b/docs/html/images/opengl/ccw-square.png
Binary files differ
diff --git a/docs/html/images/opengl/ccw-winding.png b/docs/html/images/opengl/ccw-winding.png
new file mode 100644
index 000000000000..a7ece315a146
--- /dev/null
+++ b/docs/html/images/opengl/ccw-winding.png
Binary files differ
diff --git a/docs/html/images/opengl/coordinates.png b/docs/html/images/opengl/coordinates.png
index 7180cd5cecf3..7a02cdd5b82c 100644
--- a/docs/html/images/opengl/coordinates.png
+++ b/docs/html/images/opengl/coordinates.png
Binary files differ
diff --git a/docs/html/images/opengl/helloopengl-es10-1.png b/docs/html/images/opengl/helloopengl-es10-1.png
deleted file mode 100644
index 9aa2376ed720..000000000000
--- a/docs/html/images/opengl/helloopengl-es10-1.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/opengl/helloopengl-es10-2.png b/docs/html/images/opengl/helloopengl-es10-2.png
deleted file mode 100644
index cdfd9c70539a..000000000000
--- a/docs/html/images/opengl/helloopengl-es10-2.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/opengl/helloopengl-es20-1.png b/docs/html/images/opengl/helloopengl-es20-1.png
deleted file mode 100644
index 1f76c22cb23b..000000000000
--- a/docs/html/images/opengl/helloopengl-es20-1.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/opengl/helloopengl-es20-2.png b/docs/html/images/opengl/helloopengl-es20-2.png
deleted file mode 100644
index 0fbbe60010e3..000000000000
--- a/docs/html/images/opengl/helloopengl-es20-2.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/opengl/ogl-triangle-projected.png b/docs/html/images/opengl/ogl-triangle-projected.png
new file mode 100644
index 000000000000..d10bbdc0d27f
--- /dev/null
+++ b/docs/html/images/opengl/ogl-triangle-projected.png
Binary files differ
diff --git a/docs/html/images/opengl/ogl-triangle-touch.png b/docs/html/images/opengl/ogl-triangle-touch.png
new file mode 100644
index 000000000000..35177a4670b0
--- /dev/null
+++ b/docs/html/images/opengl/ogl-triangle-touch.png
Binary files differ
diff --git a/docs/html/images/opengl/ogl-triangle.png b/docs/html/images/opengl/ogl-triangle.png
new file mode 100644
index 000000000000..3d4a385f198a
--- /dev/null
+++ b/docs/html/images/opengl/ogl-triangle.png
Binary files differ
diff --git a/docs/html/images/play_tableft.png b/docs/html/images/play_tableft.png
new file mode 100644
index 000000000000..14740cb4347d
--- /dev/null
+++ b/docs/html/images/play_tableft.png
Binary files differ
diff --git a/docs/html/images/providers/ContactsDataFlow.png b/docs/html/images/providers/ContactsDataFlow.png
new file mode 100644
index 000000000000..403afc77441e
--- /dev/null
+++ b/docs/html/images/providers/ContactsDataFlow.png
Binary files differ
diff --git a/docs/html/images/providers/contacts_structure.png b/docs/html/images/providers/contacts_structure.png
new file mode 100644
index 000000000000..3cdc5de5a15f
--- /dev/null
+++ b/docs/html/images/providers/contacts_structure.png
Binary files differ
diff --git a/docs/html/images/providers/contacts_tables.png b/docs/html/images/providers/contacts_tables.png
new file mode 100644
index 000000000000..c44994830a9c
--- /dev/null
+++ b/docs/html/images/providers/contacts_tables.png
Binary files differ
diff --git a/docs/html/images/providers/data_columns.png b/docs/html/images/providers/data_columns.png
new file mode 100644
index 000000000000..6e9d90e669c7
--- /dev/null
+++ b/docs/html/images/providers/data_columns.png
Binary files differ
diff --git a/docs/html/images/publishing/publishing_unknown_sources.png b/docs/html/images/publishing/publishing_unknown_sources.png
deleted file mode 100755
index ad310a1810dc..000000000000
--- a/docs/html/images/publishing/publishing_unknown_sources.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/publishing/publishing_unknown_sources_sm.png b/docs/html/images/publishing/publishing_unknown_sources_sm.png
new file mode 100644
index 000000000000..34cba2a7f858
--- /dev/null
+++ b/docs/html/images/publishing/publishing_unknown_sources_sm.png
Binary files differ
diff --git a/docs/html/images/publishing/publishing_via_email.png b/docs/html/images/publishing/publishing_via_email.png
index 54c64bd6e809..d367747230b4 100755
--- a/docs/html/images/publishing/publishing_via_email.png
+++ b/docs/html/images/publishing/publishing_via_email.png
Binary files differ
diff --git a/docs/html/images/resources/res-selection-flowchart.png b/docs/html/images/resources/res-selection-flowchart.png
index 5de7688a2532..149f4dcadda2 100644
--- a/docs/html/images/resources/res-selection-flowchart.png
+++ b/docs/html/images/resources/res-selection-flowchart.png
Binary files differ
diff --git a/docs/html/images/resources/resource_devices_diagram1.png b/docs/html/images/resources/resource_devices_diagram1.png
index 0b3c856ff859..e2f515fdb570 100644
--- a/docs/html/images/resources/resource_devices_diagram1.png
+++ b/docs/html/images/resources/resource_devices_diagram1.png
Binary files differ
diff --git a/docs/html/images/resources/resource_devices_diagram2.png b/docs/html/images/resources/resource_devices_diagram2.png
index d32a7811f64c..f0a3886bf30f 100644
--- a/docs/html/images/resources/resource_devices_diagram2.png
+++ b/docs/html/images/resources/resource_devices_diagram2.png
Binary files differ
diff --git a/docs/html/images/robot-sdk.png b/docs/html/images/robot-sdk.png
new file mode 100644
index 000000000000..962d4d512436
--- /dev/null
+++ b/docs/html/images/robot-sdk.png
Binary files differ
diff --git a/docs/html/images/robot-tiny.png b/docs/html/images/robot-tiny.png
new file mode 100644
index 000000000000..f925062b3fb6
--- /dev/null
+++ b/docs/html/images/robot-tiny.png
Binary files differ
diff --git a/docs/html/images/screens_support/screens-densities.png b/docs/html/images/screens_support/screens-densities.png
index edbd1e32572a..3220ecf5f687 100644
--- a/docs/html/images/screens_support/screens-densities.png
+++ b/docs/html/images/screens_support/screens-densities.png
Binary files differ
diff --git a/docs/html/images/screens_support/screens-ranges.png b/docs/html/images/screens_support/screens-ranges.png
index d8a0ffae549f..c6a06771a554 100644
--- a/docs/html/images/screens_support/screens-ranges.png
+++ b/docs/html/images/screens_support/screens-ranges.png
Binary files differ
diff --git a/docs/html/images/sdk-cube.png b/docs/html/images/sdk-cube.png
new file mode 100644
index 000000000000..58b43aec28c9
--- /dev/null
+++ b/docs/html/images/sdk-cube.png
Binary files differ
diff --git a/docs/html/images/service_lifecycle.png b/docs/html/images/service_lifecycle.png
index 7ab96d7c733a..413bf5627f42 100644
--- a/docs/html/images/service_lifecycle.png
+++ b/docs/html/images/service_lifecycle.png
Binary files differ
diff --git a/docs/html/images/tools-home.png b/docs/html/images/tools-home.png
new file mode 100644
index 000000000000..291a36138a4e
--- /dev/null
+++ b/docs/html/images/tools-home.png
Binary files differ
diff --git a/docs/html/images/topdev_ann.png b/docs/html/images/topdev_ann.png
new file mode 100644
index 000000000000..9564387e8d8b
--- /dev/null
+++ b/docs/html/images/topdev_ann.png
Binary files differ
diff --git a/docs/html/images/training/basics/basic-lifecycle-create.png b/docs/html/images/training/basics/basic-lifecycle-create.png
index 01d7328da8a4..d6c66fc0fcc6 100644
--- a/docs/html/images/training/basics/basic-lifecycle-create.png
+++ b/docs/html/images/training/basics/basic-lifecycle-create.png
Binary files differ
diff --git a/docs/html/images/training/basics/basic-lifecycle-paused.png b/docs/html/images/training/basics/basic-lifecycle-paused.png
index fcb8bd245fa9..1b81c07b3ffb 100644
--- a/docs/html/images/training/basics/basic-lifecycle-paused.png
+++ b/docs/html/images/training/basics/basic-lifecycle-paused.png
Binary files differ
diff --git a/docs/html/images/training/basics/basic-lifecycle-savestate.png b/docs/html/images/training/basics/basic-lifecycle-savestate.png
index d74f1baa3033..9ea9484fc620 100644
--- a/docs/html/images/training/basics/basic-lifecycle-savestate.png
+++ b/docs/html/images/training/basics/basic-lifecycle-savestate.png
Binary files differ
diff --git a/docs/html/images/training/basics/basic-lifecycle-stopped.png b/docs/html/images/training/basics/basic-lifecycle-stopped.png
index 26c22ee0cc33..6f45fccb7f42 100644
--- a/docs/html/images/training/basics/basic-lifecycle-stopped.png
+++ b/docs/html/images/training/basics/basic-lifecycle-stopped.png
Binary files differ
diff --git a/docs/html/images/training/basics/basic-lifecycle.png b/docs/html/images/training/basics/basic-lifecycle.png
index 61eb422de9ba..f991787f68b8 100644
--- a/docs/html/images/training/basics/basic-lifecycle.png
+++ b/docs/html/images/training/basics/basic-lifecycle.png
Binary files differ
diff --git a/docs/html/images/training/basics/network-settings1.png b/docs/html/images/training/basics/network-settings1.png
new file mode 100644
index 000000000000..9eaf207d29ee
--- /dev/null
+++ b/docs/html/images/training/basics/network-settings1.png
Binary files differ
diff --git a/docs/html/images/training/basics/network-settings2.png b/docs/html/images/training/basics/network-settings2.png
new file mode 100644
index 000000000000..5f4dc63aa96d
--- /dev/null
+++ b/docs/html/images/training/basics/network-settings2.png
Binary files differ
diff --git a/docs/html/images/ui/button-types.png b/docs/html/images/ui/button-types.png
new file mode 100644
index 000000000000..dcb083f0a687
--- /dev/null
+++ b/docs/html/images/ui/button-types.png
Binary files differ
diff --git a/docs/html/images/ui/buttons-holo.png b/docs/html/images/ui/buttons-holo.png
new file mode 100644
index 000000000000..16e2fd274b11
--- /dev/null
+++ b/docs/html/images/ui/buttons-holo.png
Binary files differ
diff --git a/docs/html/images/ui/checkboxes.png b/docs/html/images/ui/checkboxes.png
new file mode 100644
index 000000000000..8878fb137cf6
--- /dev/null
+++ b/docs/html/images/ui/checkboxes.png
Binary files differ
diff --git a/docs/html/images/ui/edittext-actionlabel.png b/docs/html/images/ui/edittext-actionlabel.png
new file mode 100644
index 000000000000..a0e9fe9fcb35
--- /dev/null
+++ b/docs/html/images/ui/edittext-actionlabel.png
Binary files differ
diff --git a/docs/html/images/ui/edittext-actionsend.png b/docs/html/images/ui/edittext-actionsend.png
new file mode 100644
index 000000000000..63ccbd1b9b19
--- /dev/null
+++ b/docs/html/images/ui/edittext-actionsend.png
Binary files differ
diff --git a/docs/html/images/ui/edittext-autocomplete.png b/docs/html/images/ui/edittext-autocomplete.png
new file mode 100644
index 000000000000..c29091ac75c9
--- /dev/null
+++ b/docs/html/images/ui/edittext-autocomplete.png
Binary files differ
diff --git a/docs/html/images/ui/edittext-email.png b/docs/html/images/ui/edittext-email.png
new file mode 100644
index 000000000000..26f6136b2ee6
--- /dev/null
+++ b/docs/html/images/ui/edittext-email.png
Binary files differ
diff --git a/docs/html/images/ui/edittext-noextract.png b/docs/html/images/ui/edittext-noextract.png
new file mode 100644
index 000000000000..b459283c4d60
--- /dev/null
+++ b/docs/html/images/ui/edittext-noextract.png
Binary files differ
diff --git a/docs/html/images/ui/edittext-phone.png b/docs/html/images/ui/edittext-phone.png
new file mode 100644
index 000000000000..45177d3af7f4
--- /dev/null
+++ b/docs/html/images/ui/edittext-phone.png
Binary files differ
diff --git a/docs/html/images/ui/edittext-text-next.png b/docs/html/images/ui/edittext-text-next.png
new file mode 100644
index 000000000000..ef5ff1deea8f
--- /dev/null
+++ b/docs/html/images/ui/edittext-text-next.png
Binary files differ
diff --git a/docs/html/images/ui/edittext-text.png b/docs/html/images/ui/edittext-text.png
new file mode 100644
index 000000000000..599dcec187b7
--- /dev/null
+++ b/docs/html/images/ui/edittext-text.png
Binary files differ
diff --git a/docs/html/images/ui/edittext.png b/docs/html/images/ui/edittext.png
new file mode 100644
index 000000000000..d4bcaaa643cf
--- /dev/null
+++ b/docs/html/images/ui/edittext.png
Binary files differ
diff --git a/docs/html/images/ui/gridlayout-small.png b/docs/html/images/ui/gridlayout-small.png
new file mode 100644
index 000000000000..935b481c20cf
--- /dev/null
+++ b/docs/html/images/ui/gridlayout-small.png
Binary files differ
diff --git a/docs/html/images/ui/gridlayout.png b/docs/html/images/ui/gridlayout.png
new file mode 100644
index 000000000000..12ae414dfafa
--- /dev/null
+++ b/docs/html/images/ui/gridlayout.png
Binary files differ
diff --git a/docs/html/images/ui/gridview-small.png b/docs/html/images/ui/gridview-small.png
new file mode 100644
index 000000000000..104a4d4ec95f
--- /dev/null
+++ b/docs/html/images/ui/gridview-small.png
Binary files differ
diff --git a/docs/html/images/ui/gridview.png b/docs/html/images/ui/gridview.png
new file mode 100644
index 000000000000..a780df313469
--- /dev/null
+++ b/docs/html/images/ui/gridview.png
Binary files differ
diff --git a/docs/html/images/ui/linearlayout-small.png b/docs/html/images/ui/linearlayout-small.png
new file mode 100644
index 000000000000..5d929e25d641
--- /dev/null
+++ b/docs/html/images/ui/linearlayout-small.png
Binary files differ
diff --git a/docs/html/images/ui/linearlayout.png b/docs/html/images/ui/linearlayout.png
new file mode 100644
index 000000000000..392cc11bd749
--- /dev/null
+++ b/docs/html/images/ui/linearlayout.png
Binary files differ
diff --git a/docs/html/images/ui/listview-small.png b/docs/html/images/ui/listview-small.png
new file mode 100644
index 000000000000..97eba89c100b
--- /dev/null
+++ b/docs/html/images/ui/listview-small.png
Binary files differ
diff --git a/docs/html/images/ui/listview.png b/docs/html/images/ui/listview.png
new file mode 100644
index 000000000000..456ed0c851ca
--- /dev/null
+++ b/docs/html/images/ui/listview.png
Binary files differ
diff --git a/docs/html/images/ui/pickers.png b/docs/html/images/ui/pickers.png
new file mode 100644
index 000000000000..e446fab48a42
--- /dev/null
+++ b/docs/html/images/ui/pickers.png
Binary files differ
diff --git a/docs/html/images/ui/radiobuttons.png b/docs/html/images/ui/radiobuttons.png
new file mode 100644
index 000000000000..8f6b22a7ab0f
--- /dev/null
+++ b/docs/html/images/ui/radiobuttons.png
Binary files differ
diff --git a/docs/html/images/ui/relativelayout-small.png b/docs/html/images/ui/relativelayout-small.png
new file mode 100644
index 000000000000..c531e9a76cdd
--- /dev/null
+++ b/docs/html/images/ui/relativelayout-small.png
Binary files differ
diff --git a/docs/html/images/ui/relativelayout.png b/docs/html/images/ui/relativelayout.png
new file mode 100644
index 000000000000..72c06ae15796
--- /dev/null
+++ b/docs/html/images/ui/relativelayout.png
Binary files differ
diff --git a/docs/html/images/ui/sample-linearlayout.png b/docs/html/images/ui/sample-linearlayout.png
new file mode 100644
index 000000000000..c4beb93a6d07
--- /dev/null
+++ b/docs/html/images/ui/sample-linearlayout.png
Binary files differ
diff --git a/docs/html/images/ui/sample-relativelayout.png b/docs/html/images/ui/sample-relativelayout.png
new file mode 100644
index 000000000000..d9ea30e0b02c
--- /dev/null
+++ b/docs/html/images/ui/sample-relativelayout.png
Binary files differ
diff --git a/docs/html/images/ui/spinner.png b/docs/html/images/ui/spinner.png
new file mode 100644
index 000000000000..79ee4e443626
--- /dev/null
+++ b/docs/html/images/ui/spinner.png
Binary files differ
diff --git a/docs/html/images/ui/switch.png b/docs/html/images/ui/switch.png
new file mode 100644
index 000000000000..e8d801484dd9
--- /dev/null
+++ b/docs/html/images/ui/switch.png
Binary files differ
diff --git a/docs/html/images/ui/tabs-small.png b/docs/html/images/ui/tabs-small.png
new file mode 100644
index 000000000000..622f1e70b6c5
--- /dev/null
+++ b/docs/html/images/ui/tabs-small.png
Binary files differ
diff --git a/docs/html/images/ui/tabs.png b/docs/html/images/ui/tabs.png
new file mode 100644
index 000000000000..da9d4b661dc1
--- /dev/null
+++ b/docs/html/images/ui/tabs.png
Binary files differ
diff --git a/docs/html/images/ui/togglebutton.png b/docs/html/images/ui/togglebutton.png
new file mode 100644
index 000000000000..a69b3fe38a30
--- /dev/null
+++ b/docs/html/images/ui/togglebutton.png
Binary files differ
diff --git a/docs/html/images/ui/ui-controls.png b/docs/html/images/ui/ui-controls.png
new file mode 100644
index 000000000000..13534d3861bd
--- /dev/null
+++ b/docs/html/images/ui/ui-controls.png
Binary files differ
diff --git a/docs/html/images/ui/ui_index.png b/docs/html/images/ui/ui_index.png
new file mode 100644
index 000000000000..3cc82c270725
--- /dev/null
+++ b/docs/html/images/ui/ui_index.png
Binary files differ
diff --git a/docs/html/images/ui/webview-small.png b/docs/html/images/ui/webview-small.png
new file mode 100644
index 000000000000..4c3243246376
--- /dev/null
+++ b/docs/html/images/ui/webview-small.png
Binary files differ
diff --git a/docs/html/images/ui/webview.png b/docs/html/images/ui/webview.png
new file mode 100644
index 000000000000..12cef588cecd
--- /dev/null
+++ b/docs/html/images/ui/webview.png
Binary files differ
diff --git a/docs/html/images/viewgroup.png b/docs/html/images/viewgroup.png
index 2c86ddbd1874..fa077991037a 100644
--- a/docs/html/images/viewgroup.png
+++ b/docs/html/images/viewgroup.png
Binary files differ
diff --git a/docs/html/images/webapps/webapps.png b/docs/html/images/webapps/webapps.png
index 6ad620530345..ff499cfcd4dc 100644
--- a/docs/html/images/webapps/webapps.png
+++ b/docs/html/images/webapps/webapps.png
Binary files differ
diff --git a/docs/html/index.jd b/docs/html/index.jd
index d3203bbb04cb..58bfd040815c 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -1,218 +1,70 @@
-home=true
+fullpage=true
+no_footer_links=true
+carousel=true
page.metaDescription=The official site for Android developers. Provides the Android SDK and documentation for app developers and designers.
@jd:body
-<div id="mainBodyFixed">
- <div id="mainBodyLeft">
- <div id="homeMiddle">
- <div id="topAnnouncement">
- <div id="homeTitle">
- <h2>Developer Announcements</h2>
- </div><!-- end homeTitle -->
- <div id="announcement-block">
- <!-- total max width is 520px -->
- <img src="{@docRoot}images/home/play_logo.png"
-alt="Google Play" width="120px" style="padding:10px 52px"/>
- <div id="announcement" style="width:275px">
- <p>Introducing <strong>Google Play</strong>: An integrated digital content destination where
-users buy and enjoy all of their favorite content in one place. It's the new destination for
-Android apps!</p>
- <p><a href="http://android-developers.blogspot.com/2012/03/introducing-google-play.html">Read more &raquo;</a></p>
- </div> <!-- end annoucement -->
- </div> <!-- end annoucement-block -->
- </div><!-- end topAnnouncement -->
- <div id="carouselMain" style="height:205px"> <!-- this height can be
- adjusted based on the content height -->
+<div class="wrap">
+ <!-- Slideshow -->
+ <div class="slideshow-container slideshow-home col-16">
+ <a href="" class="slideshow-prev">Prev</a>
+ <a href="" class="slideshow-next">Next</a>
+ <div class="frame">
+ <ul>
+ <li class="item carousel-home">
+ <div class="content-left col-10">
+ <img src="{@docRoot}images/home/design.png" style="margin-top:30px">
+ </div>
+ <div class="content-right col-6">
+ <h1>Make your Android apps<br>look great</h1>
+ <p>New templates in the design guide make it easier than ever to design apps
+that are beautiful and easy to use.</p>
+ <a href="/design/index.html" class="button">Learn More</a>
+ </div>
+ </li>
+ <li class="item carousel-home">
+ <div class="content-left col-10">
+ <img src="/images/home/google-io.png">
</div>
- <div class="clearer"></div>
- <div id="carouselWheel">
- <div class="app-list-container" align="center">
- <a href="javascript:{}" id="arrow-left" onclick="" class="arrow-left-off"></a>
- <div id="list-clip">
- <div style="left: 0px;" id="app-list">
- <!-- populated by buildCarousel() -->
- </div>
- </div><!-- end list-clip -->
- <a href="javascript:{ page_right(); }" id="arrow-right" onclick="" class="arrow-right-on"></a>
- <div class="clearer"></div>
- </div><!-- end app-list container -->
- </div><!-- end carouselWheel -->
- </div><!-- end homeMiddle -->
-
- <div style="clear:both">&nbsp;</div>
- </div><!-- end mainBodyLeft -->
-
- <div id="mainBodyRight">
- <table id="rightColumn">
- <tr>
- <td class="imageCell"><a href="{@docRoot}sdk/index.html"><img src="{@docRoot}assets/images/icon_download.jpg" style="padding:0" /></a></td>
- <td>
- <h2 class="green">Download</h2>
- <p>The Android SDK has the tools, sample code, and docs you need to create great apps.</p>
- <p><a href="{@docRoot}sdk/index.html">Learn more &raquo;</a></p>
- </td>
- </tr>
-
-
- <tr>
- <td colspan="2"><div class="seperator">&nbsp;</div></td>
- </tr>
- <tr>
- <td class="imageCell"><a href="{@docRoot}design/index.html"><img src="{@docRoot}assets/images/icon_design.png" style="padding:5px" /></a></td>
- <td>
- <h2 class="green">Design</h2>
- <p>Learn about principles, building blocks, and patterns for creating world-class Android user interfaces.</p>
- <p><a href="{@docRoot}design/index.html">Learn more &raquo;</a></p>
- </td>
- </tr>
-
- <tr>
- <td colspan="2"><div class="seperator">&nbsp;</div></td>
- </tr>
- <tr>
- <td class="imageCell"><a href="http://play.google.com/apps/publish"><img src="{@docRoot}assets/images/icon_play.png" style="padding:0" /></a></td>
- <td>
- <h2 class="green">Publish</h2>
- <p>Google Play is an open service that lets you distribute your apps to devices.</p>
- <p><a href="http://play.google.com/apps/publish">Learn more &raquo;</a></p>
- </td>
- </tr>
-
- <tr>
- <td colspan="2"><div class="seperator">&nbsp;</div></td>
- </tr>
- <tr>
- <td class="imageCell"><a
-href="{@docRoot}resources/dashboard/platform-versions.html"><img
-src="{@docRoot}images/icon_dashboard.png" style="padding:0" /></a></td>
- <td>
- <h2 class="green">Target Devices</h2>
- <p>The Device Dashboard
-provides information about deployed Android devices to
-help you target suitable device configurations as you build and update your
-apps.</p>
- <p><a
-href="{@docRoot}resources/dashboard/platform-versions.html">Learn more &raquo;</a></p>
- </td>
- </tr>
-
- </table>
- </div>
- </div>
-
-<!--[if lte IE 6]>
- <style>
- #arrow-left {
- margin:0 0 0 5px;
- }
- #arrow-right {
- margin-left:0;
- }
- .app-list-container {
- margin: 37px 0 0 23px;
- }
- div#list-clip {
- width:468px;
- }
- </style>
-<![endif]-->
-
-<script type="text/javascript">
-
-// * -- carousel dictionary -- * //
- /* layout: imgLeft, imgRight, imgTop
- icon: image for carousel entry. cropped (height:70px, width:90px)
- name: string for carousel entry
- img: image for bulletin post. cropped (height: 170, width:230px)
- title: header for bulletin (optional, insert "" value to skip
- desc: the bulletin post. must include html tags.
- */
+ <div class="content-right col-6">
+ <h1>Watch Android at Google I/O!</h1>
+ <p>See the keynote and more than 40 Android developer sessions streamed live from Moscone Center in San Francisco. <div style="margin-top:-22px;">Begins June 27, 9AM PDT (UTC-7).</span></p>
+ <a href="https://developers.google.com/events/io/sessions#android"
+class="button">See the Android Sessions</a>
+ </div>
+ </li>
+ <li class="item carousel-home">
+ <div class="content-left col-10">
+ <img src="/images/home/google-play.png"
+ style="margin-top:50px">
+ </div>
+ <div class="content-right col-6">
+ <h1>Publish your apps<br>in Google Play</h1>
+ <p>The most visited store in the world for Android apps. Cloud-connected and always synced, it's never been easier for users to find and download your apps.</p>
- var droidList = {
- 'sdk': {
- 'layout':"imgLeft",
- 'icon':"sdk-small.png",
- 'name':"Android 4.0.3",
- 'img':"ics-android.png",
- 'title':"Android 4.0.3",
- 'desc': "<p>Android 4.0.3 is an update to the Ice Cream Sandwich release that adds a "
-+ "handful of new features for users and developers. Check out the <a "
-+ "href='http://developer.android.com/sdk/android-4.0-highlights.html'>Platform Highlights</a> "
-+ "for an overview of all features in Android 4.0.x.</p>"
-+ "<p>For information about API changes in 4.0.3 (API level 15), read the "
-+ "<a href='{@docRoot}sdk/android-4.0.3.html'>platform notes</a> and <a "
-+ "href='{@docRoot}sdk/api_diff/15/changes.html'>diff report</a>. If you're new to Android, "
-+ "get started with the <a href='/sdk/index.html'>SDK starter package</a>.</p>"
- },
+ <a href="{@docRoot}distribute/index.html" class="button">Learn More</a>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <!-- /End slideshow -->
- 'plus': {
- 'layout':"imgLeft",
- 'icon':"google-plus-small.png",
- 'name':"Google+ Page",
- 'img':"google-plus.png",
- 'title':"Android Developers on Google+",
- 'desc': "<p>We now have a Google+ page for <a "
-+ "href='https://plus.google.com/108967384991768947849'>+Android Developers</a>. "
-+ "We'll use it to host Hangouts for developers, talk about the latest releases, "
-+ "development and design tips, and much more.</p>"
-+ "<div style='margin:.7em 0 0 0'><g:plus href='https://plus.google.com/108967384991768947849' "
-+ "size=\"smallbadge\" width=\"275\"></g:plus></div>"
- },
-
- 'tv': {
- 'layout':"imgLeft",
- 'icon':"GTV_icon_small.png",
- 'name':"Google TV",
- 'img':"GTV_icon_large.png",
- 'title':"Google TV!",
- 'desc': "<p>Build something big. By big, we mean <em>worthy-of-the-living-room</em> big.</p>"
- + " <p>Google TV brings the power of Android"
- + " and Google Chrome to television."
- + " The average American watches five hours of TV per day. Give them the apps"
- + " to update their status, listen to music, watch web videos, and more.</p>"
- + "<p><a href='http://code.google.com/tv'>Develop for Google TV &raquo;</a></p>"
- },
-
-/*
- 'devphone': {
- 'layout':"imgLeft",
- 'icon':"devphone-small.png",
- 'name':"Dev Phones",
- 'img':"devphone-large.png",
- 'title':"Android Dev Phones",
- 'desc': "<p>Run and debug your Android applications directly on one of these "
- + "devices. Modify and rebuild the Android operating system, and flash it onto "
- + "the phone. The Android Dev Phones are carrier-independent, and available for "
- + "purchase by developers through their Google Play publisher accounts.</p><p> "
- + "<a href='http://play.google.com/apps/publish'>Visit Google Play "
- + "to learn more &raquo;</a></p>"
- },
- */
-
- 'mapskey': {
- 'layout':"imgLeft",
- 'icon':"maps-small.png",
- 'name':"Maps API Key",
- 'img':"maps-large.png",
- 'title':"Maps API Key",
- 'desc':"<p>If you're writing an Android application that uses Google Maps (with MapView), you must register your application to obtain a Maps API Key. Without the key, your maps application will not work on Android devices. Obtaining a key requires just a couple of steps.</p><p><a href='http://code.google.com/android/add-ons/google-apis/maps-overview.html'>Learn more &raquo;</a></p>"
- }
-
- }
-</script>
-<script type="text/javascript" src="{@docRoot}assets/carousel.js"></script>
-<script type="text/javascript">
- initCarousel("plus");
-</script>
+
+
+</div>
+<div class="wrap" style="padding-bottom:20px">
+ <!-- Section links -->
+ <div class="home-sections">
+ <ul>
+ <li><a href="{@docRoot}about/index.html">About Android</a></li>
+ <li><a href="{@docRoot}sdk/index.html">Get the SDK</a></li>
+ <li><a href="http://source.android.com">Open Source</a></li>
+ <li><a href="{@docRoot}support.html">Support</a></li>
+ <li class="last"><a href="{@docRoot}legal.html">Legal</a></li>
+ </ul>
+ </div>
+ <!-- /Section links -->
+</div>
-<script type="text/javascript" src="https://plus.google.com/108967384991768947849"
-rel="publisher"></script>
-<script type="text/javascript">
-window.___gcfg = {lang: 'en'};
-(function()
-{var po = document.createElement("script");
-po.type = "text/javascript"; po.async = true;po.src = "https://apis.google.com/js/plusone.js";
-var s = document.getElementsByTagName("script")[0];
-s.parentNode.insertBefore(po, s);
-})();</script>
diff --git a/docs/html/intl/es/training/monitoring-device-state/battery-monitoring.jd b/docs/html/intl/es/training/monitoring-device-state/battery-monitoring.jd
new file mode 100644
index 000000000000..08a42dd1f7f4
--- /dev/null
+++ b/docs/html/intl/es/training/monitoring-device-state/battery-monitoring.jd
@@ -0,0 +1,120 @@
+page.title=Cómo controlar el nivel de batería y el estado de carga
+parent.title=Cómo optimizar la duración de la batería
+parent.link=index.html
+
+trainingnavtop=true
+next.title=Cómo determinar y controlar el tipo de conector y el estado de la conexión
+next.link=docking-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>En esta sección puedes aprender:</h2>
+<ol>
+ <li><a href="#DetermineChargeState">Cómo determinar el estado de carga actual</a></li>
+ <li><a href="#MonitorChargeState">Cómo supervisar los cambios en el estado de carga</a></li>
+ <li><a href="#CurrentLevel">Cómo determinar el nivel de batería actual</a></li>
+ <li><a href="#MonitorLevel">Cómo supervisar cambios importantes en el nivel de batería</a></li>
+</ol>
+
+<h2>También puedes consultar:</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Intentos y filtros de intentos</a>
+</ul>
+
+</div>
+</div>
+
+<p>Al modificar la frecuencia de las actualizaciones en segundo plano para reducir el efecto de las mismas en la duración de la batería, te recomendamos que comiences por comprobar el estado de carga y el nivel actual de la batería.</p>
+
+<p>El impacto derivado de actualizar aplicaciones en la duración de la batería varía en función del nivel de batería y del estado de carga del dispositivo, mientras que es insignificante cuando este está conectado a la corriente. Por ello, en la mayoría de los casos, puedes maximizar la frecuencia de actualización cuando el dispositivo esté conectado a un cargador. Por el contrario, si el dispositivo está en proceso de descarga, disminuir la frecuencia de actualización te permitirá aumentar la duración de la batería.</p>
+
+<p>Del mismo modo, puedes comprobar el nivel de carga de la batería y reducir la frecuencia de las actualizaciones o incluso detenerlas cuando la batería esté a punto de agotarse.</p>
+
+
+<h2 id="DetermineChargeState">Cómo determinar el estado de carga actual</h2>
+
+<p>En primer lugar, te recomendamos que determines el estado de carga actual. {@link android.os.BatteryManager} envía los detalles de carga y de la batería en un {@link android.content.Intent} persistente que incluye el estado de carga.</p>
+
+<p>Se trata de un intento persistente, por lo que no es necesario registrar un {@link android.content.BroadcastReceiver}. Para ello, solo tienes que ejecutar {@code registerReceiver} transmitiendo {@code null} como el receptor (como se muestra en el siguiente fragmento). A continuación, se devuelve el intento de estado actual de la batería. Puedes transmitir un objeto {@link android.content.BroadcastReceiver} real, pero hablaremos sobre las actualizaciones en otra sección, por lo que no es necesario ahora.</p>
+
+<pre>IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
+Intent batteryStatus = context.registerReceiver(null, ifilter);</pre>
+
+<p>Puedes extraer el estado de carga actual y, si el dispositivo está cargando, puedes saber también si se está usando un cargador de corriente alterna o USB:<p>
+
+<pre>// Are we charging / charged?
+int status = batteryStatus.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
+boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
+ status == BatteryManager.BATTERY_STATUS_FULL;
+
+// How are we charging?
+int chargePlug = battery.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
+boolean usbCharge = chargePlug == BATTERY_PLUGGED_USB;
+boolean acCharge = chargePlug == BATTERY_PLUGGED_AC;</pre>
+
+<p>Normalmente, debes maximizar la frecuencia de las actualizaciones en segundo plano si el dispositivo está conectado a un cargador de corriente alterna, disminuir esa frecuencia si se utiliza un cargador USB y reducirla aún más si la batería se está descargando.</p>
+
+
+<h2 id="MonitorChargeState">Cómo supervisar los cambios en el estado de carga</h2>
+
+<p>Modificar el estado de carga es tan fácil como conectar el dispositivo a un enchufe o USB. Por ello, es importante que supervises el estado de carga por si se producen cambios y modifiques la frecuencia de actualización según corresponda.</p>
+
+<p>{@link android.os.BatteryManager} emite una acción siempre que el dispositivo se conecta o desconecta de la corriente. Es importante recibir estos eventos aunque la aplicación no esté en ejecución (especialmente porque estos eventos pueden afectar a la frecuencia con la que inicias tu aplicación para actualizarla en segundo plano), por lo que debes registrar un {@link android.content.BroadcastReceiver} en tu archivo de manifiesto para detectar ambos eventos definiendo {@link android.content.Intent#ACTION_POWER_CONNECTED} y {@link android.content.Intent#ACTION_POWER_DISCONNECTED} en un filtro de intentos.</p>
+
+<pre>&lt;receiver android:name=".PowerConnectionReceiver">
+ &lt;intent-filter>
+ &lt;action android:name="android.intent.action.ACTION_POWER_CONNECTED"/>
+ &lt;action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
+ &lt;/intent-filter>
+&lt;/receiver></pre>
+
+<p>En la implementación de {@link android.content.BroadcastReceiver} asociada, puedes extraer el método y el estado de carga actual como se describe en el paso anterior.</p>
+
+<pre>public class PowerConnectionReceiver extends BroadcastReceiver {
+ &#64;Override
+ public void onReceive(Context context, Intent intent) {
+ int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
+ boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
+ status == BatteryManager.BATTERY_STATUS_FULL;
+
+ int chargePlug = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
+ boolean usbCharge = chargePlug == BATTERY_PLUGGED_USB;
+ boolean acCharge = chargePlug == BATTERY_PLUGGED_AC;
+ }
+}</pre>
+
+
+<h2 id="CurrentLevel">Cómo determinar el nivel de batería actual</h2>
+
+<p>En algunos casos, también es útil determinar el nivel de batería actual. Puedes disminuir la frecuencia de las actualizaciones en segundo plano si el nivel de carga de la batería es inferior a un valor determinado.</p>
+
+<p>Puedes consultar la carga actual de la batería extrayendo el nivel actual de la batería y subir a partir del intento de estado de batería, como se muestra a continuación:</p>
+
+<pre>int level = battery.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
+int scale = battery.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
+
+float batteryPct = level / (float)scale;</pre>
+
+
+<h2 id="MonitorLevel">Cómo supervisar cambios importantes en el nivel de batería</h2>
+
+<p>No puedes controlar el estado de la batería de forma continua fácilmente, pero tampoco es necesario.</p>
+
+<p>En términos generales, el impacto sobre la batería derivado de controlar continuamente el nivel de batería es mayor que el comportamiento habitual de la aplicación. Por ello, te recomendamos que supervises únicamente los cambios en el nivel de batería más significativos, especialmente cuando el dispositivo tenga poca batería o acabe de cargarse.</p>
+
+<p>El fragmento de manifiesto que aparece a continuación se ha extraído del elemento de filtro de intento de un receptor de emisión. El receptor detecta {@link android.content.Intent#ACTION_BATTERY_LOW} y {@link android.content.Intent#ACTION_BATTERY_OKAY} y se activa cuando el nivel de batería del dispositivo es bajo o cuando se sale de un estado bajo de batería.</p>
+
+<pre>&lt;receiver android:name=".BatteryLevelReceiver">
+&lt;intent-filter>
+ &lt;action android:name="android.intent.action.ACTION_BATTERY_LOW"/>
+ &lt;action android:name="android.intent.action.ACTION_BATTERY_OKAY"/>
+ &lt;/intent-filter>
+&lt;/receiver></pre>
+
+<p>Cuando la batería esté a punto de agotarse, te recomendamos que inhabilites las actualizaciones en segundo plano. Si el teléfono se apaga antes de poder utilizar las aplicaciones, no importa que tengan los datos actualizados.</p>
+
+<p>En muchos casos, el hecho de cargar un dispositivo coincide con la acción de utilizar un conector. En la próxima sección, hablaremos sobre cómo determinar el estado de conexión actual y cómo supervisar los cambios que se produzcan al conectar el dispositivo.</p>
+
diff --git a/docs/html/intl/es/training/monitoring-device-state/connectivity-monitoring.jd b/docs/html/intl/es/training/monitoring-device-state/connectivity-monitoring.jd
new file mode 100644
index 000000000000..2a5ff120e23d
--- /dev/null
+++ b/docs/html/intl/es/training/monitoring-device-state/connectivity-monitoring.jd
@@ -0,0 +1,70 @@
+page.title=Cómo determinar y controlar el estado de la conectividad
+parent.title=Cómo optimizar la duración de la batería
+parent.link=index.html
+
+trainingnavtop=true
+
+previous.title=Cómo determinar y controlar el tipo de conector y el estado de la conexión
+previous.link=docking-monitoring.html
+next.title=Cómo manipular los receptores de emisión bajo demanda
+next.link=manifest-receivers.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>En esta sección puedes aprender:</h2>
+<ol>
+ <li><a href="#DetermineConnection">Cómo determinar si tienes conexión a Internet</a></li>
+ <li><a href="#DetermineType">Cómo determinar el tipo de conexión a Internet</a></li>
+ <li><a href="#MonitorChanges">Cómo supervisar los cambios en la conectividad</a></li>
+</ol>
+
+
+<h2>También puedes consultar:</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Intentos y filtros de intentos</a>
+</ul>
+
+</div>
+</div>
+
+<p>Algunos de los usos más comunes para las alarmas con repetición y los servicios en segundo plano es programar actualizaciones regulares de los datos de aplicaciones a partir de recursos de Internet, almacenar datos en la memoria caché o ejecutar descargas a largo plazo. Sin embargo, si no estás conectado a Internet o la conexión es demasiado débil para completar la descarga, ¿para qué activar el dispositivo y programar la actualización?</p>
+
+<p>Puedes utilizar {@link android.net.ConnectivityManager} para comprobar si estás conectado a Internet y, en ese caso, el tipo de conexión que estás utilizando.</p>
+
+
+<h2 id="DetermineConnection">Cómo determinar si tienes conexión a Internet</h2>
+
+<p>No es necesario programar una actualización basada en un recurso de Internet si no estás conectado. En el fragmento que aparece a continuación, se muestra cómo utilizar {@link android.net.ConnectivityManager} para consultar la red activa y determinar si hay conexión a Internet.</p>
+
+<pre>ConnectivityManager cm =
+ (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
+
+NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
+boolean isConnected = activeNetwork.isConnectedOrConnecting();</pre>
+
+
+<h2 id="DetermineType">Cómo determinar el tipo de conexión a Internet</h2>
+
+<p>También puedes determinar el tipo de conexión a Internet que hay disponible.</p>
+
+<p>El dispositivo se puede conectar a Internet a través de conexiones Ethernet, Wi-Fi, WiMAX y de datos móviles. Al consultar el tipo de red activa, como se muestra a continuación, puedes modificar la frecuencia de actualización en función del ancho de banda disponible.</p>
+
+<pre>boolean isWiFi = activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;</pre>
+
+<p>El coste de las conexiones de datos móviles suele ser superior al de las conexiones Wi-Fi, por lo que en la mayoría de los casos, la frecuencia de actualización de tu aplicación debería ser menor si utilizas conexiones móviles. Del mismo modo, las descargas grandes deberían cancelarse hasta que estés conectado a una red Wi-Fi.</p>
+
+<p>Cuando hayas inhabilitado las actualizaciones, es importante que detectes si se hay cambios en la conectividad para poder reanudarlas cuando se haya establecido una conexión a Internet.</p>
+
+
+<h2 id="MonitorChanges">Cómo supervisar los cambios en la conectividad</h2>
+
+<p>{@link android.net.ConnectivityManager} emite la acción {@link android.net.ConnectivityManager#CONNECTIVITY_ACTION} ({@code "android.net.conn.CONNECTIVITY_CHANGE"}) cuando se han modificado los detalles de la conectividad. Puedes registrar un receptor de emisión en el archivo de manifiesto para detectar estos cambios y reanudar (o cancelar) las actualizaciones en segundo plano según corresponda.</p>
+
+<pre>&lt;action android:name="android.net.conn.CONNECTIVITY_CHANGE"/></pre>
+
+<p>Los cambios en la conectividad de un dispositivo pueden ser muy frecuentes (esta emisión se activa siempre que cambias de una conexión de datos móviles a una conexión Wi-Fi). Como resultado, te recomendamos que supervises esta emisión únicamente cuando hayas cancelado anteriormente las actualizaciones o las descargas para reanudarlas. Normalmente, basta con comprobar la conexión a Internet antes de iniciar una actualización y, si no hay ninguna, cancelar el resto de actualizaciones hasta que se restablezca la conexión.</p>
+
+<p>Esta técnica requiere que alternes receptores de emisión que hayas declarado en el archivo de manifiesto, que se describe en la próxima sección.</p>
diff --git a/docs/html/intl/es/training/monitoring-device-state/docking-monitoring.jd b/docs/html/intl/es/training/monitoring-device-state/docking-monitoring.jd
new file mode 100644
index 000000000000..d6122811e422
--- /dev/null
+++ b/docs/html/intl/es/training/monitoring-device-state/docking-monitoring.jd
@@ -0,0 +1,74 @@
+page.title=Cómo determinar y controlar el tipo de conector y el estado de la conexión
+parent.title=Cómo optimizar la duración de la batería
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Cómo controlar el nivel de batería y el estado de carga
+previous.link=battery-monitoring.html
+next.title=Cómo determinar y controlar el estado de la conectividad
+next.link=connectivity-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>En esta sección puedes aprender:</h2>
+<ol>
+ <li><a href="#CurrentDockState">Cómo solicitar el foco de audio</a></li>
+ <li><a href="#DockType">Cómo determinar el tipo de conector actual</a></li>
+ <li><a href="#MonitorDockState">Cómo supervisar los cambios en el tipo de conector o en el estado del mismo</a></li>
+</ol>
+
+
+<h2>También puedes consultar:</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Intentos y filtros de intentos</a>
+</ul>
+
+</div>
+</div>
+
+<p>Los dispositivos Android se pueden conectar a distintos tipos de conectores. Por ejemplo, se puede utilizar conectores para coche o domésticos y tanto digitales como analógicos. Normalmente, el estado del conector está vinculado al estado de carga, ya que muchos conectores cargan el dispositivo mientras está conectado.</p>
+
+<p>El modo en el que el estado del conector del teléfono afecta a la frecuencia de actualización depende de tu aplicación. Puedes aumentar la frecuencia de actualización de una aplicación sobre noticias cuando el dispositivo esté conectado a un conector de escritorio o inhabilitar las actualizaciones completamente si está conectado a un conector de coche. Por el contrario, puedes maximizar las actualizaciones si el dispositivo está conectado a un conector de coche y tu servicio en segundo plano se actualiza con el estado del tráfico.</p>
+
+<p>El estado del conector se emite también como un {@link android.content.Intent} persistente, lo que te permite consultar si el dispositivo está conectado o no y, si lo está, determinar el tipo de conector.</p>
+
+
+<h2 id="CurrentDockState">Cómo determinar el estado de conexión actual</h2>
+
+<p>La información sobre el estado del conector se incluye como información adicional en una emisión persistente de la acción {@link android.content.Intent#ACTION_DOCK_EVENT}. Por ello, no es necesario registrar un {@link android.content.BroadcastReceiver}. Solo tienes que ejecutar {@link android.content.Context#registerReceiver registerReceiver()} transmitiendo {@code null} como el receptor de emisión, como se muestra en el fragmento de código que aparece a continuación.</p>
+
+<pre>IntentFilter ifilter = new IntentFilter(Intent.ACTION_DOCK_EVENT);
+Intent dockStatus = context.registerReceiver(null, ifilter);</pre>
+
+<p>Puedes extraer el estado actual de la conexión de la información adicional de {@code EXTRA_DOCK_STATE}:<p>
+
+<pre>int dockState = battery.getIntExtra(EXTRA_DOCK_STATE, -1);
+boolean isDocked = dockState != Intent.EXTRA_DOCK_STATE_UNDOCKED;</pre>
+
+
+<h2 id="DockType">Cómo determinar el tipo de conector actual</h2>
+
+<p>Si un dispositivo está insertado en un conector, se puede conectar a cualquiera de estos cuatro tipos de conectores:
+<ul><li>coche,</li>
+<li>escritorio,</li>
+<li>escritorio de gama baja (analógico),</li>
+<li>escritorio de gama alta (digital).</li></ul></p>
+
+<p>Ten en cuenta que las últimas dos opciones se introdujeron en Android únicamente en el nivel 11 del API. Por ello, te recomendamos que compruebes las tres opciones solo cuando te interese más el tipo de conector que si se trata de un conector digital o analógico:</p>
+
+<pre>boolean isCar = dockState == EXTRA_DOCK_STATE_CAR;
+boolean isDesk = dockState == EXTRA_DOCK_STATE_DESK ||
+ dockState == EXTRA_DOCK_STATE_LE_DESK ||
+ dockState == EXTRA_DOCK_STATE_HE_DESK;</pre>
+
+
+<h2 id="MonitorDockState">Cómo supervisar los cambios en el tipo de conector o en el estado del mismo</h2>
+
+<p>Cuando el dispositivo está conectado a un conector o desconectado del mismo, se emite la acción {@link android.content.Intent#ACTION_DOCK_EVENT}. Para controlar los cambios que se produzcan en el estado del conector del dispositivo, solo tienes que registrar un receptor de emisión en el archivo de manifiesto de la aplicación, como se muestra en el fragmento que aparece a continuación:</p>
+
+<pre>&lt;action android:name="android.intent.action.ACTION_DOCK_EVENT"/></pre>
+
+<p>Puedes extraer el estado y el tipo de conector en la implementación del receptor con las mismas técnicas que se han descrito en el paso anterior.</p>
diff --git a/docs/html/intl/es/training/monitoring-device-state/index.jd b/docs/html/intl/es/training/monitoring-device-state/index.jd
new file mode 100644
index 000000000000..bf6b1c1e7091
--- /dev/null
+++ b/docs/html/intl/es/training/monitoring-device-state/index.jd
@@ -0,0 +1,49 @@
+page.title=Cómo optimizar la duración de la batería
+
+trainingnavtop=true
+startpage=true
+next.title=Cómo controlar el nivel de batería y el estado de carga
+next.link=battery-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>Dependencias y requisitos previos</h2>
+<ul>
+ <li>Android 2.0 (nivel 5 del API) o superior</li>
+ <li>Experiencia con <a href="{@docRoot}guide/components/intents-filters.html">Intentos y filtros de intentos</a></li>
+</ul>
+
+<h2>También puedes consultar:</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/services.html">Servicios</a>
+</ul>
+
+</div>
+</div>
+
+<p>Uno de los objetivos de tu aplicación debe ser limitar su impacto en la duración de la batería del dispositivo en el que esté instalada. Después de leer estas secciones, podrás desarrollar aplicaciones que optimizarán el uso de la batería en función del estado del dispositivo en el que estén instaladas.</p>
+
+<p>Al tomar medidas como inhabilitar las actualizaciones de servicios en segundo plano o disminuir la frecuencia de dichas actualizaciones cuando el nivel de batería sea bajo, puedes garantizar que se minimice el impacto de tu aplicación en la duración de la batería sin afectar a la experiencia del usuario.</p>
+
+<h2>Secciones</h2>
+
+<!-- Create a list of the lessons in this class along with a short description of each lesson.
+These should be short and to the point. It should be clear from reading the summary whether someone
+will want to jump to a lesson or not.-->
+
+<dl>
+ <dt><b><a href="battery-monitoring.html">Cómo controlar el nivel de batería y el estado de carga</a></b></dt>
+ <dd>Obtén más información sobre cómo determinar y controlar el nivel de batería actual y los cambios en el estado de carga para modificar la frecuencia de actualizaciones en segundo plano de tu aplicación.</dd>
+
+ <dt><b><a href="docking-monitoring.html">Cómo determinar y controlar el tipo de conector y el estado de la conexión</a></b></dt>
+ <dd>La frecuencia de actualización óptima puede variar en función de cómo se utilice el dispositivo en el que está instalada la aplicación. Obtén más información sobre cómo determinar y controlar cuándo el dispositivo está conectado a algún sistema de acoplamiento u otra conexión.</dd>
+
+ <dt><b><a href="connectivity-monitoring.html">Cómo determinar y controlar el estado de la conectividad</a></b></dt>
+ <dd>Si no tienes conexión a Internet, no puedes actualizar tu aplicación a partir de una fuente online. Obtén más información sobre cómo comprobar el estado de la conectividad para modificar la frecuencia de actualización en segundo plano de tu aplicación. También puedes obtener más información sobre cómo comprobar la conectividad móvil o Wi-Fi antes de iniciar operaciones que requieran un nivel elevado de ancho de banda.</dd>
+
+ <dt><b><a href="manifest-receivers.html">Cómo manipular los receptores de emisión bajo demanda</a></b></dt>
+ <dd>Los receptores de emisión que declaras en el archivo de manifiesto se pueden alternar durante la ejecución para inhabilitar los que no son necesarios debido al estado actual del dispositivo. Obtén más información sobre cómo alternar y superponer receptores de cambio de estado para mejorar el rendimiento y cómo posponer acciones hasta que el dispositivo se encuentre en un estado concreto.</dd>
+</dl> \ No newline at end of file
diff --git a/docs/html/intl/es/training/monitoring-device-state/manifest-receivers.jd b/docs/html/intl/es/training/monitoring-device-state/manifest-receivers.jd
new file mode 100644
index 000000000000..a90468e37336
--- /dev/null
+++ b/docs/html/intl/es/training/monitoring-device-state/manifest-receivers.jd
@@ -0,0 +1,50 @@
+page.title=Cómo manipular los receptores de emisión bajo demanda
+parent.title=Cómo optimizar la duración de la batería
+parent.link=index.html
+
+trainingnavtop=true
+
+previous.title=Cómo determinar y controlar el estado de la conectividad
+previous.link=connectivity-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>En esta sección puedes aprender:</h2>
+<ol>
+ <li><a href="#ToggleReceivers">Cómo alternar y superponer receptores de cambio de estado para mejorar el rendimiento</a></li>
+</ol>
+
+
+<h2>También puedes consultar:</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Intentos y filtros de intentos</a>
+</ul>
+
+</div>
+</div>
+
+<p>La forma más sencilla de controlar los cambios en el estado del dispositivo es crear un {@link android.content.BroadcastReceiver} para cada estado que vayas a controlar y registrar cada uno de ellos en el archivo de manifiesto de tu aplicación. A continuación, en cada uno de esos receptores solo tienes que volver a programar las alarmas recurrentes en función del estado actual del dispositivo.</p>
+
+<p>Un efecto secundario de este método es que tu aplicación activará el dispositivo siempre que uno de los receptores se active (probablemente, con más frecuencia de la necesaria).</p>
+
+<p>Te recomendamos que inhabilites o habilites los receptores de emisión en el momento de la ejecución. De este modo, puedes utilizar los receptores que hayas declarado en el archivo de manifiesto como alarmas pasivas que se activan mediante los eventos del sistema solo cuando es necesario.</p>
+
+
+<h2 id="ToggleReceivers">Cómo alternar y superponer receptores de cambio de estado para mejorar el rendimiento </h2>
+
+<p>Se puede utilizar el {@link android.content.pm.PackageManager} para alternar el estado habilitado en cualquier componente definido en el archivo de manifiesto, incluidos los receptores de emisión que quieras habilitar o inhabilitar, como se muestra en el fragmento que aparece a continuación:</p>
+
+<pre>ComponentName receiver = new ComponentName(context, myReceiver.class);
+
+PackageManager pm = context.getPackageManager();
+
+pm.setComponentEnabledSetting(receiver,
+ PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
+ PackageManager.DONT_KILL_APP)</pre>
+
+<p>Al utilizar esta técnica, si determinas que la conectividad se ha perdido, puedes inhabilitar todos los receptores excepto el receptor de cambio de conectividad. Por el contrario, cuando estés conectado, puedes dejar de detectar cambios de conectividad y solo comprobar si tienes conexión antes de realizar una actualización y de volver a programar una alarma de actualización recurrente.</p>
+
+<p>Puedes utilizar la misma técnica para posponer una descarga que requiera un nivel de ancho de banda superior para completarse. Solo tienes que habilitar un receptor de emisión que detecte los cambios de conectividad y que inicie la descarga solo cuando estés conectado a una red Wi-Fi.</p>
diff --git a/docs/html/intl/es/training/multiscreen/adaptui.jd b/docs/html/intl/es/training/multiscreen/adaptui.jd
new file mode 100644
index 000000000000..61f0735bc409
--- /dev/null
+++ b/docs/html/intl/es/training/multiscreen/adaptui.jd
@@ -0,0 +1,212 @@
+page.title=Cómo implementar interfaces de usuario adaptables
+parent.title=Cómo diseñar aplicaciones para varias pantallas
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Cómo admitir varias densidades de pantalla
+previous.link=screendensities.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>En esta sección puedes aprender:</h2>
+
+<ol>
+ <li><a href="#TaskDetermineCurLayout">Cómo determinar el diseño actual</a></li>
+ <li><a href="#TaskReactToLayout">Cómo reaccionar en función del diseño actual</a></li>
+ <li><a href="#TaskReuseFrag">Cómo volver a utilizar fragmentos en otras actividades</a></li>
+ <li><a href="#TaskHandleConfigChanges">Cómo gestionar los cambios en la configuración de la pantalla</a></li>
+</ol>
+
+<h2>También puedes consultar:</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/tablets-and-handsets.html">Cómo admitir tablets y dispositivos móviles</a></li>
+</ul>
+
+<h2>¡Pruébalo!</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">Descargar la aplicación de ejemplo</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+
+</div>
+</div>
+
+<p>En función del diseño actual de tu aplicación, la interfaz puede variar. Por ejemplo, si tu aplicación está en modo de panel dual, haz clic en un elemento del panel izquierdo para que aparezca en el panel de la derecha. Asimismo, si está en modo de panel único, el contenido debería aparecer por sí mismo (en otra actividad).</p>
+
+
+<h2 id="TaskDetermineCurLayout">Cómo determinar el diseño actual</h2>
+
+<p>Dado que la implementación de cada diseño variará en cierta medida, probablemente una de las primeras cosas que tendrás que hacer será determinar el diseño que el usuario puede ver en ese momento. Por ejemplo, puedes determinar si el usuario utiliza el modo de "panel único" o de "panel dual". Para ello, puedes consultar si una vista determinada existe y es visible:</p>
+
+<pre class="prettyprint">
+public class NewsReaderActivity extends FragmentActivity {
+ boolean mIsDualPane;
+
+ &#64;Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main_layout);
+
+ View articleView = findViewById(R.id.article);
+ mIsDualPane = articleView != null &amp;&amp;
+ articleView.getVisibility() == View.VISIBLE;
+ }
+}
+</pre>
+
+<p>Ten en cuenta que este código consulta la disponibilidad del panel del "artículo", lo que es mucho más flexible que incluir una consulta para un diseño determinado.</p>
+
+<p>Otro ejemplo de cómo puedes adaptar la existencia de diferentes componentes es comprobar su disponibilidad antes de realizar una operación relacionada con los mismos. Por ejemplo, en la aplicación de ejemplo News Reader, hay un botón que abre un menú, pero ese botón solo aparece en las versiones anteriores a Android 3.0 (porque <PH>{@link android.app.ActionBar}</PH> en el nivel 11 del API y en niveles superiores). Por tanto, para añadir el detector de eventos para este botón, puedes hacer lo siguiente:</p>
+
+<pre class="prettyprint">
+Button catButton = (Button) findViewById(R.id.categorybutton);
+OnClickListener listener = /* create your listener here */;
+if (catButton != null) {
+ catButton.setOnClickListener(listener);
+}
+</pre>
+
+
+<h2 id="TaskReactToLayout">Cómo reaccionar en función del diseño actual</h2>
+
+<p>El resultado de algunas acciones puede variar en función del diseño actual. Por ejemplo, en el ejemplo de News Reader, al hacer clic en un encabezado de la lista se abrirá el artículo del panel situado a la derecha si la interfaz de usuario está en modo de panel dual, pero se iniciará una actividad independiente si esta está en modo de panel único:</p>
+
+<pre>
+&#64;Override
+public void onHeadlineSelected(int index) {
+ mArtIndex = index;
+ if (mIsDualPane) {
+ /* display article on the right pane */
+ mArticleFragment.displayArticle(mCurrentCat.getArticle(index));
+ } else {
+ /* start a separate activity */
+ Intent intent = new Intent(this, ArticleActivity.class);
+ intent.putExtra("catIndex", mCatIndex);
+ intent.putExtra("artIndex", index);
+ startActivity(intent);
+ }
+}
+</pre>
+
+<p>De igual modo, si la aplicación está en modo de panel dual, debe configurar la barra de acción con pestañas para la navegación, mientras que si la aplicación está en modo de panel único, debe configurar la navegación con un widget giratorio. Por tanto, el código debe comprobar también cuál es el caso adecuado:</p>
+
+<pre>
+final String CATEGORIES[] = { "Top Stories", "Politics", "Economy", "Technology" };
+
+public void onCreate(Bundle savedInstanceState) {
+ ....
+ if (mIsDualPane) {
+ /* use tabs for navigation */
+ actionBar.setNavigationMode(android.app.ActionBar.NAVIGATION_MODE_TABS);
+ int i;
+ for (i = 0; i &lt; CATEGORIES.length; i++) {
+ actionBar.addTab(actionBar.newTab().setText(
+ CATEGORIES[i]).setTabListener(handler));
+ }
+ actionBar.setSelectedNavigationItem(selTab);
+ }
+ else {
+ /* use list navigation (spinner) */
+ actionBar.setNavigationMode(android.app.ActionBar.NAVIGATION_MODE_LIST);
+ SpinnerAdapter adap = new ArrayAdapter<String>(this,
+ R.layout.headline_item, CATEGORIES);
+ actionBar.setListNavigationCallbacks(adap, handler);
+ }
+}
+</pre>
+
+
+<h2 id="TaskReuseFrag">Cómo volver a utilizar fragmentos en otras actividades</h2>
+
+<p>Un patrón recurrente a la hora de diseñar para distintas pantallas es utilizar una parte de la interfaz que se implementa como un panel en algunas configuraciones de pantalla y como actividad independiente en otras. Por ejemplo, en el ejemplo de News Reader, el texto del artículo de noticias se presenta en el panel de la derecha en las pantallas grandes, pero es una actividad independiente en las pantallas más pequeñas.</p>
+
+<p>En otros casos similares, puedes evitar la duplicación de código reutilizando la misma <PH>{@link android.app.Fragment}</PH> en distintas actividades. Por ejemplo, <code>ArticleFragment</code> se utiliza en el diseño de panel dual:</p>
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+
+<p>A continuación, se vuelve a utilizar (sin diseño) en el diseño de actividad para pantallas más pequeñas (<code>ArticleActivity</code>):</p>
+
+<pre>
+ArticleFragment frag = new ArticleFragment();
+getSupportFragmentManager().beginTransaction().add(android.R.id.content, frag).commit();
+</pre>
+
+<p>Evidentemente, esto tiene el mismo efecto que declarar el fragmento en un diseño XML. Sin embargo, en este caso, un diseño XML sería un trabajo innecesario porque el fragmento del artículo es el único componente de esta actividad.</p>
+
+<p>Un punto muy importante que debes tener en cuenta al diseñar tus fragmentos es no crear un acoplamiento fuerte para una actividad determinada. Para ello, normalmente puedes definir una interfaz que resuma todas las formas en las que tiene que interactuar el fragmento con su actividad principal y, a continuación, la actividad principal implementa esa interfaz:</p>
+
+<p>Por ejemplo, ese es precisamente el objetivo del <code>HeadlinesFragment</code> de la aplicación News Reader:</p>
+
+<pre>
+public class HeadlinesFragment extends ListFragment {
+ ...
+ OnHeadlineSelectedListener mHeadlineSelectedListener = null;
+
+ /* Must be implemented by host activity */
+ public interface OnHeadlineSelectedListener {
+ public void onHeadlineSelected(int index);
+ }
+ ...
+
+ public void setOnHeadlineSelectedListener(OnHeadlineSelectedListener listener) {
+ mHeadlineSelectedListener = listener;
+ }
+}
+</pre>
+
+<p>A continuación, cuando el usuario selecciona un encabezado, el fragmento notifica el detector especificado por la actividad principal (en lugar de notificar una actividad predefinida específica):</p>
+
+<pre>
+public class HeadlinesFragment extends ListFragment {
+ ...
+ &#64;Override
+ public void onItemClick(AdapterView&lt;?&gt; parent,
+ View view, int position, long id) {
+ if (null != mHeadlineSelectedListener) {
+ mHeadlineSelectedListener.onHeadlineSelected(position);
+ }
+ }
+ ...
+}
+</pre>
+
+<p>Si quieres obtener más información sobre esta técnica, puedes consultar la guía sobre <a
+href="{@docRoot}guide/practices/tablets-and-handsets.html">Cómo admitir tablets y dispositivos móviles</a>.</p>
+
+
+<h2 id="TaskHandleConfigChanges">Cómo gestionar los cambios en la configuración de la pantalla</h2>
+
+<p>Si utilizas actividades independientes para implementar partes individuales de tu interfaz, debes tener en cuenta que es posible que tengas que reaccionar ante determinados cambios en la configuración (como un cambio de rotación) para mantener la homogeneidad de tu interfaz.</p>
+
+<p>Por ejemplo, en un tablet de 7" que utilice Android 3.0 o una versión superior, el ejemplo de News Reader utiliza una actividad independiente para mostrar el artículo de noticias en el modo vertical, pero utiliza el diseño de panel dual en el modo horizontal.</p>
+
+<p>Esto significa que cuando el usuario utiliza el modo vertical y está consultando un artículo, tienes que detectar que la orientación ha cambiado al modo horizontal y reaccionar de forma adecuada finalizando la actividad. A continuación, debes volver a la actividad principal para que el contenido pueda mostrarse en el diseño de panel dual:</p>
+
+<pre>
+public class ArticleActivity extends FragmentActivity {
+ int mCatIndex, mArtIndex;
+
+ &#64;Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ mCatIndex = getIntent().getExtras().getInt("catIndex", 0);
+ mArtIndex = getIntent().getExtras().getInt("artIndex", 0);
+
+ // If should be in two-pane mode, finish to return to main activity
+ if (getResources().getBoolean(R.bool.has_two_panes)) {
+ finish();
+ return;
+ }
+ ...
+}
+</pre>
+
+
diff --git a/docs/html/intl/es/training/multiscreen/index.jd b/docs/html/intl/es/training/multiscreen/index.jd
new file mode 100644
index 000000000000..0a1461b12cdc
--- /dev/null
+++ b/docs/html/intl/es/training/multiscreen/index.jd
@@ -0,0 +1,63 @@
+page.title=Cómo diseñar aplicaciones para varias pantallas
+trainingnavtop=true
+startpage=true
+next.title=Cómo admitir varios tamaños de pantalla
+next.link=screensizes.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>Dependencias y requisitos previos</h2>
+
+<ul>
+ <li>Android 1.6 o superior (Android 2.1 o superior para la aplicación de ejemplo)</li>
+ <li>Conocimiento básico de <a
+href="http://developer.android.com/guide/components/activities.html">Actividades</a> y <a href="http://developer.android.com/guide/components/fragments.html">Fragmentos</a></li>
+ <li>Experiencia en el desarrollo de una <a
+href="http://developer.android.com/guide/topics/ui/index.html">Interfaz de usuario</a> de Android</li>
+ <li>Algunas funciones requieren el uso de la <a
+href="{@docRoot}tools/extras/support-library.html">biblioteca de compatibilidad</a></li>
+</ul>
+
+<h2>También puedes consultar:</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">Cómo admitir varias pantallas</a></li>
+</ul>
+
+<h2>¡Pruébalo!</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">Descargar la aplicación de ejemplo</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>Android se utiliza en cientos de dispositivos con diferentes tamaños de pantalla, desde pequeños teléfonos hasta enormes televisores. Por ello, es importante que diseñes tu aplicación para que sea compatible con todos los tamaños de pantalla y esté disponible para el mayor número de usuarios posible.</p>
+
+<p>Sin embargo, no es suficiente con que tu aplicación sea compatible con diferentes dispositivos. Cada tamaño de pantalla ofrece diferentes posibilidades y retos para la interacción del usuario. Por ello, para satisfacer completamente a tus usuarios e impresionarlos, tu aplicación debe ir más allá de simplemente <em>admitir</em> varias pantallas: debe <em>optimizar</em> la experiencia de usuario para cada configuración de pantalla.</p>
+
+<p>En esta sección se explica cómo implementar una interfaz de usuario que esté optimizada para diferentes configuraciones de pantalla.</p>
+
+<p>El código que aparece en cada sección se ha extraído de una aplicación de ejemplo para explicar las prácticas recomendadas a la hora de optimizar tu aplicación para varias pantallas. Puedes descargar el ejemplo (situado a la derecha) y utilizarlo como fuente de código reutilizable para tu propia aplicación.</p>
+
+<p class="note"><strong>Nota:</strong> en esta sección y en el ejemplo correspondiente, se utiliza la <a
+href="{@docRoot}tools/extras/support-library.html">biblioteca de compatibilidad</a> para poder usar las API de <PH>{@link android.app.Fragment}</PH> en versiones anteriores a Android 3.0. Debes descargar y la biblioteca y añadirla a tu aplicación para poder utilizar todas las API que se indican en esta sección.</p>
+
+
+<h2>Secciones</h2>
+
+<dl>
+ <dt><b><a href="screensizes.html">Cómo admitir varios tamaños de pantalla</a></b></dt>
+ <dd>En esta sección se explica cómo crear diseños que se adapten a diferentes tamaños de pantalla (mediante dimensiones flexibles para vistas, <PH>{@link android.widget.RelativeLayout}</PH>, calificadores de orientación y tamaño de pantalla, filtros de alias y mapas de bits de la clase NinePatch).</dd>
+
+ <dt><b><a href="screendensities.html">Cómo admitir varias densidades de pantalla</a></b></dt>
+ <dd>En esta sección se explica cómo admitir pantallas con diferentes densidades de píxeles (mediante píxeles independientes de la densidad y mapas de bits adecuados a cada densidad).</dd>
+
+ <dt><b><a href="adaptui.html">Cómo implementar interfaces de usuario adaptables</a></b></dt>
+ <dd>En esta sección se explica cómo implementar tu interfaz de usuario para que se adapte a varias combinaciones de densidad o de tamaño de pantalla (detección de tiempo de ejecución del diseño activo, cómo reaccionar en función del diseño actual y cómo administrar los cambios en la configuración de la pantalla).</dd>
+</dl>
diff --git a/docs/html/intl/es/training/multiscreen/screendensities.jd b/docs/html/intl/es/training/multiscreen/screendensities.jd
new file mode 100644
index 000000000000..0edb89fd4707
--- /dev/null
+++ b/docs/html/intl/es/training/multiscreen/screendensities.jd
@@ -0,0 +1,100 @@
+page.title=Cómo admitir varias densidades de pantalla
+parent.title=Cómo diseñar aplicaciones para varias pantallas
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Cómo admitir varios tamaños de pantalla
+previous.link=screensizes.html
+next.title=Cómo implementar interfaces de usuario adaptables
+next.link=adaptui.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>En esta sección puedes aprender:</h2>
+<ol>
+ <li><a href="#TaskUseDP">Cómo utilizar píxeles independientes de la densidad</a></li>
+ <li><a href="#TaskProvideAltBmp">Cómo proporcionar mapas de bits alternativos</a></li>
+</ol>
+
+<h2>También puedes consultar:</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">Cómo admitir varias pantallas</a></li>
+ <li><a href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">Directrices para diseñar iconos</a></li>
+</ul>
+
+<h2>¡Pruébalo!</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">Descargar la aplicación de ejemplo</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+
+</div>
+</div>
+
+<p>En esta sección se explica cómo proporcionar diferentes recursos y utilizar unidades de medida de resolución independiente para admitir diferentes densidades de pantalla.</p>
+
+<h2 id="TaskUseDP">Cómo utilizar píxeles independientes de la densidad</h2>
+
+<p>Un error común que debes evitar al crear tus diseños es utilizar píxeles absolutos para definir distancias o tamaños. Definir dimensiones de diseño mediante píxeles es problemático porque cada pantalla tiene densidades de píxeles diferentes, por lo que es posible que el mismo número de píxeles corresponda a varios tamaños físicos en distintos dispositivos. Por tanto, al especificar dimensiones, debes utilizar siempre unidades <code>dp</code> o <code>sp</code>. <code>dp</code> es un píxel independiente de la densidad que corresponde al tamaño físico de un píxel a 160 dpi. <code>sp</code> es la misma unidad de base, pero aumentada en función del tamaño de letra preferido por el usuario (se trata de un píxel independiente de la escala). Por tanto, debes utilizar esta unidad de medida para definir el tamaño de letra (pero no para tamaños de diseños).</p>
+
+<p>Por ejemplo, al especificar un espacio entre dos vistas, debes utilizar <code>dp</code> en lugar de <code>px</code>:</p>
+
+<pre>
+&lt;Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="&#64;string/clickme"
+ android:layout_marginTop="20dp" /&gt;
+</pre>
+
+<p>Al especificar el tamaño de letra, debes usar siempre <code>sp</code>:</p>
+
+<pre>
+&lt;TextView android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="20sp" /&gt;
+</pre>
+
+
+<h2 id="TaskProvideAltBmp">Cómo proporcionar mapas de bits alternativos</h2>
+
+<p>Dado que Android se ejecuta en dispositivos con diferentes densidades de pantalla, siempre debes proporcionar tus recursos de mapas de bits adaptados a los conjuntos de densidades generalizados: baja, media, alta y muy alta. De este modo, podrás conseguir un rendimiento y una calidad gráfica óptimos en todas las densidades de pantalla.</p>
+
+<p>Para generar estas imágenes, debes empezar con tu recurso genérico en formato vectorial y generar las imágenes para cada densidad con la siguiente escala de tamaños:</p>
+
+<p><ul>
+ <li><code>xhdpi</code>: 2,0
+ <li><code>hdpi</code>: 1,5
+ <li><code>mdpi</code>: 1.0 (base)
+ <li><code>ldpi</code>: 0,75
+</ul></p>
+
+<p>Esto significa que si generas una imagen de 200 x 200 para dispositivos <code>xhdpi</code>, debes generar el mismo recurso en 150 x 150 para <code>hdpi</code>, en 100 x 100 para <code>mdpi</code> y, por último, una imagen de 75 x 75 para dispositivos <code>ldpi</code>.</p>
+
+<p>A continuación, sitúa los archivos de imagen generados en el subdirectorio adecuado en <code>res/</code> y el sistema seleccionará el archivo correspondiente automáticamente en función de la densidad de la pantalla del dispositivo en el que se esté ejecutando la aplicación:</p>
+
+<pre class="classic no-pretty-print">
+MyProject/
+ res/
+ drawable-xhdpi/
+ awesomeimage.png
+ drawable-hdpi/
+ awesomeimage.png
+ drawable-mdpi/
+ awesomeimage.png
+ drawable-ldpi/
+ awesomeimage.png
+</pre>
+
+<p>Por tanto, cada vez que hagas referencia a <code>&#64;drawable/awesomeimage</code>, el sistema seleccionará el mapa de bits adecuado en función de los puntos por pulgada de la pantalla.</p>
+
+<p>Para consultar más sugerencias y directrices sobre cómo crear recursos de iconos para tu aplicación, consulta la sección <a
+href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">Directrices para diseñar iconos</a>.</p>
+
diff --git a/docs/html/intl/es/training/multiscreen/screensizes.jd b/docs/html/intl/es/training/multiscreen/screensizes.jd
new file mode 100644
index 000000000000..9a971d1c000c
--- /dev/null
+++ b/docs/html/intl/es/training/multiscreen/screensizes.jd
@@ -0,0 +1,279 @@
+page.title=Cómo admitir varios tamaños de pantalla
+parent.title=Cómo diseñar aplicaciones para varias pantallas
+parent.link=index.html
+
+trainingnavtop=true
+next.title=Cómo admitir varias densidades de pantalla
+next.link=screendensities.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>En esta sección puedes aprender:</h2>
+<ol>
+ <li><a href="#TaskUseWrapMatchPar">Cómo utilizar los valores "wrap_content" y "match_parent"</a></li>
+ <li><a href="#TaskUseRelativeLayout">Cómo utilizar RelativeLayout</a></li>
+ <li><a href="#TaskUseSizeQuali">Cómo utilizar calificadores de tamaño</a></li>
+ <li><a href="#TaskUseSWQuali">Cómo utilizar el calificador de ancho más pequeño</a></li>
+ <li><a href="#TaskUseAliasFilters">Cómo utilizar alias de diseño</a></li>
+ <li><a href="#TaskUseOriQuali">Cómo utilizar calificadores de orientación</a></li>
+ <li><a href="#TaskUse9Patch">Cómo utilizar mapas de bits de la clase NinePatch</a></li>
+</ol>
+
+<h2>También puedes consultar:</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">Cómo admitir varias pantallas</a></li>
+</ul>
+
+<h2>¡Pruébalo!</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">Descargar la aplicación de ejemplo</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>En esta sección se explica cómo admitir varios tamaños de pantalla. Para ello, sigue estos pasos:</p>
+<ul>
+ <li>Asegúrate de que el diseño se haya ajustado correctamente al tamaño de la pantalla.</li>
+ <li>Configura la pantalla con el diseño de interfaz adecuado.</li>
+ <li>Asegúrate de aplicar el diseño adecuado a la pantalla correspondiente.</li>
+ <li>Utiliza el mapa de bits con la escala adecuada.</li>
+</ul>
+
+
+<h2 id="TaskUseWrapMatchPar">Cómo utilizar los valores "wrap_content" y "match_parent"</h2>
+
+<p>Para garantizar que el diseño es flexible y que se adapta a varios tamaños de pantalla, debes utilizar los valores <code>"wrap_content"</code> y <code>"match_parent"</code> para la altura y el ancho de algunos componentes de la vista. Si utilizas <code>"wrap_content"</code>, el ancho o la altura de la vista se establece en el tamaño mínimo necesario para adaptar el contenido a esta vista, mientras que <code>"match_parent"</code> (también conocido como <code>"fill_parent"</code> antes del nivel 8 del API) provoca que el componente se amplíe hasta coincidir con el tamaño de la vista principal.</p>
+
+<p>Al utilizar los valores de tamaño <code>"wrap_content"</code> y <code>"match_parent"</code> en lugar de los tamaños predefinidos, las vistas pueden utilizar únicamente el espacio requerido para esa vista o ampliarse hasta rellenar el espacio disponible respectivamente. Por ejemplo:</p>
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
+
+<p>Observa cómo se utilizan en el ejemplo los valores <code>"wrap_content"</code> y <code>"match_parent"</code> para los tamaños de los componentes en lugar de dimensiones específicas. Esto permite que el diseño se adapte correctamente a diferentes tamaños y orientaciones de la pantalla.</p>
+
+<p>Por ejemplo, esta es la apariencia del diseño en modo horizontal y vertical. Ten en cuenta que los tamaños de los componentes se adaptan automáticamente a la altura y al ancho:</p>
+
+<img src="{@docRoot}images/training/layout-hvga.png" />
+<p class="img-caption"><strong>Figura 1.</strong> La aplicación de ejemplo News Reader en modo vertical (izquierda) y horizontal (derecha)</p>
+
+
+<h2 id="TaskUseRelativeLayout">Cómo utilizar RelativeLayout</h2>
+
+<p>Puedes crear diseños de un cierto nivel de complejidad con instancias anidadas de <PH>{@link android.widget.LinearLayout}</PH> y combinaciones de los valores de tamaño <code>"wrap_content"</code> y <code>"match_parent"</code>. Sin embargo, <PH>{@link android.widget.LinearLayout}</PH> no te permite controlar con precisión las relaciones espaciales de las vistas secundarias; las vistas de <PH>{@link android.widget.LinearLayout}</PH> simplemente se alinean en paralelo. Si quieres orientar las vistas secundarias de una forma que no sea una línea recta, a menudo la mejor solución es utilizar <PH>{@link android.widget.RelativeLayout}</PH>que te permite especificar el diseño según las relaciones espaciales entre los componentes. Por ejemplo, puedes alinear una vista secundaria en el lateral izquierdo y otra vista en el lateral derecho de la pantalla.</p>
+
+<p>Por ejemplo:</p>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"&gt;
+ &lt;TextView
+ android:id="&#64;+id/label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/&gt;
+ &lt;EditText
+ android:id="&#64;+id/entry"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="&#64;id/label"/&gt;
+ &lt;Button
+ android:id="&#64;+id/ok"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="&#64;id/entry"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10dp"
+ android:text="OK" /&gt;
+ &lt;Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="&#64;id/ok"
+ android:layout_alignTop="&#64;id/ok"
+ android:text="Cancel" /&gt;
+&lt;/RelativeLayout&gt;
+</pre>
+
+<p>La figura 2 indica cómo se muestra este diseño en una pantalla QVGA.</p>
+
+<img src="{@docRoot}images/training/relativelayout1.png" />
+<p class="img-caption"><strong>Figura 2.</strong> Captura de pantalla de una pantalla QVGA (pantalla pequeña)</p>
+
+<p>La figura 3 indica cómo se muestra este diseño en una pantalla más grande.</p>
+
+<img src="{@docRoot}images/training/relativelayout2.png" />
+<p class="img-caption"><strong>Figura 3.</strong> Captura de pantalla de una pantalla WSVGA (pantalla grande)</p>
+
+<p>Ten en cuenta que aunque el tamaño de los componentes es diferente, las relaciones espaciales se mantienen según se ha especificado con <PH>{@link android.widget.RelativeLayout.LayoutParams}</PH>.</p>
+
+
+<h2 id="TaskUseSizeQuali">Cómo utilizar calificadores de tamaño</h2>
+
+<p>Hay mucha diferencia entre un diseño flexible y un diseño relativo como el que se ha utilizado en las secciones anteriores. Aunque ambos diseños se adaptan a diferentes pantalla estirando el espacio dentro de los componentes y alrededor de los mismos, puede que no ofrezcan la mejor experiencia de usuario para cada tamaño de pantalla. Por tanto, tu aplicación no solo debe implementar los diseños flexibles, sino que también debe ofrecer varios diseños alternativos para diferentes configuraciones de pantalla. Para ello, se utilizan <a href="http://developer.android.com/guide/practices/screens_support.html#qualifiers">calificadores de configuración</a>, que permiten que el tiempo de ejecución seleccione el recurso adecuado en función de la configuración actual del dispositivo (por ejemplo, un diseño diferente para diferentes tamaños de pantalla).</p>
+
+<p>Por ejemplo, muchas aplicaciones implementan el patrón de "panel dual" para pantallas grandes (la aplicación mostraría una lista de elementos en un panel y el contenido en otro panel). Aunque los tablets y las televisiones son lo suficientemente grandes como para que los dos paneles aparezcan simultáneamente en la pantalla, las pantallas de los teléfonos tienen que mostrarlos por separado. Para implementar estos diseños, puedes utilizar los siguientes archivos:</p>
+
+<ul>
+ <li><code>res/layout/main.xml</code>, diseño de panel único (predeterminado):
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+</li>
+ <li><code>res/layout-large/main.xml</code>, diseño de panel dual:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+</li>
+</ul>
+
+<p>Observa el calificador <code>large</code> en el nombre de directorio del segundo diseño. Este diseño se seleccionará en dispositivos con pantallas clasificadas como grandes (por ejemplo, tablets de 7" y superiores). El otro diseño (sin calificadores) se seleccionará en el caso de dispositivos más pequeños.</p>
+
+
+<h2 id="TaskUseSWQuali">Cómo utilizar el calificador de ancho mínimo</h2>
+
+<p>Una de las dificultades a las que se enfrentaron los desarrolladores con los dispositivos Android anteriores a la versión 3.2 fue el contenedor de tamaño de pantalla "grande". Algunos ejemplos de este tipo de dispositivo son el tablet Dell Streak, el tablet Galaxy Tab original y los tablets de 7" en general. Sin embargo, es posible que muchas aplicaciones quieran mostrar varios diseños para diferentes dispositivos de esta categoría (por ejemplo, para dispositivos de 5" y de 7"), aunque todos estos dispositivos se consideren de pantalla grande. Por esta razón, Android introdujo el calificador de "ancho mínimo" (entre otros) en Android 3.2.</p>
+
+<p>Este calificador te permite mostrar contenido en pantallas que tengan un ancho mínimo determinado en píxeles independientes de la densidad. Por ejemplo, el tablet típico de 7" tiene un ancho mínimo de 600 dp, por lo que si quieres que la interfaz de usuario sea de panel dual en esta pantalla (y una única lista en pantallas más pequeñas), puedes utilizar los mismos dos diseños de la sección anterior para los diseños de panel único y de panel dual, solo que en lugar de utilizar el calificador de tamaño <code>large</code>, debes utilizar <code>sw600dp</code> para indicar que el diseño de panel dual se utiliza con las pantallas cuyo ancho mínimo sea de 600 dp:</p>
+
+<ul>
+ <li><code>res/layout/main.xml</code>, diseño de panel único (predeterminado):
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+</li>
+ <li><code>res/layout-sw600dp/main.xml</code>, diseño de panel dual:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+</li>
+</ul>
+
+<p>Esto significa que los dispositivos cuyo ancho mínimo sea igual o superior a 600 dp utilizarán el diseño <code>layout-sw600dp/main.xml</code> (panel dual), mientras que las pantallas más pequeñas utilizarán el diseño <code>layout/main.xml</code> (panel único).</p>
+
+<p>No obstante, esto no funcionará en los dispositivos anteriores a Android 3.2 porque no reconocen <code>sw600dp</code> como calificador de tamaño, por lo que también tendrás que seguir utilizando el calificador <code>large</code>. Por tanto, debes tener un archivo con el nombre <code>res/layout-large/main.xml</code> idéntico a <code>res/layout-sw600dp/main.xml</code>. En la siguiente sección, obtendrás información sobre una técnica que te permite evitar que se dupliquen los archivos de diseños.</p>
+
+
+<h2 id="TaskUseAliasFilters">Cómo utilizar alias de diseño</h2>
+
+<p>El calificador de ancho mínimo solo está disponible en Android 3.2 o superior. Por tanto, tendrás que seguir utilizando los contenedores de tamaño abstractos (pequeño, normal, grande y extragrande) para que sean compatibles con versiones anteriores. Por ejemplo, si quieres que tu interfaz de usuario sea de panel único en teléfonos pero multipanel en tablets de 7", televisiones y otros dispositivos grandes, tendrás que utilizar los siguientes archivos:</p>
+
+<p><ul>
+<li><code>res/layout/main.xml:</code> diseño de panel único,</li>
+<li><code>res/layout-large:</code> diseño multipanel,</li>
+<li><code>res/layout-sw600dp:</code> diseño multipanel.</li>
+</ul></p>
+
+<p>Los dos últimos archivos son idénticos porque uno de ellos se utilizará con dispositivos Android 3.2 y el otro con tablets y televisiones que utilicen versiones anteriores de Android.</p>
+
+<p>Para evitar la duplicación del mismo archivo para tablets y televisiones (así como todos los problemas que esto conlleva), puedes utilizar archivos alias. Por ejemplo, puedes establecer los siguientes diseños:</p>
+
+<ul>
+<li><code>res/layout/main.xml</code>: diseño de panel único,</li>
+<li><code>res/layout/main_twopanes.xml</code>: diseño de panel dual.</li>
+</ul>
+
+<p>Añade estos dos archivos:</p>
+
+<p><ul>
+<li><code>res/values-large/layout.xml</code>:
+<pre>
+&lt;resources>
+ &lt;item name="main" type="layout">&#64;layout/main_twopanes&lt;/item>
+&lt;/resources>
+</pre>
+</li>
+
+<li><code>res/values-sw600dp/layout.xml</code>:
+<pre>
+&lt;resources>
+ &lt;item name="main" type="layout">&#64;layout/main_twopanes&lt;/item>
+&lt;/resources>
+</pre>
+
+</li>
+</ul></p>
+
+<p>Estos dos últimos archivos tienen el mismo contenido, pero en realidad no definen el diseño. Solo configuran <PH>{@code main}</PH> para que sea un alias de <PH>{@code main_twopanes}</PH>. Como los archivos tienen selectores <code>large</code> y <code>sw600dp</code>, se aplican a tablets y a televisiones independientemente de la versión de Android (las televisiones y los tablets anteriores a la versión 3.2 utilizarán
+<PH>{@code large}</PH>y las televisiones y los tablets posteriores a la versión 3.2 utilizarán <code>sw600dp</code>).</p>
+
+
+<h2 id="TaskUseOriQuali">Cómo utilizar calificadores de orientación</h2>
+
+<p>Aunque algunos diseños se pueden utilizar tanto en modo horizontal como vertical, la mayoría de ellos pueden beneficiarse de los ajustes. A continuación, se indica cómo se comporta el diseño según cada tamaño y orientación de la pantalla en la aplicación de ejemplo News Reader:</p>
+
+<p><ul>
+<li><b>pantalla pequeña, vertical:</b> panel único con logotipo,</li>
+<li><b>pantalla pequeña, horizontal:</b> panel único con logotipo,</li>
+<li><b>tablet de 7", vertical:</b> panel único con barra de acciones,</li>
+<li><b>tablet de 7", horizontal:</b> panel dual ancho con barra de acciones,</li>
+<li><b>tablet de 10", vertical:</b> panel dual estrecho con barra de acciones,</li>
+<li><b>tablet de 10", horizontal:</b> panel dual ancho con barra de acciones,</li>
+<li><b>televisión, horizontal:</b> panel dual ancho con barra de acciones.</li>
+</ul></p>
+
+<p>Cada uno de estos diseños se establecen en un archivo XML en el directorio <code>res/layout/</code>. Para definir posteriormente las diferentes configuraciones de pantalla, la aplicación utiliza alias de diseño para asignarlos a cada configuración:</p>
+
+<p><code>res/layout/onepane.xml:</code></p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+
+<p><code>res/layout/onepane_with_bar.xml:</code></p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
+
+<p><code>res/layout/twopanes.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+
+<p><code>res/layout/twopanes_narrow.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes_narrow.xml all}
+
+<p>Una vez que se hayan definido todos los diseños posibles, solo se debe asignar el diseño adecuado a cada configuración a través de calificadores de configuración. Ahora ya puedes utilizar la técnica de los alias de diseño:</p>
+
+<p><code>res/values/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values/layouts.xml all}
+
+<p><code>res/values-sw600dp-land/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-sw600dp-land/layouts.xml
+all}
+
+<p><code>res/values-sw600dp-port/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-sw600dp-port/layouts.xml
+all}
+
+<p><code>res/values-large-land/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-large-land/layouts.xml all}
+
+<p><code>res/values-large-port/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-large-port/layouts.xml all}
+
+
+
+<h2 id="TaskUse9Patch">Cómo utilizar mapas de bits de la clase NinePatch</h2>
+
+<p>Admitir diferentes tamaños de pantalla normalmente implica que las fuentes de imagen también deben poder adaptarse a varios tamaños. Por ejemplo, un fondo de botón debe adaptarse a cualquier forma de botón a la que se aplique.</p>
+
+<p>Si utilizas imágenes sencillas en componentes que pueden cambiar de tamaño, observarás rápidamente que los resultados no es que sean precisamente impresionantes, ya que las imágenes se estirarán o estrecharán. La solución es utilizar mapas de bits de la clase NinePatch, que son archivos PNG con un formato especial que indican las áreas que se pueden y no se pueden estirar.</p>
+
+<p>Por tanto, al diseñar mapas de bits que se vayan a utilizar en componentes con tamaño variable, utiliza siempre mapas de bits de la clase NinePatch. Para convertir un mapa de bits en uno de la clase NinePatch, puedes empezar con una imagen normal (consulta la figura 4, que se ha ampliado cuatro veces para obtener una mayor claridad).</p>
+
+<img src="{@docRoot}images/training/button.png" />
+<p class="img-caption"><strong>Figura 4.</strong> <code>button.png</code></p>
+
+<p>A continuación, puedes pasar a la utilidad <ode
+href="{@docRoot}tools/help/draw9patch.html"><code>draw9patch</code></a> del SDK (que se localiza en el directorio <code>tools/</code>) en la que puedes marcar las áreas que se deben estirar dibujando píxeles a lo largo de los bordes superior e izquierdo. También puedes marcar el área que debe incluir el contenido dibujando píxeles a lo largo de los bordes inferior y derecho, como se muestra en la figura 5.</p>
+
+<img src="{@docRoot}images/training/button_with_marks.png" />
+<p class="img-caption"><strong>Figura 5.</strong> <code>button.9.png</code></p>
+
+<p>Observa los píxeles de color negro situados junto a los bordes. Los que aparecen en los bordes superior e izquierdo indican los lugares en los que se puede estirar la imagen, mientras que los que aparecen en los bordes inferior y derecho indican dónde se debe situar el contenido.</p>
+
+<p>Además, observa la extensión <code>.9.png</code>. Debes utilizar esta extensión, ya que, de este modo, el marco detecta que se trata de una imagen de la clase NinePatch, en lugar de una imagen PNG normal.</p>
+
+<p>Cuando aplicas este fondo a un componente (definiendo <code>android:background="&#64;drawable/button"</code>), el marco estira la imagen de forma adecuada para adaptarla al botón, como se muestra en varios tamaños de la figura 6.</p>
+
+<img src="{@docRoot}images/training/buttons_stretched.png" />
+<p class="img-caption"><strong>Figura 6.</strong> Botón que utiliza la clase NinePatch <code>button.9.png</code> en varios tamaños</p>
+
diff --git a/docs/html/intl/ja/guide/developing/eclipse-adt.jd b/docs/html/intl/ja/guide/developing/eclipse-adt.jd
index 397c0068ab75..2cd69496145e 100644
--- a/docs/html/intl/ja/guide/developing/eclipse-adt.jd
+++ b/docs/html/intl/ja/guide/developing/eclipse-adt.jd
@@ -29,8 +29,8 @@ page.title=Eclipse 内で ADT を使用
<li>プロジェクトを、ユーザーに配布可能な署名済みの APK 形式でエクスポートすることもできます。</li>
</ul>
-<p>ADT を組み込んだ Eclipse 総合開発環境で Android アプリケーションの開発を始めるには、最初に Eclipse 総合開発環境をダウンロードしてから、ADT プラグインをダウンロードしてインストールする必要があります。そのためには、<a href="{@docRoot}sdk/eclipse-adt.html#installing">Eclipse 用 ADT プラグインのインストール</a>に記載されている手順どおりに操作します。</p>
-<p>バージョン 0.9 より前の ADT を使用してアプリケーションを既に開発中の場合は、必ず最新バージョンにアップグレードしてから続行してください。<a href="{@docRoot}sdk/eclipse-adt.html#updating">Eclipse ADT プラグインをアップデート</a>するためのガイドをご覧ください。</p>
+<p>ADT を組み込んだ Eclipse 総合開発環境で Android アプリケーションの開発を始めるには、最初に Eclipse 総合開発環境をダウンロードしてから、ADT プラグインをダウンロードしてインストールする必要があります。そのためには、<a href="{@docRoot}tools/sdk/eclipse-adt.html#installing">Eclipse 用 ADT プラグインのインストール</a>に記載されている手順どおりに操作します。</p>
+<p>バージョン 0.9 より前の ADT を使用してアプリケーションを既に開発中の場合は、必ず最新バージョンにアップグレードしてから続行してください。<a href="{@docRoot}tools/sdk/eclipse-adt.html#updating">Eclipse ADT プラグインをアップデート</a>するためのガイドをご覧ください。</p>
<p class="note"><strong>注:</strong> このガイドでは、ADT プラグインの最新バージョンを使用していることを前提としています。説明の大半は、以前のバージョンにも当てはまりますが、以前のバージョンを使用している場合は、このドキュメントのオンライン版ではなく、SDK パッケージに付属された資料内の同ドキュメントをご覧ください。</p>
@@ -84,9 +84,9 @@ page.title=Eclipse 内で ADT を使用
<h2 id="Running">アプリケーションの実行</h2>
-<p>注意してください。<em></em>アプリケーションを Android エミュレータで実行する前に、Android 仮想デバイス(AVD)を作成する<strong>必要があります</strong>。AVD では、エミュレータで使用する Android プラットフォームを指定します。詳しくは <a href="{@docRoot}guide/developing/tools/avd.html">Android 仮想デバイス</a> のドキュメントをご覧ください。ただし、すぐにアプリケーションを実行したい場合は、次の簡単な手順に従って AVD を作成してください。</p>
+<p>注意してください。<em></em>アプリケーションを Android エミュレータで実行する前に、Android 仮想デバイス(AVD)を作成する<strong>必要があります</strong>。AVD では、エミュレータで使用する Android プラットフォームを指定します。詳しくは <a href="{@docRoot}tools/avd.html">Android 仮想デバイス</a> のドキュメントをご覧ください。ただし、すぐにアプリケーションを実行したい場合は、次の簡単な手順に従って AVD を作成してください。</p>
-<p>携帯端末の実機でのみアプリケーションを実行する場合は、AVD は必要ありません。この場合のアプリケーションの実行について詳しくは、<a href="{@docRoot}guide/developing/device.html">Developing On a Device</a> をご覧ください。</p>
+<p>携帯端末の実機でのみアプリケーションを実行する場合は、AVD は必要ありません。この場合のアプリケーションの実行について詳しくは、<a href="{@docRoot}tools/device.html">Developing On a Device</a> をご覧ください。</p>
<h3 id="CreatingAnAvd">AVD の作成</h3>
@@ -119,7 +119,7 @@ id:2
<p>これで AVD が作成できました。次のセクションでは、エミュレータでアプリケーションを起動する際に、AVD がどのように使用されるかについて説明します。</p>
-<p>AVD の作成と管理について詳しくは、<a href="{@docRoot}guide/developing/tools/avd.html">Android 仮想デバイス</a> のドキュメントをご覧ください。</p>
+<p>AVD の作成と管理について詳しくは、<a href="{@docRoot}tools/avd.html">Android 仮想デバイス</a> のドキュメントをご覧ください。</p>
<h3 id="RunningYourApplication">アプリケーションの実行</h3>
@@ -193,7 +193,7 @@ id:2
<p>Android アプリケーションの開発を始めると、Android アプリケーションをシステムがエミュレータや実機にインストールする前に、どの Android アプリケーションにもデジタル署名が必要であることがわかります。署名には、デバッグ キーを使用する方法(エミュレータや開発用端末ですぐにテストする場合)と、非公開キーを使用する方法(アプリケーションを配布する場合)の 2 つがあります。</p>
<p>ADT プラグインでは、アプリケーションをエミュレータや開発用端末にインストールする前に、.apk ファイルがデバッグ キーを使用して署名されるので、開発を早めることができます。つまり、独自の非公開キーを生成する必要がなく、Eclipse からアプリケーションをすぐに実行できます。Keytool に ADT がアクセスできれば、デベロッパーが特に操作する必要はありません。ただし、アプリケーションを公開する場合は、SDK ツールが生成するデバッグ キーではなく、独自の非公開キーを使用してアプリケーションに署名する<strong>必要があります</strong>。</p>
-<p><a href="{@docRoot}guide/publishing/app-signing.html">アプリケーションへの署名</a>をご覧ください。Android でのアプリケーションへの署名と、Android アプリケーション デベロッパーにとっての署名の意味について説明しています。このドキュメントには、ADT のエクスポート ウィザードを使用してアプリケーションをエクスポートし、署名するためのガイドも含まれています。</p>
+<p><a href="{@docRoot}tools/publishing/app-signing.html">アプリケーションへの署名</a>をご覧ください。Android でのアプリケーションへの署名と、Android アプリケーション デベロッパーにとっての署名の意味について説明しています。このドキュメントには、ADT のエクスポート ウィザードを使用してアプリケーションをエクスポートし、署名するためのガイドも含まれています。</p>
<h2 id="Tips">Eclipse のヒント </h2>
@@ -224,7 +224,7 @@ id:2
<h3>DDMS の手動による実行</h3>
-<p>ADT プラグインを使用するデバッグをおすすめしますが、手動で DDMS を実行し、ポート 8700 でデバッグするように Eclipse を設定することができます(<strong>注:</strong> 最初に必ず <a href="{@docRoot}guide/developing/tools/ddms.html">DDMS</a> を起動してください)。 </p>
+<p>ADT プラグインを使用するデバッグをおすすめしますが、手動で DDMS を実行し、ポート 8700 でデバッグするように Eclipse を設定することができます(<strong>注:</strong> 最初に必ず <a href="{@docRoot}tools/ddms.html">DDMS</a> を起動してください)。 </p>
<!-- TODO: clean this up and expand it to cover more wizards and features
<h3>ADT Wizards</h3>
diff --git a/docs/html/intl/ja/guide/developing/other-ide.jd b/docs/html/intl/ja/guide/developing/other-ide.jd
index ba82c18d1303..cbffee3320e3 100644
--- a/docs/html/intl/ja/guide/developing/other-ide.jd
+++ b/docs/html/intl/ja/guide/developing/other-ide.jd
@@ -19,9 +19,9 @@ page.title=その他の統合開発環境
<h2>関連項目</h2>
<ol>
- <li><a href="{@docRoot}guide/developing/tools/othertools.html#android">android ツール</a></li>
- <li><a href="{@docRoot}guide/developing/tools/emulator.html">Android Emulator</a></li>
- <li><a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a></li>
+ <li><a href="{@docRoot}tools/othertools.html#android">android ツール</a></li>
+ <li><a href="{@docRoot}tools/help/emulator.html">Android Emulator</a></li>
+ <li><a href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a></li>
</ol>
</div>
</div>
@@ -36,11 +36,11 @@ page.title=その他の統合開発環境
<p>Eclipse 以外の統合開発環境やエディタで開発する際には、次の Android SDK ツールについて知っておく必要があります:</p>
<dl>
- <dt><a href="{@docRoot}guide/developing/tools/othertools.html#android">android</a></dt>
+ <dt><a href="{@docRoot}tools/othertools.html#android">android</a></dt>
<dd>Android プロジェクトの作成/更新、AVD の作成/移動/削除のために使用します。</dd>
- <dt><a href="{@docRoot}guide/developing/tools/emulator.html">Android Emulator</a></dt>
+ <dt><a href="{@docRoot}tools/help/emulator.html">Android Emulator</a></dt>
<dd>Android のエミュレーション プラットフォームで Android アプリケーションを実行するために使用します。</dd>
- <dt><a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a></dt>
+ <dt><a href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a></dt>
<dd>エミュレータまたは接続先の端末とのインターフェースとして使用します(アプリケーションのインストール、端末のシェル、コマンドの実行などに使用)。
</dd>
</dl>
@@ -109,7 +109,7 @@ android create project \
<li><code>tests/</code> - テスト用に、上記のすべての複製が含まれます。</li>
</ul>
-<p>プロジェクトを作成すると、開発を始める準備ができます。開発のために、プロジェクト フォルダをどこにでも移動できますが、アプリケーションをエミュレータに送信するために(方法については後述します)、SDK の <code>tools/</code> ディレクトリにある <a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a>(adb)を使用する必要があります。そのためにプロジェクト ソリューションと <code>tools/</code> フォルダ間でアクセスする必要があります。</p>
+<p>プロジェクトを作成すると、開発を始める準備ができます。開発のために、プロジェクト フォルダをどこにでも移動できますが、アプリケーションをエミュレータに送信するために(方法については後述します)、SDK の <code>tools/</code> ディレクトリにある <a href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a>(adb)を使用する必要があります。そのためにプロジェクト ソリューションと <code>tools/</code> フォルダ間でアクセスする必要があります。</p>
<p class="warning"><strong>注:</strong> SDK ディレクトリは移動させないでください。移動するとビルド スクリプトが機能しなくなります(ビルド スクリプトをもう一度機能させるには、手動でスクリプトを更新して、SDK の新しいロケーションを反映させる必要があります)。</p>
@@ -140,7 +140,7 @@ android update project --target 2 --path ./myProject
<p>Android のビルド ツールを使用すると、ビルド時にデバッグキーを使用して .apk ファイルに自動的に署名できるので、スムーズな開発が可能です。つまり、独自の非公開キーを生成しなくても、アプリケーションをコンパイルして、エミュレータにインストールすることができます。ただし、アプリケーションを公開する場合は、SDK ツールが生成したデバッグ キーではなく、独自の非公開キーを使用してアプリケーションに署名する<strong>必要があります</strong>。 </p>
-<p><a href="{@docRoot}guide/publishing/app-signing.html">アプリケーションへの署名</a>をご覧ください。Android でのアプリケーションへの署名と、Android アプリケーション デベロッパーにとっての署名の意味について説明しています。</p>
+<p><a href="{@docRoot}tools/publishing/app-signing.html">アプリケーションへの署名</a>をご覧ください。Android でのアプリケーションへの署名と、Android アプリケーション デベロッパーにとっての署名の意味について説明しています。</p>
@@ -150,7 +150,7 @@ android update project --target 2 --path ./myProject
<p>デバッグ モードとリリース モードのどちらでビルドしているかに関係なく、プロジェクトをコンパイルし、ビルドするには Ant ツールが必要です。これにより、エミュレータや端末にインストールする .apk ファイルが作成されます。デバッグ モードでビルドすると、.apk ファイルは SDK ツールによりデバッグ キーを使用して自動的に署名されるので、インストールの準備がすぐに整います(ただし、エミュレータまたは接続された開発用端末上にのみインストールできます)。リリース モードでビルドされた .apk ファイルは署名されないので、Keytool と Jarsigner を使って、独自の非公開キーで手動で署名する必要があります。<em></em></p>
-<p><a href="{@docRoot}guide/publishing/app-signing.html">アプリケーションへの署名</a>の内容をよく理解する必要があります。また、アプリケーションをリリースしてエンドユーザーと共有することを計画している場合は非常に重要です。「アプリケーションへの署名」では、非公開キーを生成し、それを使用して .apk ファイルに署名する手順について説明しています。ただし、開発を始めたばかりであれば、デバッグ モードでビルドすることにより、エミュレータまたは独自の開発用端末でアプリケーションをすぐに実行できます。</p>
+<p><a href="{@docRoot}tools/publishing/app-signing.html">アプリケーションへの署名</a>の内容をよく理解する必要があります。また、アプリケーションをリリースしてエンドユーザーと共有することを計画している場合は非常に重要です。「アプリケーションへの署名」では、非公開キーを生成し、それを使用して .apk ファイルに署名する手順について説明しています。ただし、開発を始めたばかりであれば、デバッグ モードでビルドすることにより、エミュレータまたは独自の開発用端末でアプリケーションをすぐに実行できます。</p>
<p>Ant をお持ちでない場合は、<a href="http://ant.apache.org/">Apache Ant ホームページ</a>から入手してください。Ant をインストールして、必ず実行可能パスに置きます。Ant を実行する前に、「JAVA_HOME」環境変数を宣言して JDK のインストールパスを指定する必要があります。</p>
@@ -191,7 +191,7 @@ android update project --target 2 --path ./myProject
</li>
</ol>
-<p>リリース モードではアプリケーションを署名せずにビルドを行います。このため、アプリケーションをエンドユーザーに配布するためには、次に非公開キーを使用して署名を行う必要があります。この手順を行う方法については、<a href="{@docRoot}guide/publishing/app-signing.html">Signing Your Application</a>をご覧ください。</p>
+<p>リリース モードではアプリケーションを署名せずにビルドを行います。このため、アプリケーションをエンドユーザーに配布するためには、次に非公開キーを使用して署名を行う必要があります。この手順を行う方法については、<a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Application</a>をご覧ください。</p>
<p>非公開キーを使用してアプリケーションに署名すると、アプリケーションをエミュレータや端末にインストールできるようになります。これについては次の<a href="#Running">アプリケーションの実行</a>のセクションで説明します。次の方法でウェブ サーバーから端末にインストールすることもできます。署名した APK をウェブサイトにアップロードし、Android ウェブブラウザでその .apk の URL を読み込んでアプリケーションをダウンロードし、インストールを開始します(端末上では、[設定] &gt; [アプリケーション] を選択し、[提供元不明のアプリ] をオンにする必要があります)。<em></em></p>
@@ -200,7 +200,7 @@ android update project --target 2 --path ./myProject
<p>端末のハードウェア以外でアプリケーションを実行する場合は、アプリケーションのインストール先となるエミュレータを起動する必要があります。Android エミュレータのインスタンスは、特有の端末構成に合わせて設定された、特定の Android プラットフォームを実行しています。このプラットフォームと構成は、Android 仮想デバイス(AVD)で定義されます。そのためエミュレータを起動する前に、AVD を定義しなくてはいけません。</p>
-<p>端末ハードウェアでアプリケーションを実行する場合は、代わりに、<a href="{@docRoot}guide/developing/device.html">端末のでの開発</a> をご覧ください。</p>
+<p>端末ハードウェアでアプリケーションを実行する場合は、代わりに、<a href="{@docRoot}tools/device.html">端末のでの開発</a> をご覧ください。</p>
<ol>
<li><strong>AVD の作成</strong>
@@ -253,9 +253,9 @@ id:2
<p>上記で使用したツールについて詳しくは、次のドキュメントをご覧ください:</p>
<ul>
- <li><a href="{@docRoot}guide/developing/tools/othertools.html#android">android ツール</a></li>
- <li><a href="{@docRoot}guide/developing/tools/emulator.html">Android Emulator</a></li>
- <li><a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a> (ADB)</li>
+ <li><a href="{@docRoot}tools/othertools.html#android">android ツール</a></li>
+ <li><a href="{@docRoot}tools/help/emulator.html">Android Emulator</a></li>
+ <li><a href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a> (ADB)</li>
</ul>
@@ -265,7 +265,7 @@ id:2
<p>Eclipse プラグインを使用すると、デバッガへの接続は自動化されます。しかし他の総合開発環境でも、デバッグ ポートをリッスンしてデバッグ情報を受信するように設定することができます:</p>
<ol>
- <li>総合開発環境とエミュレータ間のポート転送サービスとして機能する <strong><a href="{@docRoot}guide/developing/tools/ddms.html">Dalvik Debug Monitor Server(DDMS)</a>ツールを起動します。</strong></li>
+ <li>総合開発環境とエミュレータ間のポート転送サービスとして機能する <strong><a href="{@docRoot}tools/ddms.html">Dalvik Debug Monitor Server(DDMS)</a>ツールを起動します。</strong></li>
<li><strong>エミュレータでオプションのデバッグ構成を設定します</strong>。設定には、デバッガ接続まで Activity のアプリケーション起動をブロックするオプションなどが含まれます。エミュレータでの CPU 使用率や画面の更新率の表示のように、これらのデバッグ用オプションの多くは DDMS がなくても使用できます。</li>
<li><strong>総合開発環境を設定して、デバッグ用にポート 8700 に接続します。</strong><a href="{@docRoot}guide/developing/debug-tasks.html#ide-debug-port">総合開発環境を設定してデバッグ ポートに接続する</a> をご覧ください。 </li>
</ol>
diff --git a/docs/html/intl/ja/guide/index.jd b/docs/html/intl/ja/guide/index.jd
index 5d35e0ab2b85..69b9eca150e0 100644
--- a/docs/html/intl/ja/guide/index.jd
+++ b/docs/html/intl/ja/guide/index.jd
@@ -18,7 +18,7 @@ Android デベロッパー ガイドへようこそ。<i></i>デベロッパー
<dd>Android とは何か、基本機能、アプリケーションとの関係など、Android の基本事項について紹介します。</dd>
<dt><b>フレームワーク トピック</b></dt>
-<dd>Android のフレームワークと API の各部分について説明します。フレームワークの概要については、<a href="{@docRoot}guide/topics/fundamentals.html">アプリケーションの基礎</a>を最初にご覧ください。次に、ユーザー インターフェースの設計やリソースの設定、データの保存、権限の利用など、それぞれのトピックを必要に応じて参照してください。</dd>
+<dd>Android のフレームワークと API の各部分について説明します。フレームワークの概要については、<a href="{@docRoot}guide/components/fundamentals.html">アプリケーションの基礎</a>を最初にご覧ください。次に、ユーザー インターフェースの設計やリソースの設定、データの保存、権限の利用など、それぞれのトピックを必要に応じて参照してください。</dd>
<dt><b>開発</b></dt>
<dd>Android の開発とデバッグ用ツールの使用方法、結果のテスト方法について説明します。</dd>
@@ -41,7 +41,7 @@ Android 向けプログラム開発の最初のステップは、SDK(ソフト
</p>
<p>
-SDK のダウンロード後は、まずはじめにデベロッパー ガイドを参照してください。コードを実際に見てみることから始めたい場合は、簡単な <a href="{@docRoot}resources/tutorials/hello-world.html">Hello World</a> チュートリアルを参照してください。Android プラットフォーム向けに作成された標準的な「Hello, World」アプリケーションについて説明しています。<a href="{@docRoot}guide/topics/fundamentals.html">アプリケーションの基礎</a>ドキュメントは、アプリケーション フレームワークを理解したいユーザーに最適な出発点となります。
+SDK のダウンロード後は、まずはじめにデベロッパー ガイドを参照してください。コードを実際に見てみることから始めたい場合は、簡単な <a href="{@docRoot}training/basics/firstapp/index.html">Building Your First App</a> チュートリアルを参照してください。Android プラットフォーム向けに作成された標準的な「Hello, World」アプリケーションについて説明しています。<a href="{@docRoot}guide/components/fundamentals.html">アプリケーションの基礎</a>ドキュメントは、アプリケーション フレームワークを理解したいユーザーに最適な出発点となります。
</p>
diff --git a/docs/html/intl/ja/guide/publishing/app-signing.jd b/docs/html/intl/ja/guide/publishing/app-signing.jd
index 710591dd976e..2d2acfa2f8c3 100644
--- a/docs/html/intl/ja/guide/publishing/app-signing.jd
+++ b/docs/html/intl/ja/guide/publishing/app-signing.jd
@@ -35,8 +35,8 @@ page.title=アプリケーションへの署名
<h2>関連項目</h2>
<ol>
-<li><a href="{@docRoot}guide/publishing/versioning.html">アプリケーションのバージョニング</a></li>
-<li><a href="{@docRoot}guide/publishing/preparing.html">公開の準備</a></li>
+<li><a href="{@docRoot}tools/publishing/versioning.html">アプリケーションのバージョニング</a></li>
+<li><a href="{@docRoot}tools/publishing/preparing.html">公開の準備</a></li>
</ol>
</div>
diff --git a/docs/html/intl/ja/guide/publishing/preparing.jd b/docs/html/intl/ja/guide/publishing/preparing.jd
index e232f3b354e7..c7a29509aeea 100644
--- a/docs/html/intl/ja/guide/publishing/preparing.jd
+++ b/docs/html/intl/ja/guide/publishing/preparing.jd
@@ -21,9 +21,9 @@ page.title=公開の準備
</p>
<p>アプリケーションを Android マーケットに公開する場合は、アプリケーションの具体的な準備要件について <a
-href="{@docRoot}guide/publishing/publishing.html#market">Android マーケットでの公開</a> もご覧ください。 </p>
+href="{@docRoot}tools/publishing/publishing.html#market">Android マーケットでの公開</a> もご覧ください。 </p>
-<p>アプリケーションを公開する方法の一般的な情報については、<a href="{@docRoot}guide/publishing/publishing.html">Publishing Your Applications</a> のドキュメントをご覧ください。 </p>
+<p>アプリケーションを公開する方法の一般的な情報については、<a href="{@docRoot}tools/publishing/publishing.html">Publishing Your Applications</a> のドキュメントをご覧ください。 </p>
<div class="special">
@@ -56,7 +56,7 @@ href="{@docRoot}guide/publishing/publishing.html#market">Android マーケット
<h3 id="test">1. アプリケーションを実際のデバイスで徹底的にテストする</h3>
-<p>アプリケーションをできる限り広範に徹底的にテストすることが重要です。この作業を支援するため、Android では多数のテスト用クラスとツールを用意しています。{@link android.app.Instrumentation Instrumentation} を使用して JUnit およびその他のテスト ケースを実行できます。また、<a href="{@docRoot}guide/developing/tools/monkey.html">UI/Application Exerciser Monkey</a> などのテスティング ツールを使用できます。 </p>
+<p>アプリケーションをできる限り広範に徹底的にテストすることが重要です。この作業を支援するため、Android では多数のテスト用クラスとツールを用意しています。{@link android.app.Instrumentation Instrumentation} を使用して JUnit およびその他のテスト ケースを実行できます。また、<a href="{@docRoot}tools/help/monkey.html">UI/Application Exerciser Monkey</a> などのテスティング ツールを使用できます。 </p>
<ul>
<li>ユーザーがアプリケーションを正常に実行できるようにするため、アプリケーションが実行されると予想されるタイプの携帯端末の実機を入手してください。実際のデバイスで、実際のネットワーク条件の下でアプリケーションをテストします。アプリケーションを実際のデバイスでテストすることは非常に重要です。これによって、作成したユーザー インターフェース要素のサイズが正しく(特にタッチスクリーン UI の場合)、アプリケーションのパフォーマンスと電池効率が適正であることを確認できるからです。</li>
@@ -96,13 +96,13 @@ href="{@docRoot}guide/publishing/publishing.html#market">Android マーケット
<p>これまでにリリースしたバージョンがある場合、最新のアプリケーションのバージョン番号を旧バージョンから増加させる必要があります。アプリケーションのマニフェスト ファイルの <code>&lt;manifest&gt;</code> 要素の <code>android:versionCode</code> と <code>android:versionName</code> 属性の両方を適切な値を使用して増加する必要があります。 </p>
-<p>アプリケーションのバージョン情報を定義する方法は、<a href="{@docRoot}guide/publishing/versioning.html">Versioning Your Applications</a>をご覧ください。</p>
+<p>アプリケーションのバージョン情報を定義する方法は、<a href="{@docRoot}tools/publishing/versioning.html">Versioning Your Applications</a>をご覧ください。</p>
<h3 id="cryptokey">6. 適切な暗号化キーを取得する</h3>
<p>ここまで準備作業をすべて読んで実行していれば、アプリケーションはコンパイルされ、署名の準備ができています。.apk の内部では、アプリケーションは適切にバージョン管理されており、上記のように余分なファイルや非公開データは削除されています。 </p>
-<p>アプリケーションに署名する前に、適切な非公開キーがあることを確認する必要があります。非公開キーを取得(または生成)する方法については、<a href="{@docRoot}guide/publishing/app-signing.html#cert">適切な非公開キーの取得</a>をご覧ください。</p>
+<p>アプリケーションに署名する前に、適切な非公開キーがあることを確認する必要があります。非公開キーを取得(または生成)する方法については、<a href="{@docRoot}tools/publishing/app-signing.html#cert">適切な非公開キーの取得</a>をご覧ください。</p>
<p>適切な非公開キーを取得(または生成)したら、キーを使用して次の手順を実行します:</p>
@@ -136,7 +136,7 @@ href="http://code.google.com/android/add-ons/google-apis/mapkey.html">Maps API
</ol>
<p>署名と非公開キーについては、<a
-href="{@docRoot}guide/publishing/app-signing.html">アプリケーションへの署名</a>をご覧ください。</p>
+href="{@docRoot}tools/publishing/app-signing.html">アプリケーションへの署名</a>をご覧ください。</p>
<h2 id="compile">アプリケーションのコンパイル</h2>
@@ -147,7 +147,7 @@ href="{@docRoot}guide/publishing/app-signing.html">アプリケーションへ
<h3 id="signapp">8. アプリケーションに署名する</h3>
-<p>非公開キーを使用してアプリケーションに署名します。アプリケーションに正しく署名することは、非常に重要です。詳細は、<a href="{@docRoot}guide/publishing/app-signing.html">アプリケーションへの署名</a>をご覧ください。 </p>
+<p>非公開キーを使用してアプリケーションに署名します。アプリケーションに正しく署名することは、非常に重要です。詳細は、<a href="{@docRoot}tools/publishing/app-signing.html">アプリケーションへの署名</a>をご覧ください。 </p>
<h3 id="testapp">9. コンパイルして署名したアプリケーションのテスト</h3>
diff --git a/docs/html/intl/ja/guide/publishing/versioning.jd b/docs/html/intl/ja/guide/publishing/versioning.jd
index bf86016f7428..192861053499 100644
--- a/docs/html/intl/ja/guide/publishing/versioning.jd
+++ b/docs/html/intl/ja/guide/publishing/versioning.jd
@@ -24,8 +24,8 @@ page.title=アプリケーションのバージョニング
<h2>関連項目</h2>
<ol>
-<li><a href="{@docRoot}guide/publishing/preparing.html">公開の準備</a></li>
-<li><a href="{@docRoot}guide/publishing/publishing.html#market">Android マーケットでの公開</a></li>
+<li><a href="{@docRoot}tools/publishing/preparing.html">公開の準備</a></li>
+<li><a href="{@docRoot}tools/publishing/publishing.html#market">Android マーケットでの公開</a></li>
<li><a href="{@docRoot}guide/topics/manifest/manifest-intro.html">The AndroidManifest.xml File</a></li>
</ol>
@@ -97,4 +97,4 @@ method of {@link android.content.pm.PackageManager PackageManager}. </p> を使
<p>アプリケーションに最小プラットフォーム バージョンを指定するには、<code>&lt;uses-sdk&gt;</code> 要素を <code>&lt;manifest&gt;</code> の子として追加し、<code>android:minSdkVersion</code> を属性として定義します。 </p>
-<p>詳細は、<a href="{@docRoot}sdk/android-1.1.html">Android System Image 1.1 Version Notes</a> もご覧ください。</p>
+<p>詳細は、<a href="{@docRoot}about/versions/android-1.1.html">Android System Image 1.1 Version Notes</a> もご覧ください。</p>
diff --git a/docs/html/intl/ja/guide/topics/fundamentals.jd b/docs/html/intl/ja/guide/topics/fundamentals.jd
index d329a8c042b8..025cf531b371 100644
--- a/docs/html/intl/ja/guide/topics/fundamentals.jd
+++ b/docs/html/intl/ja/guide/topics/fundamentals.jd
@@ -47,7 +47,7 @@ page.title=開発の基礎
</div>
<p>
-Android アプリケーションはすべて Java プログラミング言語で記述します。コンパイル済みの Java コード(およびそのアプリケーションに必要なすべてのデータやリソース ファイル)は、<a href="{@docRoot}guide/developing/tools/aapt.html"><code>aapt</code> ツール</a>を使用して Android パッケージにバンドルします。Android パッケージは、拡張子が {@code .apk} のアーカイブ ファイルです。<i></i>ユーザーは、このファイルをデバイスにダウンロードして利用します。つまり、Android パッケージは、アプリケーションをモバイル デバイスに配布およびインストールするための媒体として機能します。1 つの {@code .apk} ファイルに含まれているすべてのコードが、1 つのアプリケーションと見なされます。<i></i>
+Android アプリケーションはすべて Java プログラミング言語で記述します。コンパイル済みの Java コード(およびそのアプリケーションに必要なすべてのデータやリソース ファイル)は、<a href="{@docRoot}tools/aapt.html"><code>aapt</code> ツール</a>を使用して Android パッケージにバンドルします。Android パッケージは、拡張子が {@code .apk} のアーカイブ ファイルです。<i></i>ユーザーは、このファイルをデバイスにダウンロードして利用します。つまり、Android パッケージは、アプリケーションをモバイル デバイスに配布およびインストールするための媒体として機能します。1 つの {@code .apk} ファイルに含まれているすべてのコードが、1 つのアプリケーションと見なされます。<i></i>
</p>
<p>
@@ -185,7 +185,7 @@ android.content.BroadcastReceiver#onReceive onReceive()}</code> メソッドが
</ul>
<p>
-インテント メッセージについて詳しくは、<a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a> をご覧ください。
+インテント メッセージについて詳しくは、<a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a> をご覧ください。
</p>
@@ -293,7 +293,7 @@ Intent オブジェクトでは、対象とするコンポーネントを明示
</p>
<p>
-インテント フィルタについて詳しくは、<a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a> をご覧ください。
+インテント フィルタについて詳しくは、<a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a> をご覧ください。
</p>
@@ -526,7 +526,7 @@ RPC インターフェースに含めることができるのはメソッドの
</p>
<p>
-このメカニズムを簡単に説明すると次のようになります。まず、シンプルなインターフェース定義言語(IDL)を使用して、実装したい RPC インターフェースを宣言します。<code><a href="{@docRoot}guide/developing/tools/aidl.html">aidl</a></code> ツールにより、RPC インターフェースの宣言から Java インターフェース定義が生成されます。この定義は、ローカルとリモートの両方のプロセスで使用する必要があります。定義には、次の図に示すように 2 つの内部クラスが含まれています:
+このメカニズムを簡単に説明すると次のようになります。まず、シンプルなインターフェース定義言語(IDL)を使用して、実装したい RPC インターフェースを宣言します。<code><a href="{@docRoot}tools/aidl.html">aidl</a></code> ツールにより、RPC インターフェースの宣言から Java インターフェース定義が生成されます。この定義は、ローカルとリモートの両方のプロセスで使用する必要があります。定義には、次の図に示すように 2 つの内部クラスが含まれています:
</p>
<p style="margin-left: 2em">
@@ -560,7 +560,7 @@ onServiceDisconnected()}</code> メソッドが実装されているため、リ
</ul>
<p>
-ここでは、説明を簡単にするため、RPC メカニズムの細かい点は省略しています。詳しくは、<a href="{@docRoot}guide/developing/tools/aidl.html">Designing a Remote Interface Using AIDL</a>、および {@link android.os.IBinder IBinder} クラスの説明をご覧ください。
+ここでは、説明を簡単にするため、RPC メカニズムの細かい点は省略しています。詳しくは、<a href="{@docRoot}tools/aidl.html">Designing a Remote Interface Using AIDL</a>、および {@link android.os.IBinder IBinder} クラスの説明をご覧ください。
</p>
diff --git a/docs/html/intl/ja/guide/tutorials/hello-world.jd b/docs/html/intl/ja/guide/tutorials/hello-world.jd
index 647c828e96dc..c69f5da3f8ed 100644
--- a/docs/html/intl/ja/guide/tutorials/hello-world.jd
+++ b/docs/html/intl/ja/guide/tutorials/hello-world.jd
@@ -20,13 +20,13 @@ page.title=Hello, World
<p>Eclipse を使用していない場合でも問題ありません。<a href="{@docRoot}guide/developing/other-ide.html">Developing in Other IDEs</a>に慣れてから、このチュートリアルに戻り、Eclipse に関する部分以外を参考にしてください。</p>
-<p>開始する前に、最新の SDK がインストールされている必要があります。また、Eclipse を使用する場合には、ADT プラグインもインストールされている必要があります。これらのプログラムがインストールされていない場合は、「<a href="{@docRoot}sdk/installing.html">Installing the Android SDK</a>」を参考にインストールを実行して、完了後にこのチュートリアルに戻ってください。</p>
+<p>開始する前に、最新の SDK がインストールされている必要があります。また、Eclipse を使用する場合には、ADT プラグインもインストールされている必要があります。これらのプログラムがインストールされていない場合は、「<a href="{@docRoot}sdk/installing/index.html">Installing the Android SDK</a>」を参考にインストールを実行して、完了後にこのチュートリアルに戻ってください。</p>
<h2 id="avd">AVD の作成</h2>
<div class="sidebox-wrapper">
<div class="sidebox">
- <p>AVD の使用方法と使用可能なオプションについて詳しくは、<a href="{@docRoot}guide/developing/tools/avd.html">Android 仮想デバイス</a> のドキュメントを参照してください。</p>
+ <p>AVD の使用方法と使用可能なオプションについて詳しくは、<a href="{@docRoot}tools/avd.html">Android 仮想デバイス</a> のドキュメントを参照してください。</p>
</div>
</div>
@@ -288,7 +288,7 @@ public class HelloAndroid extends Activity {
<p class="note"><strong>ヒント:</strong> ショートカット キー<strong>Ctrl+F11</strong>(Mac では <strong>コマンド+Shift+F11</strong>)を使用して、現在表示されているアプリケーションを実行することができます。</p>
-<p>ここからは、デバッグの基礎知識と、他の総合開発環境に関する補足情報について説明します。さらに詳しく学習したい場合は、「<a href="{@docRoot}guide/topics/fundamentals.html">アプリケーションの基礎</a>」を参照してください。Android アプリケーションが動作するためのすべての要素について説明しています。また、「<a href="{@docRoot}guide/index.html">デベロッパー ガイド</a>」の導入ページを参照して、<em>デベロッパー ガイド</em> ドキュメントの概要を確認してください。</p>
+<p>ここからは、デバッグの基礎知識と、他の総合開発環境に関する補足情報について説明します。さらに詳しく学習したい場合は、「<a href="{@docRoot}guide/components/fundamentals.html">アプリケーションの基礎</a>」を参照してください。Android アプリケーションが動作するためのすべての要素について説明しています。また、「<a href="{@docRoot}guide/index.html">デベロッパー ガイド</a>」の導入ページを参照して、<em>デベロッパー ガイド</em> ドキュメントの概要を確認してください。</p>
<div class="special">
@@ -357,7 +357,7 @@ public class HelloAndroid extends Activity {
<p>Eclipse を使用していない場合(普段から使用している総合開発環境がある場合や、シンプルにテキスト エディタやコマンド ライン ツールを使用している場合など)は、Eclipse プラグインを利用することはできません。しかし心配は無用です。Eclipse を使用していないからといって何らかの機能が失われることはありません。</p>
- <p>Android Plugin for Eclipse は、単に Android SDK に含まれるツール セットをまとめたものに過ぎません(エミュレータ、aapt、adb、ddms などの個別のツールについては、<a href="{@docRoot}guide/developing/tools/index.html">こちらで別途説明</a>しています)。このため、これらのツールを別のツール、たとえば「Ant」のビルド ファイルなどでまとめることも可能です。</p>
+ <p>Android Plugin for Eclipse は、単に Android SDK に含まれるツール セットをまとめたものに過ぎません(エミュレータ、aapt、adb、ddms などの個別のツールについては、<a href="{@docRoot}tools/index.html">こちらで別途説明</a>しています)。このため、これらのツールを別のツール、たとえば「Ant」のビルド ファイルなどでまとめることも可能です。</p>
<p>Android SDK には、「android」という名前のツールが含まれています。このツールを使用すると、作成するプロジェクトのソース コードとディレクトリ スタブすべて、および Ant と互換性のある <code>build.xml</code> ファイルを作成することができます。これにより、プロジェクトをコマンド ラインで作成したり、普段使用している総合開発環境と統合したりすることができます。</p>
diff --git a/docs/html/intl/ja/index.jd b/docs/html/intl/ja/index.jd
index fbbd88f7ae8c..ac36f90a52fd 100644
--- a/docs/html/intl/ja/index.jd
+++ b/docs/html/intl/ja/index.jd
@@ -148,7 +148,7 @@ home=true
'name':"Dev Phone 1",
'img':"devphone-large.png",
'title':"Android Dev Phone 1",
- 'desc': "<p>この携帯電話を使用することで、開発した Android アプリケーションの実行とデバッグを行うことができます。Android オペレーティングシステムを変更してからリビルドし、携帯電話に書き込むことができます。Android Dev Phone 1 は携帯通信会社に依存しておらず、<a href='http://play.google.com/apps/publish'>Android マーケット</a>に登録済みのデベロッパーなら誰でも購入可能です。</p><p><a href='/guide/developing/device.html#dev-phone-1'>Android Dev Phone 1 の詳細&raquo;</a></p>"
+ 'desc': "<p>この携帯電話を使用することで、開発した Android アプリケーションの実行とデバッグを行うことができます。Android オペレーティングシステムを変更してからリビルドし、携帯電話に書き込むことができます。Android Dev Phone 1 は携帯通信会社に依存しておらず、<a href='http://play.google.com/apps/publish'>Android マーケット</a>に登録済みのデベロッパーなら誰でも購入可能です。</p><p><a href='/tools/device.html#dev-phone-1'>Android Dev Phone 1 の詳細&raquo;</a></p>"
}
}
diff --git a/docs/html/intl/ja/resources/tutorials/hello-world.jd b/docs/html/intl/ja/resources/tutorials/hello-world.jd
index 0cda2fb5e7f9..e0ef9e69ca0e 100644
--- a/docs/html/intl/ja/resources/tutorials/hello-world.jd
+++ b/docs/html/intl/ja/resources/tutorials/hello-world.jd
@@ -20,13 +20,13 @@ page.title=Hello, World
<p>Eclipse を使用していない場合でも問題ありません。<a href="{@docRoot}guide/developing/other-ide.html">Developing in Other IDEs</a>に慣れてから、このチュートリアルに戻り、Eclipse に関する部分以外を参考にしてください。</p>
-<p>開始する前に、最新の SDK がインストールされている必要があります。また、Eclipse を使用する場合には、ADT プラグインもインストールされている必要があります。これらのプログラムがインストールされていない場合は、「<a href="{@docRoot}sdk/installing.html">Installing the Android SDK</a>」を参考にインストールを実行して、完了後にこのチュートリアルに戻ってください。</p>
+<p>開始する前に、最新の SDK がインストールされている必要があります。また、Eclipse を使用する場合には、ADT プラグインもインストールされている必要があります。これらのプログラムがインストールされていない場合は、「<a href="{@docRoot}sdk/installing/index.html">Installing the Android SDK</a>」を参考にインストールを実行して、完了後にこのチュートリアルに戻ってください。</p>
<h2 id="avd">AVD の作成</h2>
<div class="sidebox-wrapper">
<div class="sidebox">
- <p>AVD の使用方法と使用可能なオプションについて詳しくは、<a href="{@docRoot}guide/developing/tools/avd.html">Android 仮想デバイス</a> のドキュメントを参照してください。</p>
+ <p>AVD の使用方法と使用可能なオプションについて詳しくは、<a href="{@docRoot}tools/avd.html">Android 仮想デバイス</a> のドキュメントを参照してください。</p>
</div>
</div>
@@ -289,7 +289,7 @@ public class HelloAndroid extends Activity {
<p class="note"><strong>ヒント:</strong> ショートカット キー<strong>Ctrl+F11</strong>(Mac では <strong>コマンド+Shift+F11</strong>)を使用して、現在表示されているアプリケーションを実行することができます。</p>
-<p>ここからは、デバッグの基礎知識と、他の総合開発環境に関する補足情報について説明します。さらに詳しく学習したい場合は、「<a href="{@docRoot}guide/topics/fundamentals.html">アプリケーションの基礎</a>」を参照してください。Android アプリケーションが動作するためのすべての要素について説明しています。また、「<a href="{@docRoot}guide/index.html">デベロッパー ガイド</a>」の導入ページを参照して、<em>デベロッパー ガイド</em> ドキュメントの概要を確認してください。</p>
+<p>ここからは、デバッグの基礎知識と、他の総合開発環境に関する補足情報について説明します。さらに詳しく学習したい場合は、「<a href="{@docRoot}guide/components/fundamentals.html">アプリケーションの基礎</a>」を参照してください。Android アプリケーションが動作するためのすべての要素について説明しています。また、「<a href="{@docRoot}guide/index.html">デベロッパー ガイド</a>」の導入ページを参照して、<em>デベロッパー ガイド</em> ドキュメントの概要を確認してください。</p>
<div class="special">
@@ -358,7 +358,7 @@ public class HelloAndroid extends Activity {
<p>Eclipse を使用していない場合(普段から使用している総合開発環境がある場合や、シンプルにテキスト エディタやコマンド ライン ツールを使用している場合など)は、Eclipse プラグインを利用することはできません。しかし心配は無用です。Eclipse を使用していないからといって何らかの機能が失われることはありません。</p>
- <p>Android Plugin for Eclipse は、単に Android SDK に含まれるツール セットをまとめたものに過ぎません(エミュレータ、aapt、adb、ddms などの個別のツールについては、<a href="{@docRoot}guide/developing/tools/index.html">こちらで別途説明</a>しています)。このため、これらのツールを別のツール、たとえば「Ant」のビルド ファイルなどでまとめることも可能です。</p>
+ <p>Android Plugin for Eclipse は、単に Android SDK に含まれるツール セットをまとめたものに過ぎません(エミュレータ、aapt、adb、ddms などの個別のツールについては、<a href="{@docRoot}tools/index.html">こちらで別途説明</a>しています)。このため、これらのツールを別のツール、たとえば「Ant」のビルド ファイルなどでまとめることも可能です。</p>
<p>Android SDK には、「android」という名前のツールが含まれています。このツールを使用すると、作成するプロジェクトのソース コードとディレクトリ スタブすべて、および Ant と互換性のある <code>build.xml</code> ファイルを作成することができます。これにより、プロジェクトをコマンド ラインで作成したり、普段使用している総合開発環境と統合したりすることができます。</p>
diff --git a/docs/html/intl/ja/sdk/1.5_r2/installing.jd b/docs/html/intl/ja/sdk/1.5_r2/installing.jd
index 789fc2651def..bd464c69a8d0 100644
--- a/docs/html/intl/ja/sdk/1.5_r2/installing.jd
+++ b/docs/html/intl/ja/sdk/1.5_r2/installing.jd
@@ -29,7 +29,7 @@ page.title=Android SDK のインストール
<p>システム上に展開した SDK ディレクトリの名前とパスをメモしておきましょう。Android プラグインの設定時や、SDK ツールの使用時にこの SDK ディレクトリを参照する必要があります。</p>
-<p>SDK のプライマリディレクトリである <code>tools</code> のパスを、システム PATH に追加することをおすすめします。<code>tools/</code> プライマリディレクトリは、SDK フォルダのルートにあります。<code>tools</code> をパスに追加すると、Android Debug Bridge(adb)やその他のコマンド ライン <a href="{@docRoot}guide/developing/tools/index.html">ツール</a>を、ツールの格納されたディレクトの完全なパスを指定せずに実行できるようになります。 </p>
+<p>SDK のプライマリディレクトリである <code>tools</code> のパスを、システム PATH に追加することをおすすめします。<code>tools/</code> プライマリディレクトリは、SDK フォルダのルートにあります。<code>tools</code> をパスに追加すると、Android Debug Bridge(adb)やその他のコマンド ライン <a href="{@docRoot}tools/index.html">ツール</a>を、ツールの格納されたディレクトの完全なパスを指定せずに実行できるようになります。 </p>
<ul>
<li>Linux 上では <code>~/.bash_profile</code> ファイルまたは <code>~/.bashrc</code> ファイルを編集します。PATH 環境変数を設定している行を探し、その行に <code>tools/</code> ディレクトリへの完全なパスを追加します。PATH を設定する行が無い場合は、次の行を追加します:</li>
@@ -150,7 +150,7 @@ JKS</pre>
<li><a href="{@docRoot}guide/index.html">デベロッパー ガイド</a>と、ガイドに説明されている情報の種類を参照します。</li>
<li>Android をプラットフォームとして紹介している <a
href="{@docRoot}guide/basics/what-is-android.html">Android とは</a>を読みます。</li>
- <li><a href="{@docRoot}guide/topics/fundamentals.html">アプリケーションの基礎</a>を参照して、Android フレームワークとそこでのアプリケーションの実行方法について学びます。</li>
+ <li><a href="{@docRoot}guide/components/fundamentals.html">アプリケーションの基礎</a>を参照して、Android フレームワークとそこでのアプリケーションの実行方法について学びます。</li>
<li>[<a
href="{@docRoot}reference/packages.html">リファレンス</a>] タブの Android Framework API の仕様を参照します。</li>
</ul>
@@ -158,7 +158,7 @@ JKS</pre>
<p><strong>SDK の探索</strong></p>
<ul>
<li>利用可能な<a
- href="{@docRoot}guide/developing/tools/index.html">開発ツール</a>の概要を把握します。</li>
+ href="{@docRoot}tools/index.html">開発ツール</a>の概要を把握します。</li>
<li><a
href="{@docRoot}guide/developing/eclipse-adt.html">Eclipse/ADT</a> または<a href="{@docRoot}guide/developing/other-ide.html">別の IDE</a> での開発方法を参照します。
</li>
@@ -166,7 +166,7 @@ JKS</pre>
<p><strong>サンプル コードの参照</strong></p>
<ul>
- <li><a href="{@docRoot}resources/tutorials/hello-world.html">Hello World アプリケーション</a>を構築します(特に Eclipse ユーザーにおすすめです)。</li>
+ <li><a href="{@docRoot}training/basics/firstapp/index.html">Hello World アプリケーション</a>を構築します(特に Eclipse ユーザーにおすすめです)。</li>
<li><a href="{@docRoot}resources/tutorials/notepad/index.html">Notepad チュートリアル</a>に沿って Android アプリケーションを完全に構築します。 </li>
<li><code><em>&lt;sdk&gt;</em>/platforms/<em>&lt;platfrom&gt;</em>/samples</code> に収められている他のサンプル アプリケーションのいずれかを新しいプロジェクトとして作成し、自分の開発環境でコンパイルし、実行します。</li>
</ul>
diff --git a/docs/html/intl/ja/sdk/1.5_r3/installing.jd b/docs/html/intl/ja/sdk/1.5_r3/installing.jd
index 789fc2651def..bd464c69a8d0 100644
--- a/docs/html/intl/ja/sdk/1.5_r3/installing.jd
+++ b/docs/html/intl/ja/sdk/1.5_r3/installing.jd
@@ -29,7 +29,7 @@ page.title=Android SDK のインストール
<p>システム上に展開した SDK ディレクトリの名前とパスをメモしておきましょう。Android プラグインの設定時や、SDK ツールの使用時にこの SDK ディレクトリを参照する必要があります。</p>
-<p>SDK のプライマリディレクトリである <code>tools</code> のパスを、システム PATH に追加することをおすすめします。<code>tools/</code> プライマリディレクトリは、SDK フォルダのルートにあります。<code>tools</code> をパスに追加すると、Android Debug Bridge(adb)やその他のコマンド ライン <a href="{@docRoot}guide/developing/tools/index.html">ツール</a>を、ツールの格納されたディレクトの完全なパスを指定せずに実行できるようになります。 </p>
+<p>SDK のプライマリディレクトリである <code>tools</code> のパスを、システム PATH に追加することをおすすめします。<code>tools/</code> プライマリディレクトリは、SDK フォルダのルートにあります。<code>tools</code> をパスに追加すると、Android Debug Bridge(adb)やその他のコマンド ライン <a href="{@docRoot}tools/index.html">ツール</a>を、ツールの格納されたディレクトの完全なパスを指定せずに実行できるようになります。 </p>
<ul>
<li>Linux 上では <code>~/.bash_profile</code> ファイルまたは <code>~/.bashrc</code> ファイルを編集します。PATH 環境変数を設定している行を探し、その行に <code>tools/</code> ディレクトリへの完全なパスを追加します。PATH を設定する行が無い場合は、次の行を追加します:</li>
@@ -150,7 +150,7 @@ JKS</pre>
<li><a href="{@docRoot}guide/index.html">デベロッパー ガイド</a>と、ガイドに説明されている情報の種類を参照します。</li>
<li>Android をプラットフォームとして紹介している <a
href="{@docRoot}guide/basics/what-is-android.html">Android とは</a>を読みます。</li>
- <li><a href="{@docRoot}guide/topics/fundamentals.html">アプリケーションの基礎</a>を参照して、Android フレームワークとそこでのアプリケーションの実行方法について学びます。</li>
+ <li><a href="{@docRoot}guide/components/fundamentals.html">アプリケーションの基礎</a>を参照して、Android フレームワークとそこでのアプリケーションの実行方法について学びます。</li>
<li>[<a
href="{@docRoot}reference/packages.html">リファレンス</a>] タブの Android Framework API の仕様を参照します。</li>
</ul>
@@ -158,7 +158,7 @@ JKS</pre>
<p><strong>SDK の探索</strong></p>
<ul>
<li>利用可能な<a
- href="{@docRoot}guide/developing/tools/index.html">開発ツール</a>の概要を把握します。</li>
+ href="{@docRoot}tools/index.html">開発ツール</a>の概要を把握します。</li>
<li><a
href="{@docRoot}guide/developing/eclipse-adt.html">Eclipse/ADT</a> または<a href="{@docRoot}guide/developing/other-ide.html">別の IDE</a> での開発方法を参照します。
</li>
@@ -166,7 +166,7 @@ JKS</pre>
<p><strong>サンプル コードの参照</strong></p>
<ul>
- <li><a href="{@docRoot}resources/tutorials/hello-world.html">Hello World アプリケーション</a>を構築します(特に Eclipse ユーザーにおすすめです)。</li>
+ <li><a href="{@docRoot}training/basics/firstapp/index.html">Hello World アプリケーション</a>を構築します(特に Eclipse ユーザーにおすすめです)。</li>
<li><a href="{@docRoot}resources/tutorials/notepad/index.html">Notepad チュートリアル</a>に沿って Android アプリケーションを完全に構築します。 </li>
<li><code><em>&lt;sdk&gt;</em>/platforms/<em>&lt;platfrom&gt;</em>/samples</code> に収められている他のサンプル アプリケーションのいずれかを新しいプロジェクトとして作成し、自分の開発環境でコンパイルし、実行します。</li>
</ul>
diff --git a/docs/html/intl/ja/training/monitoring-device-state/battery-monitoring.jd b/docs/html/intl/ja/training/monitoring-device-state/battery-monitoring.jd
new file mode 100644
index 000000000000..c4aafe4ccf90
--- /dev/null
+++ b/docs/html/intl/ja/training/monitoring-device-state/battery-monitoring.jd
@@ -0,0 +1,120 @@
+page.title=電池残量と充電状態の監視
+parent.title=電池消費量の最適化
+parent.link=index.html
+
+trainingnavtop=true
+next.title=ホルダーの装着状態とタイプの特定と監視
+next.link=docking-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>このレッスンの内容</h2>
+<ol>
+ <li><a href="#DetermineChargeState">現在の充電状態を特定する</a></li>
+ <li><a href="#MonitorChargeState">充電状態の変化を監視する</a></li>
+ <li><a href="#CurrentLevel">現在の電池残量を特定する</a></li>
+ <li><a href="#MonitorLevel">電池残量の大きな変化を監視する</a></li>
+</ol>
+
+<h2>関連項目</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">インテントとインテント フィルタ</a>
+</ul>
+
+</div>
+</div>
+
+<p>バックグラウンド更新が電池消費量に及ぼす影響を抑えるために更新の頻度を変更するには、初めに現在の電池残量と充電状態を調べることをおすすめします。</p>
+
+<p>アプリの更新が電池消費量に及ぼす影響の度合いは、端末の電池残量と充電状態によって異なります。AC 電源から端末を充電しているときは、更新の実行による影響はごくわずかなので、ほとんどの場合は、端末が AC 電源に接続されている限り、更新頻度を最大にして差し支えありません。逆に、端末が電池で駆動しているときは、更新頻度を下げると電池消費量を抑えることができます。</p>
+
+<p>同様に、電池残量を調べると、残量がごくわずかであるときに更新頻度を下げたり、場合によっては停止させたりすることができます。</p>
+
+
+<h2 id="DetermineChargeState">現在の充電状態を特定する</h2>
+
+<p>初めに、現在の充電状態を特定します。{@link android.os.BatteryManager} によって電池と充電状態に関するすべての詳細情報が sticky {@link android.content.Intent} としてブロードキャストされますが、この中に充電状態が格納されています。</p>
+
+<p>これは sticky インテントであるため、{@link android.content.BroadcastReceiver} を登録する必要はありません。{@code registerReceiver} を呼び出し、{@code null} をレシーバとして渡すだけで(次のコード例を参照)、現在の電池状態のインテントが返されます。ここで実際の {@link android.content.BroadcastReceiver} オブジェクトを渡すこともできますが、このレッスンでは後で更新についての処理を行うので、これは必要ありません。</p>
+
+<pre>IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
+Intent batteryStatus = context.registerReceiver(null, ifilter);</pre>
+
+<p>現在の充電状態に加えて、充電中の場合は USB 経由か AC 充電器経由かを調べることもできます。<p>
+
+<pre>// Are we charging / charged?
+int status = batteryStatus.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
+boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
+ status == BatteryManager.BATTERY_STATUS_FULL;
+
+// How are we charging?
+int chargePlug = battery.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
+boolean usbCharge = chargePlug == BATTERY_PLUGGED_USB;
+boolean acCharge = chargePlug == BATTERY_PLUGGED_AC;</pre>
+
+<p>一般的には、端末が AC 充電器に接続されているときはバックグラウンド更新の頻度を最大にし、USB 経由で充電中のときは頻度を下げ、電池で駆動中のときはさらに頻度を下げます。</p>
+
+
+<h2 id="MonitorChargeState">充電状態の変化を監視する</h2>
+
+<p>充電状態は、端末が充電器に接続されたときにすぐに変化するので、充電状態の変化を監視し、その変化に応じて更新の頻度を変更することが重要です。</p>
+
+<p>{@link android.os.BatteryManager} は、端末が電源に接続されたときや接続が解除されたときに、アクションをブロードキャストします。このようなイベントは、アプリが実行中でないときでも受信することが重要です。特にそのイベントが、アプリのバックグラウンド更新を開始するためにアプリを起動させる頻度に影響するものである場合です。したがって、{@link android.content.BroadcastReceiver} をアプリのマニフェスト内で登録し、両方のイベントを受信するために {@link android.content.Intent#ACTION_POWER_CONNECTED} と {@link android.content.Intent#ACTION_POWER_DISCONNECTED} をインテント フィルタ内で定義します。</p>
+
+<pre>&lt;receiver android:name=".PowerConnectionReceiver">
+ &lt;intent-filter>
+ &lt;action android:name="android.intent.action.ACTION_POWER_CONNECTED"/>
+ &lt;action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
+ &lt;/intent-filter>
+&lt;/receiver></pre>
+
+<p>関連付けられている {@link android.content.BroadcastReceiver} 実装の中で、前のステップで説明したように、現在の充電状態と充電方法を抽出します。</p>
+
+<pre>public class PowerConnectionReceiver extends BroadcastReceiver {
+ &#64;Override
+ public void onReceive(Context context, Intent intent) {
+ int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
+ boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
+ status == BatteryManager.BATTERY_STATUS_FULL;
+
+ int chargePlug = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
+ boolean usbCharge = chargePlug == BATTERY_PLUGGED_USB;
+ boolean acCharge = chargePlug == BATTERY_PLUGGED_AC;
+ }
+}</pre>
+
+
+<h2 id="CurrentLevel">現在の電池残量を特定する</h2>
+
+<p>状況によっては、現在の電池残量がわかると便利なことがあります。たとえば、電池残量が所定のレベルを下回った場合にアプリのバックグラウンド更新の頻度を下げることができます。</p>
+
+<p>現在の電池残量を調べるには、次に示すように、電池状態のインテントから現在の電池残量と最大量を抽出します。</p>
+
+<pre>int level = battery.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
+int scale = battery.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
+
+float batteryPct = level / (float)scale;</pre>
+
+
+<h2 id="MonitorLevel">電池残量の大きな変化を監視する</h2>
+
+<p>電池状態を継続的に監視することは簡単ではありませんが、その必要もありません。</p>
+
+<p>一般的に、電池残量を継続的に監視するほうが、電池への影響はアプリの通常の動作によるものよりも大きくなるため、電池残量の大きな変化のみを監視することをおすすめします。特に、端末が電池残量低下状態に入ったときや、その状態が解消されたときです。</p>
+
+<p>次に示すマニフェストの断片は、ブロードキャスト レシーバの中にあるインテント フィルタ要素からの抜粋です。このレシーバは、端末が電池残量低下状態に入ったときや、その状態が解消されたときに呼び出されます。そのために、{@link android.content.Intent#ACTION_BATTERY_LOW} と {@link android.content.Intent#ACTION_BATTERY_OKAY} を受信します。</p>
+
+<pre>&lt;receiver android:name=".BatteryLevelReceiver">
+&lt;intent-filter>
+ &lt;action android:name="android.intent.action.ACTION_BATTERY_LOW"/>
+ &lt;action android:name="android.intent.action.ACTION_BATTERY_OKAY"/>
+ &lt;/intent-filter>
+&lt;/receiver></pre>
+
+<p>一般的に、電池残量がごくわずかになったときはアプリのバックグラウンド更新をすべて停止することをおすすめします。データがいくら新しくても、端末自体の電源が切れてしまったのではデータを活用できません。</p>
+
+<p>多くの場合、端末の充電という動作が開始するのは、端末がホルダーにセットされるのと同時です。次のレッスンでは、現在のホルダーの状態を特定し、端末のホルダー装着状態の変化を監視する方法を紹介します。</p>
+
diff --git a/docs/html/intl/ja/training/monitoring-device-state/connectivity-monitoring.jd b/docs/html/intl/ja/training/monitoring-device-state/connectivity-monitoring.jd
new file mode 100644
index 000000000000..82b0c6b01acb
--- /dev/null
+++ b/docs/html/intl/ja/training/monitoring-device-state/connectivity-monitoring.jd
@@ -0,0 +1,70 @@
+page.title=接続状態の特定と監視
+parent.title=電池消費量の最適化
+parent.link=index.html
+
+trainingnavtop=true
+
+previous.title=ホルダーの装着状態とタイプの特定と監視
+previous.link=docking-monitoring.html
+next.title=オンデマンドでのブロードキャスト レシーバ操作
+next.link=manifest-receivers.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>このレッスンの内容</h2>
+<ol>
+ <li><a href="#DetermineConnection">インターネット接続の有無を特定する</a></li>
+ <li><a href="#DetermineType">インターネット接続のタイプを特定する</a></li>
+ <li><a href="#MonitorChanges">接続状態の変化を監視する</a></li>
+</ol>
+
+
+<h2>関連項目</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">インテントとインテント フィルタ</a>
+</ul>
+
+</div>
+</div>
+
+<p>反復アラームとバックグラウンド サービスの用途のうち代表的なものとしては、インターネット リソースからアプリのデータを定期的に更新するためのスケジュール設定や、データのキャッシュへの格納、長時間に及ぶダウンロードの実行などがあります。しかし、インターネットに接続されていないときや、速度が低すぎるためにダウンロードを完了できない場合にまで、更新をスケジューリングするために端末をスリープ状態から復帰させる必要があるでしょうか。</p>
+
+<p>{@link android.net.ConnectivityManager} を使用すると、端末が実際にインターネットに接続されているかどうかと、接続されている場合の接続タイプを調べることができます。</p>
+
+
+<h2 id="DetermineConnection">インターネット接続の有無を特定する</h2>
+
+<p>端末がインターネットに接続されていない場合は、インターネット リソースに基づく更新をスケジューリングする必要性はありません。次のスニペットは、{@link android.net.ConnectivityManager} を使用してアクティブなネットワークを問い合わせて、インターネットに接続しているかどうかを特定する方法を示すものです。</p>
+
+<pre>ConnectivityManager cm =
+ (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
+
+NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
+boolean isConnected = activeNetwork.isConnectedOrConnecting();</pre>
+
+
+<h2 id="DetermineType">インターネット接続のタイプを特定する</h2>
+
+<p>現在使用可能なインターネット接続のタイプも調べることができます。</p>
+
+<p>端末の接続のタイプとしては、モバイル データ、WiMAX、Wi-Fi、イーサネットがあります。次に示すように、アクティブなネットワークのタイプを問い合わせると、使用可能な帯域幅に合わせて更新頻度を変更することができます。</p>
+
+<pre>boolean isWiFi = activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;</pre>
+
+<p>モバイル データ接続のコストは Wi-Fi 接続を大きく上回る傾向があるため、端末がモバイル接続しているときはアプリの更新頻度を下げるのが一般的です。同様に、大量のデータをダウンロードするときは、Wi-Fi 接続されるまで停止するとよいでしょう。</p>
+
+<p>更新を停止した場合は、接続状態の変化を受信することが重要です。インターネット接続が確立されたら更新を再開できるようにするためです。</p>
+
+
+<h2 id="MonitorChanges">接続状態の変化を監視する</h2>
+
+<p>接続状態の詳細が変化すると、{@link android.net.ConnectivityManager} によって {@link android.net.ConnectivityManager#CONNECTIVITY_ACTION}({@code "android.net.conn.CONNECTIVITY_CHANGE"})アクションがブロードキャストされます。アプリのマニフェスト内でブロードキャスト レシーバを登録し、このような変化を検出することで、それに応じてアプリのバックグラウンド更新を再開(または停止)することができます。</p>
+
+<pre>&lt;action android:name="android.net.conn.CONNECTIVITY_CHANGE"/></pre>
+
+<p>端末の接続状態の変化は、きわめて頻繁になることもあります。このブロードキャストは、モバイル データ接続と Wi-Fi 接続とが切り替わるたびに発行されるからです。したがって、このブロードキャストの監視は、更新やダウンロードを停止した後に再開すべきかどうかを判断するために限って行うことをおすすめします。一般的には、更新を開始する前にインターネット接続の有無を調べれば十分です。インターネットに接続していない場合は、再び接続されるまでの間、更新を停止します。</p>
+
+<p>このようにするには、マニフェスト内で宣言したブロードキャスト レシーバのオンとオフを切り替える必要があります。これについて、次のレッスンで説明します。</p>
diff --git a/docs/html/intl/ja/training/monitoring-device-state/docking-monitoring.jd b/docs/html/intl/ja/training/monitoring-device-state/docking-monitoring.jd
new file mode 100644
index 000000000000..9c0e05435cd4
--- /dev/null
+++ b/docs/html/intl/ja/training/monitoring-device-state/docking-monitoring.jd
@@ -0,0 +1,74 @@
+page.title=ホルダーの装着状態とタイプの特定と監視
+parent.title=電池消費量の最適化
+parent.link=index.html
+
+trainingnavtop=true
+previous.title= 電池残量と充電状態の監視
+previous.link=battery-monitoring.html
+next.title= 接続状態の特定と監視
+next.link=connectivity-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>このレッスンの内容</h2>
+<ol>
+ <li><a href="#CurrentDockState">オーディオ フォーカスをリクエストする</a></li>
+ <li><a href="#DockType">現在のホルダーのタイプを特定する</a></li>
+ <li><a href="#MonitorDockState">ホルダーの装着状態またはタイプの変化を監視する</a></li>
+</ol>
+
+
+<h2>関連項目</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">インテントとインテント フィルタ</a>
+</ul>
+
+</div>
+</div>
+
+<p>Android 搭載端末を装着できるホルダーの種類には、さまざまなものがあります。たとえば、車載用や家庭用のホルダーがあり、デジタルかアナログかという区別もあります。ホルダー装着状態は一般的に、充電状態と密接にリンクしています。多くのホルダーは、装着されている端末に電力を供給しているからです。</p>
+
+<p>端末のホルダー装着状態が更新の頻度にどのように影響するかは、アプリによって異なります。たとえば、スポーツ センター アプリなら、卓上ホルダー装着時には更新頻度を上げ、カー ホルダー装着時には更新を完全に停止するとよいでしょう。逆に、カー ホルダー装着時に更新頻度を最大にするケースとしては、バックグラウンド サービスによって道路交通状況を更新する場合が考えられます。</p>
+
+<p>ホルダー装着状態も sticky {@link android.content.Intent} としてブロードキャストされるので、端末がホルダーに装着されているかどうかと、装着されている場合のホルダーのタイプを問い合わせることができます。</p>
+
+
+<h2 id="CurrentDockState">現在のホルダー装着状態を特定する</h2>
+
+<p>ホルダー装着状態の詳細は、{@link android.content.Intent#ACTION_DOCK_EVENT} アクションの sticky ブロードキャストにエクストラとして含まれています。これは sticky であるため、{@link android.content.BroadcastReceiver} を登録する必要はありません。次のコード例に示すように、{@link android.content.Context#registerReceiver registerReceiver()} を呼び出し、{@code null} をブロードキャスト レシーバとして渡します。</p>
+
+<pre>IntentFilter ifilter = new IntentFilter(Intent.ACTION_DOCK_EVENT);
+Intent dockStatus = context.registerReceiver(null, ifilter);</pre>
+
+<p>現在のホルダー装着状態は、次のように {@code EXTRA_DOCK_STATE} エクストラから抽出します。<p>
+
+<pre>int dockState = battery.getIntExtra(EXTRA_DOCK_STATE, -1);
+boolean isDocked = dockState != Intent.EXTRA_DOCK_STATE_UNDOCKED;</pre>
+
+
+<h2 id="DockType">現在のホルダーのタイプを特定する</h2>
+
+<p>端末がホルダーに装着されている場合のホルダーのタイプは、次の 4 つのいずれかです。
+<ul><li>カー</li>
+<li>卓上</li>
+<li>ローエンド(アナログ)卓上</li>
+<li>ハイエンド(デジタル)卓上</li></ul></p>
+
+<p>最後の 2 つは、Android API レベル 11 で追加されたものです。したがって、ホルダーのタイプだけがわかればよく、デジタルとアナログの区別は問わないという場合は、次のように 3 つすべてについて調べるとよいでしょう。</p>
+
+<pre>boolean isCar = dockState == EXTRA_DOCK_STATE_CAR;
+boolean isDesk = dockState == EXTRA_DOCK_STATE_DESK ||
+ dockState == EXTRA_DOCK_STATE_LE_DESK ||
+ dockState == EXTRA_DOCK_STATE_HE_DESK;</pre>
+
+
+<h2 id="MonitorDockState">ホルダーの装着状態またはタイプの変化を監視する</h2>
+
+<p>端末がホルダーに装着されたり、装着が解除されたりするたびに、{@link android.content.Intent#ACTION_DOCK_EVENT} アクションがブロードキャストされます。端末のホルダー装着状態の変化を監視するには、次のコード例に示すように、アプリのマニフェスト内でブロードキャスト レシーバを登録します。</p>
+
+<pre>&lt;action android:name="android.intent.action.ACTION_DOCK_EVENT"/></pre>
+
+<p>レシーバ実装の中でホルダーのタイプと状態を抽出する方法は、前のステップで使用したものと同じです。</p>
diff --git a/docs/html/intl/ja/training/monitoring-device-state/index.jd b/docs/html/intl/ja/training/monitoring-device-state/index.jd
new file mode 100644
index 000000000000..07897b1f0280
--- /dev/null
+++ b/docs/html/intl/ja/training/monitoring-device-state/index.jd
@@ -0,0 +1,49 @@
+page.title=電池消費量の最適化
+
+trainingnavtop=true
+startpage=true
+next.title=電池残量と充電状態の監視
+next.link=battery-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>依存関係と前提条件</h2>
+<ul>
+ <li>Android 2.0(API レベル 5)以上</li>
+ <li>「<a href="{@docRoot}guide/components/intents-filters.html">インテントとインテント フィルタ</a>」を読み終えていること</li>
+</ul>
+
+<h2>関連項目</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/services.html">サービス</a>
+</ul>
+
+</div>
+</div>
+
+<p>アプリを開発するときは、ホスト端末の電池消費量への影響を抑えるよう心がける必要があります。このクラスを修了すると、開発するアプリの中でホスト端末の状態を監視し、それに基づいて機能や動作を変更することができるようになります。</p>
+
+<p>接続が失われたときはバックグラウンド サービスの更新を停止する、電池残量が低下したときは更新の頻度を下げるといった対策を講じることにより、ユーザー エクスペリエンスを損なうことなく、アプリが電池消費量に及ぼす影響を最小限に抑えることができます。</p>
+
+<h2>レッスン</h2>
+
+<!-- Create a list of the lessons in this class along with a short description of each lesson.
+These should be short and to the point. It should be clear from reading the summary whether someone
+will want to jump to a lesson or not.-->
+
+<dl>
+ <dt><b><a href="battery-monitoring.html">電池残量と充電状態の監視</a></b></dt>
+ <dd>アプリの更新頻度を変更するために現在の電池残量や充電状態の変化を特定および監視する方法を学習します。</dd>
+
+ <dt><b><a href="docking-monitoring.html">ホルダーの装着状態とタイプの特定と監視</a></b></dt>
+ <dd>最適な更新頻度は、ホスト端末がどのように使用されているかによって異なります。ホルダーの装着状態とタイプに応じてアプリの動作を変更するために、これらを特定および監視する方法を学習します。</dd>
+
+ <dt><b><a href="connectivity-monitoring.html">接続状態の特定と監視</a></b></dt>
+ <dd>インターネットに接続していないときは、オンライン ソースからアプリを更新することはできません。接続状態を調べ、それに応じてバックグラウンド更新の頻度を変更する方法を学習します。また、大量の帯域幅を消費する処理を開始する前に接続が Wi-Fi かモバイル データかを調べる方法も学習します。</dd>
+
+ <dt><b><a href="manifest-receivers.html">オンデマンドでのブロードキャスト レシーバ操作</a></b></dt>
+ <dd>マニフェスト内で宣言したブロードキャスト レシーバのオンとオフを実行時に切り替えます。端末の状態に応じて、不要なレシーバを無効にすることができます。効率を上げるために、状態変化レシーバのオンとオフを切り替える方法や、端末が特定の状態になるまでアクションを延期する方法を学習します。</dd>
+</dl> \ No newline at end of file
diff --git a/docs/html/intl/ja/training/monitoring-device-state/manifest-receivers.jd b/docs/html/intl/ja/training/monitoring-device-state/manifest-receivers.jd
new file mode 100644
index 000000000000..7635d9f87c02
--- /dev/null
+++ b/docs/html/intl/ja/training/monitoring-device-state/manifest-receivers.jd
@@ -0,0 +1,50 @@
+page.title=オンデマンドでのブロードキャスト レシーバ操作
+parent.title=電池消費量の最適化
+parent.link=index.html
+
+trainingnavtop=true
+
+previous.title=接続状態の特定と監視
+previous.link=connectivity-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>このレッスンの内容</h2>
+<ol>
+ <li><a href="#ToggleReceivers">効率を上げるために状態変化レシーバのオンとオフを切り替える</a></li>
+</ol>
+
+
+<h2>関連項目</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">インテントとインテント フィルタ</a>
+</ul>
+
+</div>
+</div>
+
+<p>端末の状態変化を監視する最も単純な方法は、監視対象とする状態ごとに {@link android.content.BroadcastReceiver} を作成し、それぞれをアプリのマニフェスト内で登録するというものです。これらの各レシーバ内で、端末の現在の状態に基づいて反復アラームのスケジュールを再設定します。</p>
+
+<p>この方法のデメリットは、これらのレシーバのいずれかがトリガされるたびに端末がスリープから復帰することですが、このことは必要以上に頻繁に発生する可能性があります。</p>
+
+<p>これよりも良い方法は、実行時にブロードキャスト レシーバをオンまたはオフにするというものです。このようにすれば、マニフェスト内で宣言したレシーバを受動的アラームとして使用できます。つまり、このアラームは、必要なときにだけシステム イベントによって呼び出されます。</p>
+
+
+<h2 id="ToggleReceivers">効率を上げるために状態変化レシーバのオンとオフを切り替える </h2>
+
+<p>{@link android.content.pm.PackageManager} を使用すると、マニフェスト内で定義されているコンポーネントの有効化状態を切り替えることができます。このコンポーネントにはブロードキャスト レシーバも該当するので、次に示すようにオンとオフを切り替えることができます。</p>
+
+<pre>ComponentName receiver = new ComponentName(context, myReceiver.class);
+
+PackageManager pm = context.getPackageManager();
+
+pm.setComponentEnabledSetting(receiver,
+ PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
+ PackageManager.DONT_KILL_APP)</pre>
+
+<p>この手法を使用すれば、接続が失われたことが判明した場合に、接続状態変化レシーバ以外のレシーバをすべて無効にすることができます。逆に、接続が確立された後は、接続状態変化の受信を停止します。オンラインかどうかを調べるのは、更新を実行する直前や、反復更新アラームのスケジュール再設定の直前だけで十分です。</p>
+
+<p>同じ手法を使用して、大量の帯域幅を必要とするダウンロードを延期することもできます。それには、接続状態の変化をリッスンするブロードキャスト レシーバを有効にしておき、端末が Wi-Fi に接続されたらダウンロードを開始します。</p>
diff --git a/docs/html/intl/ja/training/multiscreen/adaptui.jd b/docs/html/intl/ja/training/multiscreen/adaptui.jd
new file mode 100644
index 000000000000..8b1e6acdee05
--- /dev/null
+++ b/docs/html/intl/ja/training/multiscreen/adaptui.jd
@@ -0,0 +1,212 @@
+page.title=順応性のある UI フローの実装
+parent.title=複数画面のデザイン
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=さまざまな画面密度のサポート
+previous.link=screendensities.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>このレッスンでの学習内容</h2>
+
+<ol>
+ <li><a href="#TaskDetermineCurLayout">現在のレイアウトを判別する</a></li>
+ <li><a href="#TaskReactToLayout">現在のレイアウトに合わせて応答する</a></li>
+ <li><a href="#TaskReuseFrag">他のアクティビティのフラグメントを再利用する</a></li>
+ <li><a href="#TaskHandleConfigChanges">画面設定の変更を処理する</a></li>
+</ol>
+
+<h2>関連ドキュメント</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/tablets-and-handsets.html">タブレットと携帯端末のサポート</a></li>
+</ul>
+
+<h2>試してみる</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">サンプル アプリのダウンロード</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+
+</div>
+</div>
+
+<p>アプリが現在表示しているレイアウトによって、UI フローが異なる可能性があります。たとえば、アプリがデュアルペイン モードであれば、左ペインのアイテムをクリックすると、単に右ペインにコンテンツが表示されるだけですが、シングルペイン モードであれば、コンテンツは(別のアクティビティ内の)コンテンツ専用のペインに表示される必要があります。</p>
+
+
+<h2 id="TaskDetermineCurLayout">現在のレイアウトを判別する</h2>
+
+<p>レイアウトによって実装が多少異なるので、まず、ユーザーが現在どのようなレイアウトを表示しているかを判別する必要があります。たとえば、ユーザーが表示しているレイアウトが「シングルペイン」モードなのか、「デュアルペイン」モードなのかを確認する必要があります。それは、以下のようなコードで、ある特定のビューが存在し、かつ可視になっているかを照会することで可能です:</p>
+
+<pre class="prettyprint">
+public class NewsReaderActivity extends FragmentActivity {
+ boolean mIsDualPane;
+
+ &#64;Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main_layout);
+
+ View articleView = findViewById(R.id.article);
+ mIsDualPane = articleView != null &amp;&amp;
+ articleView.getVisibility() == View.VISIBLE;
+ }
+}
+</pre>
+
+<p>このコードにおいて「article」ペインが使用可能かどうかを照会している点に注目してください。特定のレイアウトの照会をハードコーディングするよりもはるかに柔軟性があります。</p>
+
+<p>その他にも、さまざまなコンポーネントでも対応できる方法として、コンポーネントを操作する前に使用可能かどうかを確認する方法もあります。たとえば、News Reader サンプル アプリでは、メニューを開くボタンがありますが、このボタンは Android 3.0 よりも古いバージョンで動作しているときにしか表示されません(この機能は、API レベル 11 以上の <PH>{@link android.app.ActionBar}</PH> で提供されるため)。そこで、以下のようなコードを追加して、このボタンのイベント リスナーを追加します:</p>
+
+<pre class="prettyprint">
+Button catButton = (Button) findViewById(R.id.categorybutton);
+OnClickListener listener = /* create your listener here */;
+if (catButton != null) {
+ catButton.setOnClickListener(listener);
+}
+</pre>
+
+
+<h2 id="TaskReactToLayout">現在のレイアウトに合わせて応答する</h2>
+
+<p>現在のレイアウトによって、一部のアクションの結果が異なる可能性があります。たとえば、News Reader サンプルでは、見出しリストで見出しをクリックしたとき、デュアルペイン モードの UI の場合は右ペインに記事が表示されますが、シングルペインの UI の場合は別のアクティビティが起動します:</p>
+
+<pre>
+&#64;Override
+public void onHeadlineSelected(int index) {
+ mArtIndex = index;
+ if (mIsDualPane) {
+ /* display article on the right pane */
+ mArticleFragment.displayArticle(mCurrentCat.getArticle(index));
+ } else {
+ /* start a separate activity */
+ Intent intent = new Intent(this, ArticleActivity.class);
+ intent.putExtra("catIndex", mCatIndex);
+ intent.putExtra("artIndex", index);
+ startActivity(intent);
+ }
+}
+</pre>
+
+<p>同様に、アプリがデュアルペイン モードの場合は、ナビ用タブでアクション バーを設定し、一方、シングルペイン モードの場合は、スピナー ウィジェットでナビを設定することになります。したがって、コードでは以下のようにどちらのケースが適切かを調べることも必要です:</p>
+
+<pre>
+final String CATEGORIES[] = { "トップ ニュース 政治", "政治", "経済", "Technology" };
+
+public void onCreate(Bundle savedInstanceState) {
+ ....
+ if (mIsDualPane) {
+ /* use tabs for navigation */
+ actionBar.setNavigationMode(android.app.ActionBar.NAVIGATION_MODE_TABS);
+ int i;
+ for (i = 0; i &lt; CATEGORIES.length; i++) {
+ actionBar.addTab(actionBar.newTab().setText(
+ CATEGORIES[i]).setTabListener(handler));
+ }
+ actionBar.setSelectedNavigationItem(selTab);
+ }
+ else {
+ /* use list navigation (spinner) */
+ actionBar.setNavigationMode(android.app.ActionBar.NAVIGATION_MODE_LIST);
+ SpinnerAdapter adap = new ArrayAdapter<String>(this,
+ R.layout.headline_item, CATEGORIES);
+ actionBar.setListNavigationCallbacks(adap, handler);
+ }
+}
+</pre>
+
+
+<h2 id="TaskReuseFrag">他のアクティビティのフラグメントを再利用する</h2>
+
+<p>複数の画面に対応するように設計する場合、あるパターンが繰り返されますが、そうしたパターンは、ある画面設定ではペインとして、別の画面設定では別のアクティビティとして実装されるインターフェースの一部に存在します。たとえば、News Reader サンプルでは、ラージ画面の場合はニュース記事のテキストが右ペインに表示されますが、それよりも小さい画面の場合は別のアクティビティになります。</p>
+
+<p>このような場合、通常、複数のアクティビティで同じ <PH>{@link android.app.Fragment}</PH> サブクラスを再利用することでコードの重複を回避できます。たとえば、<code>ArticleFragment</code> は以下のようにデュアルペイン レイアウトで使用されます:</p>
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+
+<p>また、より小さな画面向けのアクティビティ レイアウト内では(レイアウトを使用せずに)再利用されます(<code>ArticleActivity</code>):</p>
+
+<pre>
+ArticleFragment frag = new ArticleFragment();
+getSupportFragmentManager().beginTransaction().add(android.R.id.content, frag).commit();
+</pre>
+
+<p>当然、これは XML レイアウトでフラグメントを宣言するのと同じ効果がありますが、この場合は、XML レイアウトは必要ありません。このアクティビティのコンポーネントは記事フラグメントしかないからです。</p>
+
+<p>フラグメントを設計する際に注意すべき非常に重要なポイントの 1 つとして、特定のアクティビティに対して強い結合を作成しないことがあります。通常、これは、フラグメントが自分のホスト アクティビティとやり取りするのに必要なあらゆる手段を抽象化したインターフェースを定義し、さらに、そのインターフェースをホスト アクティビティに実装することで可能になります:</p>
+
+<p>たとえば、News Reader アプリの <code>HeadlinesFragment</code> は、まさにそのようになっています:</p>
+
+<pre>
+public class HeadlinesFragment extends ListFragment {
+ ...
+ OnHeadlineSelectedListener mHeadlineSelectedListener = null;
+
+ /* Must be implemented by host activity */
+ public interface OnHeadlineSelectedListener {
+ public void onHeadlineSelected(int index);
+ }
+ ...
+
+ public void setOnHeadlineSelectedListener(OnHeadlineSelectedListener listener) {
+ mHeadlineSelectedListener = listener;
+ }
+}
+</pre>
+
+<p>これにより、ユーザーが見出しを選択すると、フラグメントは以下のように(特定のハードコーディングされたアクティビティに通知するのではなく)ホスト アクティビティが指定したリスナーに通知します:</p>
+
+<pre>
+public class HeadlinesFragment extends ListFragment {
+ ...
+ &#64;Override
+ public void onItemClick(AdapterView&lt;?&gt; parent,
+ View view, int position, long id) {
+ if (null != mHeadlineSelectedListener) {
+ mHeadlineSelectedListener.onHeadlineSelected(position);
+ }
+ }
+ ...
+}
+</pre>
+
+<p>このテクニックについては、<a
+href="{@docRoot}guide/practices/tablets-and-handsets.html">タブレットと携帯端末のサポート</a>で詳しく説明されています。</p>
+
+
+<h2 id="TaskHandleConfigChanges">画面設定の変更を処理する</h2>
+
+<p>インターフェースの各パーツを実装するのに個別のアクティビティを使用している場合、インターフェースの一貫性を維持するために、(向きの変更などの)特定の設定変更に対応できるように注意する必要があります。</p>
+
+<p>たとえば、Android 3.0 以上が動作する一般的な 7 インチ タブレットでは、News Reader サンプルがニュース記事を表示する場合、縦表示では個別のアクティビティを使用しますが、横表示では 2 ペイン レイアウトを使用します。</p>
+
+<p>つまり、縦表示のときに記事閲覧用アクティビティが画面上にある場合、画面の向きが横方向に変わったことを検出したら、コンテンツを 2 ペイン レイアウトで表示するために、そのアクティビティを終了してメインのアクティビティに戻り、適切に応答しなければなりません:</p>
+
+<pre>
+public class ArticleActivity extends FragmentActivity {
+ int mCatIndex, mArtIndex;
+
+ &#64;Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ mCatIndex = getIntent().getExtras().getInt("catIndex", 0);
+ mArtIndex = getIntent().getExtras().getInt("artIndex", 0);
+
+ // If should be in two-pane mode, finish to return to main activity
+ if (getResources().getBoolean(R.bool.has_two_panes)) {
+ finish();
+ return;
+ }
+ ...
+}
+</pre>
+
+
diff --git a/docs/html/intl/ja/training/multiscreen/index.jd b/docs/html/intl/ja/training/multiscreen/index.jd
new file mode 100644
index 000000000000..ff84f8a718e6
--- /dev/null
+++ b/docs/html/intl/ja/training/multiscreen/index.jd
@@ -0,0 +1,64 @@
+page.title=複数画面のデザイン
+
+trainingnavtop=true
+startpage=true
+next.title=さまざまな画面サイズのサポート
+next.link=screensizes.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>必要な知識と前提条件</h2>
+
+<ul>
+ <li>Android 1.6 以上(サンプル アプリを使用するには 2.1 以上)</li>
+ <li><a
+href="http://developer.android.com/guide/components/activities.html">アクティビティ</a>と<a href="http://developer.android.com/guide/components/fragments.html">フラグメント</a>の基礎知識</li>
+ <li>Android <a
+href="http://developer.android.com/guide/topics/ui/index.html">ユーザー インターフェース</a>の開発経験</li>
+ <li><a
+href="{@docRoot}tools/extras/support-library.html">サポート ライブラリ</a>の利用(一部の機能で必要)</li>
+</ul>
+
+<h2>関連ドキュメント</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">複数画面のサポート</a></li>
+</ul>
+
+<h2>試してみる</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">サンプル アプリのダウンロード</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>Android は、小さな携帯電話から大きなテレビまで、画面サイズも種類もさまざまなデバイスに搭載できます。そのため、できる限り多くのユーザーが使用できるように、すべての画面サイズに対応できるようアプリを設計することが重要になります。</p>
+
+<p>しかし、さまざまな種類のデバイスに対応できるだけでは十分ではありません。画面サイズによって、ユーザーが操作できることが決まってくるため、本当にユーザーを満足させてよい印象を持ってもらうためには、アプリが単に複数の画面をサポートするだけでは不十分です: 画面設定ごとにユーザー エクスペリエンスを最適化する必要があります。<em></em><em></em></p>
+
+<p>このクラスは、いくつかの画面設定に合わせて最適化されたユーザー インターフェースを実装する方法を提供します。</p>
+
+<p>各レッスンで紹介されているコードは、複数の画面に合わせて最適化する際、ベスト プラクティスとなるサンプル アプリから抜粋したものです。このサンプルを(右側から)ダウンロードして、再利用可能なコードのソースとしてご自分のアプリに使用することができます。</p>
+
+<p class="note"><strong>注:</strong> このクラスと関連サンプルでは、<a
+href="{@docRoot}tools/extras/support-library.html">サポート ライブラリ</a>を使用します。理由は、Android 3.0 未満のバージョンで <PH>{@link android.app.Fragment}</PH> API を使用するためです。このクラスのすべての API を使用するには、ライブラリをダウンロードして、アプリに追加する必要があります。</p>
+
+
+<h2>レッスン</h2>
+
+<dl>
+ <dt><b><a href="screensizes.html">さまざまな画面サイズのサポート</a></b></dt>
+ <dd>このレッスンでは、さまざまな画面サイズに適したレイアウトを(柔軟なビュー サイズ、 <PH>{@link android.widget.RelativeLayout}</PH>、画面サイズと画面の向きの修飾子、エイリアス フィルタ、ナインパッチ ビットマップを使用して)設計する方法について学習します。</dd>
+
+ <dt><b><a href="screendensities.html">さまざまな画面密度のサポート</a></b></dt>
+ <dd>このレッスンでは、(密度非依存ピクセルを使用し、各密度に適したビットマップを提供して)ピクセル密度が異なる画面をサポートする方法について学習します。</dd>
+
+ <dt><b><a href="adaptui.html">順応性のある UI フローの実装</a></b></dt>
+ <dd>このレッスンでは、いくつかの画面サイズ/密度の組み合わせに適した方法(実行時にアクティブなレイアウトを検出する方法、現在のレイアウトに合わせて応答する方法、画面設定の変更を処理する方法)で UI を実装する方法について学習します。</dd>
+</dl>
diff --git a/docs/html/intl/ja/training/multiscreen/screendensities.jd b/docs/html/intl/ja/training/multiscreen/screendensities.jd
new file mode 100644
index 000000000000..3482d5c5117e
--- /dev/null
+++ b/docs/html/intl/ja/training/multiscreen/screendensities.jd
@@ -0,0 +1,100 @@
+page.title=さまざまな画面密度のサポート
+parent.title=複数画面のデザイン
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=さまざまな画面サイズのサポート
+previous.link=screensizes.html
+next.title=順応性のある UI フローの実装
+next.link=adaptui.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>このレッスンでの学習内容</h2>
+<ol>
+ <li><a href="#TaskUseDP">密度非依存ピクセルを使用する</a></li>
+ <li><a href="#TaskProvideAltBmp">代替ビットマップを生成する</a></li>
+</ol>
+
+<h2>関連ドキュメント</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">複数画面のサポート</a></li>
+ <li><a href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">アイコン設計のガイドライン</a></li>
+</ul>
+
+<h2>試してみる</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">サンプル アプリのダウンロード</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+
+</div>
+</div>
+
+<p>このレッスンでは、異なるリソースを生成し、かつ解像度非依存単位を使用して、異なる画面密度をサポートする方法について学習します。</p>
+
+<h2 id="TaskUseDP">密度非依存ピクセルを使用する</h2>
+
+<p>レイアウトを設計する際に回避すべきよくある落とし穴の 1 つとして、絶対ピクセルを使用して距離やサイズを定義することがあります。ピクセルを使用してレイアウトのサイズを定義すると、画面によってピクセル密度が異なるため、問題が起こります。したがって、同じピクセル数では、デバイスが異なる場合に物理サイズが異なる可能性があります。そのため、サイズを指定する場合は、常に <code>dp</code> 単位や <code>sp</code> 単位を使用します。<code>dp</code> とは、1 ピクセルの物理サイズが 160 dpi に相当する密度非依存ピクセルです。<code>sp</code> も基本単位は同じですが、ユーザーの優先テキスト サイズによってサイズが決まるので(スケール非依存ピクセル)、テキスト サイズを定義する際にはこの単位を使用する必要があります(ただし、レイアウト サイズには絶対に使用しないこと)。</p>
+
+<p>たとえば、2 つのビューの間にスペースを挿入する場合は、<code>px</code> ではなくて <code>dp</code> を使用します:</p>
+
+<pre>
+&lt;Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="&#64;string/clickme"
+ android:layout_marginTop="20dp" /&gt;
+</pre>
+
+<p>テキスト サイズを指定する場合は、常に <code>sp</code> を使用します:</p>
+
+<pre>
+&lt;TextView android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="20sp" /&gt;
+</pre>
+
+
+<h2 id="TaskProvideAltBmp">代替ビットマップを生成する</h2>
+
+<p>Android は、画面密度がさまざまなデバイスで動作するため、それぞれの汎用密度バケット(低密度、中密度、高密度、超高密度)に合わせてビットマップ リソースを生成する必要があります。そうすることで、すべての画面密度で画質とパフォーマンスが向上します。</p>
+
+<p>これらの画像を生成するには、ベクター形式の未加工リソースから、次のサイズ スケールを使用して密度別に画像を生成する必要があります:</p>
+
+<p><ul>
+ <li><code>xhdpi</code>: 2.0
+ <li><code>hdpi</code>: 1.5
+ <li><code>mdpi</code>: 1.0(基準)
+ <li><code>ldpi</code>: 0.75
+</ul></p>
+
+<p>つまり、200&times;200 画像(<code>xhdpi</code> デバイス用)を生成する場合、同じリソースを 150&times;150 画像(<code>hdpi</code> デバイス用)、100&times;100 画像(<code>mdpi</code> デバイス用)、75&times;75(<code>ldpi</code> デバイス用)でも生成する必要があります。</p>
+
+<p>さらに、生成した画像を <code>res/</code> 下の適切なサブディレクトリに配置することで、アプリが動作するデバイスの画面密度に基づいて、自動的に適切な画像が表示されます:</p>
+
+<pre class="classic no-pretty-print">
+MyProject/
+ res/
+ drawable-xhdpi/
+ awesomeimage.png
+ drawable-hdpi/
+ awesomeimage.png
+ drawable-mdpi/
+ awesomeimage.png
+ drawable-ldpi/
+ awesomeimage.png
+</pre>
+
+<p>また、<code>&#64;drawable/awesomeimage</code> を参照する場合は常に画面の dpi に基づいて、適切なビットマップが選択されます。</p>
+
+<p>アプリ用のアイコン アセットを作成するためのヒントとガイドラインについては、<a
+href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">アイコン設計のガイドライン</a>をご覧ください。</p>
+
diff --git a/docs/html/intl/ja/training/multiscreen/screensizes.jd b/docs/html/intl/ja/training/multiscreen/screensizes.jd
new file mode 100644
index 000000000000..3655a33be2b9
--- /dev/null
+++ b/docs/html/intl/ja/training/multiscreen/screensizes.jd
@@ -0,0 +1,279 @@
+page.title=さまざまな画面サイズのサポート
+parent.title=複数画面のデザイン
+parent.link=index.html
+
+trainingnavtop=true
+next.title=さまざまな画面密度のサポート
+next.link=screendensities.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>このレッスンでの学習内容</h2>
+<ol>
+ <li><a href="#TaskUseWrapMatchPar">「wrap_content」と「match_parent」を使用する</a></li>
+ <li><a href="#TaskUseRelativeLayout">RelativeLayout を使用する</a></li>
+ <li><a href="#TaskUseSizeQuali">サイズ修飾子を使用する</a></li>
+ <li><a href="#TaskUseSWQuali">最小幅修飾子を使用する</a></li>
+ <li><a href="#TaskUseAliasFilters">レイアウト エイリアスを使用する</a></li>
+ <li><a href="#TaskUseOriQuali">画面の向きの修飾子を使用する</a></li>
+ <li><a href="#TaskUse9Patch">ナインパッチ ビットマップを使用する</a></li>
+</ol>
+
+<h2>関連ドキュメント</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">複数画面のサポート</a></li>
+</ul>
+
+<h2>試してみる</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">サンプル アプリのダウンロード</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>このレッスンでは、異なる画面サイズを以下のような方法でサポートする方法について学習します:</p>
+<ul>
+ <li>画面に収まるようにレイアウト サイズを適切に変更する</li>
+ <li>画面設定に基づいて適切な UI レイアウトを表示する</li>
+ <li>適切な画面に適切なレイアウトを適用する</li>
+ <li>適切にサイズ調整したビットマップを表示する</li>
+</ul>
+
+
+<h2 id="TaskUseWrapMatchPar">「wrap_content」と「match_parent」を使用する</h2>
+
+<p>レイアウトをさまざまな画面サイズに柔軟に対応させるには、一部のビュー コンポーネントの幅と高さに <code>"wrap_content"</code> と <code>"match_parent"</code> を使用する必要があります。<code>"wrap_content"</code> を使用すると、ビューの幅や高さがそのビュー内にコンテンツが収まるのに必要な最小サイズに設定されます。一方、<code>"match_parent"</code>(API レベル 8 より前の名称は <code>"fill_parent"</code>)を使用すると、コンポーネントがその親ビューのサイズに一致するまで拡大されます。</p>
+
+<p>ハードコーディングされたサイズの代わりに <code>"wrap_content"</code> と <code>"match_parent"</code> を使用することで、ビューはそれぞれ、そのビューに必要なスペースだけを使用したり、空きスペースを埋めるまで拡大したりします。次に例を示します:</p>
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
+
+<p>このサンプルでは、特定のサイズではない <code>"wrap_content"</code> と <code>"match_parent"</code> をコンポーネント サイズにどのように使用しているかに注目してください。こうすることで、異なる画面のサイズと向きにレイアウトを正しく対応させることができます。</p>
+
+<p>たとえば、このレイアウトを縦表示と横表示で表示したときの見え方を以下に示します。コンポーネントのサイズが幅と高さに自動的に適合している点に注目してください:</p>
+
+<img src="{@docRoot}images/training/layout-hvga.png" />
+<p class="img-caption"><strong>図 1.</strong> News Reader サンプル アプリの縦表示(左)と横表示(右)</p>
+
+
+<h2 id="TaskUseRelativeLayout">RelativeLayout を使用する</h2>
+
+<p>ネストされた <PH>{@link android.widget.LinearLayout} インスタンスや、</PH> <code>"wrap_content"</code> と <code>"match_parent"</code> のサイズの組み合わせを使用すると、かなり複雑なレイアウトを作成できます。しかし、 <PH>{@link android.widget.LinearLayout}</PH> では、子ビューの空間的な位置関係を正確に制御することはできません。 <PH>{@link android.widget.LinearLayout} のビューは、</PH> 単に一列に並ぶだけです。子ビューに対して直線以外のさまざまな配置を実現する必要がある場合は、 <PH>{@link android.widget.RelativeLayout}</PH>を使用することでうまくいくことがよくあります。たとえば、1 つの子ビューを画面の左側に配置し、もう 1 つの子ビューを右側に配置できます。</p>
+
+<p>次に例を示します:</p>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"&gt;
+ &lt;TextView
+ android:id="&#64;+id/label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/&gt;
+ &lt;EditText
+ android:id="&#64;+id/entry"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="&#64;id/label"/&gt;
+ &lt;Button
+ android:id="&#64;+id/ok"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="&#64;id/entry"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10dp"
+ android:text="OK" /&gt;
+ &lt;Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="&#64;id/ok"
+ android:layout_alignTop="&#64;id/ok"
+ android:text="Cancel" /&gt;
+&lt;/RelativeLayout&gt;
+</pre>
+
+<p>図 2 は、このレイアウトの QVGA 画面での見え方を示しています。</p>
+
+<img src="{@docRoot}images/training/relativelayout1.png" />
+<p class="img-caption"><strong>図 2.</strong> QVGA 画面(スモール画面)のスクリーンショット</p>
+
+<p>図 3 は、このレイアウトのラージ画面での見え方を示しています。</p>
+
+<img src="{@docRoot}images/training/relativelayout2.png" />
+<p class="img-caption"><strong>図 3.</strong> WSVGA 画面(ラージ画面)のスクリーンショット</p>
+
+<p>コンポーネントのサイズが変更されても、 <PH>{@link android.widget.RelativeLayout.LayoutParams}</PH>で指定されたとおりに空間的な位置関係が維持されていることがわかります。</p>
+
+
+<h2 id="TaskUseSizeQuali">サイズ修飾子を使用する</h2>
+
+<p>柔軟なレイアウトや相対的なレイアウトから得られる恩恵は、前のセクションで説明したことくらいです。これらのレイアウトはコンポーネントの内部や周囲のスペースを引き延ばすことでさまざまな画面に対応しますが、それぞれの画面サイズに合った最高のユーザー エクスペリエンスを実現していない可能性があります。したがって、アプリでは、柔軟なレイアウトの実装だけではなく、さまざまな画面設定に合わせた複数の代替レイアウトも必要になります。これは、<a href="http://developer.android.com/guide/practices/screens_support.html#qualifiers">設定修飾子</a>を使用することで実現可能です。設定修飾子により、ランタイムが現在のデバイスの設定に基づいて適切なリソース(画面サイズ別のレイアウト デザインなど)を自動的に選択できます。</p>
+
+<p>たとえば、多くのアプリでは、ラージ画面用に「2 ペイン」パターンを実装しています(一方のペインに項目リスト、もう一方のペインにそのコンテンツを表示することが可能です)。タブレットやテレビは両方のペインを同時に表示できるほど十分に大きい画面ですが、携帯端末の画面では 2 つのペインを別々に表示する必要があります。そのようなレイアウトを実装するには、次のようなファイルが必要になります:</p>
+
+<ul>
+ <li><code>res/layout/main.xml</code>、シングルペイン(デフォルト)レイアウト:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+</li>
+ <li><code>res/layout-large/main.xml</code>、2 ペイン レイアウト:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+</li>
+</ul>
+
+<p>2 番目のレイアウトのディレクトリ名の <code>large</code> 修飾子に注目してください。このレイアウトは、ラージ(7 インチ以上のタブレットなど)と分類された画面のデバイスで選択されます。それよりも小さいデバイスでは、その他のレイアウト(修飾子なし)が選択されます。</p>
+
+
+<h2 id="TaskUseSWQuali">最小幅修飾子を使用する</h2>
+
+<p>Android 3.2 未満のデバイスでデベロッパーが抱えていた問題の 1 つに、Dell Streak、初代 Galaxy Tab、7 インチ タブレット全般を含む、「ラージ」画面サイズの分類があります。しかし、多くのアプリでは、すべて「ラージ」画面と見なされたとしても、このカテゴリ内のデバイスのサイズに合わせて異なるレイアウト(5 インチと 7 インチのデバイス用など)を表示したい場合があります。そこで、Android 3.2 では「最小幅」修飾子などが導入されました。</p>
+
+<p>最小幅修飾子を使用すると、dp で指定した特定の最小幅の画面を対象とすることができます。たとえば、一般的な 7 インチ タブレットは最小幅が 600 dp なので、これらの画面の UI で 2 つのペイン(ただし、それよりも小さい画面ではシングル リスト)を表示したい場合は、前のセクションで説明した 2 つのレイアウトをシングルペイン レイアウト用と 2 ペイン レイアウト用としてそのまま利用できます。ただし、<code>large</code> サイズ修飾子の代わりに、<code>sw600dp</code> を使用して、最小幅が 600 dp の画面では 2 ペイン レイアウトになるよう指定します:</p>
+
+<ul>
+ <li><code>res/layout/main.xml</code>、シングルペイン(デフォルト)レイアウト:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+</li>
+ <li><code>res/layout-sw600dp/main.xml</code>、2 ペイン レイアウト:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+</li>
+</ul>
+
+<p>つまり、最小幅が 600dp 以上のデバイスでは <code>layout-sw600dp/main.xml</code>(2 ペイン)レイアウトが選択され、それよりも小さい画面では <code>layout/main.xml</code>(シングルペイン)レイアウトが選択されるということです。</p>
+
+<p>ただし、Android 3.2 未満のデバイスではこの修飾子は機能しません。これは <code>sw600dp</code> をサイズ修飾子として認識できないためです。したがって、引き続き <code>large</code> 修飾子も使用する必要があります。そこで、<code>res/layout-sw600dp/main.xml</code> と同じ内容の <code>res/layout-large/main.xml</code> という名前のファイルも必要になります。次のセクションでは、このようにレイアウト ファイルの重複を避けるためのテクニックについて学習します。</p>
+
+
+<h2 id="TaskUseAliasFilters">レイアウト エイリアスを使用する</h2>
+
+<p>最小幅修飾子は、Android 3.2 以上でしか利用できません。したがって、旧バージョンとの互換性を維持するために、あいまいなサイズ分類(small、normal、large、xlarge)も併用することが必要です。たとえば、携帯端末ではシングルペイン UI、7 インチ タブレットやテレビなどの大きなデバイスではマルチペイン UI を表示するよう UI を設計する場合、以下のようなファイルが必要になります:</p>
+
+<p><ul>
+<li><code>res/layout/main.xml:</code> シングルペイン レイアウト</li>
+<li><code>res/layout-large:</code> マルチペイン レイアウト</li>
+<li><code>res/layout-sw600dp:</code> マルチペイン レイアウト</li>
+</ul></p>
+
+<p>最後の 2 つのファイルは同じものです。一方は Android 3.2 デバイス用で、もう一方は旧バージョンの Android を搭載したタブレットとテレビ用です。</p>
+
+<p>このようにタブレット/テレビ用として同じファイルを使用することで起こる重複(さらに、その結果メンテナンスが困難になる状況)を避けるために、エイリアス ファイルを使用できます。たとえば、次のようなレイアウトを定義できます:</p>
+
+<ul>
+<li><code>res/layout/main.xml</code>、シングルペイン レイアウト</li>
+<li><code>res/layout/main_twopanes.xml</code>、2 ペイン レイアウト</li>
+</ul>
+
+<p>さらに、次の 2 つのファイルを追加します:</p>
+
+<p><ul>
+<li><code>res/values-large/layout.xml</code>:
+<pre>
+&lt;resources>
+ &lt;item name="main" type="layout">&#64;layout/main_twopanes&lt;/item>
+&lt;/resources>
+</pre>
+</li>
+
+<li><code>res/values-sw600dp/layout.xml</code>:
+<pre>
+&lt;resources>
+ &lt;item name="main" type="layout">&#64;layout/main_twopanes&lt;/item>
+&lt;/resources>
+</pre>
+
+</li>
+</ul></p>
+
+<p>最後の 2 つのファイルの内容は同じですが、実際のレイアウトは定義していません。これらのファイルは、単に <PH>{@code main}</PH> を <PH>{@code main_twopanes}</PH>へのエイリアスになるように設定しただけです。これらのファイルには <code>large</code> と <code>sw600dp</code> セレクタが含まれているので、Android のバージョンに関係なく(
+<PH>Android 3.2 未満のタブレット/テレビは {@code large} に一致し、</PH>Android 3.2 以上のタブレット/テレビは <code>sw600dp</code> に一致します)タブレット/テレビに適用されます。</p>
+
+
+<h2 id="TaskUseOriQuali">画面の向きの修飾子を使用する</h2>
+
+<p>横表示と縦表示が両方とも正しく表示されるレイアウトもありますが、ほとんどのレイアウトは調整が必要になります。以下に、News Reader サンプル アプリの各画面のサイズと向きでレイアウトがどのように表示されるかを示します:</p>
+
+<p><ul>
+<li><b>スモール画面、縦表示:</b> シングル ペイン、ロゴ付き</li>
+<li><b>スモール画面、横表示:</b> シングル ペイン、ロゴ付き</li>
+<li><b>7 インチ タブレット、縦表示:</b> シングル ペイン、アクション バー付き</li>
+<li><b>7 インチ タブレット、横表示:</b> デュアル ペイン、ワイド、アクション バー付き</li>
+<li><b>10 インチ タブレット、縦表示:</b> デュアル ペイン、ナロー、アクション バー付き</li>
+<li><b>10 インチ タブレット、横表示:</b> デュアル ペイン、ワイド、アクション バー付き</li>
+<li><b>テレビ、横表示:</b> デュアル ペイン、ワイド、アクション バー付き</li>
+</ul></p>
+
+<p>これらの各レイアウトは、<code>res/layout/</code> ディレクトリ内の XML ファイルに定義されています。各レイアウトをさまざまな画面設定に割り当てるには、アプリでレイアウト エイリアスを使用して、各設定に対応付けます:</p>
+
+<p><code>res/layout/onepane.xml:</code></p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+
+<p><code>res/layout/onepane_with_bar.xml:</code></p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
+
+<p><code>res/layout/twopanes.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+
+<p><code>res/layout/twopanes_narrow.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes_narrow.xml all}
+
+<p>これで、考えられるすべてのレイアウトが定義されました。あとは、設定修飾子を使用して、適切なレイアウトを各設定にマッピングするだけです。そのためには、以下のようなレイアウト エイリアス テクニックを使用することができます:</p>
+
+<p><code>res/values/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values/layouts.xml all}
+
+<p><code>res/values-sw600dp-land/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-sw600dp-land/layouts.xml
+all}
+
+<p><code>res/values-sw600dp-port/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-sw600dp-port/layouts.xml
+all}
+
+<p><code>res/values-large-land/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-large-land/layouts.xml all}
+
+<p><code>res/values-large-port/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-large-port/layouts.xml all}
+
+
+
+<h2 id="TaskUse9Patch">ナインパッチ ビットマップを使用する</h2>
+
+<p>異なる画面サイズをサポートするには、画像リソースも異なるサイズに対応できないといけません。たとえば、ボタンの背景は、適用されるボタンの形状が異なってもサイズが合わなければいけません。</p>
+
+<p>サイズ変更可能なコンポーネントでシンプルな画像を使用すると、ランタイムによって画像が一様に拡大縮小されるので、いくぶん期待はずれの結果になることがすぐにわかります。これは、ナインパッチ ビットマップを使用することで解決します。ナインパッチ ビットマップとは、拡大可能な領域と拡大不可能な領域が指定された特殊なフォーマットの PNG ファイルです。</p>
+
+<p>そのため、サイズが変化するコンポーネントで使用するビットマップをデザインする場合は、常にナインパッチを使用してください。ビットマップをナインパッチに変換するには、まず、通常の画像を用意します(図 4: わかりやすく 4 倍に拡大しています)。</p>
+
+<img src="{@docRoot}images/training/button.png" />
+<p class="img-caption"><strong>図 4.</strong> <code>button.png</code></p>
+
+<p>次に、 <ode
+href="{@docRoot}tools/help/draw9patch.html">SDK の <code>draw9patch</code></a> ユーティリティ(<code>tools/</code> ディレクトリにあります)からナインパッチを実行して、左境界線と上境界線上にピクセル(ドット)を描くことで拡大する領域にマークを付けます。また、右境界線と下境界線上にピクセルを描くことで、コンテンツを入れる領域をマークできます(図 5)。</p>
+
+<img src="{@docRoot}images/training/button_with_marks.png" />
+<p class="img-caption"><strong>図 5.</strong> <code>button.9.png</code></p>
+
+<p>境界線上に黒いピクセルがあることに注目してください。左境界線と上境界線上のものは画像を拡大できる領域で、右境界線と下境界線上のものはコンテンツを配置する領域を示しています。</p>
+
+<p>さらに、<code>.9.png</code> という拡張子にも注目してください。この拡張子は必ず使用してください。そうすることで、通常の PNG 画像ではなく、ナインパッチ画像であることがフレームワークによって検出されます。</p>
+
+<p>この背景を(<code>android:background="&#64;drawable/button"</code> を設定して)コンポーネントに適用すると、ボタンのサイズに合わせて適切に画像が拡大します(図 6 のさまざまなサイズを参照)。</p>
+
+<img src="{@docRoot}images/training/buttons_stretched.png" />
+<p class="img-caption"><strong>図 6</strong><code>button.9.png</code> ナインパッチを使用したさまざまなサイズのボタン</p>
+
diff --git a/docs/html/intl/ko/training/monitoring-device-state/battery-monitoring.jd b/docs/html/intl/ko/training/monitoring-device-state/battery-monitoring.jd
new file mode 100644
index 000000000000..2eacccf64106
--- /dev/null
+++ b/docs/html/intl/ko/training/monitoring-device-state/battery-monitoring.jd
@@ -0,0 +1,120 @@
+page.title=배터리 수준 및 충전 상태 모니터링
+parent.title=배터리 수명 최적화
+parent.link=index.html
+
+trainingnavtop=true
+next.title=도킹 상태와 유형 확인 및 모니터링
+next.link=docking-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>강의 목표</h2>
+<ol>
+ <li><a href="#DetermineChargeState">현재 충전 상태 확인</a></li>
+ <li><a href="#MonitorChargeState">충전 상태 변경사항 모니터링</a></li>
+ <li><a href="#CurrentLevel">현재 배터리 수준 확인</a></li>
+ <li><a href="#MonitorLevel">배터리 수준 중요 변경사항 모니터링</a></li>
+</ol>
+
+<h2>참고자료</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">인텐트 및 인텐트 필터</a>
+</ul>
+
+</div>
+</div>
+
+<p>백그라운드 업데이트가 배터리 수명에 미치는 영향을 줄이기 위하여 백그라운드 업데이트 빈도수를 변경하는 경우, 현재 배터리 수준과 충전 상태부터 확인하는 것이 좋습니다.</p>
+
+<p>애플리케이션 업데이트 수행이 배터리 수명에 미치는 영향은 배터리 수준 및 기기의 충전 상태에 따라 다릅니다. 기기를 AC 충전기로 충전하는 동안 업데이트 수행이 미치는 영향은 무시해도 좋습니다. 따라서 기기가 범용 충전기에 연결되어 있을 때는 대부분 새로고침 빈도를 최대화할 수 있습니다. 반대로 기기가 충전 중이 아니라면, 업데이트 빈도를 줄이는 것이 배터리 수명 연장에 도움이 됩니다.</p>
+
+<p>마찬가지로 배터리가 거의 방전된 경우, 업데이트 빈도를 줄이거나 중단할 수 있습니다.</p>
+
+
+<h2 id="DetermineChargeState">현재 충전 상태 확인</h2>
+
+<p>먼저 현재 충전 상태를 확인하는 것부터 시작합니다. {@link android.os.BatteryManager}는 배터리 충전 상태 등 충전 정보를 스티키 {@link android.content.Intent}를 통해 브로드캐스트합니다.</p>
+
+<p>스티키 인텐트이므로 {@link android.content.BroadcastReceiver}를 등록할 필요가 없으며 아래 코드 상의 리시버와 같이 간단히 {@code registerReceiver}을(를) 호출하여 {@code null}에 제출하면 현재 배터리 상태가 담긴 인텐트가 반환됩니다. 여기에 실제 {@link android.content.BroadcastReceiver} 개체 사용할 수 있으나, 이후 섹션에서 업데이트를 다루게 되므로 그럴 필요는 없습니다.</p>
+
+<pre>IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
+Intent batteryStatus = context.registerReceiver(null, ifilter);</pre>
+
+<p>현재 충전 상태와 어떤 충전기(USB 또는 AC 전원)로 충전하는지 추출할 수 있습니다.<p>
+
+<pre>// Are we charging / charged?
+int status = batteryStatus.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
+boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
+ status == BatteryManager.BATTERY_STATUS_FULL;
+
+// How are we charging?
+int chargePlug = battery.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
+boolean usbCharge = chargePlug == BATTERY_PLUGGED_USB;
+boolean acCharge = chargePlug == BATTERY_PLUGGED_AC;</pre>
+
+<p>일반적으로 기기가 AC 충전기에 연결된 경우 백그라운드 업데이트 빈도를 최대화합니다. USB를 통해 충전하는 경우 업데이트 빈도를 낮춥니다. 배터리가 방전 중이라면 빈도를 더 많이 낮추도록 합니다.</p>
+
+
+<h2 id="MonitorChargeState">충전 상태 변경사항 모니터링</h2>
+
+<p>충전 상태는 수시로 변하므로 충전 상태의 변경사항을 확인하고 이에 따라 업데이트 주기를 변경하는 것이 중요합니다.</p>
+
+<p>{@link android.os.BatteryManager}는 기기가 전원에 연결되어 있는지 여부와 관계없이 언제나 액션을 브로드캐스트합니다. 앱이 실행되지 않는 동안에도 이벤트를 수신하는 것이 중요합니다. 특히 백그라운드 업데이트를 실행하기 위해 앱을 시작하는 빈도수에 이벤트가 영향을 주기 때문입니다. 따라서 두 이벤트를 수신하려면 매니페스트에서 {@link android.content.BroadcastReceiver}를 등록하여 인텐트 필터 내에 {@link android.content.Intent#ACTION_POWER_CONNECTED}와 {@link android.content.Intent#ACTION_POWER_DISCONNECTED}를 정의해야 합니다.</p>
+
+<pre>&lt;receiver android:name=".PowerConnectionReceiver">
+ &lt;intent-filter>
+ &lt;action android:name="android.intent.action.ACTION_POWER_CONNECTED"/>
+ &lt;action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
+ &lt;/intent-filter>
+&lt;/receiver></pre>
+
+<p>다음의 {@link android.content.BroadcastReceiver} 구현에서 이전 단계에서 설명한 대로 현재 충전 상태와 방법을 알아낼 수 있습니다.</p>
+
+<pre>public class PowerConnectionReceiver extends BroadcastReceiver {
+ &#64;Override
+ public void onReceive(Context context, Intent intent) {
+ int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
+ boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
+ status == BatteryManager.BATTERY_STATUS_FULL;
+
+ int chargePlug = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
+ boolean usbCharge = chargePlug == BATTERY_PLUGGED_USB;
+ boolean acCharge = chargePlug == BATTERY_PLUGGED_AC;
+ }
+}</pre>
+
+
+<h2 id="CurrentLevel">현재 배터리 수준 확인</h2>
+
+<p>현재 배터리 수준을 확인하는 것이 유용한 경우도 있습니다. 배터리 충전이 수준 이하인 경우 백그라운드 업데이트 빈도를 줄일 수 있습니다.</p>
+
+<p>다음은 배터리 상태 정보가 담긴 인텐트에서 현재 배터리 수준 및 충전 상태를 추출하는 방법입니다.</p>
+
+<pre>int level = battery.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
+int scale = battery.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
+
+float batteryPct = level / (float)scale;</pre>
+
+
+<h2 id="MonitorLevel">배터리 수준 중요 변경사항 모니터링</h2>
+
+<p>배터리 상태를 지속적으로 확인하는 것은 쉽지 않지만, 꼭 그럴 필요도 없습니다.</p>
+
+<p>배터리 수준을 지속적으로 모니터링하는 것은 앱의 다른 작업보다 배터리에 더 큰 영향을 미칩니다. 따라서 기기가 배터리 전원 부족 상태가 되거나 이를 벗어날 때 등 중요한 변경사항만 확인하는 것이 좋습니다.</p>
+
+<p>다음 코드는 매니페스트의 브로드캐스트 리시버 내의 인텐트 필터를 보여줍니다. 배터리가 얼마 남지 않거나{@link android.content.Intent#ACTION_BATTERY_LOW} 배터리 상태가 회복되었을 때{@link android.content.Intent#ACTION_BATTERY_OKAY} 전달되는 메시지를 수신할 수 있습니다.</p>
+
+<pre>&lt;receiver android:name=".BatteryLevelReceiver">
+&lt;intent-filter>
+ &lt;action android:name="android.intent.action.ACTION_BATTERY_LOW"/>
+ &lt;action android:name="android.intent.action.ACTION_BATTERY_OKAY"/>
+ &lt;/intent-filter>
+&lt;/receiver></pre>
+
+<p>배터리 충전 상태가 매우 낮은 경우 백그라운드 업데이트를 사용하지 않는 것이 좋습니다. 전화기가 꺼져버리면 최신 데이터를 제공하는 것이 의미가 없기 때문입니다.</p>
+
+<p>기기를 충전하는 것은 곧 기기를 도크에 집어넣는 것과 같은 경우가 많습니다. 다음 강의는 현재 도크 상태를 확인하고 기기 도킹의 변경사항을 모니터링하는 방법을 보여줍니다.</p>
+
diff --git a/docs/html/intl/ko/training/monitoring-device-state/connectivity-monitoring.jd b/docs/html/intl/ko/training/monitoring-device-state/connectivity-monitoring.jd
new file mode 100644
index 000000000000..5666b98c9045
--- /dev/null
+++ b/docs/html/intl/ko/training/monitoring-device-state/connectivity-monitoring.jd
@@ -0,0 +1,70 @@
+page.title=연결 상태 확인 및 모니터링
+parent.title=배터리 수명 최적화
+parent.link=index.html
+
+trainingnavtop=true
+
+previous.title=도킹 상태와 유형 확인 및 모니터링
+previous.link=docking-monitoring.html
+next.title=온디맨드로 브로드캐스트 수신기 조작
+next.link=manifest-receivers.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>강의 목표</h2>
+<ol>
+ <li><a href="#DetermineConnection">인터넷에 연결되어 있는지 확인</a></li>
+ <li><a href="#DetermineType">인터넷 연결 유형 확인</a></li>
+ <li><a href="#MonitorChanges">연결 변경사항 모니터링</a></li>
+</ol>
+
+
+<h2>참고자료</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">인텐트 및 인텐트 필터</a>
+</ul>
+
+</div>
+</div>
+
+<p>반복 알람과 백그라운드 서비스는 일반적으로 인터넷 리소스 및 캐시 데이터로부터 애플리케이션의 업데이트를 예약하거나 긴 시간이 필요한 다운로드를 실행하는 데 사용됩니다. 하지만 인터넷에 연결되어 있지 않거나 연결이 매우 느려 다운로드를 완료하지 못한다면 업데이트 예약을 해도 소용이 없겠죠?</p>
+
+<p>인터넷에 연결되었는지, 어떤 연결 방식인지를 확인하기 위하여 {@link android.net.ConnectivityManager}를 사용할 수 있습니다.</p>
+
+
+<h2 id="DetermineConnection">인터넷에 연결되어 있는지 확인</h2>
+
+<p>인터넷에 연결되어 있지 않는 경우 인터넷 리소스를 기반으로 한 업데이트 예약을 할 필요가 없습니다. 다음은 활성 네트워크를 쿼리하고 인터넷이 연결되어 있는지 확인하기 위한 {@link android.net.ConnectivityManager} 사용법을 보여줍니다.</p>
+
+<pre>ConnectivityManager cm =
+ (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
+
+NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
+boolean isConnected = activeNetwork.isConnectedOrConnecting();</pre>
+
+
+<h2 id="DetermineType">인터넷 연결 유형 확인</h2>
+
+<p>현재 사용할 수 있는 인터넷 연결 유형을 확인할 수도 있습니다.</p>
+
+<p>연결은 모바일 데이터, WiMAZ, Wi-Fi 및 이더넷 연결을 통해 제공될 수 있습니다. 아래와 같이 활성 네트워크의 유형을 쿼리하면, 사용 가능한 대역폭에 따라 업데이트 빈도를 변경할 수 있습니다.</p>
+
+<pre>boolean isWiFi = activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;</pre>
+
+<p>모바일 데이터 비용은 Wi-Fi보다 높은 경향이 있으므로, 모바일 연결인 경우 앱의 업데이트 빈도를 줄여야 합니다. 마찬가지로 Wi-Fi로 연결되기까지 큰 용량의 다운로드는 일시 중지해야 합니다.</p>
+
+<p>업데이트를 비활성화한 경우, 인터넷 연결이 재개되면 업데이트를 다시 시작하기 위해 연결 변경사항을 알고 있는 것이 중요합니다.</p>
+
+
+<h2 id="MonitorChanges">연결 변경사항 모니터링</h2>
+
+<p>연결 정보가 변경될 때마다 {@link android.net.ConnectivityManager}는 {@link android.net.ConnectivityManager#CONNECTIVITY_ACTION}({@code "android.net.conn.CONNECTIVITY_CHANGE"}) 액션을 브로드캐스트합니다. 변경사항을 수신하거나 적절히 백그라운드 업데이트를 다시 시작 또는 일시 중지하기 위해 매니페스트에서 브로드캐스트 리시버를 등록할 수 있습니다.</p>
+
+<pre>&lt;action android:name="android.net.conn.CONNECTIVITY_CHANGE"/></pre>
+
+<p>연결 정보는 수시로 변경될 수 있습니다. 모바일과 Wi-Fi 간에 이동할 때마다 브로드캐스트가 실행됩니다. 따라서 업데이트나 다운로드를 일시 중지한 경우에만 브로드캐스트를 확인하는 것이 좋습니다. 업데이트를 시작하기 전이나 이전에 업데이트를 일시 중지했던 경우에만 확인하는 것으로 충분합니다.</p>
+
+<p>이 기술은 다음 강의에서 설명하는 매니페스트에서 선언한 브로드캐스트 리시버의 전환이 필요합니다.</p>
diff --git a/docs/html/intl/ko/training/monitoring-device-state/docking-monitoring.jd b/docs/html/intl/ko/training/monitoring-device-state/docking-monitoring.jd
new file mode 100644
index 000000000000..0cd61a067d93
--- /dev/null
+++ b/docs/html/intl/ko/training/monitoring-device-state/docking-monitoring.jd
@@ -0,0 +1,74 @@
+page.title=도킹 상태와 유형 확인 및 모니터링
+parent.title=배터리 수명 최적화
+parent.link=index.html
+
+trainingnavtop=true
+previous.title= 배터리 수준 및 충전 상태 모니터링
+previous.link=battery-monitoring.html
+next.title= 연결 상태 확인 및 모니터링
+next.link=connectivity-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>강의 목표</h2>
+<ol>
+ <li><a href="#CurrentDockState">오디오 포커스 요청</a></li>
+ <li><a href="#DockType">현재 도크 유형 확인</a></li>
+ <li><a href="#MonitorDockState">도크 상태 또는 유형 변경사항 모니터링</a></li>
+</ol>
+
+
+<h2>참고자료</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">인텐트 및 인텐트 필터</a>
+</ul>
+
+</div>
+</div>
+
+<p>Android 기기는 여러 종류의 도크로 도킹될 수 있습니다. 여기에는 카폰 또는 홈 도크와 디지털 및 아날로그 도크가 포함됩니다. 많은 도크가 도킹된 기기에 전기를 공급하므로 일반적으로 충전 상태와 도크 상태는 밀접한 관련이 있습니다.</p>
+
+<p>전화의 도크 상태가 업데이트 빈도에 어떻게 영향을 미치는지는 앱에 따라 다릅니다. 스포츠 센터 앱이라면 데스크톱 도크에서 업데이트 빈도를 높이고 카폰 도크에 연결된 경우 업데이트를 완전히 사용 중지해도 좋습니다. 반대로 교통 상황을 제공하는 앱이라면 카폰 도크에서 업데이트를 최대화해도 좋습니다.</p>
+
+<p>도크 상태는 스티키 {@link android.content.Intent}로 브로드캐스트되어 기기가 도킹되었는지 여부와 도킹되었다면 어떤 종류의 도크인지 알아낼 수 있습니다. </p>
+
+
+<h2 id="CurrentDockState">현재 도킹 상태 확인</h2>
+
+<p>도크 상태의 세부사항은 {@link android.content.Intent#ACTION_DOCK_EVENT} 액션의 스티키 브로드캐스트 내에 추가로 포함됩니다. 스티키 브로드캐스트이므로 {@link android.content.BroadcastReceiver}를 등록할 필요가 없습니다. 다음 스니펫에 표시된 브로드캐스트 수신기와 같이 간단히 {@link android.content.Context#registerReceiver registerReceiver()}를 호출하여 {@code null}에 제출할 수 있습니다. </p>
+
+<pre>IntentFilter ifilter = new IntentFilter(Intent.ACTION_DOCK_EVENT);
+Intent dockStatus = context.registerReceiver(null, ifilter);</pre>
+
+<p>{@code EXTRA_DOCK_STATE} 추가로부터 현재 도킹 상태를 추출할 수 있습니다.<p>
+
+<pre>int dockState = battery.getIntExtra(EXTRA_DOCK_STATE, -1);
+boolean isDocked = dockState != Intent.EXTRA_DOCK_STATE_UNDOCKED;</pre>
+
+
+<h2 id="DockType">현재 도크 유형 확인</h2>
+
+<p>4가지 유형의 도크가 있습니다.
+<ul><li>카폰</li>
+<li>데스크</li>
+<li>저가형(아날로그) 데스크</li>
+<li>고가형(디지털) 데스크</li></ul></p>
+
+<p>마지막 두 가지 옵션은 API 수준 11의 Android에만 제공되어 있으므로, 디지털 또는 아날로그에 상관하지 않고 관심 있는 세 가지 도크 유형에 대해 확인하는 것이 좋습니다.</p>
+
+<pre>boolean isCar = dockState == EXTRA_DOCK_STATE_CAR;
+boolean isDesk = dockState == EXTRA_DOCK_STATE_DESK ||
+ dockState == EXTRA_DOCK_STATE_LE_DESK ||
+ dockState == EXTRA_DOCK_STATE_HE_DESK;</pre>
+
+
+<h2 id="MonitorDockState">도크 상태 또는 유형 변경사항 모니터링</h2>
+
+<p>도킹 상태가 바뀌면 {@link android.content.Intent#ACTION_DOCK_EVENT} 액션이 브로드캐스트됩니다. 기기의 도크 상태 변경사항을 모니터링하려면 아래에 표시된 대로 애플리케이션 매니페스트에서 브로드캐스트 리시버를 등록하세요.</p>
+
+<pre>&lt;action android:name="android.intent.action.ACTION_DOCK_EVENT"/></pre>
+
+<p>이전 단계에서 설명한 기술을 사용하여 리시버 구현에서 도크 유형 및 상태를 추출할 수 있습니다.</p>
diff --git a/docs/html/intl/ko/training/monitoring-device-state/index.jd b/docs/html/intl/ko/training/monitoring-device-state/index.jd
new file mode 100644
index 000000000000..f96e2e16dc57
--- /dev/null
+++ b/docs/html/intl/ko/training/monitoring-device-state/index.jd
@@ -0,0 +1,49 @@
+page.title=배터리 수명 최적화
+
+trainingnavtop=true
+startpage=true
+next.title=배터리 수준 및 충전 상태 모니터링
+next.link=battery-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>요구사항과 선행조건</h2>
+<ul>
+ <li>Android 2.0(API 수준 5) 또는 이상</li>
+ <li> <a href="{@docRoot}guide/components/intents-filters.html">인텐트 및 인텐트 필터</a> 사용 경험</li>
+</ul>
+
+<h2>참고자료</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/services.html">서비스</a>
+</ul>
+
+</div>
+</div>
+
+<p>좋은 앱은 호스트 기기의 배터리 수명에 미치는 영향이 미미해야 합니다. 강의를 통해 호스트 기기의 상태에 따라 기능과 동작을 수정하는 것을 모니터링하는 앱을 구축할 수 있게 됩니다.</p>
+
+<p>연결이 끊겼을 때 백그라운드 서비스 업데이트를 사용 중지하거나, 배터리 수준이 낮을 때 업데이트 빈도를 줄이는 조치를 취하여, 사용자 환경을 손상시키지 않고 배터리 수명에 미치는 영향을 최소화할 수 있습니다.</p>
+
+<h2>강의</h2>
+
+<!-- Create a list of the lessons in this class along with a short description of each lesson.
+These should be short and to the point. It should be clear from reading the summary whether someone
+will want to jump to a lesson or not.-->
+
+<dl>
+ <dt><b><a href="battery-monitoring.html">배터리 수준 및 충전 상태 모니터링</a></b></dt>
+ <dd>충전 상태에서 현재 배터리 수준 및 변경사항을 확인 및 모니터링하여 앱의 업데이트 빈도를 변경하는 법을 알아보세요.</dd>
+
+ <dt><b><a href="docking-monitoring.html">도킹 상태와 유형 확인 및 모니터링</a></b></dt>
+ <dd>최적의 새로고침 빈도는 호스트 기기의 사용 방법에 따라 달라질 수 있습니다. 앱의 동작에 영향을 미치는 도킹 상태와 도크 유형을 확인 및 모니터링하는 방법을 알아보세요.</dd>
+
+ <dt><b><a href="connectivity-monitoring.html">연결 상태 확인 및 모니터링</a></b></dt>
+ <dd>인터넷 연결 없이 온라인 소스를 통해 앱을 업데이트할 수 없습니다. 연결 상태를 확인하여 백그라운드 업데이트 빈도를 변경하는 방법을 알아보세요. 고대역폭 작업을 시작하기 전에 Wi-Fi 또는 모바일 연결을 확인하는 방법도 알 수 있습니다.</dd>
+
+ <dt><b><a href="manifest-receivers.html">온디맨드로 브로드캐스트 수신기 조작</a></b></dt>
+ <dd>매니페스트 내에 선언했던 브로드캐스트 리시버는 현재 기기 상태에서 필요 없는 것을 사용 중지하도록 런타임 때 전환될 수 있습니다. 기기가 특정 상태에 도달할 때까지 상태 변화 리시버 및 지연 액션을 전환 및 단계적으로 연결하여 효율성을 향상하는 법을 알아보세요.</dd>
+</dl> \ No newline at end of file
diff --git a/docs/html/intl/ko/training/monitoring-device-state/manifest-receivers.jd b/docs/html/intl/ko/training/monitoring-device-state/manifest-receivers.jd
new file mode 100644
index 000000000000..c5c311b75f6b
--- /dev/null
+++ b/docs/html/intl/ko/training/monitoring-device-state/manifest-receivers.jd
@@ -0,0 +1,50 @@
+page.title=온디맨드로 브로드캐스트 수신기 조작
+parent.title=배터리 수명 최적화
+parent.link=index.html
+
+trainingnavtop=true
+
+previous.title=연결 상태 확인 및 모니터링
+previous.link=connectivity-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>강의 목표</h2>
+<ol>
+ <li><a href="#ToggleReceivers">효율성 향상을 위한 상태 변화 리시버의 전환 및 단계적 연결</a></li>
+</ol>
+
+
+<h2>참고자료</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">인텐트 및 인텐트 필터</a>
+</ul>
+
+</div>
+</div>
+
+<p>기기 상태 변경을 모니터링하는 가장 간단한 방법은 모니터링하는 각 상태에 대해 {@link android.content.BroadcastReceiver}를 만들어 각각을 애플리케이션 매니페스트에 등록하는 것입니다. 그러면 각 리시버 내에서 현재 기기 상태를 기반으로 반복 알람의 일정을 간단히 변경할 수 있습니다.</p>
+
+<p>이 방법의 부작용은 리시버 중 하나라도 실행되면 매번 앱이 기기의 절전 모드를 해제시킨다는 것입니다.</p>
+
+<p>더 나은 방법은 런타임 때 브로드캐스트 리시버를 사용 중지 또는 사용하도록 설정하는 것입니다. 이렇게 하면 매니페스트에 선언한 리시버를 필요할 때만 시스템 이벤트에 의해 실행되는 수동적인 알람으로 사용할 수 있습니다.</p>
+
+
+<h2 id="ToggleReceivers">효율성 향상을 위한 상태 변화 수신기의 전환 및 단계적 연결 </h2>
+
+<p>{@link android.content.pm.PackageManager}를 사용하여 아래에서 표시된 대로 모든 사용 또는 사용 중지하기 원하는 브로드캐스트 리시버를 포함하여 매니페스트 내에 정의된 모든 요소의 사용 가능 상태를 전환할 수 있습니다.</p>
+
+<pre>ComponentName receiver = new ComponentName(context, myReceiver.class);
+
+PackageManager pm = context.getPackageManager();
+
+pm.setComponentEnabledSetting(receiver,
+ PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
+ PackageManager.DONT_KILL_APP)</pre>
+
+<p>이 방법을 사용하면 연결이 없음을 확인한 경우 연결 변경 리시버를 제외한 모든 리시버를 사용 중지할 수 있습니다. 반대로 한 번 연결되면 연결 변경사항의 수신을 중지할 수 있으며, 업데이트를 수행하고 반복 업데이트 알람의 일정을 변경하기 전에 온라인 상태인지만 간단히 확인할 수 있습니다.</p>
+
+<p>높은 대역폭을 요구하는 다운로드를 중지시키는 데 동일한 기술을 사용할 수 있습니다. 연결 변경을 수신하는 브로드캐스트 리시버를 사용하도록 설정하고 반드시 Wi-Fi에 연결한 후에 다운로드를 시작하도록 합니다.</p>
diff --git a/docs/html/intl/ko/training/multiscreen/adaptui.jd b/docs/html/intl/ko/training/multiscreen/adaptui.jd
new file mode 100644
index 000000000000..cb7b66c90238
--- /dev/null
+++ b/docs/html/intl/ko/training/multiscreen/adaptui.jd
@@ -0,0 +1,212 @@
+page.title=조정형 UI 플로우 구현
+parent.title=다양한 화면 지원
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=다양한 화면 밀도 지원
+previous.link=screendensities.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>강의 목표</h2>
+
+<ol>
+ <li><a href="#TaskDetermineCurLayout">현재 레이아웃 확인</a></li>
+ <li><a href="#TaskReactToLayout">현재 레이아웃에 대한 대응</a></li>
+ <li><a href="#TaskReuseFrag">다른 액티비티에 프래그먼트 재사용</a></li>
+ <li><a href="#TaskHandleConfigChanges">화면 구성 변경의 처리</a></li>
+</ol>
+
+<h2>참고자료</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/tablets-and-handsets.html">태블릿 및 휴대전화 지원</a></li>
+</ul>
+
+<h2>다운로드 </h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">샘플 앱 다운로드</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+
+</div>
+</div>
+
+<p>현재 애플리케이션이 표시하는 레이아웃에 따라 UI 플로가 달라질 수 있습니다. 예를 들어 애플리케이션이 이중 창 모드로 되어 있는 경우에는 왼쪽 창에 있는 항목을 클릭하면 오른쪽 창에 콘텐츠가 표시되고, 단일 창 모드로 되어 있는 경우에는 콘텐츠가 해당 창에 표시됩니다(다른 액티비티에서).</p>
+
+
+<h2 id="TaskDetermineCurLayout">현재 레이아웃 확인</h2>
+
+<p>각 레이아웃을 구현하는 방식이 약간씩 다르므로 가장 먼저 해야 할 일은 현재 사용자에게 어떤 레이아웃이 표시되는지 확인하는 것입니다. 예를 들어, 사용자가 '단일 창' 모드에 있는지 혹은 '이중 창' 모드에 있는지 파악할 수 있습니다. 이는 특정 뷰가 존재하고 그 뷰가 표시되는지 조회하면 됩니다.</p>
+
+<pre class="prettyprint">
+public class NewsReaderActivity extends FragmentActivity {
+ boolean mIsDualPane;
+
+ &#64;Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main_layout);
+
+ View articleView = findViewById(R.id.article);
+ mIsDualPane = articleView != null &amp;&amp;
+ articleView.getVisibility() == View.VISIBLE;
+ }
+}
+</pre>
+
+<p>이 코드는 'article' 창을 사용할 수 있는지 여부를 조회하며 이러한 방식이 특정 레이아웃에 대한 조회를 하드코딩하는 것보다 훨씬 유연한 방식입니다.</p>
+
+<p>다른 구성요소의 존재 여부에 맞게 앱을 조정하는 또 다른 방법은 구성요소에 대한 작업을 수행하기 전에 해당 구성요소를 사용할 수 있는지 확인하는 것입니다. 예를 들어 뉴스 리더 샘플 앱의 경우, 메뉴를 여는 버튼이 있긴 하지만 이 버튼은 Android 3.0 이전 버전에서 실행되는 경우에만 존재합니다(API 수준 11 이상에서 <PH>{@link android.app.ActionBar}</PH> 가 그 기능을 대신하기 때문). 따라서 이 버튼에 대한 이벤트 리스너를 추가하기 위해 다음과 같이 할 수 있습니다.</p>
+
+<pre class="prettyprint">
+Button catButton = (Button) findViewById(R.id.categorybutton);
+OnClickListener listener = /* create your listener here */;
+if (catButton != null) {
+ catButton.setOnClickListener(listener);
+}
+</pre>
+
+
+<h2 id="TaskReactToLayout">현재 레이아웃에 대한 대응</h2>
+
+<p>현재 레이아웃에 따라 일부 액션의 결과가 달라질 수 있습니다. 예를 들어 뉴스 리더 샘플의 헤드라인 목록에서 헤드라인을 클릭하면 UI가 이중 창 모드인 경우에는 기사가 오른쪽 창에서 열리지만, UI가 단일 창 모드인 경우에는 별도의 액티비티가 실행됩니다.</p>
+
+<pre>
+&#64;Override
+public void onHeadlineSelected(int index) {
+ mArtIndex = index;
+ if (mIsDualPane) {
+ /* display article on the right pane */
+ mArticleFragment.displayArticle(mCurrentCat.getArticle(index));
+ } else {
+ /* start a separate activity */
+ Intent intent = new Intent(this, ArticleActivity.class);
+ intent.putExtra("catIndex", mCatIndex);
+ intent.putExtra("artIndex", index);
+ startActivity(intent);
+ }
+}
+</pre>
+
+<p>마찬가지로, 앱이 이중 창 모드인 경우에는 탐색용 탭이 포함된 작업 표시줄이 설정되지만, 앱이 단일 창 모드인 경우에는 스피너 위젯이 포함된 탐색 메뉴가 설정됩니다. 따라서 어떤 경우가 적합한지도 코드에서 확인해야 합니다.</p>
+
+<pre>
+final String CATEGORIES[] = { "Top Stories", "Politics", "Economy", "Technology" };
+
+public void onCreate(Bundle savedInstanceState) {
+ ....
+ if (mIsDualPane) {
+ /* use tabs for navigation */
+ actionBar.setNavigationMode(android.app.ActionBar.NAVIGATION_MODE_TABS);
+ int i;
+ for (i = 0; i &lt; CATEGORIES.length; i++) {
+ actionBar.addTab(actionBar.newTab().setText(
+ CATEGORIES[i]).setTabListener(handler));
+ }
+ actionBar.setSelectedNavigationItem(selTab);
+ }
+ else {
+ /* use list navigation (spinner) */
+ actionBar.setNavigationMode(android.app.ActionBar.NAVIGATION_MODE_LIST);
+ SpinnerAdapter adap = new ArrayAdapter<String>(this,
+ R.layout.headline_item, CATEGORIES);
+ actionBar.setListNavigationCallbacks(adap, handler);
+ }
+}
+</pre>
+
+
+<h2 id="TaskReuseFrag">다른 액티비티에 프래그먼트 재사용</h2>
+
+<p>다양한 화면의 디자인에 반복되는 패턴에는 일부 화면 구성에서는 창으로 구현되고 다른 화면 구성에서는 별도의 액티비티로 구현되는 인터페이스가 일부 있습니다. 예를 들어 뉴스 리더 샘플에서 뉴스 기사 텍스트가 큰 화면에서는 오른쪽 창에 표시되지만 작은 화면에서는 별도의 액티비티입니다.</p>
+
+<p>이러한 경우 일반적으로 동일한 <PH>{@link android.app.Fragment}</PH> 하위 클래스를 여러 액티비티에 재사용하여 코드 중복을 피할 수 있습니다. 예를 들어 <code>ArticleFragment</code>는 이중 창 레이아웃에서 사용되며 </p>
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+
+<p>작은 화면의 액티비티 레이아웃에 레이아웃 없이 재사용됩니다(<code>ArticleActivity</code>).</p>
+
+<pre>
+ArticleFragment frag = new ArticleFragment();
+getSupportFragmentManager().beginTransaction().add(android.R.id.content, frag).commit();
+</pre>
+
+<p>당연히 이는 XML 레이아웃에서 프래그먼트(fragment)를 명시하는 것과 같은 효과가 있지만 이 경우에는 아티클 프래그먼트가 이 액티비티의 유일한 구성요소이기 때문에 XML 레이아웃은 불필요한 작업이 됩니다.</p>
+
+<p>프래그먼트를 디자인할 때 염두에 두어야 할 매우 중요한 점 한 가지는 특정 액티비티에 대한 강한 커플링을 만들지 말아야 한다는 점입니다. 이렇게 하려면 일반적으로 프래그먼트가 호스트 액티비티와 상호작용해야 하는 모든 방식을 추상화하는 인터페이스를 정의하면 됩니다. 그러면 호스트 액티비티가 해당 인터페이스를 구현합니다.</p>
+
+<p>예를 들어 뉴스 리더 앱의 <code>HeadlinesFragment</code>가 정확하게 그 일을 해 줍니다.</p>
+
+<pre>
+public class HeadlinesFragment extends ListFragment {
+ ...
+ OnHeadlineSelectedListener mHeadlineSelectedListener = null;
+
+ /* Must be implemented by host activity */
+ public interface OnHeadlineSelectedListener {
+ public void onHeadlineSelected(int index);
+ }
+ ...
+
+ public void setOnHeadlineSelectedListener(OnHeadlineSelectedListener listener) {
+ mHeadlineSelectedListener = listener;
+ }
+}
+</pre>
+
+<p>그런 다음 사용자가 헤드라인을 선택하면 프래그먼트가 하드코딩된 특정 액티비티를 알리지 않고 호스트 액티비티가 지정한 리스너를 알립니다.</p>
+
+<pre>
+public class HeadlinesFragment extends ListFragment {
+ ...
+ &#64;Override
+ public void onItemClick(AdapterView&lt;?&gt; parent,
+ View view, int position, long id) {
+ if (null != mHeadlineSelectedListener) {
+ mHeadlineSelectedListener.onHeadlineSelected(position);
+ }
+ }
+ ...
+}
+</pre>
+
+<p>이 기술은 <a
+href="{@docRoot}guide/practices/tablets-and-handsets.html">태블릿 및 휴대전화 지원</a> 가이드에서 자세히 설명되어 있습니다.</p>
+
+
+<h2 id="TaskHandleConfigChanges">화면 구성 변경 처리</h2>
+
+<p>인터페이스 중 일부를 구현하는데 별도의 액티비티를 사용 중인 경우 인터페이스의 일관성을 유지하기 위해 특정 구성의 변경(예: 화면 전환)에 대응해야 합니다.</p>
+
+<p>예를 들어 Android 3.0 이상을 실행하는 일반적인 7인치 태블릿에서 뉴스 리더 샘플은 세로 모드에서 실행될 때에는 뉴스 기사를 표시하는 데 별도의 액티비티를 사용하지만 가로모드에서는 이중 창(two-pane) 레이아웃을 사용합니다.</p>
+
+<p>즉 사용자가 세로 모드에 있고 기사를 보기 위한 액티비티가 화면에 있는 경우, 방향이 가로로 바뀌었음을 감지하고, 액티비티를 종료한 다음 주요 액티비티로 돌아감으로써 콘텐츠가 이중 창 레이아웃에서 표시되도록 적절하게 대응해야 합니다.</p>
+
+<pre>
+public class ArticleActivity extends FragmentActivity {
+ int mCatIndex, mArtIndex;
+
+ &#64;Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ mCatIndex = getIntent().getExtras().getInt("catIndex", 0);
+ mArtIndex = getIntent().getExtras().getInt("artIndex", 0);
+
+ // If should be in two-pane mode, finish to return to main activity
+ if (getResources().getBoolean(R.bool.has_two_panes)) {
+ finish();
+ return;
+ }
+ ...
+}
+</pre>
+
+
diff --git a/docs/html/intl/ko/training/multiscreen/index.jd b/docs/html/intl/ko/training/multiscreen/index.jd
new file mode 100644
index 000000000000..d9e09b08ae48
--- /dev/null
+++ b/docs/html/intl/ko/training/multiscreen/index.jd
@@ -0,0 +1,64 @@
+page.title=다양한 화면 지원
+
+trainingnavtop=true
+startpage=true
+next.title=다양한 화면 크기 지원
+next.link=screensizes.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>요구사항과 선행조건</h2>
+
+<ul>
+ <li>Android 1.6 이상(샘플 앱의 경우 2.1 이상)</li>
+ <li><a
+href="http://developer.android.com/guide/components/activities.html">액티비티</a> 및 <a href="http://developer.android.com/guide/components/fragments.html">프래그먼트</a>에 대한 기본 지식</li>
+ <li>Android <a
+href="http://developer.android.com/guide/topics/ui/index.html"> 사용자 인터페이스</a> 구축 경험</li>
+ <li><a
+href="{@docRoot}tools/extras/support-library.html">호환성 라이브러리</a>를 사용해야 하는 여러 기능</li>
+</ul>
+
+<h2>참고자료</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">다양한 화면 지원</a></li>
+</ul>
+
+<h2>다운로드 </h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">샘플 앱 다운로드</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>Android는 소형 휴대전화에서부터 대형 TV에 이르기까지 다양한 화면 크기의 수많은 기기 유형을 지원합니다. 따라서 애플리케이션이 모든 화면 크기와 호환되어 최대한 많은 사용자가 사용할 수 있도록 디자인하는 것이 중요합니다.</p>
+
+<p>하지만 다양한 기기 유형과 호환되는 것만으로는 충분하지 않습니다. 각 화면 크기에 따라 사용자 상호작용에 유리한 점과 불리한 점이 다릅니다. 따라서 사용자에게 만족을 주고 깊은 인상을 심어주려면 애플리케이션이 단지 여러 화면을 <em>지원</em>하는 데 그치지 않고 화면 구성별로 사용자 환경을 <em>최적화</em>해야 합니다.</p>
+
+<p>이번 강의에서는 여러 화면 구성에 최적화된 사용자 인터페이스를 구현하는 방법을 설명합니다.</p>
+
+<p>각 강의에서 사용되는 코드는 여러 화면에 대한 최적화의 모범 사례를 보여주는 샘플 애플리케이션에서 가져온 것입니다. 샘플(오른쪽)을 다운로드하여 본인의 애플리케이션에 코드로 재사용할 수 있습니다. </p>
+
+<p class="note"><strong>참고:</strong> 이 강의 및 강의와 관련된 샘플은 <a
+href="{@docRoot}tools/extras/support-library.html">호환성 라이브러리</a>를 사용하며 이는 Android 3.0 이하 버전에서 <PH>{@link android.app.Fragment}</PH> API를 사용하기 위해서입니다. 이 강의에서 API를 모두 사용하려면 라이브러리를 다운로드하여 애플리케이션에 추가해야 합니다.</p>
+
+
+<h2>강의</h2>
+
+<dl>
+ <dt><b><a href="screensizes.html">다양한 화면 크기 지원</a></b></dt>
+ <dd>이 강의에서는 여러 다양한 화면 크기에 조정되는 레이아웃을 디자인하는 방법(유연한 보기 크기, <PH>{@link android.widget.RelativeLayout}</PH>, 화면 크기 및 방향 한정자, 별칭 필터 및 나인-패치 비트맵 사용하기)을 안내합니다.</dd>
+
+ <dt><b><a href="screendensities.html">다양한 화면 밀도 지원</a></b></dt>
+ <dd>이 강의에서는 다양한 픽셀 밀도를 가진 화면을 지원하는 방법(밀도 독립형 픽셀(density-independent pixel) 사용하기 및 밀도별로 적합한 비트맵 제공하기)을 설명합니다.</dd>
+
+ <dt><b><a href="adaptui.html">조정형 UI 플로우 구현</a></b></dt>
+ <dd>이 강의에서는 여러 화면 크기/밀도 조합에 조정되도록 UI 플로우를 구현하는 방법(활성 레이아웃의 런타임 감지, 현재 레이아웃에 따른 대응, 화면 구성 변경 처리)을 설명합니다.</dd>
+</dl>
diff --git a/docs/html/intl/ko/training/multiscreen/screendensities.jd b/docs/html/intl/ko/training/multiscreen/screendensities.jd
new file mode 100644
index 000000000000..5d6e2f3c59b7
--- /dev/null
+++ b/docs/html/intl/ko/training/multiscreen/screendensities.jd
@@ -0,0 +1,100 @@
+page.title=다양한 화면 밀도 지원
+parent.title=다양한 화면 지원
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=다양한 화면 크기 지원
+previous.link=screensizes.html
+next.title=조정형 UI 플로우 구현
+next.link=adaptui.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>강의 목표</h2>
+<ol>
+ <li><a href="#TaskUseDP">DIP(Density Independent Pixel) 사용</a></li>
+ <li><a href="#TaskProvideAltBmp">대체 비트맵 제공</a></li>
+</ol>
+
+<h2>참고자료</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">여러 화면 지원</a></li>
+ <li><a href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">아이콘 디자인 가이드라인</a></li>
+</ul>
+
+<h2>다운로드 </h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">샘플 앱 다운로드</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+
+</div>
+</div>
+
+<p>이 강의에서는 다양한 리소스를 제공하고 해상도 독립형(resolution-independent) 측정 단위를 사용함으로써 다양한 화면 밀도를 지원하는 방법을 설명합니다.</p>
+
+<h2 id="TaskUseDP">DIP(Density Independent Pixel) 사용</h2>
+
+<p>레이아웃을 디자인할 때 범하기 쉬운 실수 중 하나는 절대 픽셀(absolute pixel)을 사용하여 거리나 크기를 정의하는 것입니다. 각 화면은 픽셀 밀도가 서로 다른데 레이아웃 크기를 픽셀로 정의하면 동일한 픽셀 수치가 다른 기기에서 다른 물리적 크기와 대응할 수 있어 문제가 됩니다. 따라서 크기를 지정할 때에는 항상 <code>dp</code> 또는 <code>sp</code> 단위를 사용하시기 바랍니다. <code>dp</code>는 160dpi에서 픽셀의 물리적 크기에 대응하는 밀도 독립형 픽셀(Density Independent Pixel)입니다. <code>sp</code>는 동일한 기본 단위이지만 사용자의 기본 텍스트 크기에 따라 확대/축소될 수 있으므로(배율 독립형 픽셀(Scale Independent Pixel)임) 텍스트 크기를 정의할 때 이 측정 단위를 사용해야 합니다(레이아웃 크기에 사용해서는 안됨).</p>
+
+<p>예를 들어 두 개의 보기 사이에 여백을 지정할 때 <code>px</code>가 아닌 <code>dp</code>를 사용합니다.</p>
+
+<pre>
+&lt;Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="&#64;string/clickme"
+ android:layout_marginTop="20dp" /&gt;
+</pre>
+
+<p>텍스트 크기를 지정할 때에는 항상 <code>sp</code>를 사용합니다.</p>
+
+<pre>
+&lt;TextView android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="20sp" /&gt;
+</pre>
+
+
+<h2 id="TaskProvideAltBmp">대체 비트맵 제공</h2>
+
+<p>Android는 화면 밀도가 다양한 기기에서 실행되므로 각각의 일반화된 밀도 종류(저, 중, 고 및 초고 밀도)에 맞춤화된 비트맵 리소스를 제공해야 합니다. 이렇게 하면 모든 화면 밀도에서 좋은 그래픽 품질 및 성능을 얻는데 도움이 됩니다.</p>
+
+<p>이러한 이미지를 생성하려면 벡터 형식의 원본 리소스부터 시작해야 하며 다음 크기 배율을 사용하여 각 밀도에 사용할 이미지를 생성해야 합니다.</p>
+
+<p><ul>
+ <li><code>xhdpi</code>: 2.0
+ <li><code>hdpi</code>: 1.5
+ <li><code>mdpi</code>: 1.0 (기선)
+ <li><code>ldpi</code>: 0.75
+</ul></p>
+
+<p>즉 <code>xhdpi</code> 기기에 대해 200x200 이미지를 생성하는 경우 <code>hdpi</code> 기기에 대해 동일한 리소스를 150x150으로 생성해야 하며 <code>mdpi</code> 기기에 대해서는 100x100, <code>ldpi</code> 기기에 대해서는 75x75으로 동일한 리소스를 생성해야 합니다.</p>
+
+<p>그런 다음 생성된 이미지 파일을 <code>res/</code> 아래의 적절한 하위 디렉토리에 배치하면 시스템에서 애플리케이션이 실행되는 기기의 화면 밀도에 따라 정확한 이미지 파일을 자동으로 선택합니다.</p>
+
+<pre class="classic no-pretty-print">
+MyProject/
+ res/
+ drawable-xhdpi/
+ awesomeimage.png
+ drawable-hdpi/
+ awesomeimage.png
+ drawable-mdpi/
+ awesomeimage.png
+ drawable-ldpi/
+ awesomeimage.png
+</pre>
+
+<p>그런 다음 언제든지 <code>&#64;drawable/awesomeimage</code>를 참조하면 시스템이 화면의 dpi에 따라 적합한 비트맵을 선택합니다.</p>
+
+<p>애플리케이션에 사용할 아이콘 저작물 제작에 대한 자세한 도움말 및 가이드라인은 <a
+href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">아이콘 디자인 가이드라인</a>을 참조하세요.</p>
+
diff --git a/docs/html/intl/ko/training/multiscreen/screensizes.jd b/docs/html/intl/ko/training/multiscreen/screensizes.jd
new file mode 100644
index 000000000000..f2e77a6e2b04
--- /dev/null
+++ b/docs/html/intl/ko/training/multiscreen/screensizes.jd
@@ -0,0 +1,279 @@
+page.title=다양한 화면 크기 지원
+parent.title=다양한 화면 지원
+parent.link=index.html
+
+trainingnavtop=true
+next.title=다양한 화면 밀도 지원
+next.link=screendensities.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>강의 목표</h2>
+<ol>
+ <li><a href="#TaskUseWrapMatchPar">'wrap_content' 및 'match_parent' 사용</a></li>
+ <li><a href="#TaskUseRelativeLayout">RelativeLayout 사용</a></li>
+ <li><a href="#TaskUseSizeQuali">크기 한정자 사용</a></li>
+ <li><a href="#TaskUseSWQuali">최소 너비 한정자 사용</a></li>
+ <li><a href="#TaskUseAliasFilters">레이아웃 별칭 사용</a></li>
+ <li><a href="#TaskUseOriQuali">방향 한정자 사용</a></li>
+ <li><a href="#TaskUse9Patch">나인-패치 비트맵 사용</a></li>
+</ol>
+
+<h2>참고자료</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">다양한 화면 지원</a></li>
+</ul>
+
+<h2>다운로드 </h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">샘플 앱 다운로드</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>이 강의에서는 다양한 화면 크기를 지원하는 방법을 설명합니다.</p>
+<ul>
+ <li>화면에 맞게 레이아웃 크기 조정</li>
+ <li>화면 구성에 따라 적합한 UI 레이아웃 제공</li>
+ <li>올바른 화면에 올바른 레이아웃 적용</li>
+ <li>정확하게 확대되는 비트맵 제공</li>
+</ul>
+
+
+<h2 id="TaskUseWrapMatchPar">'wrap_content' 및 'match_parent' 사용</h2>
+
+<p>레이아웃이 다양한 화면 크기에 따라 유연하게 조정되도록 하려면 일부 뷰 구성요소의 너비와 높이에 <code>"wrap_content"</code> 및 <code>"match_parent"</code>를 사용해야 합니다. <code>"wrap_content"</code>를 사용하면 뷰의 너비와 높이가 해당 뷰 내에 콘텐츠가 들어가는데 필요한 최소 크기로 설정되는 반면, <code>"match_parent"</code>(API 수준 8 이전에는 <code>"fill_parent"</code>라고도 함)를 사용하면 구성요소가 확장되어 부모뷰의 크기와 일치하게 됩니다.</p>
+
+<p>하드코딩된 크기 대신 <code>"wrap_content"</code> 크기 값을 사용하면 뷰가 해당 뷰에 필요한 여백만을 사용하며 <code>"match_parent"</code> 크기 값을 사용하면 뷰가 확대되어 사용 가능한 여백을 채웁니다. 예를 들면 다음과 같습니다.</p>
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
+
+<p>샘플에서 구성요소 크기에 특정 크기가 아닌 <code>"wrap_content"</code> 및 <code>"match_parent"</code>가 사용된 것을 눈여겨 보시기 바랍니다. 이렇게 하면 레이아웃이 다양한 화면 크기 및 방향에 맞게 조정됩니다.</p>
+
+<p>예를 들어 세로 및 가로 모드에서 레이아웃은 다음과 같이 표시됩니다. 구성요소의 크기가 너비와 높이에 맞게 자동으로 조정됩니다.</p>
+
+<img src="{@docRoot}images/training/layout-hvga.png" />
+<p class="img-caption"><strong>그림 1.</strong> 세로 모드(왼쪽) 및 가로 모드(오른쪽)에서의 뉴스 리더 샘플 앱</p>
+
+
+<h2 id="TaskUseRelativeLayout">RelativeLayout 사용</h2>
+
+<p>비교적 복잡한 레이아웃을 만들려면 <PH>{@link android.widget.LinearLayout}의 중첩 인스턴스와</PH> <code>"wrap_content"</code> 및 <code>"match_parent"</code> 크기의 조합을 사용합니다. 하지만 <PH>{@link android.widget.LinearLayout}</PH> 을 사용하면 자식뷰의 여백 관계를 정확하게 제어할 수 없으며 <PH>{@link android.widget.LinearLayout}</PH> 단순히 나란하게 표시됩니다. 자식뷰를 일직선이 아닌 다양한 방향으로 표시해야 하는 경우 구성요소 사이의 여백 관계를 중심으로 레이아웃을 지정할 수 있는 <PH>{@link android.widget.RelativeLayout}</PH>을 사용하는 것이 더 좋은 방법일 수 있습니다. 예를 들어 화면 왼쪽에 하나의 자식뷰를, 오른쪽에 다른 자식뷰를 정렬할 수 있습니다.</p>
+
+<p>예를 들면 다음과 같습니다.</p>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"&gt;
+ &lt;TextView
+ android:id="&#64;+id/label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/&gt;
+ &lt;EditText
+ android:id="&#64;+id/entry"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="&#64;id/label"/&gt;
+ &lt;Button
+ android:id="&#64;+id/ok"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="&#64;id/entry"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10dp"
+ android:text="OK" /&gt;
+ &lt;Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="&#64;id/ok"
+ android:layout_alignTop="&#64;id/ok"
+ android:text="Cancel" /&gt;
+&lt;/RelativeLayout&gt;
+</pre>
+
+<p>그림 2는 이 레이아웃이 QVGA 화면에 어떻게 표시되는지 보여줍니다.</p>
+
+<img src="{@docRoot}images/training/relativelayout1.png" />
+<p class="img-caption"><strong>그림 2.</strong> QVGA 화면(작은 화면)의 스크린샷</p>
+
+<p>그림 3은 이 레이아웃이 큰 화면에서 어떻게 표시되는지 보여줍니다.</p>
+
+<img src="{@docRoot}images/training/relativelayout2.png" />
+<p class="img-caption"><strong>그림 3.</strong> WSVGA 화면(큰 화면)의 스크린샷</p>
+
+<p>구성요소의 크기가 변하더라도 여백 관계가 <PH>{@link android.widget.RelativeLayout.LayoutParams}</PH>.</p>
+
+
+<h2 id="TaskUseSizeQuali">크기 한정자 사용</h2>
+
+<p>이전 섹션에서 다룬 유연한 레이아웃이나 상대적 레이아웃으로는 한계가 있습니다. 이러한 레이아웃이 구성요소 내부 및 주위의 여백을 확장하여 다양한 화면에 맞게 조정되긴 하지만 화면 크기별로 최적의 사용자 환경을 제공하지는 못할 수 있습니다. 따라서 애플리케이션은 유연한 레이아웃을 구현할 뿐 아니라 다양한 화면 구성을 타겟팅할 수 있도록 다양한 대체 레이아웃을 제공해야 합니다. 그 방법은 런타임이 현재 기기의 구성에 따라 적합한 리소스(예: 화면 크기별로 다른 레이아웃 디자인)를 자동으로 선택하도록 해 주는 <a href="http://developer.android.com/guide/practices/screens_support.html#qualifiers">구성 한정자</a>를 사용하는 것입니다.</p>
+
+<p>예를 들어 많은 애플리케이션이 큰 화면에 '이중 창(two pane)' 패턴을 구현합니다(한 쪽 창에는 아이템의 목록을 표시하고 다른 창에는 콘텐츠를 표시). 태블릿 및 TV는 두 개의 창 모두가 화면에 동시에 들어갈 정도로 크지만 휴대전화 화면은 두 창을 따로 표시해야 합니다. 따라서 이러한 레이아웃을 구현하려면 다음 파일이 있어야 합니다.</p>
+
+<ul>
+ <li><code>res/layout/main.xml</code>, 단일 창(기본값) 레이아웃:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+</li>
+ <li><code>res/layout-large/main.xml</code>, 이중 창 레이아웃:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+</li>
+</ul>
+
+<p>두 번째 레이아웃의 디렉토리 이름에서 <code>large</code> 한정자를 눈여겨 보시기 바랍니다. 이 레이아웃은 대형(예: 7인치 태블릿 이상)으로 분류된 화면을 가진 기기에서 선택됩니다. 한정자가 없는 다른 레이아웃은 소형 기기에서 선택됩니다.</p>
+
+
+<h2 id="TaskUseSWQuali">최소 너비 한정자 사용</h2>
+
+<p>Android 3.2 이전 기기에서 개발자가 어려움을 느꼈던 문제 중의 하나는 Dell Streak, 최초의 Galaxy 탭 및 7인치 태블릿에 두루 사용되는 '큰' 화면 크기 빈이었습니다. 하지만 많은 애플리케이션은 화면이 '큰' 기기라 하더라도 이 카테고리(예: 5인치 및 7인치 기기)에 속하는 다양한 기기에 다양한 레이아웃을 표시하고 싶어 합니다. 이것이 Android에서 Android 3.2에 '최소 너비' 한정자를 도입한 이유입니다.</p>
+
+<p>최소 너비 한정자를 사용하면 dp 단위의 특정 최소 너비를 가진 화면을 타겟팅할 수 있습니다. 예를 들어 일반적인 7인치 태블릿에는 600dp라는 최소 너비가 있으므로 이러한 화면에서 두 개의 창에 UI를 사용(작은 화면에서는 단일 목록 사용) 하고 싶은 경우 단일 및 이중 창 레이아웃에 이전 섹션과 동일한 레이아웃을 사용하면 되지만, 이중 창 레이아웃은 최소 너비가 600dp인 화면에 사용한다는 것을 나타내기 위해서 <code>large</code> 크기 한정자 대신 <code>sw600dp</code>를 사용해야 합니다.</p>
+
+<ul>
+ <li><code>res/layout/main.xml</code>, 단일 창(기본값) 레이아웃:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+</li>
+ <li><code>res/layout-sw600dp/main.xml</code>, 이중 창 레이아웃:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+</li>
+</ul>
+
+<p>이는 최소 너비가 600dp 이상인 기기는 <code>layout-sw600dp/main.xml</code>(이중 창) 레이아웃을 선택하는 반면 소형 화면은 <code>layout/main.xml</code> (단일 창) 레이아웃을 선택한다는 것을 의미합니다.</p>
+
+<p>하지만 Android 3.2 이전 기기는 <code>sw600dp</code>를 크기 한정자로 인식하지 않기 때문에 최소 너비 한정자가 제대로 작동하지 않으며 따라서 <code>large</code> 한정자도 계속 사용해야 합니다. 따라서 <code>res/layout-large/main.xml</code>라는 이름의 파일이 있어야 하며 이 파일은 <code>res/layout-sw600dp/main.xml</code>과 동일한 파일입니다. 다음 섹션에서는 이런 식으로 레이아웃 파일이 중복되지 않게 하는 기술을 살펴보겠습니다.</p>
+
+
+<h2 id="TaskUseAliasFilters">레이아웃 별칭 사용</h2>
+
+<p>최소 너비 한정자는 Android 3.2 이상 버전에서만 사용할 수 있습니다. 따라서 이전 버전과 호환되도록 하려면 추상화 크기 빈(소형, 보통, 대형 및 초대형)을 계속 사용해야 합니다. 예를 들어 휴대전화에서는 단일 창 UI가 표시되고 7인치 태블릿, TV 및 기타 대형 기기에서는 다중 창 UI가 표시되도록 UI를 디자인하려면 다음 파일을 제공해야 합니다.</p>
+
+<p><ul>
+<li><code>res/layout/main.xml:</code> 단일 창 레이아웃</li>
+<li><code>res/layout-large:</code> 다중 창 레이아웃</li>
+<li><code>res/layout-sw600dp:</code> 다중 창 레이아웃</li>
+</ul></p>
+
+<p>마지막 두 개의 파일은 하나는 Android 3.2 기기와 일치하고 다른 하나는 이전 버전의 Android가 탑재된 태블릿 및 TV를 위한 것으로 서로 동일한 파일입니다.</p>
+
+<p>이 경우 별칭 파일을 사용하면 태블릿 및 TV용으로 동일한 파일이 중복되지 않도록 하고 이를 관리해야 하는 번거로움을 없앨 수 있습니다. 예를 들어 다음 레이아웃을 지정할 수 있습니다.</p>
+
+<ul>
+<li><code>res/layout/main.xml</code>, 단일 창 레이아웃</li>
+<li><code>res/layout/main_twopanes.xml</code>, 이중 창 레이아웃</li>
+</ul>
+
+<p>또한 다음 두 개의 파일을 추가합니다.</p>
+
+<p><ul>
+<li><code>res/values-large/layout.xml</code>:
+<pre>
+&lt;resources>
+ &lt;item name="main" type="layout">&#64;layout/main_twopanes&lt;/item>
+&lt;/resources>
+</pre>
+</li>
+
+<li><code>res/values-sw600dp/layout.xml</code>:
+<pre>
+&lt;resources>
+ &lt;item name="main" type="layout">&#64;layout/main_twopanes&lt;/item>
+&lt;/resources>
+</pre>
+
+</li>
+</ul></p>
+
+<p>뒤에 있는 두 개의 파일은 콘텐츠는 동일하지만 실제로 레이아웃을 지정하지는 않으며 단지 <PH>{@code main}</PH> 이 <PH>{@code main_twopanes}에 대한 별칭이 되도록 설정합니다.</PH> 이 파일에는 <code>large</code> 및 <code>sw600dp</code> 선택기가 있으므로 Android 버전에 관계없이 태블릿 및 TV에 적용됩니다(3.2 버전 이전의 태블릿 및 TV는
+<PH>{@code large}</PH>,3.2 이후 버전은 <code>sw600dp</code>와 일치).</p>
+
+
+<h2 id="TaskUseOriQuali">방향 한정자 사용</h2>
+
+<p>일부 레이아웃은 가로 및 세로 방향 모두에서 잘 작동하지만 대부분의 레이아웃은 조정을 통해 많은 이점을 누릴 수 있습니다. 다음은 뉴스 리더 샘플 앱에서 화면 크기와 방향별로 레이아웃이 어떻게 작동하는지 보여줍니다.</p>
+
+<p><ul>
+<li><b>소형 화면, 세로:</b> 단일 창, 로고 표시</li>
+<li><b>소형 화면, 가로:</b> 단일 창, 로고 표시</li>
+<li><b>7인치 태블릿, 세로:</b> 단일 창, 작업 표시줄 표시</li>
+<li><b>7인치 태블릿, 가로:</b> 이중 창, 와이드, 작업 표시줄 표시</li>
+<li><b>10인치 태블릿, 세로:</b> 이중 창, 내로우, 작업 표시줄 표시</li>
+<li><b>10인치 태블릿, 가로:</b> 이중 창, 와이드, 작업 표시줄 표시</li>
+<li><b>TV, 가로:</b> 이중 창, 와이드, 작업 표시줄 표시</li>
+</ul></p>
+
+<p>따라서 이러한 각 레이아웃은 <code>res/layout/</code> 디렉토리의 XML 파일에서 지정됩니다. 그러면 앱은 각 레이아웃을 다양한 화면 구성에 지정하기 위해 레이아웃 별칭을 사용해 레이아웃을 각 구성과 일치시킵니다.</p>
+
+<p><code>res/layout/onepane.xml:</code></p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+
+<p><code>res/layout/onepane_with_bar.xml:</code></p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
+
+<p><code>res/layout/twopanes.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+
+<p><code>res/layout/twopanes_narrow.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes_narrow.xml all}
+
+<p>가능한 레이아웃을 모두 지정했으므로 구성 한정자를 사용하여 올바른 레이아웃을 각 구성에 매핑하기만 하면 되며 이는 레이아웃 별칭 기술을 사용하면 됩니다.</p>
+
+<p><code>res/values/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values/layouts.xml all}
+
+<p><code>res/values-sw600dp-land/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-sw600dp-land/layouts.xml
+all}
+
+<p><code>res/values-sw600dp-port/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-sw600dp-port/layouts.xml
+all}
+
+<p><code>res/values-large-land/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-large-land/layouts.xml all}
+
+<p><code>res/values-large-port/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-large-port/layouts.xml all}
+
+
+
+<h2 id="TaskUse9Patch">나인-패치 비트맵 사용</h2>
+
+<p>일반적으로 다양한 화면 크기를 지원하려면 이미지 리소스도 다양한 크기에 맞게 조정될 수 있어야 합니다. 예를 들어 버튼 배경은 버튼 배경이 적용되는 모든 버튼 모양과 맞아야 합니다.</p>
+
+<p>구성요소에 크기가 바뀔 수 있는 단순한 이미지를 사용하는 경우 런타임이 이미지를 균등하게 확대하거나 축소하기 때문에 기대에 미치지 못하는 결과가 나옵니다. 이에 대한 해결 방법은 확대될 수 있는 영역과 확대될 수 없는 영역을 나타내는 특별한 형식의 PNG 파일인 나인-패치 비트맵을 사용하는 것입니다.</p>
+
+<p>따라서 다양한 크기를 가진 구성요소에 사용할 비트맵을 디자인할 때에는 항상 나인-패치를 사용하시기 바랍니다. 비트맵을 나인-패치로 변환하려면 일반적인 이미지부터 시작합니다(그림 4, 명확하게 보이도록 4배 줌으로 표시).</p>
+
+<img src="{@docRoot}images/training/button.png" />
+<p class="img-caption"><strong>그림 4.</strong> <code>button.png</code></p>
+
+<p>그 다음 이 이미지에 <ode
+href="{@docRoot}tools/help/draw9patch.html">SDK의 <code>draw9patch</code></a> 유틸리티(<code>tools/</code> 디렉토리에 있음)를 실행합니다. 이 때 왼쪽 및 상단 테두리를 따라 픽셀을 그려 확대되어야 할 영역을 표시할 수 있습니다. 또한 오른쪽 및 하단 테두리를 따라 픽셀을 그려 콘텐츠가 들어가야 할 영역을 표시할 수 있으며 그 결과는 그림 5와 같습니다.</p>
+
+<img src="{@docRoot}images/training/button_with_marks.png" />
+<p class="img-caption"><strong>그림 5.</strong> <code>button.9.png</code></p>
+
+<p>테두리를 따라 있는 검은색 픽셀을 눈여겨 보시기 바랍니다. 상단 및 왼쪽 테두리의 픽셀은 이미지가 확대될 수 있는 영역을 나타내며 오른쪽 및 하단 테두리는 콘텐츠가 위치해야 하는 영역을 나타냅니다.</p>
+
+<p>또한 <code>.9.png</code> 확장자를 확인하시기 바랍니다. 프레임워크는 이 확장자를 통해 이미지가 일반적인 PNG 이미지가 아닌 나인-패치 이미지임을 감지할 수 있으므로 이 확장자를 사용해야 합니다.</p>
+
+<p><code>android:background="&#64;drawable/button"</code>을 설정하여 이 배경을 구성요소에 적용하면 그림 6의 다양한 크기로 표시된 것처럼 프레임워크가 버튼의 크기를 수용할 수 있도록 이미지를 올바르게 확대합니다.</p>
+
+<img src="{@docRoot}images/training/buttons_stretched.png" />
+<p class="img-caption"><strong>그림 6.</strong> 다양한 크기에 <code>button.9.png</code> 나인-패치를 사용하는 버튼</p>
+
diff --git a/docs/html/intl/ru/training/monitoring-device-state/battery-monitoring.jd b/docs/html/intl/ru/training/monitoring-device-state/battery-monitoring.jd
new file mode 100644
index 000000000000..26daf04bd1ce
--- /dev/null
+++ b/docs/html/intl/ru/training/monitoring-device-state/battery-monitoring.jd
@@ -0,0 +1,120 @@
+page.title=Monitoring the Battery Level and Charging State
+parent.title=Optimizing Battery Life
+parent.link=index.html
+
+trainingnavtop=true
+next.title=Determining and Monitoring the Docking State and Type
+next.link=docking-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>Содержание урока</h2>
+<ol>
+ <li><a href="#DetermineChargeState">Определение текущего состояния зарядки</a></li>
+ <li><a href="#MonitorChargeState">Отслеживание изменений состояния зарядки</a></li>
+ <li><a href="#CurrentLevel">Определение текущего уровня заряда батареи</a></li>
+ <li><a href="#MonitorLevel">Отслеживание существенных изменений уровня заряда батареи</a></li>
+</ol>
+
+<h2>Дополнительные материалы</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Намерения и фильтры намерений</a>
+</ul>
+
+</div>
+</div>
+
+<p>Если вы хотите изменить частоту фоновых обновлений, чтобы продлить время работы устройства от батареи, сначала рекомендуется проверить текущий уровень заряда и состояние зарядки.</p>
+
+<p>Именно от этих двух факторов зависит, как обновления повлияют на время работы устройства от батареи. Когда устройство подключено к сети переменного тока, приложение можно обновлять максимально часто, поскольку процесс обновления не будет сказываться на уровне заряда батареи. Если устройство не подключено к сети, следует воздержаться от обновлений, чтобы продлить время его работы от батареи.</p>
+
+<p>Если заряд батареи практически исчерпан, можно снизить частоту обновлений (вплоть до их полного прекращения).</p>
+
+
+<h2 id="DetermineChargeState">Определение текущего состояния зарядки</h2>
+
+<p>Начните с определения текущего состояния зарядки. {@link android.os.BatteryManager} передает все сведения о батарее и зарядке в закрепленном намерении {@link android.content.Intent}, которое содержит также информацию о состоянии зарядки.</p>
+
+<p>Поскольку это намерение является закрепленным, регистрировать {@link android.content.BroadcastReceiver} не нужно. Чтобы получить текущее состояние батареи в виде намерения, нужно вызвать {@code registerReceiver}, передав {@code null} в качестве приемника, как показано в коде ниже. Можно также передать фактический объект {@link android.content.BroadcastReceiver}, но это необязательно, поскольку обработка обновлений будет выполняться позднее.</p>
+
+<pre>IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
+Intent batteryStatus = context.registerReceiver(null, ifilter);</pre>
+
+<p>Можно извлечь данные как о текущем состоянии, так и об источнике зарядки (USB или сеть переменного тока), если устройство заряжается:<p>
+
+<pre>// Are we charging / charged?
+int status = batteryStatus.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
+boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
+ status == BatteryManager.BATTERY_STATUS_FULL;
+
+// How are we charging?
+int chargePlug = battery.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
+boolean usbCharge = chargePlug == BATTERY_PLUGGED_USB;
+boolean acCharge = chargePlug == BATTERY_PLUGGED_AC;</pre>
+
+<p>Как правило, если устройство подключено к сети переменного тока, фоновые обновления можно выполнять с максимальной частотой. Если устройство заряжается через USB, частоту можно несколько сократить, а если устройство не подключено к сети&nbsp;– сократить еще больше.</p>
+
+
+<h2 id="MonitorChargeState">Отслеживание изменений состояния зарядки</h2>
+
+<p>Состояние зарядки изменяется всякий раз, когда пользователь подключает устройство к источнику питания. Поскольку это случается довольно часто, важно отслеживать изменения этого состояния и соответствующим образом корректировать частоту обновления приложения.</p>
+
+<p>{@link android.os.BatteryManager} передает действие каждый раз, когда устройство подключается к источнику питания или отключается от него. Важно получать эти события, даже если приложение не работает. Они помогут, в частности, определить, как часто будет запускаться приложение для выполнения фоновых обновлений. Чтобы отслеживать их, зарегистрируйте {@link android.content.BroadcastReceiver} в манифесте, задав {@link android.content.Intent#ACTION_POWER_CONNECTED} и {@link android.content.Intent#ACTION_POWER_DISCONNECTED} в фильтре намерений.</p>
+
+<pre>&lt;receiver android:name=".PowerConnectionReceiver">
+ &lt;intent-filter>
+ &lt;action android:name="android.intent.action.ACTION_POWER_CONNECTED"/>
+ &lt;action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
+ &lt;/intent-filter>
+&lt;/receiver></pre>
+
+<p>Соответствующая реализация {@link android.content.BroadcastReceiver} позволяет извлечь данные о текущем состоянии и способе зарядки, как описано в предыдущем шаге.</p>
+
+<pre>public class PowerConnectionReceiver extends BroadcastReceiver {
+ &#64;Override
+ public void onReceive(Context context, Intent intent) {
+ int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
+ boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
+ status == BatteryManager.BATTERY_STATUS_FULL;
+
+ int chargePlug = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
+ boolean usbCharge = chargePlug == BATTERY_PLUGGED_USB;
+ boolean acCharge = chargePlug == BATTERY_PLUGGED_AC;
+ }
+}</pre>
+
+
+<h2 id="CurrentLevel">Определение текущего уровня заряда батареи</h2>
+
+<p>В некоторых случаях целесообразно определять текущий уровень заряда батареи. Если он ниже определенного значения, частоту фоновых обновлений следует уменьшить.</p>
+
+<p>Узнать, каков в настоящий момент заряд батареи, можно путем извлечения данных о текущем и максимальном уровне заряда из намерения состояния батареи, как показано в этом коде:</p>
+
+<pre>int level = battery.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
+int scale = battery.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
+
+float batteryPct = level / (float)scale;</pre>
+
+
+<h2 id="MonitorLevel">Отслеживание существенных изменений уровня заряда батареи</h2>
+
+<p>Отслеживать состояние батареи непрерывно не следует,</p>
+
+<p>поскольку при этом нагрузка на батарею будет значительно выше, чем при обычной работе приложения. Рекомендуется отслеживать только существенные изменения уровня заряда, в частности, переход устройства в состояние низкого заряда и обратно.</p>
+
+<p>Фрагмент манифеста, приведенный ниже, относится к фильтру намерений в приемнике широковещательных намерений. Приемник срабатывает, когда батарея устройства переходит в состояние низкого заряда или выходит из него. Для этого прослушиваются события {@link android.content.Intent#ACTION_BATTERY_LOW} и {@link android.content.Intent#ACTION_BATTERY_OKAY}.</p>
+
+<pre>&lt;receiver android:name=".BatteryLevelReceiver">
+&lt;intent-filter>
+ &lt;action android:name="android.intent.action.ACTION_BATTERY_LOW"/>
+ &lt;action android:name="android.intent.action.ACTION_BATTERY_OKAY"/>
+ &lt;/intent-filter>
+&lt;/receiver></pre>
+
+<p>Общепринятой практикой является отключение всех фоновых обновлений, когда заряд батареи достигает критически низкого уровня. Будет уже неважно, насколько актуальны данные в вашем приложении, если телефон самопроизвольно выключится, прежде чем пользователь успеет их просмотреть.</p>
+
+<p>Во многих случаях начало зарядки устройства совпадает с моментом его установки в док-станцию. В следующем уроке описаны способы определения текущего состояния подключения устройства к док-станции и отслеживания изменений этого состояния.</p>
+
diff --git a/docs/html/intl/ru/training/monitoring-device-state/connectivity-monitoring.jd b/docs/html/intl/ru/training/monitoring-device-state/connectivity-monitoring.jd
new file mode 100644
index 000000000000..ca1a9423692f
--- /dev/null
+++ b/docs/html/intl/ru/training/monitoring-device-state/connectivity-monitoring.jd
@@ -0,0 +1,70 @@
+page.title=Determining and Monitoring the Connectivity Status
+parent.title=Optimizing Battery Life
+parent.link=index.html
+
+trainingnavtop=true
+
+previous.title=Determining and Monitoring the Docking State and Type
+previous.link=docking-monitoring.html
+next.title=Manipulating Broadcast Receivers On Demand
+next.link=manifest-receivers.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>Содержание урока</h2>
+<ol>
+ <li><a href="#DetermineConnection">Определение наличия подключения к Интернету</a></li>
+ <li><a href="#DetermineType">Определение типа подключения к Интернету</a></li>
+ <li><a href="#MonitorChanges">Отслеживание изменения возможностей подключения</a></li>
+</ol>
+
+
+<h2>Дополнительные материалы</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Намерения и фильтры намерений</a>
+</ul>
+
+</div>
+</div>
+
+<p>Чаще всего повторяющиеся оповещения и фоновые службы используются для планового обновления приложения из Интернета, кэширования или загрузки больших объемов данных. Однако если подключение к Интернету не установлено или скорость соединения слишком низкая, выполнять загрузку не имеет смысла.</p>
+
+<p>Проверить наличие подключения к Интернету и его тип можно с помощью {@link android.net.ConnectivityManager}.</p>
+
+
+<h2 id="DetermineConnection">Определение наличия подключения к Интернету</h2>
+
+<p>Если подключение отсутствует, нет смысла планировать обновление из Интернета. В приведенном ниже коде показано, как использовать {@link android.net.ConnectivityManager} для отправки запросов об активной сети и определять возможности подключения.</p>
+
+<pre>ConnectivityManager cm =
+ (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
+
+NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
+boolean isConnected = activeNetwork.isConnectedOrConnecting();</pre>
+
+
+<h2 id="DetermineType">Определение типа подключения к Интернету</h2>
+
+<p>Также можно определить тип доступного в настоящий момент подключения к Интернету.</p>
+
+<p>Устройство может подключаться по сети мобильной связи, WiMAX, Wi-Fi и Ethernet. Получив ответ на запрос о типе активной сети, как показано ниже, можно изменить частоту обновлений на основе ее пропускной способности.</p>
+
+<pre>boolean isWiFi = activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;</pre>
+
+<p>Стоимость передачи данных по мобильной сети, как правило, значительно выше, чем по сети Wi-Fi, поэтому частота обновлений в первом случае должна быть ниже. То же касается загрузки большого количества данных: ее следует отложить, пока не будет установлено подключение к сети Wi-Fi.</p>
+
+<p>Когда обновления отключены, необходимо отслеживать изменения доступных соединений, чтобы возобновить их сразу после подключения устройства к Интернету.</p>
+
+
+<h2 id="MonitorChanges">Отслеживание изменения возможностей подключения</h2>
+
+<p>{@link android.net.ConnectivityManager} передает действие {@link android.net.ConnectivityManager#CONNECTIVITY_ACTION} ({@code "android.net.conn.CONNECTIVITY_CHANGE"}) при каждом изменении сведений о подключении. Зарегистрируйте в манифесте приемник широковещательных намерений, чтобы отслеживать эти изменения и запускать (или приостанавливать) фоновые обновления соответствующим образом.</p>
+
+<pre>&lt;action android:name="android.net.conn.CONNECTIVITY_CHANGE"/></pre>
+
+<p>Доступные соединения могут меняться очень часто&nbsp;– эта передача инициируется при каждом переключении между сетью мобильной связи и Wi-Fi. Ее рекомендуется отслеживать, только когда необходимо запускать ранее приостановленные обновления или загрузки. Как правило, достаточно проверить наличие подключения к Интернету перед запуском обновления и, если оно отсутствует, приостановить дальнейшие обновления до восстановления соединения.</p>
+
+<p>Для использования этого метода необходимо включать и отключать приемники широковещательных намерений, объявленные в манифесте. В следующем уроке описано, как это делать.</p>
diff --git a/docs/html/intl/ru/training/monitoring-device-state/docking-monitoring.jd b/docs/html/intl/ru/training/monitoring-device-state/docking-monitoring.jd
new file mode 100644
index 000000000000..d94f3570458c
--- /dev/null
+++ b/docs/html/intl/ru/training/monitoring-device-state/docking-monitoring.jd
@@ -0,0 +1,74 @@
+page.title=Determining and Monitoring the Docking State and Type
+parent.title=Optimizing Battery Life
+parent.link=index.html
+
+trainingnavtop=true
+previous.title= Monitoring the Battery Level and Charging State
+previous.link=battery-monitoring.html
+next.title= Determining and Monitoring the Connectivity Status
+next.link=connectivity-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>Содержание урока</h2>
+<ol>
+ <li><a href="#CurrentDockState">Запрос аудиофокуса</a></li>
+ <li><a href="#DockType">Определение типа док-станции</a></li>
+ <li><a href="#MonitorDockState">Отслеживание изменений состояния подключения к док-станции и ее типа</a></li>
+</ol>
+
+
+<h2>Дополнительные материалы</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Намерения и фильтры намерений</a>
+</ul>
+
+</div>
+</div>
+
+<p>Устройства под управлением ОС Android можно подключать к нескольким типам док-станций: настольным, которые делятся на цифровые и аналоговые, и автомобильным. В большинстве случаев устройства заряжаются при подключении к док-станции, поэтому состояние подключения к док-станции часто связано с состоянием зарядки.</p>
+
+<p>Насколько состояние подключения к док-станции влияет на частоту обновления, зависит от конкретного приложения. Например, можно увеличить частоту обновлений приложения, показывающего спортивные новости, когда устройство подключено к настольной док-станции, и полностью отключить обновления при подключении к автомобильной. И наоборот, если используется приложение, которое в фоновом режиме загружает данные о дорожной обстановке, то при подключении устройства к автомобильной док-станции следует выполнять обновления максимально часто.</p>
+
+<p>Состояние подключения к док-станции также передается в виде закрепленного намерения {@link android.content.Intent}, что позволяет запрашивать сведения о наличии подключения к док-станции и ее типе.</p>
+
+
+<h2 id="CurrentDockState">Определение текущего состояния подключения к док-станции</h2>
+
+<p>Сведения о состоянии подключения к док-станции передаются в качестве дополнительных данных в закрепленном оповещении действия {@link android.content.Intent#ACTION_DOCK_EVENT}. Поскольку это закрепленное намерение, регистрировать {@link android.content.BroadcastReceiver} не требуется. Достаточно вызвать {@link android.content.Context#registerReceiver registerReceiver()}, передав {@code null} в качестве приемника широковещательных намерений, как показано в коде ниже.</p>
+
+<pre>IntentFilter ifilter = new IntentFilter(Intent.ACTION_DOCK_EVENT);
+Intent dockStatus = context.registerReceiver(null, ifilter);</pre>
+
+<p>Сведения о текущем состоянии подключения к док-станции можно извлечь из дополнительных данных {@code EXTRA_DOCK_STATE}:<p>
+
+<pre>int dockState = battery.getIntExtra(EXTRA_DOCK_STATE, -1);
+boolean isDocked = dockState != Intent.EXTRA_DOCK_STATE_UNDOCKED;</pre>
+
+
+<h2 id="DockType">Определение типа док-станции</h2>
+
+<p>Док-станция, к которой подключено устройство, может быть одного из четырех типов:
+<ul><li>автомобильная;</li>
+<li>настольная;</li>
+<li>настольная с минимальным набором функций (аналоговая);</li>
+<li>настольная с широким набором функций (цифровая).</li></ul></p>
+
+<p>Обратите внимание, что последние два типа поддерживаются только на уровне API&nbsp;11, поэтому, даже если вас не интересует, является ли док-станция цифровой или аналоговой, а интересует только ее тип, рекомендуется выполнять проверку по всем трем типам:</p>
+
+<pre>boolean isCar = dockState == EXTRA_DOCK_STATE_CAR;
+boolean isDesk = dockState == EXTRA_DOCK_STATE_DESK ||
+ dockState == EXTRA_DOCK_STATE_LE_DESK ||
+ dockState == EXTRA_DOCK_STATE_HE_DESK;</pre>
+
+
+<h2 id="MonitorDockState">Отслеживание изменений состояния подключения к док-станции и ее типа</h2>
+
+<p>При каждом подключении устройства к док-станции или отключении от нее передается действие {@link android.content.Intent#ACTION_DOCK_EVENT}. Чтобы отслеживать состояние подключения к док-станции, достаточно зарегистрировать в манифесте приложения приемник широковещательных намерений, как показано ниже.</p>
+
+<pre>&lt;action android:name="android.intent.action.ACTION_DOCK_EVENT"/></pre>
+
+<p>Данные о типе док-станции и о состоянии подключения к ней можно извлечь внутри реализации приемника с помощью методов, описанных в предыдущем шаге.</p>
diff --git a/docs/html/intl/ru/training/monitoring-device-state/index.jd b/docs/html/intl/ru/training/monitoring-device-state/index.jd
new file mode 100644
index 000000000000..c87d9af5da4d
--- /dev/null
+++ b/docs/html/intl/ru/training/monitoring-device-state/index.jd
@@ -0,0 +1,49 @@
+page.title=Optimizing Battery Life
+
+trainingnavtop=true
+startpage=true
+next.title=Monitoring the Battery Level and Charging State
+next.link=battery-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>Требования</h2>
+<ul>
+ <li>Android 2.0 (API уровня&nbsp;5) или более поздней версии</li>
+ <li>Опыт работы с <a href="{@docRoot}guide/components/intents-filters.html">намерениями и фильтрами намерений</a></li>
+</ul>
+
+<h2>Дополнительные материалы</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/services.html">Службы</a>
+</ul>
+
+</div>
+</div>
+
+<p>Качественное приложение должно оказывать минимальное влияние на время работы устройства от батареи. В этом уроке вы научитесь создавать приложения, способные изменять функционал и режим работы в зависимости от состояния устройства.</p>
+
+<p>Отключение обновления данных фоновых служб при потере подключения и снижение частоты обновления при низком заряде батареи позволяет снизить расход энергии и продлить работу устройства без подзарядки.</p>
+
+<h2>Уроки</h2>
+
+<!-- Create a list of the lessons in this class along with a short description of each lesson.
+These should be short and to the point. It should be clear from reading the summary whether someone
+will want to jump to a lesson or not.-->
+
+<dl>
+ <dt><b><a href="battery-monitoring.html">Отслеживание уровня заряда батареи и состояния зарядки</a></b></dt>
+ <dd>Вы узнаете, как изменять частоту обновления приложения, определяя и отслеживая текущий уровень заряда батареи и изменение состояния зарядки.</dd>
+
+ <dt><b><a href="docking-monitoring.html">Отслеживание состояния подключения к док-станции и определение ее типа</a></b></dt>
+ <dd>Оптимальная частота обновления зависит от способа использования устройства. Вы узнаете, как определять и отслеживать состояние подключения к док-станции и ее тип, чтобы соответствующим образом корректировать работу приложения.</dd>
+
+ <dt><b><a href="connectivity-monitoring.html">Определение и отслеживание состояния подключения</a></b></dt>
+ <dd>Приложение невозможно обновить через Интернет, если отсутствует подключение. Вы узнаете, как проверить состояние подключения, чтобы при необходимости изменить частоту фоновых обновлений. Также вы научитесь проверять наличие мобильного подключения или подключения по сети Wi-Fi перед началом операций, требующих передачи больших объемов данных.</dd>
+
+ <dt><b><a href="manifest-receivers.html">Операции с приемниками широковещательных намерений по запросу</a></b></dt>
+ <dd>Приемники широковещательных намерений, объявленные в манифесте, можно включать и отключать во время работы приложения. Это позволяет отключать ненужные приемники в зависимости от состояния устройства. Вы узнаете, как повысить эффективность путем включения, отключения или каскадирования приемников изменения состояния и как отложить действие до момента перехода устройства в заданное состояние.</dd>
+</dl> \ No newline at end of file
diff --git a/docs/html/intl/ru/training/monitoring-device-state/manifest-receivers.jd b/docs/html/intl/ru/training/monitoring-device-state/manifest-receivers.jd
new file mode 100644
index 000000000000..724ee93e2822
--- /dev/null
+++ b/docs/html/intl/ru/training/monitoring-device-state/manifest-receivers.jd
@@ -0,0 +1,50 @@
+page.title=Manipulating Broadcast Receivers On Demand
+parent.title=Optimizing Battery Life
+parent.link=index.html
+
+trainingnavtop=true
+
+previous.title=Determining and Monitoring the Connectivity Status
+previous.link=connectivity-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>Содержание урока</h2>
+<ol>
+ <li><a href="#ToggleReceivers">Включение, отключение и каскадирование приемников изменения состояния для повышения эффективности</a></li>
+</ol>
+
+
+<h2>Дополнительные материалы</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Намерения и фильтры намерений</a>
+</ul>
+
+</div>
+</div>
+
+<p>Самый простой способ отслеживать изменения состояния устройства&nbsp;– создать приемники {@link android.content.BroadcastReceiver} для каждого отслеживаемого состояния и зарегистрировать их в манифесте приложения. Затем в каждом из этих приемников можно переопределять график повторяющихся оповещений в зависимости от текущего состояния устройства.</p>
+
+<p>Этот способ имеет недостатки: приложение активирует устройство при каждом запуске любого из этих приемников, что далеко не всегда оправданно.</p>
+
+<p>Оптимальный вариант&nbsp;– включать и выключать приемники широковещательных намерений во время работы приложения. Это позволяет использовать приемники, объявленные в манифесте, как пассивные оповещения, которые инициируются системными событиями только в случае необходимости.</p>
+
+
+<h2 id="ToggleReceivers">Включение, отключение и каскадирование приемников изменения состояния для повышения эффективности </h2>
+
+<p>{@link android.content.pm.PackageManager} позволяет включать и выключать любые компоненты, определенные в манифесте, в том числе все приемники широковещательных намерений:</p>
+
+<pre>ComponentName receiver = new ComponentName(context, myReceiver.class);
+
+PackageManager pm = context.getPackageManager();
+
+pm.setComponentEnabledSetting(receiver,
+ PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
+ PackageManager.DONT_KILL_APP)</pre>
+
+<p>При разрыве соединения этот метод позволяет выключить все приемники, кроме приемника изменения состояния подключения. И наоборот, когда подключение уже установлено, отслеживать изменения его состояния не требуется. Достаточно проверить наличие подключения к Интернету непосредственно перед обновлением или изменением графика оповещений о регулярном обновлении.</p>
+
+<p>Точно так же можно отложить загрузку, для выполнения которой требуется более высокая пропускная способность. Просто включите приемник широковещательных намерений, который будет отслеживать изменения возможности подключения и инициировать загрузку только после подключения к сети Wi-Fi.</p>
diff --git a/docs/html/intl/ru/training/multiscreen/adaptui.jd b/docs/html/intl/ru/training/multiscreen/adaptui.jd
new file mode 100644
index 000000000000..490a64ad2de6
--- /dev/null
+++ b/docs/html/intl/ru/training/multiscreen/adaptui.jd
@@ -0,0 +1,212 @@
+page.title=Implementing Adaptative UI Flows
+parent.title=Designing for Multiple Screens
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Supporting Different Screen Densities
+previous.link=screendensities.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>Содержание урока</h2>
+
+<ol>
+ <li><a href="#TaskDetermineCurLayout">Определение текущего макета</a></li>
+ <li><a href="#TaskReactToLayout">Дальнейшие действия в зависимости от текущего макета</a></li>
+ <li><a href="#TaskReuseFrag">Повторное использование фрагментов в других активностях</a></li>
+ <li><a href="#TaskHandleConfigChanges">Обработка изменений конфигурации экрана</a></li>
+</ol>
+
+<h2>Дополнительные материалы</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/tablets-and-handsets.html">Поддержка планшетных ПК и мобильных телефонов</a></li>
+</ul>
+
+<h2>Упражнение</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">Загрузить учебное приложение</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+
+</div>
+</div>
+
+<p>Алгоритм пользовательского интерфейса зависит от макета, который в данный момент отображается. Например, если приложение работает в двухпанельном режиме, то при нажатии на элемент в левой панели содержание отобразится в правой. В однопанельном режиме содержание откроется отдельно (в другой активности).</p>
+
+
+<h2 id="TaskDetermineCurLayout">Определение текущего макета</h2>
+
+<p>Так как в реализации макетов существуют отличия, первое, что необходимо сделать,&nbsp;– определить, какой макет отображается в данный момент. Например, работает ли приложение в однопанельном или двухпанельном режиме. Для этого создадим запрос о том, существует ли данное представление и отображается ли оно в настоящий момент:</p>
+
+<pre class="prettyprint">
+public class NewsReaderActivity extends FragmentActivity {
+ boolean mIsDualPane;
+
+ &#64;Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main_layout);
+
+ View articleView = findViewById(R.id.article);
+ mIsDualPane = articleView != null &amp;&amp;
+ articleView.getVisibility() == View.VISIBLE;
+ }
+}
+</pre>
+
+<p>Обратите внимание: представленный выше код содержит запрос о том, доступна ли панель article, поскольку это удобнее, чем писать отдельные запросы для каждого макета.</p>
+
+<p>Кроме того, для работы с учетом существующих компонентов можно также проверять их доступность, прежде чем выполнять с ними какие-либо операции. Например, в учебном приложении News Reader есть кнопка, которая служит для доступа в меню, однако она отображается только в операционных системах Android версии ниже, чем 3.0, потому что в последующих версиях ее функцию выполняет элемент <PH>{@link android.app.ActionBar}</PH> на уровне API 11 и выше. Чтобы проверить наличие этой кнопки, добавим прослушиватель событий с помощью следующего кода:</p>
+
+<pre class="prettyprint">
+Button catButton = (Button) findViewById(R.id.categorybutton);
+OnClickListener listener = /* create your listener here */;
+if (catButton != null) {
+ catButton.setOnClickListener(listener);
+}
+</pre>
+
+
+<h2 id="TaskReactToLayout">Дальнейшие действия в зависимости от текущего макета</h2>
+
+<p>Результаты некоторых операций зависят от текущего макета. Например, если в приложении News Reader в двухпанельном режиме нажать на заголовок в списке, то статья откроется в правой панели. Если же интерфейс работает в однопанельном режиме, будет запущена отдельная активность:</p>
+
+<pre>
+&#64;Override
+public void onHeadlineSelected(int index) {
+ mArtIndex = index;
+ if (mIsDualPane) {
+ /* display article on the right pane */
+ mArticleFragment.displayArticle(mCurrentCat.getArticle(index));
+ } else {
+ /* start a separate activity */
+ Intent intent = new Intent(this, ArticleActivity.class);
+ intent.putExtra("catIndex", mCatIndex);
+ intent.putExtra("artIndex", index);
+ startActivity(intent);
+ }
+}
+</pre>
+
+<p>Аналогично, в двухпанельном режиме должна отображаться панель действий с навигационными вкладками, а в однопанельном навигация должна быть реализована с помощью раскрывающегося списка. Приложение должно проверять, какой из этих вариантов следует использовать:</p>
+
+<pre>
+final String CATEGORIES[] = { "Лучшие статьи", "Политика", "Экономика", "Новости технологий" };
+
+public void onCreate(Bundle savedInstanceState) {
+ ....
+ if (mIsDualPane) {
+ /* use tabs for navigation */
+ actionBar.setNavigationMode(android.app.ActionBar.NAVIGATION_MODE_TABS);
+ int i;
+ for (i = 0; i &lt; CATEGORIES.length; i++) {
+ actionBar.addTab(actionBar.newTab().setText(
+ CATEGORIES[i]).setTabListener(handler));
+ }
+ actionBar.setSelectedNavigationItem(selTab);
+ }
+ else {
+ /* use list navigation (spinner) */
+ actionBar.setNavigationMode(android.app.ActionBar.NAVIGATION_MODE_LIST);
+ SpinnerAdapter adap = new ArrayAdapter<String>(this,
+ R.layout.headline_item, CATEGORIES);
+ actionBar.setListNavigationCallbacks(adap, handler);
+ }
+}
+</pre>
+
+
+<h2 id="TaskReuseFrag">Повторное использование фрагментов в других активностях</h2>
+
+<p>Одним из примеров повторяющегося фрагмента является реализация части интерфейса как панели в одних конфигурациях и как отдельной активности в других. Например, если приложение News Reader работает на достаточно большом экране, текст новостной статьи отображается в правой панели, а если на маленьком, то он открывается в отдельной активности.</p>
+
+<p>В таких случаях следует повторно использовать подкласс <PH>{@link android.app.Fragment}</PH> в нескольких активностях. Например, в двухпанельном макете используется подкласс <code>ArticleFragment</code>:</p>
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+
+<p>Он же (без макета) используется при работе на маленьком экране (активность <code>ArticleActivity</code>):</p>
+
+<pre>
+ArticleFragment frag = new ArticleFragment();
+getSupportFragmentManager().beginTransaction().add(android.R.id.content, frag).commit();
+</pre>
+
+<p>Результат будет таким же, как если бы мы объявили фрагмент в макете XML, однако в этом случае макет XML не требуется, так как фрагмент article является единственным компонентом этой активности.</p>
+
+<p>При создании фрагментов важно не привязывать их строго к конкретной активности. Для этого можно определить интерфейс с абстрактным описанием всех необходимых способов взаимодействия фрагмента с активностью, в которой он содержится. Затем этот интерфейс нужно реализовать в самой активности.</p>
+
+<p>Например, именно так работает фрагмент <code>HeadlinesFragment</code> в приложении News Reader:</p>
+
+<pre>
+public class HeadlinesFragment extends ListFragment {
+ ...
+ OnHeadlineSelectedListener mHeadlineSelectedListener = null;
+
+ /* Must be implemented by host activity */
+ public interface OnHeadlineSelectedListener {
+ public void onHeadlineSelected(int index);
+ }
+ ...
+
+ public void setOnHeadlineSelectedListener(OnHeadlineSelectedListener listener) {
+ mHeadlineSelectedListener = listener;
+ }
+}
+</pre>
+
+<p>Затем, когда пользователь выбирает заголовок, фрагмент оповещает об этом не указанную в коде активность, а заданный ею прослушиватель:</p>
+
+<pre>
+public class HeadlinesFragment extends ListFragment {
+ ...
+ &#64;Override
+ public void onItemClick(AdapterView&lt;?&gt; parent,
+ View view, int position, long id) {
+ if (null != mHeadlineSelectedListener) {
+ mHeadlineSelectedListener.onHeadlineSelected(position);
+ }
+ }
+ ...
+}
+</pre>
+
+<p>Этот метод рассматривается подробнее в разделе <a
+href="{@docRoot}guide/practices/tablets-and-handsets.html">Поддержка планшетных ПК и мобильных телефонов</a>.</p>
+
+
+<h2 id="TaskHandleConfigChanges">Обработка изменений конфигурации экрана</h2>
+
+<p>При реализации отдельных частей интерфейса с помощью разных активностей нужно учитывать, что интерфейс должен уметь реагировать на определенные изменения конфигурации, такие как поворот экрана.</p>
+
+<p>Например, на типичном планшетном ПК с размером экрана 7&nbsp;дюймов под управлением ОС Android 3.0 или более поздней версии при вертикальной ориентации статья в приложении News Reader открывается с помощью отдельной активности, а при горизонтальной используется двухпанельный макет.</p>
+
+<p>Это означает, что если пользователь держит планшетный ПК вертикально и на экране запущена активность для просмотра статьи, приложение должно уметь определить, что ориентация была изменена на горизонтальную. Затем оно должно соответствующим образом отреагировать на изменение, то есть завершить эту активность и вернуться к основной активности, чтобы содержание отобразилось в двухпанельном макете:</p>
+
+<pre>
+public class ArticleActivity extends FragmentActivity {
+ int mCatIndex, mArtIndex;
+
+ &#64;Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ mCatIndex = getIntent().getExtras().getInt("catIndex", 0);
+ mArtIndex = getIntent().getExtras().getInt("artIndex", 0);
+
+ // If should be in two-pane mode, finish to return to main activity
+ if (getResources().getBoolean(R.bool.has_two_panes)) {
+ finish();
+ return;
+ }
+ ...
+}
+</pre>
+
+
diff --git a/docs/html/intl/ru/training/multiscreen/index.jd b/docs/html/intl/ru/training/multiscreen/index.jd
new file mode 100644
index 000000000000..023eaecff494
--- /dev/null
+++ b/docs/html/intl/ru/training/multiscreen/index.jd
@@ -0,0 +1,64 @@
+page.title=Designing for Multiple Screens
+
+trainingnavtop=true
+startpage=true
+next.title=Supporting Different Screen Sizes
+next.link=screensizes.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>Требования</h2>
+
+<ul>
+ <li>Android 1.6 или более поздней версии (для запуска учебного приложения требуется версия 2.1 или более поздняя)</li>
+ <li>Начальные знания о компонентах <a
+href="http://developer.android.com/guide/components/activities.html">Activity</a> (активность) и <a href="http://developer.android.com/guide/components/fragments.html">Fragment</a> (фрагмент)</li>
+ <li>Опыт создания <a
+href="http://developer.android.com/guide/topics/ui/index.html">пользовательских интерфейсов</a> для Android</li>
+ <li>Некоторые функции требуют использования <a
+href="{@docRoot}tools/extras/support-library.html">вспомогательной библиотеки</a></li>
+</ul>
+
+<h2>Дополнительные материалы</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">Поддержка нескольких экранов</a></li>
+</ul>
+
+<h2>Упражнение</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">Загрузить учебное приложение</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>На платформе Android работают устройства с самыми разными размерами экрана: от телефонов до телевизоров. Чтобы с вашим приложением могли работать как можно больше пользователей, оно должно корректно отображаться на всех этих устройствах.</p>
+
+<p>Однако совместимость с разными типами устройств&nbsp;– это еще не все. От размера экрана зависит, какие возможности будет иметь пользователь при работе с приложением. Чтобы пользователи действительно остались довольны вашим приложением, оно должно не просто <em>поддерживать</em> разные экраны, но и быть <em>оптимизировано</em> для каждого из них.</p>
+
+<p>Этот модуль посвящен реализации пользовательского интерфейса, оптимизированного для разных конфигураций экрана.</p>
+
+<p>Код, приведенный в каждом уроке, взят из учебного приложения, в котором демонстрируются способы оптимизации для разных экранов. Вы можете загрузить его (в правой части экрана) и использовать части кода в собственном приложении.</p>
+
+<p class="note"><strong>Примечание</strong>. В этом модуле и в учебном приложении используется <a
+href="{@docRoot}tools/extras/support-library.html">вспомогательная библиотека</a>, позволяющая работать с API <PH>{@link android.app.Fragment}</PH> в версиях до Android 3.0. Чтобы иметь возможность использовать все необходимые API, загрузите библиотеку и добавьте ее в свое приложение.</p>
+
+
+<h2>Уроки</h2>
+
+<dl>
+ <dt><b><a href="screensizes.html">Поддержка разных размеров экрана</a></b></dt>
+ <dd>В этом уроке рассказывается, как создать макет, который адаптируется к разным размерам экрана, используя масштабируемые представления, объекты <PH>{@link android.widget.RelativeLayout}</PH>, квалификаторы размера и ориентации, фильтры псевдонимов и растровые изображений формата nine-patch.</dd>
+
+ <dt><b><a href="screendensities.html">Поддержка разных разрешений экрана</a></b></dt>
+ <dd>В этом уроке рассказывается, как работать с экранами разного разрешения с помощью не зависящих от разрешения пикселей и как подготовить растровые изображения для каждого из них.</dd>
+
+ <dt><b><a href="adaptui.html">Реализация адаптируемых алгоритмов работы пользовательского интерфейса</a></b></dt>
+ <dd>В этом уроке рассказывается, как реализовать алгоритм работы интерфейса, адаптирующийся к размеру и разрешению экрана, то есть способный определять активный макет во время выполнения приложения, выбирать дальнейшие действия на основе текущего макета и обрабатывать изменения конфигурации экрана.</dd>
+</dl>
diff --git a/docs/html/intl/ru/training/multiscreen/screendensities.jd b/docs/html/intl/ru/training/multiscreen/screendensities.jd
new file mode 100644
index 000000000000..cfd472462824
--- /dev/null
+++ b/docs/html/intl/ru/training/multiscreen/screendensities.jd
@@ -0,0 +1,100 @@
+page.title=Supporting Different Densities
+parent.title=Designing for Multiple Screens
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Supporting Different Screen Sizes
+previous.link=screensizes.html
+next.title=Implementing Adaptative UI Flows
+next.link=adaptui.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>Содержание урока</h2>
+<ol>
+ <li><a href="#TaskUseDP">Использование пикселей, не зависящих от разрешения</a></li>
+ <li><a href="#TaskProvideAltBmp">Предоставление альтернативных растровых изображений</a></li>
+</ol>
+
+<h2>Дополнительные материалы</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">Поддержка нескольких экранов</a></li>
+ <li><a href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">Рекомендации по созданию значков</a></li>
+</ul>
+
+<h2>Упражнение</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">Загрузить учебное приложение</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+
+</div>
+</div>
+
+<p>В этом уроке рассказывается, как создать интерфейс, поддерживающий разные разрешения экрана, за счет использования разных ресурсов и не зависящих от разрешения единиц измерения.</p>
+
+<h2 id="TaskUseDP">Использование пикселей, не зависящих от разрешения</h2>
+
+<p>Разработчики часто допускают одну и ту же ошибку при создании макетов&nbsp;– указывают размеры и расстояния с помощью абсолютных значений в пикселях. Задавать размеры в пикселях не рекомендуется, поскольку из-за различной плотности пикселей на экранах разных устройств фактический размер макета будет неодинаков. Всегда задавайте размеры в единицах <code>dp</code> или <code>sp</code>. <code>dp</code>&nbsp;– это не зависящий от разрешения пиксель, равный физическому пикселю на экране с плотностью 160&nbsp;точек/дюйм. <code>sp</code> является аналогичной единицей измерения, но масштабируется на основе выбранного пользователем размера текста, поэтому ее следует применять для указания величины шрифта, но не размера макета.</p>
+
+<p>Например, если вы задаете расстояние между двумя представлениями, рекомендуется использовать <code>dp</code>, а не <code>px</code>:</p>
+
+<pre>
+&lt;Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="&#64;string/clickme"
+ android:layout_marginTop="20dp" /&gt;
+</pre>
+
+<p>Для определения размера шрифта всегда используйте <code>sp</code>:</p>
+
+<pre>
+&lt;TextView android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="20sp" /&gt;
+</pre>
+
+
+<h2 id="TaskProvideAltBmp">Предоставление альтернативных растровых изображений</h2>
+
+<p>Так как платформа Android предназначена для устройств с разными разрешениями экрана, необходимо позаботиться о наличии растровых изображений для каждого из четырех обобщенных типов разрешения: низкого, среднего, высокого и очень высокого. Это обеспечит оптимальное сочетание качества графики и производительности на всех устройствах.</p>
+
+<p>На основе исходного векторного рисунка создайте растровые изображения для каждого из указанных разрешений согласно следующей шкале размеров:</p>
+
+<p><ul>
+ <li><code>xhdpi</code>: 2,0
+ <li><code>hdpi</code>: 1,5
+ <li><code>mdpi</code>: 1,0 (стандартный размер)
+ <li><code>ldpi</code>: 0,75
+</ul></p>
+
+<p>Это означает, что изображение, которое на устройствах с разрешением экрана <code>xhdpi</code> имеет размер 200&nbsp;x&nbsp;200, на устройствах <code>hdpi</code> должно иметь размер 150&nbsp;x&nbsp;150, на устройствах <code>mdpi</code>&nbsp;– 100&nbsp;x&nbsp;100, а на устройствах <code>ldpi</code>&nbsp;– 75&nbsp;x&nbsp;75.</p>
+
+<p>Поместите файлы изображений в соответствующие подкаталоги в папке <code>res/</code>, и система автоматически выберет подходящий в зависимости от разрешения экрана устройства, на котором выполняется приложение:</p>
+
+<pre class="classic no-pretty-print">
+MyProject/
+ res/
+ drawable-xhdpi/
+ awesomeimage.png
+ drawable-hdpi/
+ awesomeimage.png
+ drawable-mdpi/
+ awesomeimage.png
+ drawable-ldpi/
+ awesomeimage.png
+</pre>
+
+<p>При каждом обращении к файлу <code>&#64;drawable/awesomeimage</code> система будет выбирать изображение, отвечающее разрешению экрана.</p>
+
+<p>Дополнительную информацию и советы можно найти в разделе <a
+href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">Рекомендации по созданию значков</a>.</p>
+
diff --git a/docs/html/intl/ru/training/multiscreen/screensizes.jd b/docs/html/intl/ru/training/multiscreen/screensizes.jd
new file mode 100644
index 000000000000..9684d77486dd
--- /dev/null
+++ b/docs/html/intl/ru/training/multiscreen/screensizes.jd
@@ -0,0 +1,279 @@
+page.title=Supporting Different Screen Sizes
+parent.title=Designing for Multiple Screens
+parent.link=index.html
+
+trainingnavtop=true
+next.title=Supporting Different Screen Densities
+next.link=screendensities.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>Содержание урока</h2>
+<ol>
+ <li><a href="#TaskUseWrapMatchPar">Использование параметров wrap_content и match_parent</a></li>
+ <li><a href="#TaskUseRelativeLayout">Использование объекта RelativeLayout</a></li>
+ <li><a href="#TaskUseSizeQuali">Использование квалификаторов размера</a></li>
+ <li><a href="#TaskUseSWQuali">Использование квалификатора Smallest-width</a></li>
+ <li><a href="#TaskUseAliasFilters">Использование псевдонимов макетов</a></li>
+ <li><a href="#TaskUseOriQuali">Использование квалификаторов ориентации</a></li>
+ <li><a href="#TaskUse9Patch">Использование растровых изображений nine-patch</a></li>
+</ol>
+
+<h2>Дополнительные материалы</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">Поддержка нескольких экранов</a></li>
+</ul>
+
+<h2>Упражнение</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">Загрузить учебное приложение</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>В этом уроке описаны следующие аспекты обеспечения совместимости интерфейса с разными экранами:</p>
+<ul>
+ <li>обеспечение способности макета адаптироваться к размеру экрана;</li>
+ <li>выбор макета интерфейса, отвечающего конфигурации экрана;</li>
+ <li>контроль правильности применяемого макета;</li>
+ <li>использование масштабируемых растровых изображений.</li>
+</ul>
+
+
+<h2 id="TaskUseWrapMatchPar">Использование параметров wrap_content и match_parent</h2>
+
+<p>Чтобы создать масштабируемый макет, способный адаптироваться к разным экранам, используйте в качестве значений ширины и высоты отдельных компонентов представления параметры <code>"wrap_content"</code> и <code>"match_parent"</code>. Если используется <code>"wrap_content"</code>, для ширины или высоты представления устанавливается минимальное значение, позволяющее уместить содержание на экран, а параметр <code>"match_parent"</code> (известный как <code>"fill_parent"</code> в API до 8&nbsp;уровня) служит для растягивания компонента по размеру родительского представления.</p>
+
+<p>Если указать параметры <code>"wrap_content"</code> и <code>"match_parent"</code> вместо строго заданных размеров, в представлениях будет использоваться минимально необходимое место или они будут растягиваться на всю доступную длину и ширину соответственно. Например:</p>
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
+
+<p>Обратите внимание на то, что в коде учебного приложения размеры компонентов заданы с помощью параметров <code>"wrap_content"</code> и <code>"match_parent"</code>. В результате макет правильно отображается на экранах разных размеров при разных ориентациях.</p>
+
+<p>Например, вот так он выглядит в вертикальной и горизонтальной ориентациях. Обратите внимание на то, как размеры компонентов автоматически адаптируются к длине и ширине:</p>
+
+<img src="{@docRoot}images/training/layout-hvga.png" />
+<p class="img-caption"><strong>Рисунок 1</strong>. Приложение News Reader при вертикальной (слева) и горизонтальной (справа) ориентации.</p>
+
+
+<h2 id="TaskUseRelativeLayout">Использование объекта RelativeLayout</h2>
+
+<p>С помощью вложенных экземпляров объекта <PH>{@link android.widget.LinearLayout}</PH> и параметров <code>"wrap_content"</code> и <code>"match_parent"</code> можно создавать достаточно сложные макеты. Однако <PH>{@link android.widget.LinearLayout}</PH> не дает возможности точно управлять взаимным расположением дочерних представлений: в <PH>{@link android.widget.LinearLayout}</PH> они просто помещаются в ряд друг за другом. Если необходимо расположить дочерние представления иным образом, используйте объект <PH>{@link android.widget.RelativeLayout}</PH>, позволяющий задать относительные позиции компонентов. Например, одно дочернее представление можно выровнять по левому краю экрана, а другое&nbsp;– по правому.</p>
+
+<p>Например:</p>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"&gt;
+ &lt;TextView
+ android:id="&#64;+id/label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/&gt;
+ &lt;EditText
+ android:id="&#64;+id/entry"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="&#64;id/label"/&gt;
+ &lt;Button
+ android:id="&#64;+id/ok"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="&#64;id/entry"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10dp"
+ android:text="OK" /&gt;
+ &lt;Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="&#64;id/ok"
+ android:layout_alignTop="&#64;id/ok"
+ android:text="Cancel" /&gt;
+&lt;/RelativeLayout&gt;
+</pre>
+
+<p>На рис.&nbsp;2 показано, как этот макет выглядит на экране QVGA.</p>
+
+<img src="{@docRoot}images/training/relativelayout1.png" />
+<p class="img-caption"><strong>Рисунок&nbsp;2</strong>. Скриншот экрана QVGA (маленького размера).</p>
+
+<p>На рис.&nbsp;3 показано, как он выглядит на экране с большей диагональю.</p>
+
+<img src="{@docRoot}images/training/relativelayout2.png" />
+<p class="img-caption"><strong>Рисунок&nbsp;3</strong>. Скриншот экрана WSVGA (большего размера).</p>
+
+<p>Обратите внимание: несмотря на изменение размера компонентов их взаимное расположение остается прежним, так как оно задано объектом <PH>{@link android.widget.RelativeLayout.LayoutParams}</PH>.</p>
+
+
+<h2 id="TaskUseSizeQuali">Использование квалификаторов размера</h2>
+
+<p>Масштабируемые или относительные макеты, один из которых продемонстрирован выше, имеют свои ограничения. Хотя они позволяют создать интерфейс, способный адаптироваться к разным экранам за счет растягивания пространства внутри и вокруг компонентов, пользователю может оказаться не слишком удобно работать с таким интерфейсом. Поэтому в приложении должен использоваться не один масштабируемый макет, а несколько альтернативных вариантов для разных конфигураций экрана. Их можно создать с помощью <a href="http://developer.android.com/guide/practices/screens_support.html#qualifiers">квалификаторов конфигураций</a>, которые позволяют оперативно выбирать ресурсы, отвечающие текущим параметрам экрана (например, разные варианты макетов для экранов разных размеров).</p>
+
+<p>Многие приложения отображаются на больших экранах в двухпанельном режиме, при котором список элементов расположен в одной панели, а их содержание открывается в другой. Такой режим просмотра удобен на достаточно больших экранах планшетных ПК и телевизоров, однако на экране телефона эти панели следует отображать по отдельности. Для каждого режима просмотра нужно создать отдельный файл.</p>
+
+<ul>
+ <li><code>res/layout/main.xml</code>, однопанельный макет (по умолчанию):
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+</li>
+ <li><code>res/layout-large/main.xml</code>, двухпанельный макет:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+</li>
+</ul>
+
+<p>Обратите внимание, что во втором случае в названии каталога использован квалификатор <code>large</code>. Этот макет будет выбран на устройствах, экраны которых считаются большими (например, 7&nbsp;дюймов и более). Первый макет (без квалификаторов) будет выбран для устройств с маленьким экраном.</p>
+
+
+<h2 id="TaskUseSWQuali">Использование квалификатора Smallest-width</h2>
+
+<p>Одной из проблем, с которой сталкивались разработчики приложений для устройств Android версий до 3.2, было слишком общее определение "большого" экрана. Это касалось устройств Dell Streak, первой модели Galaxy Tab и планшетных ПК с экраном размером 7&nbsp;дюймов. Многие приложения требовалось по-разному отображать на разных устройствах (например, с 5- и 7-дюймовыми экранами), хотя они и относились к одной категории "больших" экранов. В Android версии 3.2 и более поздних доступен квалификатор Smallest-width.</p>
+
+<p>Он позволяет определять экраны с заданной минимальной шириной в dp. Например, типичный планшетный ПК с экраном 7&nbsp;дюймов имеет минимальную ширину 600&nbsp;dp, и если вы хотите, чтобы приложение работало на нем в двухпанельном режиме (а на меньших экранах в однопанельном), используйте два макета из предыдущего раздела, но вместо квалификатора размера <code>large</code> укажите <code>sw600dp</code>. В таком случае на экранах, минимальная ширина которых составляет 600&nbsp;dp, будет использоваться двухпанельный макет.</p>
+
+<ul>
+ <li><code>res/layout/main.xml</code>, однопанельный макет (по умолчанию):
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+</li>
+ <li><code>res/layout-sw600dp/main.xml</code>, двухпанельный макет:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+</li>
+</ul>
+
+<p>Это означает, что на устройствах, минимальная ширина экрана которых не меньше 600&nbsp;dp, будет выбран <code>layout-sw600dp/main.xml</code> (двухпанельный макет), а на экранах меньшего размера&nbsp;– <code>layout/main.xml</code> (однопанельный макет).</p>
+
+<p>Следует учесть, что на Android-устройствах до версии 3.2 квалификатор <code>sw600dp</code> не будет работать, поэтому для них по-прежнему нужно использовать <code>large</code>. Таким образом, вам потребуется еще один файл с названием <code>res/layout-large/main.xml</code>, идентичный файлу <code>res/layout-sw600dp/main.xml</code>. В следующем разделе вы познакомитесь с методом, который позволяет избежать дублирования таких файлов макета.</p>
+
+
+<h2 id="TaskUseAliasFilters">Использование псевдонимов макетов</h2>
+
+<p>Квалификатор Smallest-width работает только на устройствах Android 3.2 или более поздних версий. Для совместимости с более ранними устройствами по-прежнему следует использовать абстрактные размеры (small, normal, large и xlarge). Например, чтобы интерфейс открывался в однопанельном режиме на телефонах и в многопанельном на планшетных ПК с 7-дюймовым экраном, телевизорах и других крупных устройствах, подготовьте следующие файлы:</p>
+
+<p><ul>
+<li><code>res/layout/main.xml:</code> однопанельный макет;</li>
+<li><code>res/layout-large:</code> многопанельный макет;</li>
+<li><code>res/layout-sw600dp:</code> многопанельный макет.</li>
+</ul></p>
+
+<p>Последние два файла идентичны: один из них предназначен для устройств Android 3.2 и новее, а второй для более старых планшетных ПК и телевизоров на платформе Android.</p>
+
+<p>Чтобы не создавать дубликаты файлов и упростить процесс поддержки приложения, используйте псевдонимы. Например, можно определить следующие макеты:</p>
+
+<ul>
+<li><code>res/layout/main.xml</code> (однопанельный макет);</li>
+<li><code>res/layout/main_twopanes.xml</code> (двухпанельный макет).</li>
+</ul>
+
+<p>Затем добавьте следующие два файла:</p>
+
+<p><ul>
+<li><code>res/values-large/layout.xml</code>:
+<pre>
+&lt;resources>
+ &lt;item name="main" type="layout">&#64;layout/main_twopanes&lt;/item>
+&lt;/resources>
+</pre>
+</li>
+
+<li><code>res/values-sw600dp/layout.xml</code>:
+<pre>
+&lt;resources>
+ &lt;item name="main" type="layout">&#64;layout/main_twopanes&lt;/item>
+&lt;/resources>
+</pre>
+
+</li>
+</ul></p>
+
+<p>Содержание последних двух файлов одинаково, но сами по себе они не определяют макет. Они служат для того, чтобы назначить файл <PH>{@code main}</PH> в качестве псевдонима <PH>{@code main_twopanes}</PH>. Так как в них используются селекторы <code>large</code> и <code>sw600dp</code>, они применяются к планшетным ПК и телевизорам на платформе Android независимо от версии (для версий до 3.2 используется
+<PH>{@code large}</PH>, а для более новых&nbsp;– <code>sw600dp</code>).</p>
+
+
+<h2 id="TaskUseOriQuali">Использование квалификаторов ориентации</h2>
+
+<p>Хотя некоторые макеты одинаково хорошо смотрятся в вертикальной и горизонтальной ориентациях, в большинстве случаев интерфейс все же приходится адаптировать. Ниже показано, как изменяется макет в приложении News Reader в зависимости от размера и ориентации экрана.</p>
+
+<p><ul>
+<li><b>Маленький экран, вертикальная ориентация</b>: однопанельный вид с логотипом.</li>
+<li><b>Маленький экран, горизонтальная ориентация</b>: однопанельный вид с логотипом.</li>
+<li><b>Планшетный ПК с 7-дюймовым экраном, вертикальная ориентация</b>: однопанельный вид с панелью действий.</li>
+<li><b>Планшетный ПК с 7-дюймовым экраном, горизонтальная ориентация</b>: двухпанельный вид с панелью действий.</li>
+<li><b>Планшетный ПК с 10-дюймовым экраном, вертикальная ориентация</b>: двухпанельный вид (узкий вариант) с панелью действий.</li>
+<li><b>Планшетный ПК с 10-дюймовым экраном, горизонтальная ориентация</b>: двухпанельный вид (широкий вариант) с панелью действий.</li>
+<li><b>Телевизор, горизонтальная ориентация</b>: двухпанельный вид с панелью действий.</li>
+</ul></p>
+
+<p>Каждый из этих макетов определен в XML-файле в каталоге <code>res/layout/</code>. Чтобы сопоставить их с определенными конфигурациями экрана, в приложении используются псевдонимы:</p>
+
+<p><code>res/layout/onepane.xml:</code></p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+
+<p><code>res/layout/onepane_with_bar.xml:</code></p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
+
+<p><code>res/layout/twopanes.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+
+<p><code>res/layout/twopanes_narrow.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes_narrow.xml all}
+
+<p>После того как все возможные макеты определены, остается сопоставить каждый из них с подходящей конфигурацией, используя квалификаторы конфигураций. Воспользуемся псевдонимами макетов:</p>
+
+<p><code>res/values/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values/layouts.xml all}
+
+<p><code>res/values-sw600dp-land/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-sw600dp-land/layouts.xml
+all}
+
+<p><code>res/values-sw600dp-port/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-sw600dp-port/layouts.xml
+all}
+
+<p><code>res/values-large-land/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-large-land/layouts.xml all}
+
+<p><code>res/values-large-port/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-large-port/layouts.xml all}
+
+
+
+<h2 id="TaskUse9Patch">Использование растровых изображений nine-patch</h2>
+
+<p>Чтобы интерфейс был совместим с экранами разных размеров, используемые в нем графические элементы также должны быть адаптированы соответствующим образом. Например, фон кнопки должен одинаково хорошо выглядеть независимо от ее формы.</p>
+
+<p>Если использовать для компонентов, размеры которых меняются, обычные изображения, то они будут равномерно сжиматься и растягиваться, и результат будет далек от идеального. Решением являются растровые изображения формата nine-patch&nbsp;– специальные PNG-файлы, содержащие информацию о том, какие области можно растягивать, а какие нет.</p>
+
+<p>Создавая растровые изображения для масштабируемых компонентов, обязательно используйте формат nine-patch. На рис.&nbsp;4 показано обычное растровое изображение (увеличенное в 4&nbsp;раза для наглядности), которое мы переведем в формат nine-patch.</p>
+
+<img src="{@docRoot}images/training/button.png" />
+<p class="img-caption"><strong>Рисунок&nbsp;4</strong>. <code>button.png</code></p>
+
+<p>Откройте его с помощью утилиты <ode
+href="{@docRoot}tools/help/draw9patch.html"><code>draw9patch</code></a>, входящей в комплект разработчика (в каталоге <code>tools/</code>). Установите метки на левом и верхнем краях, чтобы ограничить области, которые можно растягивать. Можно также провести линию вдоль правого и нижнего краев, как показано на рис.&nbsp;5, чтобы отметить области, в которых содержание должно быть зафиксировано.</p>
+
+<img src="{@docRoot}images/training/button_with_marks.png" />
+<p class="img-caption"><strong>Рисунок&nbsp;5</strong>. <code>button.9.png</code></p>
+
+<p>Обратите внимание на черные пиксели по краям. Метки у верхней и левой границ обозначают те области, которые можно растягивать, а метки у правой и нижней границ&nbsp;– те, куда должно быть помещено содержание.</p>
+
+<p>Также обратите внимание на расширение <code>.9.png</code>. Оно должно быть задано именно в таком виде, чтобы система могла определить, что это формат nine-patch, а не обычный PNG-файл.</p>
+
+<p>При применении этого фона к компоненту (с помощью <code>android:background="&#64;drawable/button"</code>) изображение будет растянуто по размеру кнопки, как показано на рис.&nbsp;6.</p>
+
+<img src="{@docRoot}images/training/buttons_stretched.png" />
+<p class="img-caption"><strong>Рисунок&nbsp;6</strong>. Кнопки разных размеров с файлом фона <code>button.9.png</code> в формате nine-patch.</p>
+
diff --git a/docs/html/intl/zh-CN/training/monitoring-device-state/battery-monitoring.jd b/docs/html/intl/zh-CN/training/monitoring-device-state/battery-monitoring.jd
new file mode 100644
index 000000000000..0e1ccb739168
--- /dev/null
+++ b/docs/html/intl/zh-CN/training/monitoring-device-state/battery-monitoring.jd
@@ -0,0 +1,120 @@
+page.title=监控电池电量和充电状态
+parent.title=优化电池使用时间
+parent.link=index.html
+
+trainingnavtop=true
+next.title=确定和监控基座对接状态和类型
+next.link=docking-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>本教程将指导您</h2>
+<ol>
+ <li><a href="#DetermineChargeState">确定当前的充电状态</a></li>
+ <li><a href="#MonitorChargeState">监控充电状态的变化</a></li>
+ <li><a href="#CurrentLevel">确定当前的电池电量</a></li>
+ <li><a href="#MonitorLevel">监控电池电量的显著变化</a></li>
+</ol>
+
+<h2>您还应参阅</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">intent 和 intent 过滤器</a>
+</ul>
+
+</div>
+</div>
+
+<p>如果您要更改后台更新频率,从而减少更新对电池使用时间的影响,最好先查看当前的电池电量和充电状态。</p>
+
+<p>对应用进行更新会影响电池使用时间,具体取决于设备的电池电量和充电状态。如果用户正在通过交流电源为设备充电,更新应用的影响就可以忽略不计。因此,在大多数情况下,只要设备连接了充电器,您就可以最大程度地提高刷新频率。相反,如果设备在消耗电池电量,那么降低更新频率就可以延长电池使用时间。</p>
+
+<p>同样,您也可以查看电池电量,如果电量即将耗尽,您就可以降低更新频率,甚至停止更新。</p>
+
+
+<h2 id="DetermineChargeState">确定当前的充电状态</h2>
+
+<p>请先确定当前的充电状态。{@link android.os.BatteryManager} 会通过一个包含充电状态的持续 {@link android.content.Intent} 广播所有的电池详情和充电详情。</p>
+
+<p>由于这是个持续 intent,因此您无需通过将传入 {@code null} 的 {@code registerReceiver} 作为接收器直接调用(如下一代码段所示)来注册 {@link android.content.BroadcastReceiver},系统会返回当前电池状态 intent。您可以在此处传入实际的 {@link android.content.BroadcastReceiver} 对象,不过我们会在下文中介绍如何处理更新,因此您不一定要执行此操作。</p>
+
+<pre>IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
+Intent batteryStatus = context.registerReceiver(null, ifilter);</pre>
+
+<p>如果设备正在充电,则您可以提取当前的充电状态和充电方式(无论是通过 USB 还是交流充电器),如下所示:<p>
+
+<pre>// Are we charging / charged?
+int status = batteryStatus.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
+boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
+ status == BatteryManager.BATTERY_STATUS_FULL;
+
+// How are we charging?
+int chargePlug = battery.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
+boolean usbCharge = chargePlug == BATTERY_PLUGGED_USB;
+boolean acCharge = chargePlug == BATTERY_PLUGGED_AC;</pre>
+
+<p>通常,如果设备连接了交流充电器,您就应最大程度地提高后台更新频率;如果设备通过 USB 充电,请降低更新频率;如果电池在耗电,请进一步降低更新频率。</p>
+
+
+<h2 id="MonitorChargeState">监控充电状态的变化</h2>
+
+<p>充电状态的改变就像设备连接电源那样容易,因此监控充电状态的变化并相应地调整刷新频率就很重要了。</p>
+
+<p>只要设备连接或断开电源,{@link android.os.BatteryManager} 就会广播相应的操作。即使您的应用没有运行,也请务必接收这些事件,尤其是当这些事件会影响您启动应用以执行后台更新的频率时。因此,您应该通过在 intent 过滤器中定义 {@link android.content.Intent#ACTION_POWER_CONNECTED} 和 {@link android.content.Intent#ACTION_POWER_DISCONNECTED},在清单中注册 {@link android.content.BroadcastReceiver} 来侦听这两个事件。</p>
+
+<pre>&lt;receiver android:name=".PowerConnectionReceiver">
+ &lt;intent-filter>
+ &lt;action android:name="android.intent.action.ACTION_POWER_CONNECTED"/>
+ &lt;action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
+ &lt;/intent-filter>
+&lt;/receiver></pre>
+
+<p>在实施相关的 {@link android.content.BroadcastReceiver} 时,您可以按上一步骤所述提取当前的充电状态和充电方式。</p>
+
+<pre>public class PowerConnectionReceiver extends BroadcastReceiver {
+ &#64;Override
+ public void onReceive(Context context, Intent intent) {
+ int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
+ boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
+ status == BatteryManager.BATTERY_STATUS_FULL;
+
+ int chargePlug = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
+ boolean usbCharge = chargePlug == BATTERY_PLUGGED_USB;
+ boolean acCharge = chargePlug == BATTERY_PLUGGED_AC;
+ }
+}</pre>
+
+
+<h2 id="CurrentLevel">确定当前的电池电量</h2>
+
+<p>在某些情况下,确定当前的电池电量会对您有所帮助。如果电池电量低于一定水平,您可以降低后台更新频率。</p>
+
+<p>您可以从电池状态 intent 中提取要了解的当前电池电量以及电池容量,具体如下所示:</p>
+
+<pre>int level = battery.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
+int scale = battery.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
+
+float batteryPct = level / (float)scale;</pre>
+
+
+<h2 id="MonitorLevel">监控电池电量的显著变化</h2>
+
+<p>您无法轻松地对电池状态进行持续监控,不过也无需这么做。</p>
+
+<p>一般来说,与应用的正常行为相比,持续监控电池电量会消耗更多电量。因此,比较合适的做法是只监控电池电量的显著变化(尤其是在设备进入或结束低电量状态的情况下)。</p>
+
+<p>以下清单代码段提取自广播接收器中的 intent 过滤器元素。通过侦听 {@link android.content.Intent#ACTION_BATTERY_LOW} 和 {@link android.content.Intent#ACTION_BATTERY_OKAY},只要设备的电池进入或结束低电量状态,系统就会触发接收器。</p>
+
+<pre>&lt;receiver android:name=".BatteryLevelReceiver">
+&lt;intent-filter>
+ &lt;action android:name="android.intent.action.ACTION_BATTERY_LOW"/>
+ &lt;action android:name="android.intent.action.ACTION_BATTERY_OKAY"/>
+ &lt;/intent-filter>
+&lt;/receiver></pre>
+
+<p>如果电池电量极低,通常比较合适的做法是停用所有后台更新。如果您还没用上更新的数据,手机就自动关机了,那这些数据再新也没有意义。</p>
+
+<p>在很多情况下,将设备插入基座就可以为其充电。下一教程将向您介绍如何确定当前基座状态及如何监控设备对接的变化。</p>
+
diff --git a/docs/html/intl/zh-CN/training/monitoring-device-state/connectivity-monitoring.jd b/docs/html/intl/zh-CN/training/monitoring-device-state/connectivity-monitoring.jd
new file mode 100644
index 000000000000..8313e089b908
--- /dev/null
+++ b/docs/html/intl/zh-CN/training/monitoring-device-state/connectivity-monitoring.jd
@@ -0,0 +1,70 @@
+page.title=确定和监控网络连接状态
+parent.title=优化电池使用时间
+parent.link=index.html
+
+trainingnavtop=true
+
+previous.title=确定和监控基座对接状态和类型
+previous.link=docking-monitoring.html
+next.title=根据需要操作广播接收器
+next.link=manifest-receivers.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>本教程将指导您</h2>
+<ol>
+ <li><a href="#DetermineConnection">确定是否已连接互联网</a></li>
+ <li><a href="#DetermineType">确定互联网连接的类型</a></li>
+ <li><a href="#MonitorChanges">监控连接情况的变化</a></li>
+</ol>
+
+
+<h2>您还应参阅</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">intent 和 intent 过滤器</a>
+</ul>
+
+</div>
+</div>
+
+<p>重复提醒和后台服务最常见的用途之一,就是为来自互联网资源的应用数据、缓存数据安排定期更新或执行长时间运行的下载任务。但是,如果您没有连接互联网,或因连接过慢而无法完成下载,那就根本没必要唤醒设备并安排更新了。</p>
+
+<p>您可以使用 {@link android.net.ConnectivityManager} 查看是否确实已连接互联网,如果已连接,您还可以了解当前的连接类型。</p>
+
+
+<h2 id="DetermineConnection">确定是否已连接互联网</h2>
+
+<p>如果设备未连接互联网,就没有必要根据互联网资源安排更新了。以下代码段说明如何使用 {@link android.net.ConnectivityManager} 查询有效网络并确定该网络是否已连接互联网。</p>
+
+<pre>ConnectivityManager cm =
+ (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
+
+NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
+boolean isConnected = activeNetwork.isConnectedOrConnecting();</pre>
+
+
+<h2 id="DetermineType">确定互联网连接的类型</h2>
+
+<p>您也可以确定当前可用的互联网连接的类型。</p>
+
+<p>通过移动数据、WiMAX、Wi-Fi 和以太网连接可提供设备连接。您可以查询有效网络的类型(具体如下所示),以便根据可用带宽调整刷新频率。</p>
+
+<pre>boolean isWiFi = activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;</pre>
+
+<p>移动数据的费用往往比 Wi-Fi 高很多,因此在大多数情况下,如果您使用的是移动连接,就应降低应用更新频率。同样,在没有 Wi-Fi 连接的情况下,您就应暂停较大的下载任务。</p>
+
+<p>停用更新后,请务必侦听连接情况的变化,以便在建立互联网连接后恢复更新。</p>
+
+
+<h2 id="MonitorChanges">监控连接情况的变化</h2>
+
+<p>只要连接的具体情况发生变化,{@link android.net.ConnectivityManager} 就会广播 {@link android.net.ConnectivityManager#CONNECTIVITY_ACTION} ({@code "android.net.conn.CONNECTIVITY_CHANGE"}) 操作。您可以在清单中注册广播接收器,以便侦听这些变化并相应地恢复(或暂停)后台更新。</p>
+
+<pre>&lt;action android:name="android.net.conn.CONNECTIVITY_CHANGE"/></pre>
+
+<p>设备连接情况的变化可能会非常频繁,只要您在移动数据和 Wi-Fi 之间相互切换,系统就会触发此广播。因此比较合适的做法是,仅当之前暂停了更新或下载时才监控此广播,以便恢复更新或下载。通常,您只需在开始更新前检查互联网连接情况即可,如果未连接互联网,请暂停后续更新,直到连接恢复。</p>
+
+<p>此技巧需要切换您在清单中声明的广播接收器,具体说明请见下一教程。</p>
diff --git a/docs/html/intl/zh-CN/training/monitoring-device-state/docking-monitoring.jd b/docs/html/intl/zh-CN/training/monitoring-device-state/docking-monitoring.jd
new file mode 100644
index 000000000000..53b951dd584e
--- /dev/null
+++ b/docs/html/intl/zh-CN/training/monitoring-device-state/docking-monitoring.jd
@@ -0,0 +1,74 @@
+page.title=确定和监控基座对接状态和类型
+parent.title=优化电池使用时间
+parent.link=index.html
+
+trainingnavtop=true
+previous.title= 监控电池电量和充电状态
+previous.link=battery-monitoring.html
+next.title= 确定和监控网络连接状态
+next.link=connectivity-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>本教程将指导您</h2>
+<ol>
+ <li><a href="#CurrentDockState">确定当前的基座状态</a></li>
+ <li><a href="#DockType">确定当前的基座类型</a></li>
+ <li><a href="#MonitorDockState">监控基座状态或类型的变化</a></li>
+</ol>
+
+
+<h2>您还应参阅</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">intent 和 intent 过滤器</a>
+</ul>
+
+</div>
+</div>
+
+<p>Android 设备支持几种不同类型的基座。这些类型包括车载或家用基座以及数字和模拟基座。许多基座可用于为插入的设备充电,因此基座状态通常与充电状态紧密相关。</p>
+
+<p>您可以根据手机的基座状态调整更新频率,具体取决于相关应用。如果设备插入的是桌面基座,您就可以提高体育中心类应用的更新频率;如果设备插入的是车载基座,您就可以完全停用此类更新。相反,如果设备插入的是车载基座且后台服务正在更新路况,您就可以最大程度地提高更新频率。</p>
+
+<p>系统是以持续 {@link android.content.Intent} 的形式广播基座状态的,这样您就可以查询设备是否插入了基座,如果已插入,您还可以查询基座类型。</p>
+
+
+<h2 id="CurrentDockState">确定当前的基座状态</h2>
+
+<p>基座状态详情是以附加信息的形式包含在 {@link android.content.Intent#ACTION_DOCK_EVENT} 操作的持续广播中的。由于这属于持续广播,因此您无需注册 {@link android.content.BroadcastReceiver}。您可以将传入 {@code null} 的 {@link android.content.Context#registerReceiver registerReceiver()} 作为广播接收器直接调用,具体如下一代码段所示。</p>
+
+<pre>IntentFilter ifilter = new IntentFilter(Intent.ACTION_DOCK_EVENT);
+Intent dockStatus = context.registerReceiver(null, ifilter);</pre>
+
+<p>您可以从 {@code EXTRA_DOCK_STATE} 附加信息中提取当前的基座对接状态:<p>
+
+<pre>int dockState = battery.getIntExtra(EXTRA_DOCK_STATE, -1);
+boolean isDocked = dockState != Intent.EXTRA_DOCK_STATE_UNDOCKED;</pre>
+
+
+<h2 id="DockType">确定当前的基座类型</h2>
+
+<p>用户可以将设备插入以下四种类型的基座:
+<ul><li>车载基座</li>
+<li>桌面基座</li>
+<li>低端(模拟)桌面基座</li>
+<li>高端(数字)桌面基座</li></ul></p>
+
+<p>请注意,后两种类型仅适用于 API 级别为 11 及以上的 Android,因此如果您只关注基座类型,而不在意基座究竟是数字的还是模拟的,那么比较合适的做法就是查看全部三种类型:</p>
+
+<pre>boolean isCar = dockState == EXTRA_DOCK_STATE_CAR;
+boolean isDesk = dockState == EXTRA_DOCK_STATE_DESK ||
+ dockState == EXTRA_DOCK_STATE_LE_DESK ||
+ dockState == EXTRA_DOCK_STATE_HE_DESK;</pre>
+
+
+<h2 id="MonitorDockState">监控基座状态或类型的变化</h2>
+
+<p>无论设备是否插入了基座,系统都会广播 {@link android.content.Intent#ACTION_DOCK_EVENT} 操作。要监控设备基座状态的变化,您只需在应用清单中注册广播接收器即可,具体如以下代码段所示:</p>
+
+<pre>&lt;action android:name="android.intent.action.ACTION_DOCK_EVENT"/></pre>
+
+<p>您可以使用上一步骤中所述的技术在接收器实施过程中提取基座的类型和状态。</p>
diff --git a/docs/html/intl/zh-CN/training/monitoring-device-state/index.jd b/docs/html/intl/zh-CN/training/monitoring-device-state/index.jd
new file mode 100644
index 000000000000..aa107539eeca
--- /dev/null
+++ b/docs/html/intl/zh-CN/training/monitoring-device-state/index.jd
@@ -0,0 +1,49 @@
+page.title=优化电池使用时间
+
+trainingnavtop=true
+startpage=true
+next.title=监控电池电量和充电状态
+next.link=battery-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>依存关系和前提条件</h2>
+<ul>
+ <li>Android 2.0(API 级别 5)或更高版本</li>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">intent 和 intent 过滤器</a>的使用经验</li>
+</ul>
+
+<h2>您还应参阅</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/services.html">服务</a>
+</ul>
+
+</div>
+</div>
+
+<p>为了打造一个优秀的应用,您应设法降低应用对电池使用时间的影响。阅读完本教程后,您就可以让自己构建的应用根据其所在设备的状态来监控和调整自身的功能和行为。</p>
+
+<p>要确保在不影响用户体验的情况下最大程度地降低应用对电池使用时间的影响,您可以采取一些措施,例如在网络连接断开时停用后台服务更新,或在电池电量较低时降低此类更新的频率。</p>
+
+<h2>教程</h2>
+
+<!-- Create a list of the lessons in this class along with a short description of each lesson.
+These should be short and to the point. It should be clear from reading the summary whether someone
+will want to jump to a lesson or not.-->
+
+<dl>
+ <dt><b><a href="battery-monitoring.html">监控电池电量和充电状态</a></b></dt>
+ <dd>了解如何通过确定和监控当前的电池电量和充电状态的变化来相应地调整应用的更新频率。</dd>
+
+ <dt><b><a href="docking-monitoring.html">确定和监控基座对接状态和类型</a></b></dt>
+ <dd>最佳刷新频率可能各有不同,具体取决于安装了相关应用的设备的使用方式。了解如何确定和监控所用基座的对接状态和类型,以便相应地调整应用的行为。</dd>
+
+ <dt><b><a href="connectivity-monitoring.html">确定和监控网络连接状态</a></b></dt>
+ <dd>如果没有互联网连接,您就无法通过在线来源更新应用。了解如何查看连接状态,以便相应地调整后台更新频率。您还可以了解如何在执行高带宽操作前查看 Wi-Fi 或移动连接的状态。</dd>
+
+ <dt><b><a href="manifest-receivers.html">根据需要操作广播接收器</a></b></dt>
+ <dd>您可以在运行时切换自己在清单中声明的广播接收器,以便根据当前设备状态停用不需要的接收器。了解如何在设备未处于特定状态的情况下切换和层叠状态变化接收器和延迟操作,以便提高效率。</dd>
+</dl> \ No newline at end of file
diff --git a/docs/html/intl/zh-CN/training/monitoring-device-state/manifest-receivers.jd b/docs/html/intl/zh-CN/training/monitoring-device-state/manifest-receivers.jd
new file mode 100644
index 000000000000..07c014f10a31
--- /dev/null
+++ b/docs/html/intl/zh-CN/training/monitoring-device-state/manifest-receivers.jd
@@ -0,0 +1,50 @@
+page.title=根据需要操作广播接收器
+parent.title=优化电池使用时间
+parent.link=index.html
+
+trainingnavtop=true
+
+previous.title=确定和监控网络连接状态
+previous.link=connectivity-monitoring.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>本教程将指导您</h2>
+<ol>
+ <li><a href="#ToggleReceivers">切换和层叠状态变化接收器以提高效率</a></li>
+</ol>
+
+
+<h2>您还应参阅</h2>
+<ul>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">intent 和 intent 过滤器</a>
+</ul>
+
+</div>
+</div>
+
+<p>监控设备状态变化的最简单方法就是,为您监控的每种状态创建 {@link android.content.BroadcastReceiver} 并在应用清单中逐一进行注册。然后,您只需根据当前设备状态在每个接收器中重新安排重复提醒即可。</p>
+
+<p>此方法的负面影响在于,只要系统触发了这些接收器中的任何一个,相关应用就会唤醒设备,其频率可能会远远超过所需的水平。</p>
+
+<p>更好的方法是在运行时停用或启用广播接收器。这样的话,您就可以将自己在清单中声明的接收器用作被动提醒,只有在需要时才会由系统事件触发。</p>
+
+
+<h2 id="ToggleReceivers">切换和层叠状态变化接收器以提高效率 </h2>
+
+<p>您可以使用 {@link android.content.pm.PackageManager} 切换清单中定义的任意组件的启用状态(包括您要启用或停用的任意广播接收器),具体如以下片段所示:</p>
+
+<pre>ComponentName receiver = new ComponentName(context, myReceiver.class);
+
+PackageManager pm = context.getPackageManager();
+
+pm.setComponentEnabledSetting(receiver,
+ PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
+ PackageManager.DONT_KILL_APP)</pre>
+
+<p>在使用此技巧时,如果您确定连接已断开,就可以停用除连接变化接收器外的所有接收器。相反,成功连接后,您就可以停止侦听连接变化,同时只需在执行更新和重新安排重复更新提醒前查看是否在线即可。</p>
+
+<p>您可以使用同样的方法来延迟需要较高带宽的下载任务。只有在连接 Wi-Fi 后,您才能直接启用用于侦听连接变化和启动下载任务的广播接收器。</p>
diff --git a/docs/html/intl/zh-CN/training/multiscreen/adaptui.jd b/docs/html/intl/zh-CN/training/multiscreen/adaptui.jd
new file mode 100644
index 000000000000..89908fe46ef9
--- /dev/null
+++ b/docs/html/intl/zh-CN/training/multiscreen/adaptui.jd
@@ -0,0 +1,212 @@
+page.title=实施自适应用户界面流程
+parent.title=针对多种屏幕进行设计
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=支持各种屏幕密度
+previous.link=screendensities.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>本教程将指导您</h2>
+
+<ol>
+ <li><a href="#TaskDetermineCurLayout">确定当前布局</a></li>
+ <li><a href="#TaskReactToLayout">根据当前布局做出响应</a></li>
+ <li><a href="#TaskReuseFrag">重复使用其他活动中的片段</a></li>
+ <li><a href="#TaskHandleConfigChanges">处理屏幕配置变化</a></li>
+</ol>
+
+<h2>您还应参阅</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/tablets-and-handsets.html">支持平板电脑和手持设备</a></li>
+</ul>
+
+<h2>试试看</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">下载示例应用</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+
+</div>
+</div>
+
+<p>根据您的应用当前显示的布局,用户界面流程可能会有所不同。例如,如果您的应用处于双面板模式下,点击左侧面板上的项即可直接在右侧面板上显示相关内容;如果该应用处于单面板模式下,相关内容就应以其他活动的形式在同一面板上显示。</p>
+
+
+<h2 id="TaskDetermineCurLayout">确定当前布局</h2>
+
+<p>由于每种布局的实施都会稍有不同,因此您可能需要先确定当前向用户显示的布局。例如,您可以了解用户所处的是“单面板”模式还是“双面板”模式。要做到这一点,您可以查询指定视图是否存在以及是否已显示出来。</p>
+
+<pre class="prettyprint">
+public class NewsReaderActivity extends FragmentActivity {
+ boolean mIsDualPane;
+
+ &#64;Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main_layout);
+
+ View articleView = findViewById(R.id.article);
+ mIsDualPane = articleView != null &amp;&amp;
+ articleView.getVisibility() == View.VISIBLE;
+ }
+}
+</pre>
+
+<p>请注意,这段代码用于查询“报道”面板是否可用,与针对具体布局的硬编码查询相比,这段代码的灵活性要大得多。</p>
+
+<p>再举一个适应各种组件的存在情况的方法示例:在对这些组件执行操作前先查看它们是否可用。例如,新闻阅读器示例应用中有一个用于打开菜单的按钮,但只有在版本低于 3.0 的 Android 上运行该应用时,这个按钮才会存在,因为 API 级别 11 或更高级别中的 <PH>{@link android.app.ActionBar}</PH> 已取代了该按钮的功能。因此,您可以使用以下代码为此按钮添加事件侦听器:</p>
+
+<pre class="prettyprint">
+Button catButton = (Button) findViewById(R.id.categorybutton);
+OnClickListener listener = /* create your listener here */;
+if (catButton != null) {
+ catButton.setOnClickListener(listener);
+}
+</pre>
+
+
+<h2 id="TaskReactToLayout">根据当前布局做出响应</h2>
+
+<p>有些操作可能会因当前的具体布局而产生不同的结果。例如,在新闻阅读器示例中,如果用户界面处于双面板模式下,那么点击标题列表中的标题就会在右侧面板中打开相应报道;但如果用户界面处于单面板模式下,那么上述操作就会启动一个独立活动:</p>
+
+<pre>
+&#64;Override
+public void onHeadlineSelected(int index) {
+ mArtIndex = index;
+ if (mIsDualPane) {
+ /* display article on the right pane */
+ mArticleFragment.displayArticle(mCurrentCat.getArticle(index));
+ } else {
+ /* start a separate activity */
+ Intent intent = new Intent(this, ArticleActivity.class);
+ intent.putExtra("catIndex", mCatIndex);
+ intent.putExtra("artIndex", index);
+ startActivity(intent);
+ }
+}
+</pre>
+
+<p>同样,如果该应用处于双面板模式下,就应设置带导航标签的操作栏;但如果该应用处于单面板模式下,就应使用旋转窗口小部件设置导航栏。因此您的代码还应确定哪种情况比较合适:</p>
+
+<pre>
+final String CATEGORIES[] = { "热门报道", "政治", "经济", "Technology" };
+
+public void onCreate(Bundle savedInstanceState) {
+ ....
+ if (mIsDualPane) {
+ /* use tabs for navigation */
+ actionBar.setNavigationMode(android.app.ActionBar.NAVIGATION_MODE_TABS);
+ int i;
+ for (i = 0; i &lt; CATEGORIES.length; i++) {
+ actionBar.addTab(actionBar.newTab().setText(
+ CATEGORIES[i]).setTabListener(handler));
+ }
+ actionBar.setSelectedNavigationItem(selTab);
+ }
+ else {
+ /* use list navigation (spinner) */
+ actionBar.setNavigationMode(android.app.ActionBar.NAVIGATION_MODE_LIST);
+ SpinnerAdapter adap = new ArrayAdapter<String>(this,
+ R.layout.headline_item, CATEGORIES);
+ actionBar.setListNavigationCallbacks(adap, handler);
+ }
+}
+</pre>
+
+
+<h2 id="TaskReuseFrag">重复使用其他活动中的片段</h2>
+
+<p>多屏幕设计中的重复模式是指,对于某些屏幕配置,已实施界面的一部分会用作面板;但对于其他配置,这部分就会以独立活动的形式存在。例如,在新闻阅读器示例中,对于较大的屏幕,新闻报道文本会显示在右侧面板中;但对于较小的屏幕,这些文本就会以独立活动的形式存在。</p>
+
+<p>在类似情况下,您通常可以在多个活动中重复使用相同的 <PH>{@link android.app.Fragment}</PH> 子类以避免代码重复。例如,您在双面板布局中使用了 <code>ArticleFragment</code>:</p>
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+
+<p>然后又在小屏幕的活动布局中重复使用(无布局)了它 (<code>ArticleActivity</code>):</p>
+
+<pre>
+ArticleFragment frag = new ArticleFragment();
+getSupportFragmentManager().beginTransaction().add(android.R.id.content, frag).commit();
+</pre>
+
+<p>当然,这与在 XML 布局中声明片段的效果是一样的,但在这种情况下却没必要使用 XML 布局,因为报道片段是此活动中的唯一组件。</p>
+
+<p>请务必在设计片段时注意,不要针对具体活动创建强耦合。要做到这一点,您通常可以定义一个界面,该界面概括了相关片段与其主活动交互所需的全部方式,然后让主活动实施该界面:</p>
+
+<p>例如,新闻阅读器应用的 <code>HeadlinesFragment</code> 会精确执行以下代码:</p>
+
+<pre>
+public class HeadlinesFragment extends ListFragment {
+ ...
+ OnHeadlineSelectedListener mHeadlineSelectedListener = null;
+
+ /* Must be implemented by host activity */
+ public interface OnHeadlineSelectedListener {
+ public void onHeadlineSelected(int index);
+ }
+ ...
+
+ public void setOnHeadlineSelectedListener(OnHeadlineSelectedListener listener) {
+ mHeadlineSelectedListener = listener;
+ }
+}
+</pre>
+
+<p>然后,如果用户选择某个标题,相关片段就会通知由主活动指定的侦听器(而不是通知某个硬编码的具体活动):</p>
+
+<pre>
+public class HeadlinesFragment extends ListFragment {
+ ...
+ &#64;Override
+ public void onItemClick(AdapterView&lt;?&gt; parent,
+ View view, int position, long id) {
+ if (null != mHeadlineSelectedListener) {
+ mHeadlineSelectedListener.onHeadlineSelected(position);
+ }
+ }
+ ...
+}
+</pre>
+
+<p><a
+href="{@docRoot}guide/practices/tablets-and-handsets.html">支持平板电脑和手持设备</a>的指南中进一步介绍了此技术。</p>
+
+
+<h2 id="TaskHandleConfigChanges">处理屏幕配置变化</h2>
+
+<p>如果您使用独立活动实施界面的独立部分,那么请注意,您可能需要对特定配置变化(例如屏幕方向的变化)做出响应,以便保持界面的一致性。</p>
+
+<p>例如,在运行 Android 3.0 或更高版本的标准 7 英寸平板电脑上,如果新闻阅读器示例应用运行在纵向模式下,就会在使用独立活动显示新闻报道;但如果该应用运行在横向模式下,就会使用双面板布局。</p>
+
+<p>也就是说,如果用户处于纵向模式下且屏幕上显示的是用于阅读报道的活动,那么您就需要在检测到屏幕方向变化(变成横向模式)后执行相应操作,即停止上述活动并返回主活动,以便在双面板布局中显示相关内容:</p>
+
+<pre>
+public class ArticleActivity extends FragmentActivity {
+ int mCatIndex, mArtIndex;
+
+ &#64;Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ mCatIndex = getIntent().getExtras().getInt("catIndex", 0);
+ mArtIndex = getIntent().getExtras().getInt("artIndex", 0);
+
+ // If should be in two-pane mode, finish to return to main activity
+ if (getResources().getBoolean(R.bool.has_two_panes)) {
+ finish();
+ return;
+ }
+ ...
+}
+</pre>
+
+
diff --git a/docs/html/intl/zh-CN/training/multiscreen/index.jd b/docs/html/intl/zh-CN/training/multiscreen/index.jd
new file mode 100644
index 000000000000..35c48e066c24
--- /dev/null
+++ b/docs/html/intl/zh-CN/training/multiscreen/index.jd
@@ -0,0 +1,64 @@
+page.title=针对多种屏幕进行设计
+
+trainingnavtop=true
+startpage=true
+next.title=支持各种屏幕尺寸
+next.link=screensizes.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>依存关系和前提条件</h2>
+
+<ul>
+ <li>Android 1.6 或更高版本(示例应用则需要 2.1 或更高版本)</li>
+ <li><a
+href="http://developer.android.com/guide/components/activities.html">活动</a>和<a href="http://developer.android.com/guide/components/fragments.html">片段</a>的基本知识</li>
+ <li>构建 Android <a
+href="http://developer.android.com/guide/topics/ui/index.html">用户界面</a>的经验</li>
+ <li>多个功能需要用到<a
+href="{@docRoot}tools/extras/support-library.html">支持库</a></li>
+</ul>
+
+<h2>您还应参阅</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">支持多种屏幕</a></li>
+</ul>
+
+<h2>试试看</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">下载示例应用</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>Android 支持数百种屏幕尺寸不同的设备,包括小型手机和大型电视机。因此,请务必将您的应用设计为与所有的屏幕尺寸兼容,以便让尽可能多的用户使用该应用。</p>
+
+<p>不过,与各种类型的设备兼容还远远不够。由于各种屏幕尺寸对用户互动产生的利弊有所不同,因此要真正满足用户需求并广获好评,您的应用不仅需要支持多种屏幕,还应针对各类屏幕配置的用户体验进行优化。<em></em><em></em></p>
+
+<p>本教程将向您介绍如何针对多种屏幕配置优化和实施相应的用户界面。</p>
+
+<p>各教程中都提及了一种来自一个示例应用的代码,该应用展示了关于针对多种分辨率进行优化的最佳实践。您可以在右侧下载该示例,并在自己的应用内重复使用其中的代码。</p>
+
+<p class="note"><strong>请注意</strong>:本教程和相关的示例使用了<a
+href="{@docRoot}tools/extras/support-library.html">支持库</a>,以便在 3.0 版以下的 Android 上使用 <PH>{@link android.app.Fragment}</PH> API。因此,您需要下载该库并将其添加到您的应用,才能使用本教程中涉及的所有 API。</p>
+
+
+<h2>教程</h2>
+
+<dl>
+ <dt><b><a href="screensizes.html">支持各种屏幕尺寸</a></b></dt>
+ <dd>本教程将向您介绍如何设计可适应多种屏幕尺寸的布局(使用灵活的视图尺寸、 <PH>{@link android.widget.RelativeLayout}</PH>、屏幕尺寸和屏幕方向限定符、别名过滤器以及自动拉伸位图)。</dd>
+
+ <dt><b><a href="screendensities.html">支持各种屏幕密度</a></b></dt>
+ <dd>本教程将向您介绍如何支持具有不同像素密度的屏幕(使用非密度制约像素并提供各种密度的相应位图)。</dd>
+
+ <dt><b><a href="adaptui.html">实施自适应用户界面流程</a></b></dt>
+ <dd>本教程将向您介绍如何以可适应多种屏幕尺寸/屏幕密度组合的方式实施用户界面流程(运行时对当前布局的检测,根据当前布局做出响应,处理屏幕配置变化)。</dd>
+</dl>
diff --git a/docs/html/intl/zh-CN/training/multiscreen/screendensities.jd b/docs/html/intl/zh-CN/training/multiscreen/screendensities.jd
new file mode 100644
index 000000000000..cdb9b7fe54c6
--- /dev/null
+++ b/docs/html/intl/zh-CN/training/multiscreen/screendensities.jd
@@ -0,0 +1,100 @@
+page.title=支持各种屏幕密度
+parent.title=针对多种屏幕进行设计
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=支持各种屏幕尺寸
+previous.link=screensizes.html
+next.title=实施自适应用户界面流程
+next.link=adaptui.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>本教程将指导您</h2>
+<ol>
+ <li><a href="#TaskUseDP">使用非密度制约像素</a></li>
+ <li><a href="#TaskProvideAltBmp">提供备用位图</a></li>
+</ol>
+
+<h2>您还应参阅</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">支持多种屏幕</a></li>
+ <li><a href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">图标设计指南</a></li>
+</ul>
+
+<h2>试试看</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">下载示例应用</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+
+</div>
+</div>
+
+<p>本教程将向您介绍如何通过提供不同资源和使用独立于分辨率的测量单位来支持不同屏幕密度。</p>
+
+<h2 id="TaskUseDP">使用非密度制约像素</h2>
+
+<p>在设计布局时,大家经常会误使用绝对像素来定义距离或尺寸,您一定要避免犯这种错误。由于各种屏幕的像素密度都有所不同,因此相同数量的像素在不同设备上的实际大小也有所差异,这样使用像素定义布局尺寸就会产生问题。因此,请务必使用 <code>dp</code> 或 <code>sp</code> 单位指定尺寸。<code>dp</code> 是一种非密度制约像素,其尺寸与 160 dpi 像素的实际尺寸相同。<code>sp</code> 也是一种基本单位,但它可根据用户的偏好文字大小进行调整(即尺度独立性像素),因此您应将该测量单位用于定义文字大小(请勿用其定义布局尺寸)。</p>
+
+<p>例如,请使用 <code>dp</code>(而非 <code>px</code>)指定两个视图间的间距:</p>
+
+<pre>
+&lt;Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="&#64;string/clickme"
+ android:layout_marginTop="20dp" /&gt;
+</pre>
+
+<p>请务必使用 <code>sp</code> 指定文字大小:</p>
+
+<pre>
+&lt;TextView android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="20sp" /&gt;
+</pre>
+
+
+<h2 id="TaskProvideAltBmp">提供备用位图</h2>
+
+<p>由于 Android 可在具有各种屏幕密度的设备上运行,因此您提供的位图资源应始终可以满足各类普遍密度范围的要求:低密度、中等密度、高密度以及超高密度。这将有助于您的图形在所有屏幕密度上都能得到出色的质量和效果。</p>
+
+<p>要生成这些图片,您应先提取矢量格式的原始资源,然后根据以下尺寸范围针对各密度生成相应的图片。</p>
+
+<p><ul>
+ <li><code>xhdpi</code>:2.0
+ <li><code>hdpi</code>:1.5
+ <li><code>mdpi</code>:1.0(最低要求)
+ <li><code>ldpi</code>:0.75
+</ul></p>
+
+<p>也就是说,如果您为 <code>xhdpi</code> 设备生成了 200x200 尺寸的图片,就应该使用同一资源为 <code>hdpi</code>、<code>mdpi</code> 和 <code>ldpi</code> 设备分别生成 150x150、100x100 和 75x75 尺寸的图片。</p>
+
+<p>然后,将生成的图片文件放在 <code>res/</code> 下的相应子目录中(如下所示),系统就会根据运行您应用的设备的屏幕密度自动选择合适的图片:</p>
+
+<pre class="classic no-pretty-print">
+MyProject/
+ res/
+ drawable-xhdpi/
+ awesomeimage.png
+ drawable-hdpi/
+ awesomeimage.png
+ drawable-mdpi/
+ awesomeimage.png
+ drawable-ldpi/
+ awesomeimage.png
+</pre>
+
+<p>这样一来,无论您何时引用 <code>&#64;drawable/awesomeimage</code>,系统都能根据相应屏幕的 dpi 选取合适的位图。</p>
+
+<p>有关为您的应用创建图标资产的更多提示和指南,请参阅<a
+href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">图标设计指南</a>。</p>
+
diff --git a/docs/html/intl/zh-CN/training/multiscreen/screensizes.jd b/docs/html/intl/zh-CN/training/multiscreen/screensizes.jd
new file mode 100644
index 000000000000..904d09790a21
--- /dev/null
+++ b/docs/html/intl/zh-CN/training/multiscreen/screensizes.jd
@@ -0,0 +1,279 @@
+page.title=支持各种屏幕尺寸
+parent.title=针对多种屏幕进行设计
+parent.link=index.html
+
+trainingnavtop=true
+next.title=支持各种屏幕密度
+next.link=screendensities.html
+
+@jd:body
+
+
+<!-- This is the training bar -->
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>本教程将指导您</h2>
+<ol>
+ <li><a href="#TaskUseWrapMatchPar">使用“wrap_content”和“match_parent”</a></li>
+ <li><a href="#TaskUseRelativeLayout">使用相对布局</a></li>
+ <li><a href="#TaskUseSizeQuali">使用尺寸限定符</a></li>
+ <li><a href="#TaskUseSWQuali">使用最小宽度限定符</a></li>
+ <li><a href="#TaskUseAliasFilters">使用布局别名</a></li>
+ <li><a href="#TaskUseOriQuali">使用屏幕方向限定符</a></li>
+ <li><a href="#TaskUse9Patch">使用自动拉伸位图</a></li>
+</ol>
+
+<h2>您还应参阅</h2>
+
+<ul>
+ <li><a href="{@docRoot}guide/practices/screens_support.html">支持多种屏幕</a></li>
+</ul>
+
+<h2>试试看</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">下载示例应用</a>
+<p class="filename">NewsReader.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>此教程将向您介绍如何通过以下方法支持各种尺寸的屏幕:</p>
+<ul>
+ <li>确保系统可以适当地调整您布局的尺寸以便适应屏幕</li>
+ <li>根据屏幕配置提供合适的用户界面布局</li>
+ <li>确保正确的布局应用到了正确的屏幕上</li>
+ <li>提供可正确缩放的位图</li>
+</ul>
+
+
+<h2 id="TaskUseWrapMatchPar">使用“wrap_content”和“match_parent”</h2>
+
+<p>要确保布局的灵活性并适应各种尺寸的屏幕,您应使用 <code>"wrap_content"</code> 和 <code>"match_parent"</code> 控制某些视图组件的宽度和高度。如果您使用 <code>"wrap_content"</code>,系统就会将视图的宽度或高度设置成所需的最小尺寸以适应视图中的内容,而 <code>"match_parent"</code>(在低于 API 级别 8 的级别中称为 <code>"fill_parent"</code>)则会展开组件以匹配其父视图的尺寸。</p>
+
+<p>如果使用 <code>"wrap_content"</code> 和 <code>"match_parent"</code> 尺寸值而不是硬编码的尺寸,您的视图就会相应地仅使用自身所需的空间或展开以填满可用空间。例如:</p>
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
+
+<p>请注意示例中使用 <code>"wrap_content"</code> 和 <code>"match_parent"</code> 控制组件尺寸的方法,而不是关注具体的尺寸。此方法可让布局正确适应各种屏幕尺寸和屏幕方向。</p>
+
+<p>此视图在纵向模式和横向模式下的显示效果如下所示。请注意,组件的尺寸会自动适应屏幕的高度和宽度:</p>
+
+<img src="{@docRoot}images/training/layout-hvga.png" />
+<p class="img-caption"><strong>图 1</strong>。纵向模式(左)和横向模式(右)下的新闻阅读器示例应用。</p>
+
+
+<h2 id="TaskUseRelativeLayout">使用相对布局</h2>
+
+<p>您可以使用 <PH>{@link android.widget.LinearLayout}</PH> 的嵌套实例并结合 <code>"wrap_content"</code> 和 <code>"match_parent"</code> 尺寸,以便构建相当复杂的布局。不过,您无法通过 <PH>{@link android.widget.LinearLayout}</PH> 精确控制子视图的特殊关系;系统会将 <PH>{@link android.widget.LinearLayout}</PH> 中的视图直接并排列出。如果您需要将子视图排列出各种效果而不是一条直线,通常更合适的解决方法是使用 <PH>{@link android.widget.RelativeLayout}</PH>,这样您就可以根据各组件之间的特殊关系指定布局了。例如,您可以将某个子视图对齐到屏幕左侧,同时将另一个视图对齐到屏幕右侧。</p>
+
+<p>例如:</p>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"&gt;
+ &lt;TextView
+ android:id="&#64;+id/label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/&gt;
+ &lt;EditText
+ android:id="&#64;+id/entry"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="&#64;id/label"/&gt;
+ &lt;Button
+ android:id="&#64;+id/ok"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="&#64;id/entry"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10dp"
+ android:text="OK" /&gt;
+ &lt;Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="&#64;id/ok"
+ android:layout_alignTop="&#64;id/ok"
+ android:text="Cancel" /&gt;
+&lt;/RelativeLayout&gt;
+</pre>
+
+<p>图 2 展示的是此布局在 QVGA 屏幕上的显示效果。</p>
+
+<img src="{@docRoot}images/training/relativelayout1.png" />
+<p class="img-caption"><strong>图 2</strong>。QVGA 屏幕(小屏幕)上的截图。</p>
+
+<p>图 3 展示的是此布局在较大屏幕上的显示效果。</p>
+
+<img src="{@docRoot}images/training/relativelayout2.png" />
+<p class="img-caption"><strong>图 3</strong>。WSVGA 屏幕(大屏幕)上的截图。</p>
+
+<p>请注意,虽然组件的尺寸有所变化,但它们的空间关系仍会保留,具体由 <PH>{@link android.widget.RelativeLayout.LayoutParams}</PH> 指定。</p>
+
+
+<h2 id="TaskUseSizeQuali">使用尺寸限定符</h2>
+
+<p>上文所述的灵活布局或相对布局可以为您带来的优势就只有这么多了。虽然这些布局可以拉伸组件内外的空间以适应各种屏幕,但它们不一定能为每种屏幕都提供最佳的用户体验。因此,您的应用不仅应实施灵活布局,还应针对各种屏幕配置提供一些备用布局。要做到这一点,您可以使用<a href="http://developer.android.com/guide/practices/screens_support.html#qualifiers">配置限定符</a>,这样就可以在运行时根据当前的设备配置自动选择合适的资源了(例如根据各种屏幕尺寸选择不同的布局)。</p>
+
+<p>例如,很多应用会在较大的屏幕上实施“双面板”模式(相关应用可能会在一个面板上显示项目列表,并在另一面板上显示对应内容)。平板电脑和电视的屏幕已经大到可以同时容纳这两个面板了,但手机屏幕就需要分别显示。因此,您可以使用以下文件以便实施这些布局:</p>
+
+<ul>
+ <li><code>res/layout/main.xml</code>,单面板(默认)布局:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+</li>
+ <li><code>res/layout-large/main.xml</code>,双面板布局:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+</li>
+</ul>
+
+<p>请注意第二种布局名称目录中的 <code>large</code> 限定符。系统会在属于较大屏幕(例如 7 英寸或更大的平板电脑)的设备上选择此布局。系统会在较小的屏幕上选择其他布局(无限定符)。</p>
+
+
+<h2 id="TaskUseSWQuali">使用最小宽度限定符</h2>
+
+<p>在版本低于 3.2 的 Android 设备上,开发人员遇到的问题之一是“较大”屏幕的尺寸范围,该问题会影响戴尔 Streak、早期的 Galaxy Tab 以及大部分 7 英寸平板电脑。即使这些设备的屏幕属于“较大”的尺寸,但很多应用可能会针对此类别中的各种设备(例如 5 英寸和 7 英寸的设备)显示不同的布局。这就是 Android 3.2 版在引入其他限定符的同时引入“最小宽度”限定符的原因。</p>
+
+<p>最小宽度限定符可让您通过指定某个最小宽度(以 dp 为单位)来定位屏幕。例如,标准 7 英寸平板电脑的最小宽度为 600 dp,因此如果您要在此类屏幕上的用户界面中使用双面板(但在较小的屏幕上只显示列表),您可以使用上文中所述的单面板和双面板这两种布局,但您应使用 <code>sw600dp</code> 指明双面板布局仅适用于最小宽度为 600 dp 的屏幕,而不是使用 <code>large</code> 尺寸限定符:</p>
+
+<ul>
+ <li><code>res/layout/main.xml</code>,单面板(默认)布局:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+</li>
+ <li><code>res/layout-sw600dp/main.xml</code>,双面板布局:
+
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+</li>
+</ul>
+
+<p>也就是说,对于最小宽度大于等于 600 dp 的设备,系统会选择 <code>layout-sw600dp/main.xml</code>(双面板)布局,否则系统就会选择 <code>layout/main.xml</code>(单面板)布局。</p>
+
+<p>但 Android 版本低于 3.2 的设备不支持此技术,原因是这些设备无法将 <code>sw600dp</code> 识别为尺寸限定符,因此您仍需使用 <code>large</code> 限定符。这样一来,就会有一个名称为 <code>res/layout-large/main.xml</code> 的文件(与 <code>res/layout-sw600dp/main.xml</code> 一样)。您将在下一教程中了解到避免此类布局文件出现重复的技术。</p>
+
+
+<h2 id="TaskUseAliasFilters">使用布局别名</h2>
+
+<p>最小宽度限定符仅适用于 Android 3.2 及更高版本。因此,您仍需使用与较低版本兼容的概括尺寸范围(小、正常、大和特大)。例如,如果您要将用户界面设计成在手机上显示单面板,但在 7 英寸平板电脑、电视和其他较大的设备上显示多面板,请提供以下文件:</p>
+
+<p><ul>
+<li><code>res/layout/main.xml:</code> 单面板布局</li>
+<li><code>res/layout-large:</code> 多面板布局</li>
+<li><code>res/layout-sw600dp:</code> 多面板布局</li>
+</ul></p>
+
+<p>后两个文件是相同的,因为其中一个用于和 Android 3.2 设备匹配,而另一个则是为使用较低版本 Android 的平板电脑和电视准备的。</p>
+
+<p>要避免平板电脑和电视的文件出现重复(以及由此带来的维护问题),您可以使用别名文件。例如,您可以定义以下布局:</p>
+
+<ul>
+<li><code>res/layout/main.xml</code>,单面板布局</li>
+<li><code>res/layout/main_twopanes.xml</code>,双面板布局</li>
+</ul>
+
+<p>然后添加这两个文件:</p>
+
+<p><ul>
+<li><code>res/values-large/layout.xml</code>:
+<pre>
+&lt;resources>
+ &lt;item name="main" type="layout">&#64;layout/main_twopanes&lt;/item>
+&lt;/resources>
+</pre>
+</li>
+
+<li><code>res/values-sw600dp/layout.xml</code>:
+<pre>
+&lt;resources>
+ &lt;item name="main" type="layout">&#64;layout/main_twopanes&lt;/item>
+&lt;/resources>
+</pre>
+
+</li>
+</ul></p>
+
+<p>后两个文件的内容相同,但它们并未实际定义布局。它们只是将 <PH>{@code main}</PH> 设置成了 <PH>{@code main_twopanes}</PH> 的别名。由于这些文件包含 <code>large</code> 和 <code>sw600dp</code> 选择器,因此无论 Android 版本如何,系统都会将这些文件应用到平板电脑和电视上(版本低于 3.2 的平板电脑和电视会匹配
+<PH>{@code large}</PH>,版本低于 3.2 的平板电脑和电视则会匹配 <code>sw600dp</code>)。</p>
+
+
+<h2 id="TaskUseOriQuali">使用屏幕方向限定符</h2>
+
+<p>某些布局会同时支持横向模式和纵向模式,但您可以通过调整优化其中大部分布局的效果。在新闻阅读器示例应用中,每种屏幕尺寸和屏幕方向下的布局行为方式如下所示:</p>
+
+<p><ul>
+<li><b>小屏幕,纵向</b>:单面板,带徽标</li>
+<li><b>小屏幕,横向</b>:单面板,带徽标</li>
+<li><b>7 英寸平板电脑,纵向</b>:单面板,带操作栏</li>
+<li><b>7 英寸平板电脑,横向</b>:双面板,宽,带操作栏</li>
+<li><b>10 英寸平板电脑,纵向</b>:双面板,窄,带操作栏</li>
+<li><b>10 英寸平板电脑,横向</b>:双面板,宽,带操作栏</li>
+<li><b>电视,横向</b>:双面板,宽,带操作栏</li>
+</ul></p>
+
+<p>因此,这些布局中的每一种都定义在了 <code>res/layout/</code> 目录下的某个 XML 文件中。为了继续将每个布局分配给各种屏幕配置,该应用会使用布局别名将两者相匹配:</p>
+
+<p><code>res/layout/onepane.xml:</code></p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
+
+<p><code>res/layout/onepane_with_bar.xml:</code></p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
+
+<p><code>res/layout/twopanes.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
+
+<p><code>res/layout/twopanes_narrow.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes_narrow.xml all}
+
+<p>既然您已定义了所有可能的布局,那就只需使用配置限定符将正确的布局映射到各种配置即可。您现在只需使用布局别名技术即可做到这一点:</p>
+
+<p><code>res/values/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values/layouts.xml all}
+
+<p><code>res/values-sw600dp-land/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-sw600dp-land/layouts.xml
+all}
+
+<p><code>res/values-sw600dp-port/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-sw600dp-port/layouts.xml
+all}
+
+<p><code>res/values-large-land/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-large-land/layouts.xml all}
+
+<p><code>res/values-large-port/layouts.xml</code>:</p>
+{@sample development/samples/training/multiscreen/newsreader/res/values-large-port/layouts.xml all}
+
+
+
+<h2 id="TaskUse9Patch">使用自动拉伸位图</h2>
+
+<p>支持各种屏幕尺寸通常意味着您的图片资源还必须能适应各种尺寸。例如,无论要应用到什么形状的按钮上,按钮背景都必须能适应。</p>
+
+<p>如果在可以更改尺寸的组件上使用了简单的图片,您很快就会发现显示效果多少有些不太理想,因为系统会在运行时平均地拉伸或收缩您的图片。解决方法为使用自动拉伸位图,这是一种格式特殊的 PNG 文件,其中会指明可以拉伸以及不可以拉伸的区域。</p>
+
+<p>因此,如果设计的是用于尺寸可变的组件上的位图,请务必使用自动拉伸技术。要将某个位图转换成自动拉伸位图,您可以先准备好普通图片(图 4,放大了 4 倍以便清楚显示)。</p>
+
+<img src="{@docRoot}images/training/button.png" />
+<p class="img-caption"><strong>图 4</strong>。<code>button.png</code></p>
+
+<p>然后通过 SDK 的 <ode
+href="{@docRoot}tools/help/draw9patch.html"><code>draw9patch</code></a> 实用工具(位于 <code>tools/</code> 目录中)运行该图片,您可以在该工具中绘制像素以标出要拉伸的区域以及左侧和顶部的边界。您还可以沿右侧和底部边界绘制像素以标出用于放置内容的区域,具体如图 5 所示。</p>
+
+<img src="{@docRoot}images/training/button_with_marks.png" />
+<p class="img-caption"><strong>图 5</strong>。<code>button.9.png</code></p>
+
+<p>请注意沿边界显示的黑色像素。顶部和左侧边界上的像素用于指定可以拉伸的图片区域,右侧和底部边界上的像素则用于指定放置内容的区域。</p>
+
+<p>另请注意 <code>.9.png</code> 的扩展名。您必须使用此扩展名,因为系统框架需要通过此扩展名确定相关图片是自动拉伸位图,而不是普通 PNG 图片。</p>
+
+<p>如果您将此背景应用到某个组件(通过设置 <code>android:background="&#64;drawable/button"</code>),系统框架就会正确拉伸图片以适应按钮的尺寸,具体如图 6 中的各种尺寸所示。</p>
+
+<img src="{@docRoot}images/training/buttons_stretched.png" />
+<p class="img-caption"><strong>图 6</strong>。在各种尺寸下使用 <code>button.9.png</code> 自动拉伸位图的按钮。</p>
+
diff --git a/docs/html/legal.jd b/docs/html/legal.jd
new file mode 100644
index 000000000000..575f01640eb4
--- /dev/null
+++ b/docs/html/legal.jd
@@ -0,0 +1,129 @@
+page.title=Legal Notice
+fullpage=1
+@jd:body
+
+<div class="wrap" style="width:940px;">
+
+<h1>Legal Notice</h1>
+
+<p>Android is an open platform that's freely available to you as an app developer. You can
+immediately download the Android SDK, develop apps, and distribute them to the world without any
+registration or fees.</p>
+
+<p>Android is developed by Google Inc. and the <a
+href="http://www.openhandsetalliance.com/">Open Handset Alliance</a>. We've made it available to you
+as a development platform pursuant to our commitment to openness, freedom, and innovation in
+mobile.</p>
+
+<p>To start developing apps for Android, <a
+href="{@docRoot}sdk/index.html">download the free Android SDK</a>.</p>
+
+
+
+<h2 id="Brands">Android Brands</h2>
+
+<p>The "Android" name and <img src="images/android-logo.png" alt="Android"
+style="margin:0;padding:0 2px;vertical-align:baseline" /> logo are trademarks of Google Inc.
+You may not use the logo or the logo's custom typeface.</p>
+
+<p>You may use the word "Android" in a product name only as a descriptor, such as "for Android"
+and the first instance should be followed by a TM symbol, "for Android&trade;." In other
+messaging, the word "Android" may be used in text as a descriptor, as long as it is followed by a
+proper generic term (for example, "Android&trade; application"). Any use of the Android name
+must include footer attribution in your communications: "Android is a trademark of Google Inc."</p>
+
+<p>The Android Robot logo <img src="images/robot-tiny.png" alt=""
+style="margin:0;padding:0;vertical-align:baseline" /> can be used, reproduced, and modified freely
+in marketing communications. Our standard color value for print is PMS 376C. Our online hex color is
+#A4C639. The Android Robot logo is licensed under the terms of the <a
+href="http://creativecommons.org/licenses/by/2.5/">Creative Commons Attribution</a> license and any
+use of it must be attributed as such.</p>
+
+<p>For more information about Android brands, see the <a
+href="http://www.android.com/developers/branding.html">Android Branding Guidelines</a>.</p>
+
+
+
+<h2 id="WebSite">Web Site Content</h2>
+
+<p>We are pleased to license the Android documentation and sample code on this web site under terms
+that encourage you to take, modify, reuse, re-purpose, and remix the content as you see fit. The
+documentation content on this web site is made available to you as part of the <a
+href="http://source.android.com">Android Open Source Project</a>. This documentation, including any
+code shown in it, is licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
+2.0 license</a>. All other content on this site, except the license documents themselves and as
+otherwise noted, is licensed under the <a
+href="http://creativecommons.org/licenses/by/2.5/">Creative Commons Attribution 2.5</a> license.
+</p>
+
+<p>For more information about licenses provided for the content of this web site and the
+restrictions for re-use, read the complete <a href="license.html">Content License</a>.</p>
+
+<p>Your use of this site is subject to <a href="http://www.google.com/policies/">Google's Privacy
+Policy &amp; Terms of Service</a>.</p>
+
+
+
+<h2 id="Other">Other Android Services</h2>
+
+<p>Google provides other optional services for your Android apps that have their own legal terms and
+restrictions. Such services include:</p>
+
+<dl>
+ <dt>Eclipse Android Developer Tools Plugin</dt>
+ <dd>If you're developing apps with the Eclipse IDE, we offer a free plugin called the
+<a href="{@docRoot}tools/sdk/eclipse-adt.html">Android Developer Tools</a> (ADT) to speed up your
+development and debugging. Certain code within the ADT plugin and other packages available
+from the SDK Manager require that you agree to terms and conditions for use, reproduction and
+distribution upon installation.</dd>
+
+ <dt>Google Play</dt>
+ <dd>Google Play is a publicly available service through which you can distribute your apps for
+Android-powered devices. Google Play not only makes your app available to millions of devices, but
+also offers your app powerful services such as in-app billing and license verification. In order to
+distribute your apps on Google Play and use the associated services, you must agree to the Developer
+Distribution Agreement and acquire a valid Developer Account.
+ <p><a
+href="http://www.android.com/us/developer-distribution-agreement.html">Developer Distribution
+Agreement</a>, <a
+href="http://www.android.com/us/developer-content-policy.html#showlanguages">Developer Program
+Policies</a></p></dd>
+
+ <dt>Google Maps API</dt>
+ <dd>The Android Maps APIs are a collection of services (including, but not limited to, the
+MapView and MapActivity classes) that allow you to include
+maps, geocoding, geolocation, and other content from Google and its content providers in your
+Android
+apps. If you want to develop an Android app that displays Google Maps data, you must agree
+to the terms of service, register, and get an API Key. Registration is free.
+ <p><a
+href="https://developers.google.com/maps/documentation/android/maps-api-signup"
+>Google Maps Android API Key Signup</a>, <a href="http://m.google.com/legalnotices">Mobile Legal
+Notices</a></p>
+ </dd>
+
+ <dt>Android Cloud to Device Messaging</dt>
+ <dd>Android Cloud to Device Messaging (C2DM) is a service that helps you send data from
+your servers to your users' Android devices. The service provides a simple, lightweight
+mechanism that your servers can use to tell your Android app to contact your server directly to
+fetch updated app or user data. Before you can sign up for Android Cloud to Device Messaging, you
+must agree to the terms of a legal agreement between you and Google. Registration is free.
+ <p><a href="https://developers.google.com/android/c2dm/terms">Android Cloud to Device
+Messaging Terms of Service</a></p>
+ </dd>
+
+ <dt>Android Backup Service</dt>
+ <dd>Android Backup Service is integrated with Android's data backup framework to perform data
+backup and restore for most devices running Android 2.2 or greater, using Google servers and a
+backup transport on the device. Before you can sign up for Android Backup Service, you
+must agree to the terms of a legal agreement between you and Google. Registration is free.
+ <p><a href="https://developers.google.com/android/backup/terms">Android Backup Service
+Terms of Service</a></p>
+ </dd>
+</dl>
+
+<p>Any and all other services available for Android but not documented on <a
+href="http://developer.android.com">developer.android.com</a> are subject to their own terms, as
+documented on their respective web sites. </p>
+
+</div> \ No newline at end of file
diff --git a/docs/html/license.jd b/docs/html/license.jd
index 83cd4709102a..a9af038bd696 100644
--- a/docs/html/license.jd
+++ b/docs/html/license.jd
@@ -1,15 +1,13 @@
page.title=Content License
-hide_license_footer=true
+fullpage=1
@jd:body
-<div id="mainBodyFluid">
-<h1>Content License</h1>
-
-<p>For the purposes of licensing, the content of this site is divided
+<div class="wrap" style="width:940px;">
+ <h1>Content License</h1>
+<p>For the purposes of licensing, the content of this web site is divided
into two categories:</p>
<ul>
- <li>Documentation content, found under the "Dev Guide" and "Reference"
- tabs, including both static content and content extracted from source
+ <li>Documentation content, including both static documentation and content extracted from source
code modules, as well as sample code, and </li>
<li>All other site content</li>
</ul>
@@ -31,6 +29,10 @@ is licensed under GPLv2 or other license. In those cases, the license
covering the source code module will apply to the documentation
extracted from it. </p>
+<p>Third-party components of this site such as JavaScript libraries are included in the Android
+Open Source Project under the licenses specified by their authors. For information about these
+licenses, refer to the source files in the Android Open Source Project.</p>
+
<p>All other content on this site, except the license documents themselves
and as otherwise noted, is licensed under the <a
href="http://creativecommons.org/licenses/by/2.5/">Creative Commons
@@ -42,17 +44,18 @@ above. For content licensed under Creative Commons Attribution 2.5, we
ask that you give proper <a href="#attribution">attribution</a>. </p>
-<h3 id="terms">Terms of Use</h3>
+<h2 id="terms">Terms of Use</h2>
<p>We are pleased to license the Android documentation and sample code under
terms that encourage you to take, modify, reuse, re-purpose, and remix the
-content as you see fit. Except as noted in the Restrictions section below, you
+content as you see fit. Except as noted in the <a href="#restrictions">Restrictions</a> section
+below, you
are free to use the documentation content in your own creations. For example,
you could quote the text in a book, cut-and-paste sections to your blog, record
it as an audiobook for the visually impaired, or even translate it. </p>
-<h3 id="restrictions">Restrictions</h3>
+<h2 id="restrictions">Restrictions</h2>
<ul>
<li>While the documentation itself is available to you under the Apache 2.0
@@ -60,9 +63,11 @@ license, note that proprietary trademarks and brand features are not
included in that license.</li>
<li>Google's trademarks and other brand features (including the
-ANDROID stylized typeface logo) are not included in the license.
-Please see <a href="http://www.google.com/permissions/guidelines.html">
-Guidelines for Third Party Use of Google Brand Features</a> for
+<img src="images/android-logo.png" alt="Android"
+style="margin:0;padding:0 2px;vertical-align:baseline" /> stylized typeface logo) are not included
+in the license.
+Please see <a
+href="http://www.android.com/developers/branding.html">Android Branding Guidelines</a> for
information about this usage. </li>
<li>In some cases, a page may include content, such as an image, that is not
@@ -76,9 +81,8 @@ slide decks that are not covered.</li>
documentation is subject to the conditions detailed in the <a
href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 license</a>.</li>
</ul>
-</h3>
-<h3 id="attribution">Attribution</h3>
+<h2 id="attribution">Attribution</h2>
<p>
Proper attribution is required when you reuse or create modified
versions of content that appears on a page made available under the
@@ -95,49 +99,47 @@ Creative Commons legal code</a>.
are producing the work. There are several typical ways in which this
might apply:
</p>
-<h4>Exact Reproductions</h4>
+<h3>Exact Reproductions</h3>
<p>
If your online work <em>exactly reproduces</em> text or images from this
site, in whole or in part, please include a paragraph at the bottom
of your page that reads:
</p>
-<blockquote>
+<p style="margin-left:20px;font-style:italic">
Portions of this page are reproduced from work created and <a
href="http://code.google.com/policies.html">shared by the Android Open Source Project</a>
and used according to terms described in the <a
href="http://creativecommons.org/licenses/by/2.5/">Creative Commons
2.5 Attribution License</a>.
-</blockquote>
+</p>
<p>
Also, please link back to the original source page so that readers can
refer there for more information.
</p>
-<h4>Modified Versions</h4>
+<h3>Modified Versions</h3>
<p>
If your online work shows <em>modified</em> text or images based on
the content from this site, please include a paragraph at the bottom of
your page that reads:
</p>
-<blockquote>
+<p style="margin-left:20px;font-style:italic">
Portions of this page are modifications based on work created and <a
href="http://code.google.com/policies.html">shared by the Android Open
Source Project</a> and used according to terms described in the <a
href="http://creativecommons.org/licenses/by/2.5/">Creative Commons
2.5 Attribution License</a>.
-</blockquote>
+</p>
<p>
Again, please link back to the original source page so that readers can
refer there for more information. This is even more important when
the content has been modified.
</p>
-<h4>Other Media</h4>
+<h3>Other Media</h3>
<p>
If you produce non-hypertext works, such as books, audio, or
video, we ask that you make a best effort to include a spoken or
written attribution in the spirit of the messages above.
</p>
-</div>
-
-
+</div>
diff --git a/docs/html/live/index.jd b/docs/html/live/index.jd
index 3885725eb5c2..972972713400 100644
--- a/docs/html/live/index.jd
+++ b/docs/html/live/index.jd
@@ -1,7 +1,8 @@
page.title=Live
+fullpage=1
@jd:body
-<div id="mainBodyFixed" style="padding-left:2em;">
+<div class="wrap" style="width:940px;">
<h1>Android Developers Live</h1>
@@ -61,4 +62,4 @@ livecasts on YouTube and videos of past sessions or follow us on
</div><!-- end mainBodyRight -->
</div><!-- interviewBlock -->
- </div><!-- end mainBodyFixed -->
+</div><!-- end mainBodyFixed -->
diff --git a/docs/html/mwc2010/index.html b/docs/html/mwc2010/index.html
deleted file mode 100644
index c91386f91070..000000000000
--- a/docs/html/mwc2010/index.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<html>
-<head>
-<title>Redirecting...</title>
-<meta http-equiv="refresh" content="0;url=http://sites.google.com/site/androidmwc/home">
-</head>
-<body>
-</body>
-</html>
diff --git a/docs/html/offline.jd b/docs/html/offline.jd
index edd8eb09dd2d..73da7799fdcc 100644
--- a/docs/html/offline.jd
+++ b/docs/html/offline.jd
@@ -23,13 +23,13 @@ page.title=Welcome
<div id="qv">
<h2>Get Started</h2>
<ul>
- <li>Create a <a href="{@docRoot}resources/tutorials/hello-world.html">Hello World</a>
+ <li>Create a <a href="{@docRoot}training/basics/firstapp/index.html">Building Your First App</a>
application</li>
<li>Read <a href="{@docRoot}resources/browser.html?tag=sample">Sample Code</a>,
especially <a href="{@docRoot}resources/samples/ApiDemos/index.html">API Demos</a></li>
- <li>Read the <a href="{@docRoot}guide/topics/fundamentals/index.html">Application
+ <li>Read the <a href="{@docRoot}guide/components/index.html">Application
Fundamentals</a></li>
- <li>Read the <a href="{@docRoot}guide/developing/index.html">Introduction</a> for using the SDK
+ <li>Read the <a href="{@docRoot}tools/workflow/index.html">Introduction</a> for using the SDK
tools</li>
</ul>
</div>
@@ -37,7 +37,7 @@ tools</li>
<h3>If you've downloaded the Android SDK for the first time</h3>
-<p>Follow the guide to <a href="{@docRoot}sdk/installing.html">Installing the Android SDK</a>, which
+<p>Follow the guide to <a href="{@docRoot}sdk/installing/index.html">Installing the Android SDK</a>, which
will help you setup your development environment.</p>
<h3>If you've installed new SDK components using the Android SDK Manager</h3>
diff --git a/docs/html/resources/articles/avoiding-memory-leaks.jd b/docs/html/resources/articles/avoiding-memory-leaks.jd
deleted file mode 100644
index 395f5900979c..000000000000
--- a/docs/html/resources/articles/avoiding-memory-leaks.jd
+++ /dev/null
@@ -1,111 +0,0 @@
-page.title=Avoiding Memory Leaks
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-
-<p>Android applications are, at least on the T-Mobile G1, limited
-to 16 MB of heap. It's both a lot of memory for a phone and yet very
-little for what some developers want to achieve. Even if you do not
-plan on using all of this memory, you should use as little as possible
-to let other applications run without getting them killed. The more
-applications Android can keep in memory, the faster it will be for the
-user to switch between his apps. As part of my job, I ran into memory
-leaks issues in Android applications and they are most of the time due
-to the same mistake: keeping a long-lived reference to a
-{@link android.content.Context Context}.</p>
-
-<p>On Android, a <code>Context</code> is used for many operations
- but mostly to load and access resources. This is why all the widgets
-receive a <code>Context</code> parameter in their constructor. In a
-regular Android application, you usually have two kinds of
-<code>Context</code>, {@link android.app.Activity} and
-{@link android.app.Application}. It's usually the first one that
-the developer passes to classes and methods that need a <code>Context</code>:</p>
-
-<pre class="prettyprint">&#64;Override
-protected void onCreate(Bundle state) {
- super.onCreate(state);
-
- TextView label = new TextView(this);
- label.setText("Leaks are bad");
-
- setContentView(label);
-}
-</pre>
-
-<p>This means that views have a reference to the entire activity and
-therefore to anything your activity is holding onto; usually the entire
-View hierarchy and all its resources. Therefore, if you leak the <code>Context</code>
-("leak" meaning you keep a reference to it thus preventing the GC from
-collecting it), you leak a lot of memory. Leaking an entire activity
-can be really easy if you're not careful.</p>
-
-<p>When the screen orientation changes the system will, by default,
-destroy the current activity and create a new one while preserving its
-state. In doing so, Android will reload the application's UI from the
-resources. Now imagine you wrote an application with a large bitmap
-that you don't want to load on every rotation. The easiest way to keep
-it around and not having to reload it on every rotation is to keep in a
-static field:</p>
-
-<pre class="prettyprint">private static Drawable sBackground;
-
-&#64;Override
-protected void onCreate(Bundle state) {
- super.onCreate(state);
-
- TextView label = new TextView(this);
- label.setText("Leaks are bad");
-
- if (sBackground == null) {
- sBackground = getDrawable(R.drawable.large_bitmap);
- }
- label.setBackgroundDrawable(sBackground);
-
- setContentView(label);
-}
-</pre>
-
-<p>This code is very fast and also very wrong; it leaks the first activity
-created upon the first screen orientation change. When a
-{@link android.graphics.drawable.Drawable Drawable} is attached to a view, the view is set as a
-{@link android.graphics.drawable.Drawable#setCallback(android.graphics.drawable.Drawable.Callback) callback}
-on the drawable. In the code snippet above, this means the drawable has a
-reference to the <code>TextView</code> which itself has a reference to the
-activity (the <code>Context</code>) which in turns has references to
-pretty much anything (depending on your code.)</p>
-
-<p>This example is one of the simplest cases of leaking the
-<code>Context</code> and you can see how we worked around it in the
-<a href="http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;a=blob;f=src/com/android/launcher/LauncherModel.java;h=0ef2a806b767142b28b2ff3b37f21f4ca16c355d;hb=cupcake">Home screen's source code</a>
-(look for the <code>unbindDrawables()</code> method) by setting the stored
-drawables' callbacks to null when the activity is destroyed. Interestingly
-enough, there are cases where you can create a chain of leaked contexts,
-and they are bad. They make you run out of memory rather quickly.</p>
-
-<p>There are two easy ways to avoid context-related memory leaks. The most
-obvious one is to avoid escaping the context outside of its own scope. The
-example above showed the case of a static reference but inner classes and
-their implicit reference to the outer class can be equally dangerous. The
-second solution is to use the <code>Application</code> context. This
-context will live as long as your application is alive and does not depend
-on the activities life cycle. If you plan on keeping long-lived objects
-that need a context, remember the application object. You can obtain it
-easily by calling
-{@link android.content.Context#getApplicationContext() Context.getApplicationContext()}
-or {@link android.app.Activity#getApplication() Activity.getApplication()}.</p>
-
-<p>In summary, to avoid context-related memory leaks, remember the following:</p>
-<ul>
-<li>Do not keep long-lived references to a context-activity (a reference
-to an activity should have the same life cycle as the activity itself)</li>
-<li>Try using the context-application instead of a context-activity</li>
-<li>Avoid non-static inner classes in an activity if you don't control
-their life cycle, use a static inner class and make a weak reference to
-the activity inside. The solution to this issue is to use a static inner
-class with a {@link java.lang.ref.WeakReference WeakReference} to the
-outer class, as done in <a href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/view/ViewRoot.java;h=9d7a124cb01ab94bf53e34f6e5e8a07f81e2423c;hb=master">ViewRoot</a>
-and its W inner class for instance</li>
-<li>A garbage collector is not an insurance against memory leaks</li>
-</ul>
diff --git a/docs/html/resources/articles/backward-compatibility.jd b/docs/html/resources/articles/backward-compatibility.jd
deleted file mode 100644
index f96d587c0067..000000000000
--- a/docs/html/resources/articles/backward-compatibility.jd
+++ /dev/null
@@ -1,252 +0,0 @@
-page.title=Backward Compatibility for Applications
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-
-<div id="qv-wrapper">
-<div id="qv">
-
- <h2>See also</h2>
- <ol>
- <li><a href="{@docRoot}guide/appendix/api-levels.html">Android API Levels</a></li>
- </ol>
-
-</div>
-</div>
-
-<p>A variety of Android-powered devices are now available to consumers from carriers
-in geographies around the world. Across those devices, a range of Android
-platform versions are in use, some running the latest version of the platform,
-others running older versions. As a developer, you need to consider the approach
-to backward compatibility that you will take in your application &mdash; do you
-want to allow your application to run on all devices, or just those running the
-latest software? In some cases it will be useful to employ the newer APIs on
-devices that support them, while continuing to support older devices. </p>
-
-<h3>Setting the minSdkVersion</h3>
-<p>If the use of a new API is integral to the application &mdash; perhaps you
-need to record video using an API introduced in Android 1.5 (API Level 3)
-&mdash; you should add a <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;android:minSdkVersion&gt;</code></a>
- to the application's manifest, to ensure your app won't
-be installed on older devices. For example, if your application depends on an
-API introduced in API Level 3, you would specify "3" as the value of the minimum
-SDK version</a>:</p>
-
-<pre> &lt;manifest&gt;
- ...
- &lt;uses-sdk android:minSdkVersion="3" /&gt;
- ...
- &lt;/manifest&gt;</pre>
-
-<p>However, if you want to add a useful but non-essential feature, such as
-popping up an on-screen keyboard even when a hardware keyboard is available, you
-can write your program in a way that allows it to use the newer features without
-failing on older devices.</p>
-
-<h3>Using reflection</h3>
-
-<p>Suppose there's a simple new call you want to use, like {@link
-android.os.Debug#dumpHprofData(java.lang.String)
-android.os.Debug.dumpHprofData(String filename)}. The {@link android.os.Debug}
-class has existed since Android 1.0, but the method is new in Anroid 1.5 (API
-Level 3). If you try to call it directly, your app will fail to run on devices
-running Android 1.1 or earlier.</p>
-
-<p>The simplest way to call the method is through reflection. This requires
-doing a one-time lookup and caching the result in a <code>Method</code> object.
-Using the method is a matter of calling <code>Method.invoke</code> and un-boxing
-the result. Consider the following:</p>
-
-<pre>public class Reflect {
- private static Method mDebug_dumpHprofData;
-
- static {
- initCompatibility();
- };
-
- private static void initCompatibility() {
- try {
- mDebug_dumpHprofData = Debug.class.getMethod(
- "dumpHprofData", new Class[] { String.class } );
- /* success, this is a newer device */
- } catch (NoSuchMethodException nsme) {
- /* failure, must be older device */
- }
- }
-
- private static void dumpHprofData(String fileName) throws IOException {
- try {
- mDebug_dumpHprofData.invoke(null, fileName);
- } catch (InvocationTargetException ite) {
- /* unpack original exception when possible */
- Throwable cause = ite.getCause();
- if (cause instanceof IOException) {
- throw (IOException) cause;
- } else if (cause instanceof RuntimeException) {
- throw (RuntimeException) cause;
- } else if (cause instanceof Error) {
- throw (Error) cause;
- } else {
- /* unexpected checked exception; wrap and re-throw */
- throw new RuntimeException(ite);
- }
- } catch (IllegalAccessException ie) {
- System.err.println("unexpected " + ie);
- }
- }
-
- public void fiddle() {
- if (mDebug_dumpHprofData != null) {
- /* feature is supported */
- try {
- dumpHprofData("/sdcard/dump.hprof");
- } catch (IOException ie) {
- System.err.println("dump failed!");
- }
- } else {
- /* feature not supported, do something else */
- System.out.println("dump not supported");
- }
- }
-}</pre>
-
-<p>This uses a static initializer to call <code>initCompatibility</code>,
-which does the method lookup. If that succeeds, it uses a private
-method with the same semantics as the original (arguments, return
-value, checked exceptions) to do the call. The return value (if it had
-one) and exception are unpacked and returned in a way that mimics the
-original. The <code>fiddle</code> method demonstrates how the
-application logic would choose to call the new API or do something
-different based on the presence of the new method.</p>
-
-<p>For each additional method you want to call, you would add an additional
-private <code>Method</code> field, field initializer, and call wrapper to the
-class.</p>
-
-<p>This approach becomes a bit more complex when the method is declared in a
-previously undefined class. It's also much slower to call
-<code>Method.invoke()</code> than it is to call the method directly. These
-issues can be mitigated by using a wrapper class.</p>
-
-<h3>Using a wrapper class</h3>
-
-<p>The idea is to create a class that wraps all of the new APIs exposed by a new
-or existing class. Each method in the wrapper class just calls through to the
-corresponding real method and returns the same result.</p>
-
-<p>If the target class and method exist, you get the same behavior you would get
-by calling the class directly, with a small amount of overhead from the
-additional method call. If the target class or method doesn't exist, the
-initialization of the wrapper class fails, and your application knows that it
-should avoid using the newer calls.</p>
-
-<p>Suppose this new class were added:</p><pre>public class NewClass {
- private static int mDiv = 1;
-
- private int mMult;
-
- public static void setGlobalDiv(int div) {
- mDiv = div;
- }
-
- public NewClass(int mult) {
- mMult = mult;
- }
-
- public int doStuff(int val) {
- return (val * mMult) / mDiv;
- }
-}</pre>
-
-<p>We would create a wrapper class for it:</p>
-
-<pre>class WrapNewClass {
- private NewClass mInstance;
-
- /* class initialization fails when this throws an exception */
- static {
- try {
- Class.forName("NewClass");
- } catch (Exception ex) {
- throw new RuntimeException(ex);
- }
- }
-
- /* calling here forces class initialization */
- public static void checkAvailable() {}
-
- public static void setGlobalDiv(int div) {
- NewClass.setGlobalDiv(div);
- }
-
- public WrapNewClass(int mult) {
- mInstance = new NewClass(mult);
- }
-
- public int doStuff(int val) {
- return mInstance.doStuff(val);
- }
-}</pre>
-
-<p>This has one method for each constructor and method in the original, plus a
-static initializer that tests for the presence of the new class. If the new
-class isn't available, initialization of <code>WrapNewClass</code> fails,
-ensuring that the wrapper class can't be used inadvertently. The
-<code>checkAvailable</code> method is used as a simple way to force class
-initialization. We use it like this:</p>
-
-<pre>public class MyApp {
- private static boolean mNewClassAvailable;
-
- /* establish whether the "new" class is available to us */
- static {
- try {
- WrapNewClass.checkAvailable();
- mNewClassAvailable = true;
- } catch (Throwable t) {
- mNewClassAvailable = false;
- }
- }
-
- public void diddle() {
- if (mNewClassAvailable) {
- WrapNewClass.setGlobalDiv(4);
- WrapNewClass wnc = new WrapNewClass(40);
- System.out.println("newer API is available - " + wnc.doStuff(10));
- } else {
- System.out.println("newer API not available");
- }
- }
-}</pre>
-
-<p>If the call to <code>checkAvailable</code> succeeds, we know the new class is
-part of the system. If it fails, we know the class isn't there, and adjust our
-expectations accordingly. It should be noted that the call to
-<code>checkAvailable</code> will fail before it even starts if the bytecode
-verifier decides that it doesn't want to accept a class that has references to a
-nonexistent class. The way this code is structured, the end result is the same
-whether the exception comes from the verifier or from the call to
-<code>Class.forName</code>.</p>
-
-<p>When wrapping an existing class that now has new methods, you only need to
-put the new methods in the wrapper class. Invoke the old methods directly. The
-static initializer in <code>WrapNewClass</code> would be augmented to do a
-one-time check with reflection.</p>
-
-<h3>Testing is key</h3>
-
-<p>You must test your application on every version of the Android framework that
-is expected to support it. By definition, the behavior of your application will
-be different on each. Remember the mantra: if you haven't tried it, it doesn't
-work.</p>
-
-<p>You can test for backward compatibility by running your application in an
-emulator that uses an older version of the platform. The Android SDK allows you
-to do this easily by creating "Android Virtual Devices" with different API
-levels. Once you create the AVDs, you can test your application with old and new
-versions of the system, perhaps running them side-by-side to see the
-differences. More information about emulator AVDs can be found in <a
-href="{@docRoot}guide/developing/devices/index.html">Creating and Managing Virtual Devices</a> and
-from <code>emulator -help-virtual-device</code>.</p> \ No newline at end of file
diff --git a/docs/html/resources/articles/can-i-use-this-intent.jd b/docs/html/resources/articles/can-i-use-this-intent.jd
deleted file mode 100644
index 7787d31e39ca..000000000000
--- a/docs/html/resources/articles/can-i-use-this-intent.jd
+++ /dev/null
@@ -1,71 +0,0 @@
-page.title=Can I Use this Intent?
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>Android offers a very powerful and yet easy-to-use message type called
-an <a href="{@docRoot}guide/topics/intents/intents-filters.html">intents</a>.
-You can use intents to turn applications into high-level libraries and
-make code modular and reusable. The Android Home screen and AnyCut
-applications, for instance, use intents extensively to create shortcuts. </p>
-
-<p>While it is nice to be able to make use of a loosely coupled
-API, there is no guarantee that the intent you send will be received by
-another application. This happens in particular with third-party apps, like
-<a href="http://code.google.com/p/apps-for-android/source/browse/trunk/Panoramio">Panoramio</a>
-and its RADAR intent.</p>
-
-<p>This article describes a technique you can use to find out whether the system
-contains any application capable of responding to the intent you want to use.
-The example below shows a helper method that queries the system package manager
-to determine whether there's an app that can respond to a specified intent. Your
-application can pass an intent to the method and then, for example, show or hide
-user options that the user would normally use to trigger the intent. </p>
-
-<pre class="prettyprint">/**
- * Indicates whether the specified action can be used as an intent. This
- * method queries the package manager for installed packages that can
- * respond to an intent with the specified action. If no suitable package is
- * found, this method returns false.
- *
- * @param context The application's environment.
- * @param action The Intent action to check for availability.
- *
- * @return True if an Intent with the specified action can be sent and
- * responded to, false otherwise.
- */
-public static boolean isIntentAvailable(Context context, String action) {
- final PackageManager packageManager = context.getPackageManager();
- final Intent intent = new Intent(action);
- List&lt;ResolveInfo&gt; list =
- packageManager.queryIntentActivities(intent,
- PackageManager.MATCH_DEFAULT_ONLY);
- return list.size() &gt; 0;
-}
-</pre>
-
-<p>Here is how you could use the helper method:</p>
-
-<pre class="prettyprint">@Override
-public boolean onPrepareOptionsMenu(Menu menu) {
- final boolean scanAvailable = isIntentAvailable(this,
- "com.google.zxing.client.android.SCAN");
-
- MenuItem item;
- item = menu.findItem(R.id.menu_item_add);
- item.setEnabled(scanAvailable);
-
- return super.onPrepareOptionsMenu(menu);
-}
-</pre>
-
-<p>In this example, the menu is grayed out if the <em>Barcode Scanner</em>
-application is not installed. </p>
-
-<p>Another, simpler, way to do this is to catch the
-<code>ActivityNotFoundException</code> when calling <code>startActivity()</code>
-but it only lets you react to the problem, you cannot predict it and update the
-UI accordingly to prevent the user from doing something that won't work. The
-technique described here can also be used at startup time to ask the user
-whether he'd like to install the missing package, you can then simply redirect
-him to Google Play by using the appropriate URI.</p> \ No newline at end of file
diff --git a/docs/html/resources/articles/contacts.jd b/docs/html/resources/articles/contacts.jd
deleted file mode 100644
index 374587b284a5..000000000000
--- a/docs/html/resources/articles/contacts.jd
+++ /dev/null
@@ -1,424 +0,0 @@
-page.title=Using the Contacts API
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>Starting from Android 2.0 (API Level 5), the Android platform provides an
-improved Contacts API for managing and integrating contacts from multiple
-accounts and from other data sources. To handle overlapping data from multiple
-sources, the contacts content provider aggregates similar contacts and presents
-them to users as a single entity. This article describes how to use the new API
-to manage contacts.</p>
-
-<p>The new Contacts API is defined in the
-{@link android.provider.ContactsContract android.provider.ContactsContract}
-and related classes. The older API is still supported, although deprecated.
-If you have an existing application that uses the older API,
-see <a href="#legacy">Considerations for legacy apps</a>, below, for ideas
-on how to support the Contacts API in your app.</p>
-
-<p>If you'd like to look at an applied example of how to use the new Contacts
-API, including how to support both the new and older API in a single app,
-please see the <a
-href="{@docRoot}resources/samples/BusinessCard/index.html">Business Card
-sample application</a>.</p>
-
-<h3>Data structure of Contacts</h3>
-
-<p>In the new Contacts API, data is laid out in three primary tables:
-<em>contacts</em>, <em>raw contacts</em>, and <em>data</em>, a structure that
-is slightly different from that used in the older API. The new structure
-allows the system to more easily store and manage information for a
-specific contact from multiple contacts sources. </p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center; width: 471px; height: 255px;" src="images/contacts-2.png" alt="" border="0">
-
-<ul>
-<li><code>Data</code> is a generic table that stores all of the data points
-associated with a raw contact. Each row stores data of a specific kind &mdash;
-for example name, photo, email addresses, phone numbers, and group memberships.
-Each row is tagged with a MIME type to identify what type of data it can
-contain, across the entire column. Columns are generic and the type of data they
-contain is determined by the kind of data stored in each row. For example, if a
-row's data kind is <code>Phone.CONTENT_ITEM_TYPE</code>, then the first column
-stores the phone number, but if the data kind is
-<code>Email.CONTENT_ITEM_TYPE</code>, then the column stores the email address.
-
-<p>The {@link android.provider.ContactsContract.CommonDataKinds ContactsContract.CommonDataKinds}
-class provides subclasses corresponding to common MIME types for contacts data.
-If needed, your application or other contacts sources can define additional MIME
-types for data rows. For more information about the Data table and examples of
-how to use it, see {@link android.provider.ContactsContract.Data android.provider.ContactsContract.Data}.</p></li>
-
-<li>A row in the <code>RawContacts</code> table represents the set of
-<code>Data</code> and other information describing a person and associated with
-a single contacts source. For example, a row might define the data associated
-with a person's Google or Exchange account or Facebook friend. For more
-information, see
-{@link android.provider.ContactsContract.RawContacts ContactsContract.RawContacts}.</p>
-
-<li>A row in the <code>Contacts</code> table represents an aggregate of one or
-more <code>RawContacts</code> describing the same person (or entity).
-
-<p>As mentioned above, the Contacts content provider automatically aggregates
-Raw Contacts into a single Contact entry, where possible, since common data
-fields (such as name or email address) are likely to be stored in each raw
-contact. Since the aggregation logic maintains the entries in the Contact rows,
-the entries can be read but should not be modified. See the section <a
-href="#aggregation">Aggregation of contacts</a>, below, for more details,
-including and information on how to
-control aggregation.</li>
-
-</ul>
-
-<p>When displaying contacts to users, applications should typically operate on
-the Contacts level, since it provides a unified, aggregated view of contacts
-from various underlying sources. </p>
-
-<h4>Example: Inserting a Phone Number</h4>
-
-<p>To insert a phone number using the new APIs you'll need the ID of the Raw
-Contact to attach the phone number to, then you'll need to create a Data
-row:</p>
-
-<pre>import android.provider.ContactsContract.CommonDataKinds.Phone;
-...
-ContentValues values = new ContentValues();
-values.put(Phone.RAW_CONTACT_ID, rawContactId);
-values.put(Phone.NUMBER, phoneNumber);
-values.put(Phone.TYPE, Phone.TYPE_MOBILE);
-Uri uri = getContentResolver().insert(Phone.CONTENT_URI, values);</pre>
-
-
-<h3 id="aggregation">Aggregation of contacts</h3>
-
-<p>When users sync contacts from multiple sources, several contacts might refer
-to the same person or entity, but with slightly different (or overlapping) data.
- For example, "Bob Parr" might be a user's co-worker and also his personal
-friend, so the user might have his contact information stored in both a
-corporate email account and a personal account. To provide a simplified view for
-the user, the system locates such overlapping contacts and combines them into a
-single, aggregate contact. </p>
-
-<p>The system automatically aggregates contacts by default. However, if needed,
-your application can control how the system handles aggregation or it can
-disable aggregation altogether, as described in the sections below.</p>
-
-<h4>Automatic aggregation</h4>
-
-<p>When a raw contact is added or modified, the system looks for matching
-(overlapping) raw contacts with which to aggregate it. It may not find any
-matching raw contacts, in which case it will create an aggregate contact that
-contains just the original raw contact. If it finds a single match, it creates a
-new contact that contains the two raw contacts. And it may even find multiple
-similar raw contacts, in which case it chooses the closest match. </p>
-
-<p>Two raw contacts are considered to be a match if at least one of these
-conditions is met:</p>
-
-<ul>
-<li>They have matching names.</li>
-<li>Their names consist of the same words but in different order
-(for example, "Bob Parr" and "Parr, Bob")</li>
-<li>One of them has a common short name for the other (for example,
-"Bob Parr" and "Robert Parr")</li>
-<li>One of them has just a first or last name and it matches the other
-raw contact. This rule is less reliable, so it only applies if the two
-raw contacts are also sharing some other data like a phone number, an
-email address or a nickname (for example, Helen ["elastigirl"] = Helen
-Parr ["elastigirl"])</li>
-<li>At least one of the two raw contacts is missing the name altogether
-and they are sharing a phone number, an email address or a nickname (for
-example, Bob Parr [incredible@android.com] = incredible@android.com).</li>
-</ul>
-
-<p>When comparing names, the system ignores upper/lower case differences
-(Bob=BOB=bob) and diacritical marks (Hélène=Helene). When comparing two
-phone numbers the system ignores special characters such as "*", "#",
-"(", ")", and whitespace. Also if the only difference between two numbers
-is that one has a country code and the other does not, then the system
-considers those to be a match (except for numbers in the Japan country code).</p>
-
-<p>Automatic aggregation is not permanent; any change of a constituent raw
-contact may create a new aggregate or break up an existing one.</p>
-
-<h4>Explicit aggregation</h4>
-
-<p>In some cases, the system's automatic aggregation may not meet the
-requirements of your application or sync adapter. There are two sets of APIs you
-can use to control aggregation explicitly: <em>aggregation modes</em> allow you
-to control automatic aggregation behaviors and <em>aggregation exceptions</em>
-allow you to override automated aggregation entirely.
-
-<p><strong>Aggregation modes</strong></p>
-
-<p>You can set an aggregation mode for each raw contact individually. To do so,
-add a mode constant as the value of the <code>AGGREGATION_MODE column</code> in
-the <code>RawContact</code> row. The mode constants available include: </p>
-
-<ul>
-<li><code>AGGREGATION_MODE_DEFAULT</code> &mdash; normal mode, automatic
-aggregation is allowed.</li>
-<li><code>AGGREGATION_MODE_DISABLED</code> &mdash; automatic aggregation is not
-allowed. The raw contact will not be aggregated.</li>
-<li><code>AGGREGATION_MODE_SUSPENDED</code> &mdash; automatic aggregation is
-deactivated. If the raw contact is already a part of an aggregated contact when
-aggregation mode changes to suspended, it will remain in the aggregate, even if
-it changes in such a way that it no longer matches the other raw contacts in the
-aggregate.</li>
-</ul>
-
-<p><strong>Aggregation exceptions</strong></p>
-
-<p>To keep two raw contacts unconditionally together or unconditionally apart,
-you can add a row to the
-{@link android.provider.ContactsContract.AggregationExceptions} table. Exceptions
-defined in the table override all automatic aggregation rules. </p>
-
-
-<h3>Loookup URI</h3>
-
-<p>The new Contacts API introduces the notion of a lookup key for a contact. If
-your application needs to maintain references to contacts, you should use lookup
-keys instead of the traditional row ids. You can acquire a lookup key from the
-contact itself, it is a column on the
-{@link android.provider.ContactsContract.Contacts} table. Once you have a lookup key,
-you can construct a URI in this way:</p>
-
-<pre>Uri lookupUri = Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey)</pre>
-
-<p>and use it like you would use a traditional content URI, for example: </p>
-
-<pre>Cursor c = getContentResolver().query(lookupUri, new String[]{Contacts.DISPLAY_NAME}, ...);
-try {
- c.moveToFirst();
- String displayName = c.getString(0);
-} finally {
- c.close();
-}</pre>
-
-<p>The reason for this complication is that regular contact row IDs are
-inherently volatile. Let's say your app stored a long ID of a contact. Then the
-user goes and manually joins the contact with some other contact. Now there is a
-single contact where there used to be two, and the stored long contact ID points
-nowhere.
-
-<p>The lookup key helps resolve the contact in this case. The key is a string
-that concatenates the server-side identities of the raw contacts. Your
-application can use that string to find a contact, regardless whether the raw
-contact is aggregated with others or not. </p>
-
-<p>If performance is a concern for your application, you might want to store
-both the lookup and the long ID of a contact and construct a lookup URI out of
-both IDs, as shown here:</p>
-
-<pre>Uri lookupUri = getLookupUri(contactId, lookupKey)</pre>
-
-<p>When both IDs are present in the URI, the system will try to use the long ID
-first. That is a very quick query. If the contact is not found, or if the one
-that is found has the wrong lookup key, the content provider will parse the
-lookup key and track down the constituent raw contacts. If your app
-bulk-processes contacts, you should maintain both IDs. If your app works with a
-single contact per user action, you probably don't need to bother with storing
-the long ID.</p>
-
-Android itself uses lookup URIs whenever there is a need to reference a contact,
-such as with shortcuts or Quick Contact, and also during editing or even viewing
-a contact. The latter case is less obvious &mdash; why would a contact ID change
-while we are simply viewing the contact? It could change because there might be
-a sync going in the background, and the contact might get automatically
-aggregated with another while being viewed.</p>
-
-<p>In summary: whenever you need to reference a contact, we recommend that you
-do so by its lookup URI.</p>
-
-
-<h3 id="legacy">Considerations for legacy applications</h3>
-
-<p>If you have an existing application that uses the older Contacts API,
-you should consider upgrading it to use the new API. You have four options: </p>
-
-<ul>
-<li>Leave it as-is and rely on the Contacts compatibility mode.</li>
-<li>Upgrade the app and discontinue support of pre-Android 2.0 platforms.</li>
-<li>Build a new version of the app for the new API, while keeping the old version available.</li>
-<li>Make the app use the right set of APIs depending on the platform where it is deployed. </li>
-</ul>
-
-<p>Let's consider these options one by one.</p>
-
-<h4>Using compatibility mode</h4>
-
-<p>Compatibility mode is the easiest option because you just leave the
-application as is, and it should run on Android 2.0 as long as it only uses
-public APIs. A couple examples of the use of non-public API include the use of
-explicit table names in nested queries and the use of columns that were not
-declared as public constants in the {@link android.provider.Contacts} class.
-</p>
-
-<p>Even if the application currently runs, you don't want to leave it like this
-for long. The main reason is that it will only have access to contacts from one
-account, namely the first Google account on the device. If the user opens other
-accounts in addition to or instead of a Google account, your application will
-not be able to access those contacts.</p>
-
-
-<h4>Upgrading to the new API and dropping support for older platforms</h4>
-
-<p>If your application will no longer target platforms older than
-Android 2.0, you can upgrade to the new API in this way:</p>
-
-<ul>
-<li>Replace all usages of {@link android.provider.Contacts} with calls to new
-API. After you are done, you should not see any deprecation warnings during
-application build. The new application will be able to take full advantage of
-multiple accounts and other new features of Android 2.0. </p>
-
-<li>In the application's manifest, update (or add) the
-<code>android:minSdkVersion</code> attribute to the
-<code>&lt;uses-sdk&gt;</code> element. To use the new Contacts API, you should
-set the value of the attribute to "5" (or higher, as appropriate). For more
-information about <code>android:minSdkVersion</code>, see the documentation for
-the <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
-element. For more information about the value of the
-<code>minSdkVersion</code>, see <a
-href="{@docRoot}guide/appendix/api-levels.html">API Levels</a>.</li>
-</ul>
-
-<h4>Maintaining two applications</h4>
-
-<p>You may decide to have two different applications: one for pre-Android 2.0
-platforms and one for Android 2.0 and beyond. If so, here's what you'll need to do:</p>
-
-<ul>
- <li>Clone your existing app. </li>
- <li>Change the old application: </li>
- <ul>
- <li>At launch time, check the version of the SDK. The version of the SDK
-is available as {@link android.os.Build.VERSION#SDK android.os.Build.VERSION.SDK}.</li>
- <li>If the SDK version is greater or equal to 5 (Android 2.0), show a dialog
-suggesting to the user that it's time to go to Google Play and find a new version of
-the app. You can even provide a link to the new app on Google Play (see <a
-href="{@docRoot}guide/publishing/publishing.html#marketintent">Using Intents
-to Launch Google Play</a>). </li>
- </ul>
- <li>Change the new application:</li>
- <ul>
- <li>Replace all usages of the older Contacts API with calls to new API.
-The new application will be able to take full advantage of multiple accounts
-and other new features of Android 2.0. </li>
- <li>Modify that application's AndroidManifest.xml file: </li>
- <ul>
- <li>Give the application a new name and a new package name. Currently
-Google Play does not allow you to have two applications with the same
-name/package.</li>
- <li>Update (or add) the <code>android:minSdkVersion</code> attribute
-to the <code>&lt;uses-sdk&gt;</code> element. To use the new Contacts API,
-you should set the value of the attribute to "5" (or higher, as appropriate).</li>
- </ul>
- </ul>
- <li>Publish both apps on Google Play, the old app one as an upgrade and the
-other as new. Make sure to explain the difference between the apps in their
-descriptions.</li>
-</ul>
-
-<p>This plan has its disadvantages: </p>
-
-<ul>
-<li>The new application will not be able to read the old application's data.
-Application data can only be accessed by code living in the same package. So
-databases, shared preferences, and so on, will need to be populated from
-scratch.</li>
-<li>The upgrade process is too clunky for the user. Some users may choose
-to either stay with the crippled old version or uninstall altogether.</li>
-</ul>
-
-<h4>Supporting the old and new APIs in the same application</h4>
-
-<p>This is a bit tricky, but the result is worth the effort. You can
-build a single package that will work on any platform:</p>
-
-<p>Go through the existing application and factor out all access to
-{@link android.provider.Contacts} into one class, such as ContactAccessorOldApi.
-For example, if you have code like this:
-
-<pre> protected void pickContact() {
- startActivityForResult(new Intent(Intent.ACTION_PICK, People.CONTENT_URI), 0);
- }</pre>
-
-<p>it will change to:</p>
-
-
-<pre> private final ContactAccessorOldApi mContactAccessor = new ContactAccessorOldApi();
-
- void pickContact() {
- startActivityForResult(mContactAccessor.getContactPickerIntent(), 0);
- }</pre>
-
-<p>The corresponding method on ContactAccessorOldApi will look like this:</p>
-
-<pre> public Intent getContactPickerIntent() {
- return new Intent(Intent.ACTION_PICK, People.CONTENT_URI);
- }</pre>
-
-<p>Once you are done, you should see deprecation warnings coming only
-from ContactAccessorOldApi. </p>
-
-<p>Create a new abstract class ContactAccessor, make sure the abstract
-class has all method signatures from ContactAccessorOldApi. Make
-ContactAccessorOldApi extend ContactAccessor:</p>
-
-<pre> public abstract class ContactAccessor {
- public abstract Intent getContactPickerIntent();
- ...
- }</pre>
-
-<p>Create a new subclass of ContactAccessor, ContactAccessorNewApi and
-implement all methods using the new API:</p>
-
-<pre> public class ContactAccessorNewApi extends ContactAccessor {
- &#64;Override
- public Intent getContactPickerIntent() {
- return new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI);
- }
- ...
- }</pre>
-
-<p>At this point, you have two implementations of the same API, one using the
-old API and another using the new API. Let's plug them in. Add this code to
-the ContactAccessor class:</p>
-
-<pre> private static ContactAccessor sInstance;
-
- public static ContactAccessor getInstance() {
- if (sInstance == null) {
- String className;
- int sdkVersion = Integer.parseInt(Build.VERSION.SDK);
- if (sdkVersion &lt; Build.VERSION_CODES.ECLAIR) {
- className = "ContactAccessorOldApi";
- } else {
- className = "ContactAccessorNewApi";
- }
- try {
- Class&lt;? extends ContactAccessor&gt; clazz =
- Class.forName(ContactAccessor.class.getPackage() + "." + className)
- .asSubclass(ContactAccessor.class);
- sInstance = clazz.newInstance();
- } catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
- return sInstance;
- }</pre>
-
-<p>Now replace references to ContactsAccessorOldApi with references to
-ContactsAccessor:</p>
-
-<pre> private final ContactAccessor mContactAccessor = ContactAccessor.getInstance();</pre>
-
-<p>You are done! Now you will want to test on Android 2.0, 1.6 and 1.5.</p>
-
-<p>We hope you like the new features and APIs we've added to Contacts in
-Android 2.0, and we can't wait to see what cool things developers do with
-the new APIs.</p>
diff --git a/docs/html/resources/articles/drawable-mutations.jd b/docs/html/resources/articles/drawable-mutations.jd
deleted file mode 100644
index c5818fcbafb9..000000000000
--- a/docs/html/resources/articles/drawable-mutations.jd
+++ /dev/null
@@ -1,93 +0,0 @@
-page.title=Drawable Mutations
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>Android's drawables are extremely useful to easily build applications. A
-{@link android.graphics.drawable.Drawable Drawable} is a pluggable drawing
-container that is usually associated with a View. For instance, a
-{@link android.graphics.drawable.BitmapDrawable BitmapDrawable} is used to display
-images, a {@link android.graphics.drawable.ShapeDrawable ShapeDrawable} to draw
-shapes and gradients, and so on. You can even combine them to create complex
-renderings.</p>
-
-<p>Drawables allow you to easily customize the rendering of the widgets without
-subclassing them. As a matter of fact, they are so convenient that most of the
-default Android apps and widgets are built using drawables; there are about 700
-drawables used in the core Android framework. Because drawables are used so
-extensively throughout the system, Android optimizes them when they are loaded
-from resources. For instance, every time you create a
-{@link android.widget.Button Button}, a new drawable is loaded from the framework
-resources (<code>android.R.drawable.btn_default</code>). This means all buttons
-across all the apps use a different drawable instance as their background.
-However, all these drawables share a common state, called the "constant state."
-The content of this state varies according to the type of drawable you are
-using, but it usually contains all the properties that can be defined by a
-resource. In the case of a button, the constant state contains a bitmap image.
-This way, all buttons across all applications share the same bitmap, which saves
-a lot of memory.</p>
-
-<p>The following diagram shows what entities are
-created when you assign the same image resource as the background of
-two different views. As you can see, two drawables are created but they
-both share the same constant state, hence the same bitmap:</p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 307px; height: 400px;" src="images/shared_states.png" alt="" id="BLOGGER_PHOTO_ID_5331437883277472082" border="0">
-
-<p>This state sharing feature is great to avoid wasting memory but it can cause
-problems when you try to modify the properties of a drawable. Imagine an
-application with a list of books. Each book has a star next to its name, totally
-opaque when the user marks the book as a favorite, and translucent when the book
-is not a favorite. To achieve this effect, you would probably write the
-following code in your list adapter's <code>getView()</code> method:</p>
-
-<pre>Book book = ...;
-TextView listItem = ...;
-
-listItem.setText(book.getTitle());
-
-Drawable star = context.getResources().getDrawable(R.drawable.star);
-if (book.isFavorite()) {
- star.setAlpha(255); // opaque
-} else {
- star.setAlpha(70); // translucent
-}</pre>
-
-<p>Unfortunately, this piece of code yields a rather strange result:
-all of the drawables have the same opacity:</p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 267px; height: 400px;" src="images/all_drawables_changed.png" alt="" id="BLOGGER_PHOTO_ID_5331438978390342066" border="0">
-
-<p>This
-result is explained by the constant state. Even though we are getting a
-new drawable instance for each list item, the constant state remains
-the same and, in the case of BitmapDrawable, the opacity is part of the
-constant state. Thus, changing the opacity of one drawable instance
-changes the opacity of all the other instances. Even worse, working
-around this issue was not easy with Android 1.0 and 1.1.</p>
-
-<p>Android 1.5 and higher offers a very easy way to solve this issue
-with the new {@link android.graphics.drawable.Drawable#mutate()} method</a>.
-When you invoke this method on a drawable, the constant state of the
-drawable is duplicated to allow you to change any property without
-affecting other drawables. Note that bitmaps are still shared, even
-after mutating a drawable. The diagram below shows what happens when
-you invoke <code>mutate()</code> on a drawable:</p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 307px; height: 400px;" src="images/mutated_states.png" alt="" id="BLOGGER_PHOTO_ID_5331440144116345074" border="0">
-
-<p>Let's update our previous piece of code to make use of <code>mutate()</code>:</p>
-
-<pre>Drawable star = context.getResources().getDrawable(R.drawable.star);
-if (book.isFavorite()) {
- star.mutate().setAlpha(255); // opaque
-} else {
- star. mutate().setAlpha(70); // translucent
-}</pre>
-
-<p>For convenience, <code>mutate()</code>
-returns the drawable itself, which allows to chain method calls. It
-does not however create a new drawable instance. With this new piece of
-code, our application now behaves correctly:</p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 267px; height: 400px;" src="images/correct_drawables.png" alt="" id="BLOGGER_PHOTO_ID_5331440757515573842" border="0">
diff --git a/docs/html/resources/articles/faster-screen-orientation-change.jd b/docs/html/resources/articles/faster-screen-orientation-change.jd
deleted file mode 100644
index e7b73bf2d6ae..000000000000
--- a/docs/html/resources/articles/faster-screen-orientation-change.jd
+++ /dev/null
@@ -1,133 +0,0 @@
-page.title=Faster Screen Orientation Change
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-
-<div id="qv-wrapper">
-<div id="qv">
-
- <h2>See also</h2>
- <ol>
- <li><a href="{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime
-Changes</a></li>
- </ol>
-
-</div>
-</div>
-
-<p>Android is designed to run efficiently on a wide
-array of devices, with very different hardware configurations. Some
-devices, like the T-Mobile G1, can change their hardware configuration
-at runtime. For instance, when you open the keyboard, the screen change
-from the portrait orientation to the landscape orientation.
-
-<div class="sidebox-wrapper">
-<div class="sidebox">
-<h2>Using the alternate resources framework</h2>
-
-<p>The platform's support for loading orientation-specific
-resources at run time is based on the alternate resources framework.</p>
-
-<p>Providing orientation-specific resources is an important part of
-developing your app. If you are not familiar with resource directory qualifiers
-or how the platform uses them, please read
-<a href="{@docRoot}guide/topics/resources/resources-i18n.html#AlternateResources">
-Alternate Resources</a>.
-</div>
-</div>
-
-<p>To make
-Android app development easier, the Android system automatically handles
-configuration change events and restarts the current activity with the new
-configuration. This is the default behavior that lets you declare
-resources like layouts and drawables based on the orientation, screen
-size, locale, etc. </p>
-
-<p>While this behavior is really powerful, since your application adapts
-automatically to the device's configuration at runtime, it is sometimes
-confusing for new Android developers, who wonder why their activity is
-destroyed and recreated. </p>
-
-<p>Facing this "issue," some developers choose to handle configuration changes
-themselves which is, in general, a short-term solution that will only complicate
-their lives later. On the other hand, the system's automatic resource handling
-is a very efficient and easy way to adapt an application's user interface to
-various devices and devices configurations. It sometimes comes at a price,
-though.</p>
-
-<p>When your application displays a lot of data, or data that is expensive to fetch,
-the automatic destruction/creation of the activities can be lead to a
-painful user experience. Take the example of <a href="http://code.google.com/p/apps-for-android/source/browse/#git%2FPhotostream%2Fsrc%2Fcom%2Fgoogle%2Fandroid%2Fphotostream">Photostream</a>,
-a simple Flickr browsing application. After you launch the application and choose a Flickr account, the
-application downloads a set of 6 photos (on a T-Mobile G1) from the
-Flickr servers and displays them on screen. To improve the user
-experience, the application uses slightly different layouts and drawables in
-portrait and landscape modes and this is what the result looks like:</p>
-
-<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_9l0GmPwgCzk/SZoGyJyg6-I/AAAAAAAAACU/ItuVwhegPb8/s1600-h/photostream_landscape.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 214px;" src="images/photostream_landscape.png" alt="" id="BLOGGER_PHOTO_ID_5303558969873198050" border="0"></a></p>
-
-<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_9l0GmPwgCzk/SZoGx4I-QlI/AAAAAAAAACM/-GkZR5MUKhY/s1600-h/photostream_portrait.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 214px; height: 320px;" src="images/photostream_portrait.png" alt="" id="BLOGGER_PHOTO_ID_5303558965135557202" border="0"></a></p>
-
-<p>Photostream lets Android take care of the configuration change when the
-screen is rotated. However, can you imagine how painful it would be for the user
-to see all the images being downloaded again? The obvious solution to this
-problem is to temporarily cache the images. They could be cached on the SD card
-(if there's one), in the Application object, in a static field, etc. None of
-these techniques is adapted to the current situation: why should we bother
-caching the images when the screen is not rotated? Fortunately for us, Android
-offers a great API exactly for that purpose.</p>
-
-<p>The Activity class has a special method called
-{@link android.app.Activity#onRetainNonConfigurationInstance()}. This method
-can be used to pass an arbitrary object to <em>your future self</em> and Android
-is smart enough to call this method only when needed. In the case of Photostream,
-the application used this method
-to pass the downloaded images to the future activity on orientation change.
-The implementation can be summarized like so:</p>
-
-<pre class="prettyprint">&#64;Override
-public Object onRetainNonConfigurationInstance() {
- final LoadedPhoto[] list = new LoadedPhoto[numberOfPhotos];
- keepPhotos(list);
- return list;
-}
-</pre>
-
-<p>In the new activity, in <code>onCreate()</code>, all you have to do to
-get your object back is to call {@link android.app.Activity#getLastNonConfigurationInstance()}.
-In Photostream, this method is invoked
-and if the returned value is not null, the grid is loaded with the list of
-photos from the previous activity:</p>
-
-<pre class="prettyprint">private void loadPhotos() {
- final Object data = getLastNonConfigurationInstance();
-
- // The activity is starting for the first time, load the photos from Flickr
- if (data == null) {
- mTask = new GetPhotoListTask().execute(mCurrentPage);
- } else {
- // The activity was destroyed/created automatically, populate the grid
- // of photos with the images loaded by the previous activity
- final LoadedPhoto[] photos = (LoadedPhoto[]) data;
- for (LoadedPhoto photo : photos) {
- addPhoto(photo);
- }
- }
-}
-</pre>
-
-<p>Be very careful with the object you pass through
-<code>onRetainNonConfigurationChange()</code>, though. If the object you
-pass is for some reason tied to the Activity/Context, <a
-href="http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/">you will leak</a>
-all the views and resources of the activity. This means you should
-never pass a View, a Drawable, an Adapter, etc. Photostream for
-instance extracts the bitmaps from the drawables and pass the bitmaps
-only, not the drawables. Finally, remember that
-<code>onRetainNonConfigurationChange()</code> should be used only to retain
-data that is expensive to load. Otherwise, keep it simple and let Android
-do everything.</p>
-
-<p>Also read the guide to <a href="{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime
-Changes</a>.</p>
diff --git a/docs/html/resources/articles/future-proofing.jd b/docs/html/resources/articles/future-proofing.jd
deleted file mode 100644
index b8aeedf1794a..000000000000
--- a/docs/html/resources/articles/future-proofing.jd
+++ /dev/null
@@ -1,91 +0,0 @@
-page.title=Future-Proofing Your Apps
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>It's important to implement your application so that it will not break as new
-versions of the Android platform are loaded onto the users device. The list
-below is based on our observations of five ways that we've seen bad apps fail.
-You can think of these as "anti-patterns" (that is, techniques to avoid) for
-Android development.</p>
-
-<p>If your application uses any of the dubious techniques below, break out
-your IDE and duct tape, spackle, and patch up the app.</p>
-
-<p><b>Technique to Avoid, #1: Using Internal APIs</b></p>
-
-<p>Even
-though we've always strongly advised against doing so, some developers
-have chosen to use unsupported or internal APIs. For instance, many
-developers are using the internal brightness control and bluetooth
-toggle APIs that were present in 1.0 and 1.1. A bug -- which was
-fixed in Android 1.5 -- allowed apps to use those APIs without
-requesting permission. As a result, apps that used those APIs broke
-on 1.5. If you've used internal APIs in your apps, you need to update
-your apps to stop doing so. </p>
-
-<p><b>Technique to Avoid, #2: Directly Manipulating Settings</b></p>
-
-<p>Strictly speaking this one isn't evil, since this is a change in
-behavior that we made to Android itself. But we made it because some
-developers were doing naughty things: a number of apps were changing
-system settings silently without even notifying the user. For instance,
-some apps turn on GPS without asking the user, and others might turn on
-data roaming.</p>
-
-<p>As a result, applications can no longer directly
-manipulate the values of certain system Settings, even if they
-previously had permission to do so. For instance, apps can no longer
-directly turn on or off GPS. These apps won't crash, but the APIs in
-question now have no effect, and do nothing. Instead, apps will need to
-issue an Intent to launch the appropriate Settings configuration
-screen, so that the user can change these settings manually. For
-details, see the android.provider.Settings.Secure class, which you can
-find in the 1.5_pre SDK documentation (and later). Note that only
-Settings that were moved to the Settings.Secure class are affected.
-Other, less sensitive, settings will continue to have the same behavior
-as in Android 1.1.</p>
-
-<p><b>Technique to Avoid, #3: Going Overboard with Layouts</b></p>
-
-<p>Due to changes in the View rendering infrastructure, unreasonably deep
-(more than 10 or so) or broad (more than 30 total) View hierarchies in
-layouts are now likely to cause crashes. This was always a risk for
-excessively complex layouts, but you can think of Android 1.5 as being
-better than 1.1 at exposing this problem. Most developers won't need to
-worry about this, but if your app has very complicated layouts, you'll
-need to put it on a diet. You can simplify your layouts using the more
-advanced layout classes like FrameLayout and TableLayout.</p>
-
-<p><b>Technique to Avoid, #4: Bad Hardware Assumptions</b></p>
-
-<p>Android 1.5 includes support for soft keyboards, and there will soon be many
-devices that run Android but do not have physical keyboards. If your
-application assumes the presence of a physical keyboard (such as if you
-have created a custom View that sinks keypress events) you should make
-sure it degrades gracefully on devices that only have soft keyboards.
-For more information on this, keep on eye on this blog as we'll be
-posting more detailed information about handling the new soft keyboards.</p>
-
-<p><b>Technique to Avoid, #5: Incautious Rotations </b></p>
-
-<p>Devices running Android 1.5 and later can automatically rotate the screen,
-depending on how the user orients the device. Some 1.5 devices will do
-this by default, and on all others it can be turned on by the user.
-This can sometimes result in unpredictable behavior from applications
-that do their own reorientations (whether using the accelerometer, or
-something else.) This often happens when applications assume that the
-screen can only rotate if the physical keyboard is exposed; if the
-device lacks a physical keyboard, these apps do not expect to be
-reoriented, which is a coding error. Developers should be sure that
-their applications can gracefully handle being reoriented at any time.</p>
-
-<p>Also, apps that use the accelerometer directly to reorient themselves
-sometimes compete with the system doing the same thing, with odd
-results. And finally, some apps that use the accelerometer to detect
-things like shaking motions and that don't lock their orientation to
-portrait or landscape, often end up flipping back and forth between
-orientations. This can be irritating to the user. (You can lock your
-app's orientation to portrait or landscape using the
-<code>android:screenOrientation</code> attribute in the manifest file.)</p>
-
diff --git a/docs/html/resources/articles/gestures.jd b/docs/html/resources/articles/gestures.jd
deleted file mode 100644
index 5b8d76068842..000000000000
--- a/docs/html/resources/articles/gestures.jd
+++ /dev/null
@@ -1,213 +0,0 @@
-page.title=Gestures
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>Touch screens are a great way to interact with applications on
-mobile devices. With a touch screen, users can easily tap, drag, fling,
-or slide to quickly perform actions in their favorite applications.
-For app developers. the Android framework makes it's easy to
-recognize simple actions, like a swipe, but it has been more
-difficult to handle complicated gestures, sometimes requiring
-developers to write a lot of code.</p>
-
-<p>That's why we introduced a new gestures API in Android 1.6. This API, located
-in the new package {@link android.gesture}, lets you store, load, draw, and
-recognize gestures. This article will show you how you can use the
-<code>android.gesture</code> API in your applications. Before going any further,
-you should <a
-href="http://code.google.com/p/apps-for-android/downloads/detail?name=
-GesturesDemos.zip&amp;can=2&amp;q=#makechanges">download the source code
-of the examples</a>.</p>
-
-<h3>Creating a gestures library</h3>
-
-<p>Android 1.6 and higher SDK platforms include a new application pre-installed
-on the emulator, called Gestures Builder. You can use this application to create
-a set of pre-defined gestures for your own application. It also serves as an
-example of how to let the user define his own gestures in your applications. You
-can find the source code of Gestures Builders in the samples directory of each
-SDK platform. In our example we will use Gestures Builder to generate a set of
-gestures for us (make sure to create an AVD with an SD card image to use
-Gestures Builder.) The screenshot below shows what the application looks like
-after adding a few gestures:</p>
-
-<img src="images/gestures_006.png" style="width: 320px; height: 480px;">
-
-<p>As you can see, a gesture is always associated with a name. That name is very
-important because it identifies each gesture within your application. The names
-do not have to be unique. Actually it can be very useful to have several
-gestures with the same name to increase the precision of the recognition. Every
-time you add or edit a gesture in the Gestures Builder, a file is generated on
-the emulator's SD card, <code>/sdcard/gestures</code>. This file contains the
-description of all the gestures, and you will need to package it inside your
-application inside the resources directory, in
-<code>/res/raw</code>.</p>
-
-<h3>Loading the gestures library</h3>
-
-<p>Now that you have a set of pre-defined gestures, you must load it inside your
-application. This can be achieved in several ways but the easiest is to use the
-<code>GestureLibraries</code> class:</p>
-
-<pre class="prettyprint">mLibrary = GestureLibraries.fromRawResource(this, R.raw.spells);
-if (!mLibrary.load()) {
- finish();
-}</pre>
-
-<p>In this example, the gesture library is loaded from the file
-<code>/res/raw/spells</code>. You can easily load libraries from other sources,
-like the SD card, which is very important if you want your application to be
-able to save the library; a library loaded from a raw resource is read-only and
-cannot be modified. The following diagram shows the structure of a library:</p>
-
-<img src="images/gestures_002.png" style="width: 600px; height: 512px;">
-
-<h3>Recognizing gestures</h3>
-
-<p>To start recognizing gestures in your application, all you have to do
-is add a <code>GestureOverlayView</code> to your XML layout:</p>
-
-<pre>&lt;android.gesture.GestureOverlayView
- android:id="@+id/gestures"
- android:layout_width="fill_parent"
- android:layout_height="0dip"
- android:layout_weight="1.0" /&gt;</pre>
-
-<p>Notice that the <code>GestureOverlayView</code>
-is not part of the usual android.widget package. Therefore, you must
-use its fully qualified name. A gesture overlay acts as a simple
-drawing board on which the user can draw his gestures. You can tweak
-several visual properties, like the color and the width of the stroke
-used to draw gestures, and register various listeners to follow what
-the user is doing. The most commonly used listener is
-<code>GestureOverlayView.OnGesturePerformedListener</code>,
-which fires whenever a user is done drawing a gesture:</p>
-
-<pre>GestureOverlayView gestures = (GestureOverlayView) findViewById(R.id.gestures);
-gestures.addOnGesturePerformedListener(this);</pre>
-
-<p>When the listener fires, you can ask the <code>GestureLibrary</code>
-to try to recognize the gesture. In return, you will get a list of
-Prediction instances, each with a name - the same name you entered in
-the Gestures Builder - and a score. The list is sorted by descending
-scores; the higher the score, the more likely the associated gesture is
-the one the user intended to draw. The following code snippet
-demonstrates how to retrieve the name of the first prediction:</p>
-
-<pre>public void onGesturePerformed(GestureOverlayView overlay, Gesture gesture) {
- ArrayList&lt;prediction&gt; predictions = mLibrary.recognize(gesture);
-
- // We want at least one prediction
- if (predictions.size() &gt; 0) {
- Prediction prediction = predictions.get(0);
- // We want at least some confidence in the result
- if (prediction.score &gt; 1.0) {
- // Show the spell
- Toast.makeText(this, prediction.name, Toast.LENGTH_SHORT).show();
- }
- }
-}</pre>
-
-<p>In this example, the first prediction is taken into account only if it's
-score is greater than 1.0. The threshold you use is entirely up to you
-but know that scores lower than 1.0 are typically poor matches. And
-this is all the code you need to create a simple application that can
-recognize pre-defined gestures (see the source code of the project
-GesturesDemo):</p>
-
-<img src="images/gestures.png" style="width: 320px; height: 480px;">
-
-<h3>Gestures overlay</h3>
-
-<p>In the example above, the <code>GestureOverlayView</code> was used
-as a normal view, embedded inside a <code>LinearLayout</code>.
-However, as its name suggests, it can also be used as an overlay on top
-of other views. This can be useful to recognize gestures in a game or
-just anywhere in the UI of an application. In the second example,
-called GesturesListDemo, we'll create an overlay on top of a list of
-contacts. We start again in Gestures Builder to create a new set of
-pre-defined gestures:</p>
-
-<p><img src="images/gestures_005.png" style="width: 320px; height: 480px;"></p>
-
-<p>And here is what the XML layout looks like:</p>
-
-<pre>&lt;android.gesture.GestureOverlayView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/gestures"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
-
- android:gestureStrokeType="multiple"
- android:eventsInterceptionEnabled="true"
- android:orientation="vertical"&gt;
-
- &lt;ListView
- android:id="@android:id/list"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" /&gt;
-
-&lt;/android.gesture.GestureOverlayView&gt;</pre>
-
-<p>In this application, the gestures view is an overlay on top of a regular
-ListView. The overlay also specifies a few properties that we did not
-need before:</p>
-
-<ul>
-<li><code>gestureStrokeType</code>: indicates
-whether we want to recognize gestures made of a single stroke or
-multiple strokes. Since one of our gestures is the "+" symbol, we need
-multiple strokes</li>
-<li><code>eventsInterceptionEnabled</code>: when
-set to true, this property tells the overlay to steal the events from
-its children as soon as it knows the user is really drawing a gesture.
-This is useful when there's a scrollable view under the overlay, to
-avoid scrolling the underlying child as the user draws his gesture </li>
-<li><code>orientation</code>:
-indicates the scroll orientation of the views underneath. In this case
-the list scrolls vertically, which means that any horizontal gestures
-(like <code>action_delete</code>) can immediately be recognized as a
-gesture. Gestures that start with a vertical stroke must contain at
-least one horizontal component to be recognized. In other words, a
-simple vertical line cannot be recognized as a gesture since it would
-conflict with the list's scrolling.</li>
-</ul>
-
-<p>The code used to load and set up the gestures library and overlay is exactly
-the same as before. The only difference is that we now check the name of the
-predictions to know what the user intended to do:</p>
-
-<pre>public void onGesturePerformed(GestureOverlayView overlay, Gesture gesture) {
- ArrayList&lt;Prediction&gt; predictions = mLibrary.recognize(gesture);
- if (predictions.size() &gt; 0 &amp;&amp; predictions.get(0).score &gt; 1.0) {
- String action = predictions.get(0).name;
- if ("action_add".equals(action)) {
- Toast.makeText(this, "Adding a contact", Toast.LENGTH_SHORT).show();
- } else if ("action_delete".equals(action)) {
- Toast.makeText(this, "Removing a contact", Toast.LENGTH_SHORT).show();
- } else if ("action_refresh".equals(action)) {
- Toast.makeText(this, "Reloading contacts", Toast.LENGTH_SHORT).show();
- }
- }
-}</pre>
-
-<p>The user is now able to draw his gestures on top of the list without
-interfering with the scrolling:</p>
-
-<img src="images/gestures_004.png" style="width: 320px; height: 480px;">
-
-<p>The overlay even gives visual clues as to whether the gesture is considered
-valid for recognition. In the case of a vertical overlay, for instance,
-a single vertical stroke cannot be recognized as a gesture and is
-therefore drawn with a translucent color:</p>
-
-<img src="images/gestures_003.png" style="width: 320px; height: 480px;">
-
-<h3>It's your turn</h3>
-
-<p>Adding support for gestures in your application is easy and can be a valuable
-addition. The gestures API does not even have to be used to recognize complex
-shapes; it will work equally well to recognize simple swipes. We are very
-excited by the possibilities the gestures API offers, and we're eager to see
-what cool applications the community will create with it.</p>
diff --git a/docs/html/resources/articles/glsurfaceview.jd b/docs/html/resources/articles/glsurfaceview.jd
deleted file mode 100644
index 45407a96dbe1..000000000000
--- a/docs/html/resources/articles/glsurfaceview.jd
+++ /dev/null
@@ -1,270 +0,0 @@
-page.title=Introducing GLSurfaceView
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-
-<p>The {@link android android.opengl.GLSurfaceView} class makes it
-easier for you to use OpenGL ES rendering in your applications by:</p>
-
-<ul>
-<li>Providing the glue code to connect OpenGL ES to the {@link
-android.view.View} system.</li>
-<li>Providing the glue code to make OpenGL ES work with the {@link
-android.app.Activity} life-cycle.</li>
-<li>Making it easy to choose an appropriate frame buffer pixel format.</li>
-<li>Creating and managing a separate rendering thread, to enable smooth
-animation.</li>
-<li>Providing easy-to-use debugging tools for tracing OpenGL ES API calls and
-checking for errors.</li>
-</ul>
-
-<p>GLSurfaceView is a good base for building an application that uses OpenGL ES
-for part or all of its rendering. A 2D or 3D action game would be a good
-candidate, as would a 2D or 3D data visualization application such as <a
-href="http://www.youtube.com/watch?v=4PRfVKzuUJ4&amp;fmt=18" title="Google Maps
-StreetView">Google Maps StreetView</a>.</p>
-
-<h3>A simple GLSurfaceView application</h3>
-
-<p>Here's the source code to the simplest possible OpenGL ES application:</p>
-
-<pre>package com.example.android.apis.graphics;
-
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.opengles.GL10;
-
-import android.app.Activity;
-import android.opengl.GLSurfaceView;
-import android.os.Bundle;
-
-public class ClearActivity extends Activity {
- &#64;Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- mGLView = new GLSurfaceView(this);
- mGLView.setRenderer(new ClearRenderer());
- setContentView(mGLView);
- }
-
- &#64;Override
- protected void onPause() {
- super.onPause();
- mGLView.onPause();
- }
-
- &#64;Override
- protected void onResume() {
- super.onResume();
- mGLView.onResume();
- }
-
- private GLSurfaceView mGLView;
-}
-
-class ClearRenderer implements GLSurfaceView.Renderer {
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- // Do nothing special.
- }
-
- public void onSurfaceChanged(GL10 gl, int w, int h) {
- gl.glViewport(0, 0, w, h);
- }
-
- public void onDrawFrame(GL10 gl) {
- gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
- }
-}</pre>
-
-<p>This program doesn't do much: it clears the screen to black on every frame.
-But it is a complete OpenGL application that correctly implements the
-Android activity life-cycle. It pauses rendering when the activity is
-paused, and resumes it when the activity is resumed. You could use this
-application as the basis for non-interactive demonstration programs.
-Just add more OpenGL calls to the <code>ClearRenderer.onDrawFrame()</code> method.
-Notice that you don't even need to subclass the <code>GLSurfaceView</code> view.</p>
-
-<p>The {@link android.opengl.GLSurfaceView.Renderer} interface has three methods:</p>
-
-<ul>
-<li>The
-<code>onSurfaceCreated()</code> method is called at the start of rendering, and
-whenever the OpenGL ES drawing context has to be recreated. (The
-drawing context is typically lost and recreated when the activity is
-paused and resumed.) <code>OnSurfaceCreated()</code> is a good place to create
-long-lived OpenGL resources such as textures.</li>
-<li>The <code>onSurfaceChanged()</code>
-method is called when the surface changes size. It's a good place to
-set your OpenGL viewport. You may also want to set your camera here, if
-it's a fixed camera that doesn't move around the scene.</li>
-<li>The <code>onDrawFrame()</code> method is called every frame, and is
-responsible for drawing the scene. You would typically start by calling
-<code>glClear</code> to clear the framebuffer, followed by other OpenGL ES calls
-to draw the current scene.</li>
-</ul>
-
-<h3>How about user input?</h3>
-
-<p>If you want an interactive application (such as a game), you will typically
-subclass <code>GLSurfaceView</code>, because that's an easy way of obtaining
-input events. Here's a slightly longer example showing how to do that:</p>
-
-<pre>package com.google.android.ClearTest;
-
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.opengles.GL10;
-
-import android.app.Activity;
-import android.content.Context;
-import android.opengl.GLSurfaceView;
-import android.os.Bundle;
-import android.view.MotionEvent;
-
-public class ClearActivity extends Activity {
- &#64;Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- mGLView = new ClearGLSurfaceView(this);
- setContentView(mGLView);
- }
-
- &#64;Override
- protected void onPause() {
- super.onPause();
- mGLView.onPause();
- }
-
- &#64;Override
- protected void onResume() {
- super.onResume();
- mGLView.onResume();
- }
-
- private GLSurfaceView mGLView;
-}
-
-class ClearGLSurfaceView extends GLSurfaceView {
- public ClearGLSurfaceView(Context context) {
- super(context);
- mRenderer = new ClearRenderer();
- setRenderer(mRenderer);
- }
-
- public boolean onTouchEvent(final MotionEvent event) {
- queueEvent(new Runnable(){
- public void run() {
- mRenderer.setColor(event.getX() / getWidth(),
- event.getY() / getHeight(), 1.0f);
- }});
- return true;
- }
-
- ClearRenderer mRenderer;
-}
-
-class ClearRenderer implements GLSurfaceView.Renderer {
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- // Do nothing special.
- }
-
- public void onSurfaceChanged(GL10 gl, int w, int h) {
- gl.glViewport(0, 0, w, h);
- }
-
- public void onDrawFrame(GL10 gl) {
- gl.glClearColor(mRed, mGreen, mBlue, 1.0f);
- gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
- }
-
- public void setColor(float r, float g, float b) {
- mRed = r;
- mGreen = g;
- mBlue = b;
- }
-
- private float mRed;
- private float mGreen;
- private float mBlue;
-}</pre>
-
-<p>This application clears the screen for every frame. When you tap on the
-screen, it sets the clear color based on the (x,y) coordinates of your touch
-event. Note the use of <code>queueEvent()</code> in
-<code>ClearGLSurfaceView.onTouchEvent()</code>. The <code>queueEvent()</code>
-method is used to safely communicate between the UI thread and the rendering
-thread. If you prefer, you can use some other Java cross-thread communication
-technique, such as synchronized methods on the <code>Renderer</code> class
-itself. However, queueing events is often the simplest way of dealing with
-cross-thread communication.</p>
-
-<h3>Other GLSurfaceView samples</h3>
-
-<p>Tired
-of just clearing the screen? You can find more interesting samples in
-the API Demos sample included in the Android SDK. All the OpenGL ES samples have been
-converted to use the <code>GLSurfaceView</code> view:</p>
-
-<ul>
-<li>GLSurfaceView - a spinning triangle</li>
-<li>Kube - a cube puzzle demo</li>
-<li>Translucent GLSurfaceView - shows how to display 3D graphics on a translucent background</li>
-<li>Textured Triangle - shows how to draw a textured 3D triangle</li>
-<li>Sprite Text - shows how to draw text into a texture and then composite it into a 3D scene</li>
-<li>Touch Rotate - shows how to rotate a 3D object in response to user input.</li>
-</ul>
-
-<h3>Choosing a surface</h3>
-
-<p><code>GLSurfaceView</code>
-helps you choose the type of surface to render to. Different Android
-devices support different types of surfaces, with no common subset.
-This makes it tricky problem to choose the best available surface on
-each device. </p>
-
-<p>By default, <code>GLSurfaceView</code> tries to find a surface that's as
-close as possible to a 16-bit RGB frame buffer with a 16-bit depth
-buffer. Depending upon your application's needs you may want to change
-this behavior. For example, the Translucent GLSurfaceView sample needs
-an Alpha channel in order to render translucent data. <code>GLSurfaceView</code>
-provides an overloaded <code>setEGLSurfaceChooser()</code> method to give
-you control over which surface type is chosen:</p>
-
-<dl>
-<dt><code>setEGLConfigChooser(boolean needDepth)</code></dt>
-<dd>Choose a config that's closest to R5G6B5 with or without a 16-bit framebuffer</dd>
-<dt><code>setEGLConfigChooser(int redSize, int greenSize,int blueSize,
-int alphaSize,int depthSize, int stencilSize)</code></dt>
-<dd>Choose the config with the fewest number of bits per pixel that has at least
-as many bits-per-channel as specified in the constructor.</dd>
-<dt><code>setEGLConfigChooser(EGLConfigChooser configChooser)</code></dt>
-<dd>Allow total control over choosing a configuration. You pass in your own
-implementation of <code>EGLConfigChooser</code>, which gets to inspect the
-device's capabilities and choose a configuration.</dd>
-</dl>
-
-<h3>Continuous rendering versus render-when-dirty</h3>
-
-<p>Most 3D applications, such as games or simulations, are continuously
-animated. But some 3D applications are more reactive: they wait passively until
-the user does something, and then react to it. For those types of applications,
-the default <code>GLSurfaceView</code> behavior of continuously redrawing the
-screen is a waste of time. If you are developing a reactive application, you can
-call <code>GLSurfaceView.setRenderMode(RENDERMODE_WHEN_DIRTY)</code>, which
-turns off the continuous animation. Then you call
-<code>GLSurfaceView.requestRender()</code> whenever you want to re-render.</p>
-
-<h3>Help With debugging</h3>
-
-<p><code>GLSurfaceView</code> has a handy built-in feature for debugging OpenGL ES
-applications: the <code>GLSurfaceView.setDebugFlags()</code> method can be used
-to enable logging and/or error checking your OpenGL ES calls. Call this method
-in your <code>GLSurfaceView</code>'s constructor, before calling
-<code>setRenderer()</code>:</p>
-
-<pre>public ClearGLSurfaceView(Context context) {
- super(context);
- // Turn on error-checking and logging
- setDebugFlags(DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS);
- mRenderer = new ClearRenderer();
- setRenderer(mRenderer);
-}</pre> \ No newline at end of file
diff --git a/docs/html/resources/articles/images/File.png b/docs/html/resources/articles/images/File.png
deleted file mode 100644
index bc5a2b827329..000000000000
--- a/docs/html/resources/articles/images/File.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/File_002.png b/docs/html/resources/articles/images/File_002.png
deleted file mode 100644
index 39254b30a4d8..000000000000
--- a/docs/html/resources/articles/images/File_002.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/JFlubber.png b/docs/html/resources/articles/images/JFlubber.png
deleted file mode 100644
index d95e32b8fbf2..000000000000
--- a/docs/html/resources/articles/images/JFlubber.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/WikiNotes.png b/docs/html/resources/articles/images/WikiNotes.png
deleted file mode 100644
index d52c4fca7bd3..000000000000
--- a/docs/html/resources/articles/images/WikiNotes.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/all_drawables_changed.png b/docs/html/resources/articles/images/all_drawables_changed.png
deleted file mode 100644
index 04ec4a2d7aa3..000000000000
--- a/docs/html/resources/articles/images/all_drawables_changed.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/android.png b/docs/html/resources/articles/images/android.png
deleted file mode 100644
index 6dc88ccbd170..000000000000
--- a/docs/html/resources/articles/images/android.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/buttons.png b/docs/html/resources/articles/images/buttons.png
deleted file mode 100644
index 8c220b9523cc..000000000000
--- a/docs/html/resources/articles/images/buttons.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/contacts-2.png b/docs/html/resources/articles/images/contacts-2.png
deleted file mode 100644
index 02f28aaad211..000000000000
--- a/docs/html/resources/articles/images/contacts-2.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/contacts.png b/docs/html/resources/articles/images/contacts.png
deleted file mode 100644
index d8b067df99b1..000000000000
--- a/docs/html/resources/articles/images/contacts.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/correct_drawables.png b/docs/html/resources/articles/images/correct_drawables.png
deleted file mode 100644
index 516309b683e8..000000000000
--- a/docs/html/resources/articles/images/correct_drawables.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/ddms_allocation_tracker.png b/docs/html/resources/articles/images/ddms_allocation_tracker.png
deleted file mode 100644
index b9fa0a1db807..000000000000
--- a/docs/html/resources/articles/images/ddms_allocation_tracker.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/ddms_allocation_trackerl.png b/docs/html/resources/articles/images/ddms_allocation_trackerl.png
deleted file mode 100644
index 5ac8d2a0eddc..000000000000
--- a/docs/html/resources/articles/images/ddms_allocation_trackerl.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/device.png b/docs/html/resources/articles/images/device.png
deleted file mode 100644
index 186b960bd908..000000000000
--- a/docs/html/resources/articles/images/device.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/device_002.png b/docs/html/resources/articles/images/device_002.png
deleted file mode 100644
index 4bc3b0c4f14b..000000000000
--- a/docs/html/resources/articles/images/device_002.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/gestures.png b/docs/html/resources/articles/images/gestures.png
deleted file mode 100644
index fe8f7cdfe2f2..000000000000
--- a/docs/html/resources/articles/images/gestures.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/gestures_002.png b/docs/html/resources/articles/images/gestures_002.png
deleted file mode 100644
index b20da98fcd22..000000000000
--- a/docs/html/resources/articles/images/gestures_002.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/gestures_003.png b/docs/html/resources/articles/images/gestures_003.png
deleted file mode 100644
index a29593905f37..000000000000
--- a/docs/html/resources/articles/images/gestures_003.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/gestures_004.png b/docs/html/resources/articles/images/gestures_004.png
deleted file mode 100644
index 3fe5fb179357..000000000000
--- a/docs/html/resources/articles/images/gestures_004.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/gestures_005.png b/docs/html/resources/articles/images/gestures_005.png
deleted file mode 100644
index 3efc519d0326..000000000000
--- a/docs/html/resources/articles/images/gestures_005.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/gestures_006.png b/docs/html/resources/articles/images/gestures_006.png
deleted file mode 100644
index 399c31d6b51f..000000000000
--- a/docs/html/resources/articles/images/gestures_006.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/grid.png b/docs/html/resources/articles/images/grid.png
deleted file mode 100644
index 4713de5f564a..000000000000
--- a/docs/html/resources/articles/images/grid.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/ime.png b/docs/html/resources/articles/images/ime.png
deleted file mode 100644
index 57f6df1c3a97..000000000000
--- a/docs/html/resources/articles/images/ime.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/ime_002.png b/docs/html/resources/articles/images/ime_002.png
deleted file mode 100644
index 3ec00b2f66d6..000000000000
--- a/docs/html/resources/articles/images/ime_002.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/ime_003.png b/docs/html/resources/articles/images/ime_003.png
deleted file mode 100644
index a3f57bb701f3..000000000000
--- a/docs/html/resources/articles/images/ime_003.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/ime_004.png b/docs/html/resources/articles/images/ime_004.png
deleted file mode 100644
index efeddf05b0fa..000000000000
--- a/docs/html/resources/articles/images/ime_004.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/ime_005.png b/docs/html/resources/articles/images/ime_005.png
deleted file mode 100644
index a7394e067cf9..000000000000
--- a/docs/html/resources/articles/images/ime_005.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/ime_006.png b/docs/html/resources/articles/images/ime_006.png
deleted file mode 100644
index 0b55c7962dbf..000000000000
--- a/docs/html/resources/articles/images/ime_006.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/layouts_comparison_small.png b/docs/html/resources/articles/images/layouts_comparison_small.png
deleted file mode 100644
index 0ba4cb8cf9cd..000000000000
--- a/docs/html/resources/articles/images/layouts_comparison_small.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/list01.png b/docs/html/resources/articles/images/list01.png
deleted file mode 100644
index e1b7fa8255ef..000000000000
--- a/docs/html/resources/articles/images/list01.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/list02.png b/docs/html/resources/articles/images/list02.png
deleted file mode 100644
index 7f72a3f28994..000000000000
--- a/docs/html/resources/articles/images/list02.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/list_fade_1.png b/docs/html/resources/articles/images/list_fade_1.png
deleted file mode 100644
index 43013d6b3997..000000000000
--- a/docs/html/resources/articles/images/list_fade_1.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/list_fade_2.png b/docs/html/resources/articles/images/list_fade_2.png
deleted file mode 100644
index 160d3ffe5b3e..000000000000
--- a/docs/html/resources/articles/images/list_fade_2.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/list_fade_3.png b/docs/html/resources/articles/images/list_fade_3.png
deleted file mode 100644
index 70dca6439c97..000000000000
--- a/docs/html/resources/articles/images/list_fade_3.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/list_fade_4.png b/docs/html/resources/articles/images/list_fade_4.png
deleted file mode 100644
index 7619fcaeb403..000000000000
--- a/docs/html/resources/articles/images/list_fade_4.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/live_wallpapers_small.png b/docs/html/resources/articles/images/live_wallpapers_small.png
deleted file mode 100644
index 3b49b2427005..000000000000
--- a/docs/html/resources/articles/images/live_wallpapers_small.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/merge1.jpg b/docs/html/resources/articles/images/merge1.jpg
deleted file mode 100644
index 114eed697bf5..000000000000
--- a/docs/html/resources/articles/images/merge1.jpg
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/merge2.png b/docs/html/resources/articles/images/merge2.png
deleted file mode 100644
index b4a8d4c26639..000000000000
--- a/docs/html/resources/articles/images/merge2.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/merge3.png b/docs/html/resources/articles/images/merge3.png
deleted file mode 100644
index 61ed983dd506..000000000000
--- a/docs/html/resources/articles/images/merge3.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/merge4.jpg b/docs/html/resources/articles/images/merge4.jpg
deleted file mode 100644
index 17b6c20a2032..000000000000
--- a/docs/html/resources/articles/images/merge4.jpg
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/merge5.png b/docs/html/resources/articles/images/merge5.png
deleted file mode 100644
index 289f47e0f3eb..000000000000
--- a/docs/html/resources/articles/images/merge5.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/mutated_states.png b/docs/html/resources/articles/images/mutated_states.png
deleted file mode 100644
index 50518b639136..000000000000
--- a/docs/html/resources/articles/images/mutated_states.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/on-screen-inputs.png b/docs/html/resources/articles/images/on-screen-inputs.png
deleted file mode 100644
index b8b3cf794f36..000000000000
--- a/docs/html/resources/articles/images/on-screen-inputs.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/on-screen-inputs_002.png b/docs/html/resources/articles/images/on-screen-inputs_002.png
deleted file mode 100644
index a5d21c75f634..000000000000
--- a/docs/html/resources/articles/images/on-screen-inputs_002.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/on-screen-inputs_003.png b/docs/html/resources/articles/images/on-screen-inputs_003.png
deleted file mode 100644
index 81ee257b6c10..000000000000
--- a/docs/html/resources/articles/images/on-screen-inputs_003.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/on-screen-inputs_004.png b/docs/html/resources/articles/images/on-screen-inputs_004.png
deleted file mode 100644
index 651b72a10ba2..000000000000
--- a/docs/html/resources/articles/images/on-screen-inputs_004.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/on-screen-inputs_005.png b/docs/html/resources/articles/images/on-screen-inputs_005.png
deleted file mode 100644
index 75185ff1bbf0..000000000000
--- a/docs/html/resources/articles/images/on-screen-inputs_005.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/on-screen-inputs_006.png b/docs/html/resources/articles/images/on-screen-inputs_006.png
deleted file mode 100644
index b653d753dc26..000000000000
--- a/docs/html/resources/articles/images/on-screen-inputs_006.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/photostream_landscape.png b/docs/html/resources/articles/images/photostream_landscape.png
deleted file mode 100644
index ad4a0c5a0fda..000000000000
--- a/docs/html/resources/articles/images/photostream_landscape.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/photostream_portrait.png b/docs/html/resources/articles/images/photostream_portrait.png
deleted file mode 100644
index 3794f6374439..000000000000
--- a/docs/html/resources/articles/images/photostream_portrait.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/qsb.png b/docs/html/resources/articles/images/qsb.png
deleted file mode 100644
index 4e40af14a53b..000000000000
--- a/docs/html/resources/articles/images/qsb.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/qsb_002.png b/docs/html/resources/articles/images/qsb_002.png
deleted file mode 100644
index 8c2f77232270..000000000000
--- a/docs/html/resources/articles/images/qsb_002.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/qsb_003.png b/docs/html/resources/articles/images/qsb_003.png
deleted file mode 100644
index 069b6cd31d1e..000000000000
--- a/docs/html/resources/articles/images/qsb_003.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/relativelayout_1.png b/docs/html/resources/articles/images/relativelayout_1.png
deleted file mode 100644
index 3360ad85366d..000000000000
--- a/docs/html/resources/articles/images/relativelayout_1.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/relativelayout_2.png b/docs/html/resources/articles/images/relativelayout_2.png
deleted file mode 100644
index 8e71bb27f202..000000000000
--- a/docs/html/resources/articles/images/relativelayout_2.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/relativelayout_3.png b/docs/html/resources/articles/images/relativelayout_3.png
deleted file mode 100644
index 16a9767890d1..000000000000
--- a/docs/html/resources/articles/images/relativelayout_3.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/relativelayout_wire_1.png b/docs/html/resources/articles/images/relativelayout_wire_1.png
deleted file mode 100644
index 9cb241df6d45..000000000000
--- a/docs/html/resources/articles/images/relativelayout_wire_1.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/relativelayout_wire_2.png b/docs/html/resources/articles/images/relativelayout_wire_2.png
deleted file mode 100644
index 4243812e366d..000000000000
--- a/docs/html/resources/articles/images/relativelayout_wire_2.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/relativelayout_wire_3.png b/docs/html/resources/articles/images/relativelayout_wire_3.png
deleted file mode 100644
index 04ce1cefb2bd..000000000000
--- a/docs/html/resources/articles/images/relativelayout_wire_3.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/search01.png b/docs/html/resources/articles/images/search01.png
deleted file mode 100644
index 4160a76528d2..000000000000
--- a/docs/html/resources/articles/images/search01.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/search02.png b/docs/html/resources/articles/images/search02.png
deleted file mode 100644
index 63000186b730..000000000000
--- a/docs/html/resources/articles/images/search02.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/service-api-changes-starting-with_runningservices.png b/docs/html/resources/articles/images/service-api-changes-starting-with_runningservices.png
deleted file mode 100644
index e159fff70efb..000000000000
--- a/docs/html/resources/articles/images/service-api-changes-starting-with_runningservices.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/service-api-changes-starting-with_stopservice.png b/docs/html/resources/articles/images/service-api-changes-starting-with_stopservice.png
deleted file mode 100644
index cc8f0a2a5fd6..000000000000
--- a/docs/html/resources/articles/images/service-api-changes-starting-with_stopservice.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/shared_states.png b/docs/html/resources/articles/images/shared_states.png
deleted file mode 100644
index 81bec0958f81..000000000000
--- a/docs/html/resources/articles/images/shared_states.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/shelves2.png b/docs/html/resources/articles/images/shelves2.png
deleted file mode 100644
index 2de239fb413b..000000000000
--- a/docs/html/resources/articles/images/shelves2.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/speech-input.png b/docs/html/resources/articles/images/speech-input.png
deleted file mode 100644
index 78fbc98c4603..000000000000
--- a/docs/html/resources/articles/images/speech-input.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/text_field.png b/docs/html/resources/articles/images/text_field.png
deleted file mode 100644
index b9dedecd342a..000000000000
--- a/docs/html/resources/articles/images/text_field.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/ui-1.6.png b/docs/html/resources/articles/images/ui-1.6.png
deleted file mode 100644
index bc5a2b827329..000000000000
--- a/docs/html/resources/articles/images/ui-1.6.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/ui-1.6_002.png b/docs/html/resources/articles/images/ui-1.6_002.png
deleted file mode 100644
index 39254b30a4d8..000000000000
--- a/docs/html/resources/articles/images/ui-1.6_002.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/viewstub1.png b/docs/html/resources/articles/images/viewstub1.png
deleted file mode 100644
index 2de239fb413b..000000000000
--- a/docs/html/resources/articles/images/viewstub1.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/viewstub2.png b/docs/html/resources/articles/images/viewstub2.png
deleted file mode 100644
index 6e6feb978d87..000000000000
--- a/docs/html/resources/articles/images/viewstub2.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/viewstub3.png b/docs/html/resources/articles/images/viewstub3.png
deleted file mode 100644
index 5e793e664e62..000000000000
--- a/docs/html/resources/articles/images/viewstub3.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/viewstub4.png b/docs/html/resources/articles/images/viewstub4.png
deleted file mode 100644
index cffb9c63761a..000000000000
--- a/docs/html/resources/articles/images/viewstub4.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/webview.png b/docs/html/resources/articles/images/webview.png
deleted file mode 100644
index 92472af527d4..000000000000
--- a/docs/html/resources/articles/images/webview.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/window_background.png b/docs/html/resources/articles/images/window_background.png
deleted file mode 100644
index 58f4f7edd148..000000000000
--- a/docs/html/resources/articles/images/window_background.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/window_background_null.png b/docs/html/resources/articles/images/window_background_null.png
deleted file mode 100644
index 83f7b45d0053..000000000000
--- a/docs/html/resources/articles/images/window_background_null.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/images/window_background_root.png b/docs/html/resources/articles/images/window_background_root.png
deleted file mode 100644
index 95a47c0b60af..000000000000
--- a/docs/html/resources/articles/images/window_background_root.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/articles/index.jd b/docs/html/resources/articles/index.jd
deleted file mode 100644
index 2947e4a2649a..000000000000
--- a/docs/html/resources/articles/index.jd
+++ /dev/null
@@ -1,168 +0,0 @@
-page.title=Technical Articles
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/avoiding-memory-leaks.html">Avoiding Memory Leaks</a></dt>
- <dd>Mobile devices often have limited memory, and memory leaks can cause your application to waste this valuable resource without your knowledge. This article provides tips to help you avoid common causes of memory leaks on the Android platform.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/backward-compatibility.html">Backward Compatibility</a></dt>
- <dd>The Android platform strives to ensure backwards compatibility. However, sometimes you want to use new features which aren't supported on older platforms. This article discusses strategies for selectively using these features based on availability, allowing you to keep your applications portable across a wide range of devices.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/can-i-use-this-intent.html">Can I Use this Intent?</a></dt>
- <dd>Android offers a very powerful and yet easy-to-use message type called an intent. You can use intents to turn applications into high-level libraries and make code modular and reusable. While it is nice to be able to make use of a loosely coupled API, there is no guarantee that the intent you send will be received by another application. This article describes a technique you can use to find out whether the system contains any application capable of responding to the intent you want to use.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/creating-input-method.html">Creating an Input Method</a></dt>
- <dd>Input Method Editors (IMEs) provide the mechanism for entering text into text fields and other Views. Android devices come bundled with at least one IME, but users can install additional IMEs. This article covers the basics of developing an IME for the Android platform.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/drawable-mutations.html">Drawable Mutations</a></dt>
- <dd>Drawables are pluggable drawing containers that allow applications to display graphics. This article explains some common pitfalls when trying to modify the properties of multiple Drawables.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/faster-screen-orientation-change.html">Faster Screen Orientation Change</a></dt>
- <dd>When an Android device changes its orientation, the default behavior is to automatically restart the current activity with a new configuration. However, this can become a bottleneck in applications that access a large amount of external data. This article discusses how to gracefully handle this situation without resorting to manually processing configuration changes.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/future-proofing.html">Future-Proofing Your Apps</a></dt>
- <dd>A collection of common sense advice to help you ensure that your applications don't break when new versions of the Android platform are released.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/gestures.html">Gestures</a></dt>
- <dd>Touch screens allow users to perform gestures, such as tapping, dragging, flinging, or sliding, to perform various actions. The gestures API enables your application to recognize even complicated gestures with ease. This article explains how to integrate this API into an application.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/glsurfaceview.html">Introducing GLSurfaceView</a></dt>
- <dd>This article provides an overview of GLSurfaceView, a class that makes it easy to implement 2D or 3D OpenGL rendering inside of an Android application.</dd>
-</dl>
-<dl>
- <dt>
- <a href="{@docRoot}resources/articles/spell-checker-framework.jd">
- Using the Spell Checker Framework</a>
- </dt>
- <dd>
- This article describes how to use the Spell Checker Framework to check spelling in
- various ways in your application.
- </dd>
-</dl>
-<dl>
- <dt><a href="{@docRoot}resources/articles/layout-tricks-reuse.html">Layout Tricks: Creating Reusable UI Components</a></dt>
- <dd>Learn how to combine multiple standard UI widgets into a single high-level component, which can be reused throughout your application.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/layout-tricks-efficiency.html">Layout Tricks: Creating Efficient Layouts</a></dt>
- <dd>Learn how to optimize application layouts as this article walks you through converting a LinearLayout into a RelativeLayout, and analyzes the resulting implications on performance.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/layout-tricks-stubs.html">Layout Tricks: Using ViewStubs</a></dt>
- <dd>Learn about using ViewStubs inside an application's layout in order to inflate rarely used UI elements, without the performance implications which would otherwise be caused by using the <code>&lt;include&gt;</code> tag.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/layout-tricks-merge.html">Layout Tricks: Merging Layouts</a></dt>
- <dd>Learn how to use the <code>&lt;merge&gt;</code> tag in your XML layouts in order to avoid unnecessary levels of hierarchy within an application's view tree.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/listview-backgrounds.html">ListView Backgrounds: An Optimization</a></dt>
- <dd>ListViews are very popular widgets within the Android framework. This article describes some of the optimizations used by the ListView widget, and how to avoid some common issues that this causes when trying to use a custom background.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/live-folders.html">Live Folders</a></dt>
- <dd>Live Folders allow users to display any source of data on their home screen without launching an application. This article discusses how to export an application's data in a format suitable for display inside of a live folder.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/live-wallpapers.html">Live Wallpapers</a></dt>
- <dd>Live wallpapers are richer, animated, interactive backgrounds that users can display in their home screens. Learn how to create a live wallpaper and bundle it in an application that users can install on their devices.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/on-screen-inputs.html">Onscreen Input Methods</a></dt>
- <dd>The Input Method Framework (IMF) allows users to take advantage of on-screen input methods, such as software keyboards. This article provides an overview of Input Method Editors (IMEs) and how applications interact with them.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/painless-threading.html">Painless Threading</a></dt>
- <dd>This article discusses the threading model used by Android applications and how applications can ensure best UI performance by spawning worker threads to handle long-running operations, rather than handling them in the main thread. The article also explains the API that your application can use to interact with Android UI toolkit components running on the main thread and spawn managed worker threads.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/qsb.html">Quick Search Box</a></dt>
- <dd>Quick Search Box (QSB) is a powerful, system-wide search framework. QSB makes it possible for users to quickly and easily find what they're looking for, both on their devices and on the web. This article discusses how to work with the QSB framework to add new search results for an installed application.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/touch-mode.html">Touch Mode</a></dt>
- <dd>This article explains the touch mode, one of the most important principles of Android's UI toolkit. Whenever a user interacts with a device's touch screen, the system enters touch mode. While simple in concept, there are important implications touch mode that are often overlooked.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/track-mem.html">Tracking Memory Allocations</a></dt>
- <dd>This article discusses how to use the Allocation Tracker tool to observe memory allocations and avoid performance problems that would otherwise be caused by ignoring the effect of Dalvik's garbage collector.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/ui-1.5.html">UI Framework Changes in Android 1.5</a></dt>
- <dd>Explore the UI changes that were introduced in Android 1.5, compared with the UI provided in Android 1.0 and 1.1.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/ui-1.6.html">UI Framework Changes in Android 1.6</a></dt>
- <dd>Explore the UI changes that were introduced in Android 1.6, compared with the UI provided in Android 1.5. In particular, this article discusses changes to RelativeLayouts and click listeners.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/timed-ui-updates.html">Updating the UI from a Timer</a></dt>
- <dd>Learn about how to use Handlers as a more efficient replacement for java.util.Timer on the Android platform.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/tts.html">Using Text-to-Speech</a></dt>
- <dd>The text-to-speech API lets your application "speak" to users, in any of several languages. This article provides an overview of the TTS API and how you use to add speech capabilities to your application.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/tts.html">Using the Contacts API</a></dt>
- <dd>This article discusses the improved Contacts API introduced in Android 2.0 and how to use it to manage and integrate contacts from multiple accounts and data sources. The article also discusses techniques for using the new API on devices that support it, while maintaining backward compatibility with the old API on other devices. </dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/using-webviews.html">Using WebViews</a></dt>
- <dd>WebViews allow an application to dynamically display HTML and execute JavaScript, without relinquishing control to a separate browser application. This article introduces the WebView classes and provides a sample application that demonstrates its use.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/wikinotes-linkify.html">WikiNotes: Linkify your Text!</a></dt>
- <dd>This article introduces WikiNotes for Android, part of the Apps for Android project. It covers the use of Linkify to turn ordinary text views into richer, link-oriented content that causes Android intents to fire when a link is selected.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/wikinotes-intents.html">WikiNotes: Routing Intents</a></dt>
- <dd>This article illustrates how an application, in this case the WikiNotes sample app, can use intents to route various types of linked text to the application that handles that type of data. For example, an app can use intents to route a linked telephone number to a dialer app and a web URL to a browser.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/window-bg-speed.html">Window Backgrounds &amp; UI Speed</a></dt>
- <dd>Some Android applications need to squeeze every bit of performance out of the UI toolkit and there are many ways to do so. In this article, you will discover how to speed up the drawing and the perceived startup time of your activities. Both of these techniques rely on a single feature, the window's background drawable.</dd>
-</dl>
-
-<dl>
- <dt><a href="{@docRoot}resources/articles/zipalign.html">Zipalign: an Easy Optimization</a></dt>
- <dd>The Android SDK includes a tool called zipalign that optimizes the way an application is packaged. Running zipalign against your application enables Android to interact with it more efficiently at run time and thus has the potential to make it and the overall system run faster. This article provides a high-level overview of the zipalign tool and its use.</dd>
-</dl>
diff --git a/docs/html/resources/articles/layout-tricks-efficiency.jd b/docs/html/resources/articles/layout-tricks-efficiency.jd
deleted file mode 100644
index 00b4147e84cb..000000000000
--- a/docs/html/resources/articles/layout-tricks-efficiency.jd
+++ /dev/null
@@ -1,179 +0,0 @@
-page.title=Layout Tricks: Creating Efficient Layouts
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>The Android UI toolkit offers several layout managers that are
-rather easy to use and, most of the time, you only need the basic
-features of these layout managers to implement a user interface.</p>
-
-<p>Sticking to the basic features is unfortunately not the most efficient
-way to create user interfaces. A common example is the abuse of
-{@link android.widget.LinearLayout}, which leads to a proliferation of
-views in the view hierarchy. Every view &mdash; or worse, every layout
-manager &mdash; that you add to your application comes at a cost:
-initialization, layout and drawing become slower. The layout pass can be
-especially expensive when you nest several <code>LinearLayout</code>
-that use the {@link android.R.attr#layout_weight weight}
-parameter, which requires the child to be measured twice.</p>
-
-<p>Let's consider a very simple and common example of a layout: a list item
-with an icon on the left, a title at the top and an optional description
-underneath the title. Here is what such an item looks like:</p>
-
-<div style="text-align: center;"><img src="images/relativelayout_1.png" alt="Simple list item"></div>
-
-<p>To clearly understand how the views, one {@link android.widget.ImageView} and
-two {@link android.widget.TextView}, are positioned with respect to each other,
-here is the wireframe of the layout as captured by <a
-href="{@docRoot}guide/developing/tools/hierarchy-viewer.html">HierarchyViewer</a
->:</p>
-
-<div style="text-align: center;"><img src="images/relativelayout_wire_1.png" alt="Wireframe of the simple list item"></div>
-
-<p>Implementing this layout is straightforward with <code>LinearLayout</code>.
-The item itself is a horizontal <code>LinearLayout</code> with an
-<code>ImageView</code> and a vertical <code>LinearLayout</code>, which contains
-the two <code>TextView</code>. Here's the source code of this layout:</p>
-
-<pre class="prettyprint">&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="?android:attr/listPreferredItemHeight"
-
- android:padding="6dip"&gt;
-
- &lt;ImageView
- android:id="&#64;+id/icon"
-
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_marginRight="6dip"
-
- android:src="&#64;drawable/icon" /&gt;
-
- &lt;LinearLayout
- android:orientation="vertical"
-
- android:layout_width="0dip"
- android:layout_weight="1"
- android:layout_height="fill_parent"&gt;
-
- &lt;TextView
- android:layout_width="fill_parent"
- android:layout_height="0dip"
- android:layout_weight="1"
-
- android:gravity="center_vertical"
- android:text="My Application" /&gt;
-
- &lt;TextView
- android:layout_width="fill_parent"
- android:layout_height="0dip"
- android:layout_weight="1"
-
- android:singleLine="true"
- android:ellipsize="marquee"
- android:text="Simple application that shows how to use RelativeLayout" /&gt;
-
- &lt;/LinearLayout&gt;
-
-&lt;/LinearLayout&gt;</pre>
-
-<p>This layout works but can be wasteful if you instantiate it for every list
-item of a {@link android.widget.ListView}. The same layout can be rewritten
-using a single {@link android.widget.RelativeLayout}, thus saving one view, and
-even better one level in view hierarchy, per list item. The implementation of
-the layout with a <code>RelativeLayout</code> remains simple:</p>
-
-<pre class="prettyprint">&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="?android:attr/listPreferredItemHeight"
-
- android:padding="6dip"&gt;
-
- &lt;ImageView
- android:id="&#64;+id/icon"
-
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
-
- android:layout_alignParentTop="true"
- android:layout_alignParentBottom="true"
- android:layout_marginRight="6dip"
-
- android:src="&#64;drawable/icon" /&gt;
-
- &lt;TextView
- android:id="&#64;+id/secondLine"
-
- android:layout_width="fill_parent"
- android:layout_height="26dip"
-
- android:layout_toRightOf="&#64;id/icon"
- android:layout_alignParentBottom="true"
- android:layout_alignParentRight="true"
-
- android:singleLine="true"
- android:ellipsize="marquee"
- android:text="Simple application that shows how to use RelativeLayout" /&gt;
-
- &lt;TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
-
- android:layout_toRightOf="&#64;id/icon"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_above="&#64;id/secondLine"
- android:layout_alignWithParentIfMissing="true"
-
- android:gravity="center_vertical"
- android:text="My Application" /&gt;
-
-&lt;/RelativeLayout&gt;</pre>
-
-<p>This new implementation behaves exactly the same way as the previous
-implementation, except in one case. The list item we want to display has two
-lines of text: the title and an <em>optional</em> description. When a
-description is not available for a given list item, the application would simply
-set the visibility of the second <code>TextView</code> to
-{@link android.view.View#GONE}. This works perfectly with the <code>LinearLayout</code>
-implementation but not with the <code>RelativeLayout</code> version:</p>
-
-<div style="text-align: center;"><img src="images/relativelayout_2.png" alt="RelativeLayout and description GONE"></div>
-<div style="text-align: center;"><img src="images/relativelayout_wire_2.png" alt="RelativeLayout and description GONE"></div>
-
-<p>In a <code>RelativeLayout</code>, views are aligned with their parent, with the
-<code>RelativeLayout</code> itself, or with other views. For instance, we declared that
-the description is aligned with the bottom of the <code>RelativeLayout</code> and
-that the title is positioned above the description and anchored to the
-parent's top. With the description GONE, RelativeLayout doesn't know
-where to position the title's bottom edge. To solve this problem, you
-can use a very special layout parameter called
-{@link android.R.attr#layout_alignWithParentIfMissing}.
-</p>
-
-<p>This boolean parameter simply tells RelativeLayout to use its own edges as
-anchors when a constraint target is missing. For instance, if you position a
-view to the right of a GONE view and set <code>alignWithParentIfMissing</code>
-to <code>true</code>, <code>RelativeLayout</code> will instead anchor the view
-to its left edge. In our case, using <code>alignWithParentIfMissing</code> will
-cause <code>RelativeLayout</code> to align the title's bottom with its own
-bottom. The result is the following:</p>
-
-<div style="text-align: center;"><img src="images/relativelayout_3.png" alt="RelativeLayout, description GONE and alignWithParentIfMissing"></div>
-<div style="text-align: center;"><img src="images/relativelayout_wire_3.png" alt="RelativeLayout, description GONE and alignWithParentIfMissing"></div>
-
-<p>The
-behavior of our layout is now perfect, even when the description is
-GONE. Even better, the hierarchy is simpler and because we are not
-using LinearLayout's weights it's also more efficient. The difference
-between the two implementations becomes obvious when comparing the view
-hierarchies in HierarchyViewer:</p>
-
-<div style="text-align: center;"><img src="images/layouts_comparison_small.png" alt="LinearLayout vs RelativeLayout"></div>
-
-<p>Again, the difference will be much more important when you use such a layout
-for every item in a ListView for instance. Hopefully this simple
-example showed you that getting to know your layouts is the best way to
-learn how to optimize your UI.</p>
diff --git a/docs/html/resources/articles/layout-tricks-merge.jd b/docs/html/resources/articles/layout-tricks-merge.jd
deleted file mode 100644
index 0ca0317d99f4..000000000000
--- a/docs/html/resources/articles/layout-tricks-merge.jd
+++ /dev/null
@@ -1,202 +0,0 @@
-page.title=Layout Tricks: Merging Layouts
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>The articles showed you how to use the <code>&lt;include /&gt;</code> tag in XML layouts, to
-reuse and share your layout code. This article explains the <code>&lt;merge /&gt;</code> tag and how
-it complements the <code>&lt;include /&gt;</code> tag.</p>
-
-<p>The <code>&lt;merge /&gt;</code> tag was created for the purpose of
-optimizing Android layouts by reducing the number of levels in view trees. It's
-easier to understand the problem this tag solves by looking at an example. The
-following XML layout declares a layout that shows an image with its title on top
-of it. The structure is fairly simple; a {@link android.widget.FrameLayout} is
-used to stack a {@link android.widget.TextView} on top of an
-{@link android.widget.ImageView}:</p>
-
-<pre class="prettyprint">&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"&gt;
-
- &lt;ImageView
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
-
- android:scaleType="center"
- android:src="&#64;drawable/golden_gate" /&gt;
-
- &lt;TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginBottom="20dip"
- android:layout_gravity="center_horizontal|bottom"
-
- android:padding="12dip"
-
- android:background="#AA000000"
- android:textColor="#ffffffff"
-
- android:text="Golden Gate" /&gt;
-
-&lt;/FrameLayout&gt;</pre>
-
-<p>This layout renders nicely and nothing seems wrong with it:</p>
-
-<div style="text-align: center;"><img src="images/merge1.jpg" alt="A FrameLayout is used to overlay a title on top of an image"></div>
-
-<p>Things get more interesting when you inspect the result with <a
-href="{@docRoot}guide/developing/debugging/debugging-ui.html#hierarchyViewer">HierarchyViewer</a>.
-If you look closely at the resulting tree, you will notice that the
-<code>FrameLayout</code> defined in our XML file (highlighted in blue below) is
-the sole child of another <code>FrameLayout</code>:</p>
-
-<div style="text-align: center;"><img src="images/merge2.png" alt="A layout with only one child of same dimensions can be removed"></div>
-
-<p>Since our <code>FrameLayout</code> has the same dimension as its parent, by
-the virtue of using the <code>fill_parent</code> constraints, and does not
-define any background, extra padding or a gravity, it is <em>totally
-useless</em>. We only made the UI more complex for no good reason. But how could
-we get rid of this <code>FrameLayout</code>? After all, XML documents require a
-root tag and tags in XML layouts always represent view instances.</p>
-
-<p>That's where the <code>&lt;merge /&gt;</code> tag comes in handy. When the
-{@link android.view.LayoutInflater} encounters this tag, it skips it and adds
-the <code>&lt;merge /&gt;</code> children to the <code>&lt;merge /&gt;</code>
-parent. Confused? Let's rewrite our previous XML layout by replacing the
-<code>FrameLayout</code> with <code>&lt;merge /&gt;</code>:</p>
-
-<pre class="prettyprint">&lt;merge xmlns:android="http://schemas.android.com/apk/res/android"&gt;
-
- &lt;ImageView
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
-
- android:scaleType="center"
- android:src="&#64;drawable/golden_gate" /&gt;
-
- &lt;TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginBottom="20dip"
- android:layout_gravity="center_horizontal|bottom"
-
- android:padding="12dip"
-
- android:background="#AA000000"
- android:textColor="#ffffffff"
-
- android:text="Golden Gate" /&gt;
-
-&lt;/merge&gt;</pre>
-
-<p>With this new version, both the <code>TextView</code> and the
-<code>ImageView</code> will be added directly to the top-level
-<code>FrameLayout</code>. The result will be visually the same but the view
-hierarchy is simpler:</p>
-
-<div style="text-align: center;"><img src="images/merge3.png" alt="Optimized view hierarchy using the merge tag"></div>
-
-<p>Obviously, using <code>&lt;merge /&gt;</code> works in this case because the
-parent of an activity's content view is always a <code>FrameLayout</code>. You
-could not apply this trick if your layout was using a <code>LinearLayout</code>
-as its root tag for instance. The <code>&lt;merge /&gt;</code> can be useful in
-other situations though. For instance, it works perfectly when combined with the
-<code>&lt;include /&gt;</code> tag. You can also use <code>&lt;merge
-/&gt;</code> when you create a custom composite view. Let's see how we can use
-this tag to create a new view called <code>OkCancelBar</code> which simply shows
-two buttons with customizable labels. You can also <a
-href="http://progx.org/users/Gfx/android/MergeLayout.zip">download the complete
-source code of this example</a>. Here is the XML used to display this custom
-view on top of an image:</p>
-
-<pre class="prettyprint">&lt;merge
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:okCancelBar="http://schemas.android.com/apk/res/com.example.android.merge"&gt;
-
- &lt;ImageView
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
-
- android:scaleType="center"
- android:src="&#64;drawable/golden_gate" /&gt;
-
- &lt;com.example.android.merge.OkCancelBar
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom"
-
- android:paddingTop="8dip"
- android:gravity="center_horizontal"
-
- android:background="#AA000000"
-
- okCancelBar:okLabel="Save"
- okCancelBar:cancelLabel="Don't save" /&gt;
-
-&lt;/merge&gt;</pre>
-
-<p>This new layout produces the following result on a device:</p>
-
-<div style="text-align: center;"><img src="images/merge4.jpg" alt="Creating a custom view with the merge tag"></div>
-
-<p>The source code of <code>OkCancelBar</code> is very simple because the two
-buttons are defined in an external XML file, loaded using a
-<code>LayoutInflate</code>. As you can see in the following snippet, the XML
-layout <code>R.layout.okcancelbar</code> is inflated with the
-<code>OkCancelBar</code> as the parent:</p>
-
-<pre class="prettyprint">public class OkCancelBar extends LinearLayout {
- public OkCancelBar(Context context, AttributeSet attrs) {
- super(context, attrs);
- setOrientation(HORIZONTAL);
- setGravity(Gravity.CENTER);
- setWeightSum(1.0f);
-
- LayoutInflater.from(context).inflate(R.layout.okcancelbar, this, true);
-
- TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.OkCancelBar, 0, 0);
-
- String text = array.getString(R.styleable.OkCancelBar_okLabel);
- if (text == null) text = "Ok";
- ((Button) findViewById(R.id.okcancelbar_ok)).setText(text);
-
- text = array.getString(R.styleable.OkCancelBar_cancelLabel);
- if (text == null) text = "Cancel";
- ((Button) findViewById(R.id.okcancelbar_cancel)).setText(text);
-
- array.recycle();
- }
-}</pre>
-
-<p>The two buttons are defined in the following XML layout. As you can see, we
-use the <code>&lt;merge /&gt;</code> tag to add the two buttons directly to the
-<code>OkCancelBar</code>. Each button is included from the same external XML
-layout file to make them easier to maintain; we simply override their id:</p>
-
-<pre class="prettyprint">&lt;merge xmlns:android="http://schemas.android.com/apk/res/android"&gt;
- &lt;include
- layout="&#64;layout/okcancelbar_button"
- android:id="&#64;+id/okcancelbar_ok" /&gt;
-
- &lt;include
- layout="&#64;layout/okcancelbar_button"
- android:id="&#64;+id/okcancelbar_cancel" /&gt;
-&lt;/merge&gt;</pre>
-
-<p>We have created a flexible and easy to maintain custom view that generates
-an efficient view hierarchy:</p>
-
-<div style="text-align: center;"><img src="images/merge5.png" alt="The resulting hierarchy is simple and efficient"></div>
-
-<p>The <code>&lt;merge /&gt;</code> tag is extremely useful and can do wonders
-in your code. However, it suffers from a couple of limitations:</p>
-
-<ul>
-<li><code>&lt;merge /&gt;</code> can only be used as the root tag of an XML layout</li>
-<li>When inflating a layout starting with a <code>&lt;merge /&gt;</code>, you <strong>must</strong>
-specify a parent <code>ViewGroup</code> and you must set <code>attachToRoot</code> to
-<code>true</code> (see the documentation for
-{@link android.view.LayoutInflater#inflate(int, android.view.ViewGroup, boolean)} method)</li>
-</ul>
-
diff --git a/docs/html/resources/articles/layout-tricks-reuse.jd b/docs/html/resources/articles/layout-tricks-reuse.jd
deleted file mode 100644
index 179c1d8e0e3e..000000000000
--- a/docs/html/resources/articles/layout-tricks-reuse.jd
+++ /dev/null
@@ -1,81 +0,0 @@
-page.title=Layout Tricks: Creating Reusable UI Components
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>The Android platform offers a wide variety of UI <em>widgets</em>, small
-visual construction blocks that you can glue together to present users with
-complex and useful interfaces. However applications often need higher-level
-visual <em>components</em>. To meet that need, and to do so efficiently, you can
-combine multiple standard widgets into a single, reusable component. </p>
-
-<p>For example, you could create a reusable component that contains a progress
-bar and a cancel button, a panel containing two buttons (positive and negative
-actions), a panel with an icon, a title and a description, and so on. You can
-create UI components easily by writing a custom <code>View</code>, but you can
-do it even more easily using only XML.</p>
-
-<p>In Android XML layout files, each tag is mapped to an actual class instance
-(the class is always a subclass of {@link android.view.View} The UI toolkit lets
-you also use three special tags that are not mapped to a <code>View</code>
-instance: <code>&lt;requestFocus /&gt;</code>, <code>&lt;merge /&gt;</code> and
-<code>&lt;include /&gt;</code>. This article shows how to use <code>&lt;include
-/&gt;</code> to create pure XML visual components. For information about how to
-use <code>&lt;merge /&gt;</code>, which can be particularly powerful when
-combined with <code>&lt;include /&gt;</code>see the <a
-href="{@docRoot}resources/articles/layout-tricks-merge.html">Merging Layouts</a>
-article. </p>
-
-<p>The <code>&lt;include /&gt;</code> element does exactly what its name
-suggests; it includes another XML layout. Using this tag is straightforward as
-shown in the following example, taken straight from <a
-href="http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;a=
-tree;h=refs/heads/master;hb=master">the source code of the Home application</a>
-that ships with Android:</p>
-
-<pre class="prettyprint">&lt;com.android.launcher.Workspace
- android:id="&#64;+id/workspace"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
-
- launcher:defaultScreen="1"&gt;
-
- &lt;include android:id="&#64;+id/cell1" layout="@layout/workspace_screen" /&gt;
- &lt;include android:id="&#64;+id/cell2" layout="@layout/workspace_screen" /&gt;
- &lt;include android:id="&#64;+id/cell3" layout="@layout/workspace_screen" /&gt;
-
-&lt;/com.android.launcher.Workspace&gt;</pre>
-
-<p>In the <code>&lt;include /&gt;</code> only the <code>layout</code> attribute
-is required. This attribute, without the <code>android</code> namespace prefix,
-is a reference to the layout file you wish to include. In this example, the same
-layout is included three times in a row. This tag also lets you override a few
-attributes of the included layout. The above example shows that you can use
-<code>android:id</code> to specify the id of the root view of the included
-layout; it will also override the id of the included layout if one is defined.
-Similarly, you can override all the layout parameters. This means that any
-<code>android:layout_*</code> attribute can be used with the <code>&lt;include
-/&gt;</code> tag. Here is an example in
-which the same layout is included twice, but only the first one overrides the layout properties:</p>
-
-<pre>
-&lt;!-- override the layout height and width --&gt;
-&lt;include layout="@layout/image_holder"
- android:layout_height="fill_parent"
- android:layout_width="fill_parent" /&gt;
-&lt;!-- do not override layout dimensions; inherit them from image_holder --&gt;
-&lt;include layout="@layout/image_holder" /&gt;
-</pre>
-
-<p class="caution"><strong>Caution:</strong> If you want to override the layout dimensions,
-you must override both <code>android:layout_height</code> and
-<code>android:layout_width</code>&mdash;you cannot override only the height or only the width.
-If you override only one, it will not take effect. (Other layout properties, such as weight,
-are still inherited from the source layout.)</p>
-
-<p>This tag is particularly useful when you need to customize only part of your
-UI depending on the device's configuration. For instance, the main layout of
-your activity can be placed in the <code>layout/</code> directory and can
-include another layout which exists in two flavors, in <code>layout-land/</code>
-and <code>layout-port/</code>. This allows you to share most of the UI in
-portrait and landscape.</p> \ No newline at end of file
diff --git a/docs/html/resources/articles/layout-tricks-stubs.jd b/docs/html/resources/articles/layout-tricks-stubs.jd
deleted file mode 100644
index 64f07f981bef..000000000000
--- a/docs/html/resources/articles/layout-tricks-stubs.jd
+++ /dev/null
@@ -1,86 +0,0 @@
-page.title=Layout Tricks: Using ViewStubs
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>Sharing and reusing UI components is very easy with Android, thanks to the <a
-href="layout-tricks-reuse.html">&lt;include /&gt;</a> tag. Sometimes it's so
-easy to create complex UI constructs that your UI ends up with a large number of
-views, some of which are rarely used. Thankfully, Android offers a very special
-widget called {@link android.view.ViewStub}, which brings you all the benefits
-of the <code>&lt;include /&gt;</code> without polluting your user interface with
-rarely used views.</p>
-
-<p>A <code>ViewStub</code> is a dumb and lightweight view. It has no dimension,
-it does not draw anything and does not participate in the layout in any way.
-This means that a <code>ViewStub</code> is very cheap to inflate and very cheap
-to keep in a view hierarchy. A <code>ViewStub</code> can be best described as a
-<em>lazy include</em>. The layout referenced by a <code>ViewStub</code> is
-inflated and added to the user interface only when you decide so.</p>
-
-<p>The following screenshot comes from the <a
-href="http://code.google.com/p/shelves">Shelves</a> application. The main purpose of
-the activity shown in the screenshot is to present the user with a browsable
-list of books:</p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center;" src="images/viewstub1.png" alt="" id="BLOGGER_PHOTO_ID_5314039375336055346" border="0">
-
-<p>The same activity is also used when the user adds or imports new books.
-During such an operation, Shelves shows extra bits of user interface.
-The screenshot below shows the progress bar and cancel button that
-appear at the bottom of the screen during an import:</p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center;" src="images/viewstub2.png" alt="" id="BLOGGER_PHOTO_ID_5314039800002559378" border="0">
-
-<p>Because importing books is not a common operation, at least when compared to
-browsing the list of books, the import panel is originally represented
-by a <code>ViewStub</code>:</p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center;" src="images/viewstub3.png" alt="" id="BLOGGER_PHOTO_ID_5314040334008167378" border="0">
-
-<p>When the user initiates the import process, the <code>ViewStub</code> is
-inflated and replaced by the content of the layout file it references:</p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center;" src="images/viewstub4.png" alt="" id="BLOGGER_PHOTO_ID_5314040638747834450" border="0">
-
-<p>To use a <code>ViewStub</code>, all you need is to specify an
-<code>android:id</code> attribute, to later inflate the stub, and an
-<code>android:layout</code> attribute, to reference what layout file
-to include and inflate. A stub lets you use a third attribute,
-<code>android:inflatedId</code>, which can be used to override the
-<code>id</code> of the root of the included file. Finally, the layout
-parameters specified on the stub will be applied to the roof of the
-included layout. Here is an example:</p>
-
-<pre class="prettyprint">&lt;ViewStub
- android:id="&#64;+id/stub_import"
- android:inflatedId="&#64;+id/panel_import"
-
- android:layout="&#64;layout/progress_overlay"
-
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom" /&gt;</pre>
-
-<p>When you are ready to inflate the stub, simply invoke the
-{@link android.view.ViewStub#inflate()} method. You can also simply change the
-visibility of the stub to {@link android.view.View#VISIBLE} or
-{@link android.view.View#INVISIBLE} and the stub will inflate. Note however that the
-<code>inflate()</code> method has the benefit of returning the root
-<code>View</code> of the inflate layout:</p>
-
-<pre class="prettyprint">((ViewStub) findViewById(R.id.stub_import)).setVisibility(View.VISIBLE);
-// or
-View importPanel = ((ViewStub) findViewById(R.id.stub_import)).inflate();</pre>
-
-<p>It is very important to remember that after the stub is inflated, the stub is
-<em>removed</em> from the view hierarchy. As such, it is unnecessary to keep a
-long-lived reference, for instance in an class instance field, to a
-<code>ViewStub</code>.</p>
-
-<p>A <code>ViewStub</code> is a great compromise between ease of programming and
-efficiency. Instead of inflating views manually and adding them at runtime to
-your view hierarchy, simply use a <code>ViewStub</code>. It's cheap and easy.
-The only drawback of <code>ViewStub</code> is that it currently does
-<em>not</em> support the <a href="layout-tricks-merge.html">&lt;merge /&gt;
-tag</a>.</p>
diff --git a/docs/html/resources/articles/listview-backgrounds.jd b/docs/html/resources/articles/listview-backgrounds.jd
deleted file mode 100644
index c4037bace625..000000000000
--- a/docs/html/resources/articles/listview-backgrounds.jd
+++ /dev/null
@@ -1,88 +0,0 @@
-page.title=ListView Backgrounds: An Optimization
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>{@link android.widget.ListView} is one of Android's most widely used widgets.
-It is rather easy to use, very flexible, and incredibly powerful.
-<code>ListView</code> can also be difficult to understand at times.</p>
-
-<p>One of the most common issues with <code>ListView</code> happens when you try
-to use a custom background. By default, like many Android widgets,
-<code>ListView</code> has a transparent background which means that you can see
-through the default window's background, a very dark gray
-(<code>#FF191919</code> with the current <code>dark</code> theme.) Additionally,
-<code>ListView</code> enables the <em>fading edges</em> by default, as you can
-see at the top of the following screenshot &mdash; the first text item gradually
-fades to black. This technique is used throughout the system to indicate that
-the container can be scrolled.</p>
-
-<div style="text-align: center;"><img src="images/list_fade_1.png" alt="Android's default ListView"></div>
-
-<p>The fade effect is implemented using a combination of
-{@link android.graphics.Canvas#saveLayerAlpha(float, float, float, float, int, int) Canvas.saveLayerAlpha()}
-and the {@link android.graphics.PorterDuff.Mode#DST_OUT Porter-Duff Destination Out blending mode}. </p>
-
-<p>Unfortunately, things start to get ugly when you try to use a custom
-background on the <code>ListView</code> or when you change the window's
-background. The following two screenshots show what happens in an application
-when you change the window's background. The left image shows what the list
-looks like by default and the right image shows what the list looks like during
-a scroll initiated with a touch gesture:</p>
-
-<div style="text-align: center;">
-<img style="margin-right: 12px;" src="images/list_fade_2.png" alt="Dark fade">
-<img src="images/list_fade_3.png" alt="Dark list"></div>
-
-<p>This rendering issue is caused by an optimization of the Android framework
-enabled by default on all instances of <code>ListView</code>. I mentioned
-earlier that the fade effect is implemented using a Porter-Duff blending mode.
-This implementation works really well but is unfortunately very costly and can
-bring down drawing performance by quite a bit as it requires to capture a
-portion of the rendering in an offscreen bitmap and then requires extra blending
-(which implies readbacks from memory.)</p>
-
-<p>Since <code>ListView</code> is most of the time displayed on a solid
-background, there is no reason to go down that expensive route. That's why we
-introduced an optimization called the "cache color hint." The cache color hint
-is an RGB color set by default to the window's background color, that is #191919
-in Android's dark theme. When this hint is set, <code>ListView</code> (actually,
-its base class <code>View</code>) knows it will draw on a solid background and
-therefore replaces th expensive <code>saveLayerAlpha()/Porter-Duff</code>
-rendering with a simple gradient. This gradient goes from fully transparent to
-the cache color hint value and this is exactly what you see on the image above,
-with the dark gradient at the bottom of the list. However, this still does not
-explain why the entire list turns black during a scroll.</p>
-
-<p>As mentioned before, <code>ListView</code> has a transparent/translucent
-background by default, and so all default widgets in the Android UI toolkit.
-This implies that when <code>ListView</code> redraws its children, it has to
-blend the children with the window's background. Once again, this requires
-costly readbacks from memory that are particularly painful during a scroll or a
-fling when drawing happens dozen of times per second. </p>
-
-<p>To improve drawing performance during scrolling operations, the Android
-framework reuses the cache color hint. When this hint is set, the framework
-copies each child of the list in a <code>Bitmap</code> filled with the hint
-value (assuming that another optimization, called <em>scrolling cache</em>, is
-not turned off). <code>ListView</code> then blits these bitmaps directly on
-screen and because these bitmaps are known to be opaque, no blending is
-required. Also, since the default cache color hint is <code>#191919</code>, you
-get a dark background behind each item during a scroll.</p>
-
-<p>To fix this issue, all you have to do is either disable the cache color hint
-optimization, if you use a non-solid color background, or set the hint to the
-appropriate solid color value. You can do this from code (see
-{@link android.widget.AbsListView#setCacheColorHint(int)}) or preferably from
-XML, by using the <code>android:cacheColorHint</code> attribute. To disable the
-optimization, simply use the transparent color <code>#00000000</code>. The
-following screenshot shows a list with
-<code>android:cacheColorHint="#00000000"</code> set in the XML layout file:</p>
-
-<div style="text-align: center;"><img src="images/list_fade_4.png" alt="Fade on a custom background"></div>
-
-<p>As you can see, the fade works perfectly against the custom wooden
-background. The cache color hint feature is interesting because it
-shows how optimizations can make your life more difficult in
-some situations. In this particular case, however, the benefit of the
-default behavior outweighs the added complexity..</p>
diff --git a/docs/html/resources/articles/live-folders.jd b/docs/html/resources/articles/live-folders.jd
deleted file mode 100644
index aeab9974c1c6..000000000000
--- a/docs/html/resources/articles/live-folders.jd
+++ /dev/null
@@ -1,170 +0,0 @@
-page.title=Live Folders
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>Live folders, introduced in Android 1.5 (API Level 3), let you display any source of data
-on the Home screen without forcing the user to launch an application. A live
-folder is simply a real-time view of a {@link android.content.ContentProvider}.
-As such, a live folder can be used to display all of the user's contacts or
-bookmarks, email, playlists, an RSS feed, and so on. The possibilities are
-endless! </p>
-
-<p>The platform includes several standard folders for displaying contacts. For
-instance, the screenshot below shows the content of the live folders that
-displays all contacts with a phone number:</p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 267px; height: 400px;" src="images/contacts.png" alt="" id="BLOGGER_PHOTO_ID_5323287788220889218" border="0">
-
-<p>If a contacts sync happens in the background while the user is browsing this live
-folder, the user will see the change happen in real-time. Live folders are not
-only useful, but they are also easy to add to to your application and data.
-
-This articles shows how to add a live folder to an example application called
-Shelves. To better understand how live folders work, you can <a
-href="http://code.google.com/p/shelves">download the source code of the
-application</a> and modify it by following the instructions below.</p>
-
-<p>To give the user the option to create a new live folder for an application,
-you first need to create a new activity with an intent filter whose action is
-<code>android.intent.action.CREATE_LIVE_FOLDER</code>. To do so, simply open
-<code>AndroidManifest.xml</code> and add something similar to this:</p>
-
-<pre>&lt;activity
- android:name=".activity.BookShelfLiveFolder"
- android:label="BookShelf"&gt;
- &lt;intent-filter&gt;
- &lt;action android:name="android.intent.action.CREATE_LIVE_FOLDER" /&gt;
- &lt;category android:name="android.intent.category.DEFAULT" /&gt;
- &lt;/intent-filter&gt;
-&lt;/activity&gt;</pre>
-
-<p>The label and icon of this activity are what the user will see on the Home
-screen when choosing a live folder to create:</p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 267px; height: 400px;" src="images/device_002.png" alt="" id="BLOGGER_PHOTO_ID_5323289217773103922" border="0">
-
-<p>Since you just need an intent filter, it is possible, and sometimes advised,
-to reuse an existing activity. In the case of Shelves, we will create a new
-activity, <code>org.curiouscreature.android.shelves.activity.BookShelfLiveFolder</code>.
-The role of this activity is to send an <code>Intent</code> result to Home
-containing the description of the live folder: its name, icon, display mode and
-content URI. The content URI is very important as it describes what
-<code>ContentProvider</code> will be used to populate the live folder. The code
-of the activity is very simple as you can see here:</p>
-
-<pre>public class BookShelfLiveFolder extends Activity {
- public static final Uri CONTENT_URI = Uri.parse("content://shelves/live_folders/books");
-
- &#64;Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- final Intent intent = getIntent();
- final String action = intent.getAction();
-
- if (LiveFolders.ACTION_CREATE_LIVE_FOLDER.equals(action)) {
- setResult(RESULT_OK, createLiveFolder(this, CONTENT_URI,
- "Books", R.drawable.ic_live_folder));
- } else {
- setResult(RESULT_CANCELED);
- }
-
- finish();
- }
-
- private static Intent createLiveFolder(Context context, Uri uri, String name, int icon) {
- final Intent intent = new Intent();
-
- intent.setData(uri);
- intent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_NAME, name);
- intent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_ICON,
- Intent.ShortcutIconResource.fromContext(context, icon));
- intent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_DISPLAY_MODE, LiveFolders.DISPLAY_MODE_LIST);
-
- return intent;
- }
-}</pre>
-
-<p>This activity, when invoked with the<code>ACTION_CREATE_LIVE_FOLDER</code>
-intent, returns an intent with a URI,
-<code>content://shelves/live_folders/books</code>, and three extras to describe
-the live folder. There are other extras and constants you can use and you should
-refer to the documentation of <code>android.provider.LiveFolders</code> for more
-details. When Home receives this intent, a new live folder is created on the
-user's desktop, with the name and icon you provided. Then, when the user clicks
-on the live folder to open it, Home queries the content provider referenced by
-the provided URI.</p>
-
-<p>Live folders' content providers must obey specific naming rules. The
-<code>Cursor</code> returned by the <code>query()</code> method must have at
-least two columns named <code>LiveFolders._ID</code> and
-<code>LiveFolders.NAME</code>. The first one is the unique identifier of each
-item in the live folder and the second one is the name of the item. There are
-other column names you can use to specify an icon, a description, the intent to
-associate with the item (fired when the user clicks that item), etc. Again,
-refer to the documentation of <code>android.provider.LiveFolders</code> for more
-details.</p><p>In our example, all we need to do is modify the existing provider
-in Shelves called
-<code>org.curiouscreature.android.shelves.provider.BooksProvider</code>. First,
-we need to modify the <code>URI_MATCHER</code> to recognize our
-<code>content://shelves/live_folders/books</code> content URI:</p>
-
-<pre>private static final int LIVE_FOLDER_BOOKS = 4;
-// ...
-URI_MATCHER.addURI(AUTHORITY, "live_folders/books", LIVE_FOLDER_BOOKS);</pre>
-
-<p>Then we need to create a new projection map for the cursor. A projection map
-can be used to "rename" columns. In our case, we will replace
-<code>BooksStore.Book._ID</code>, <code>BooksStore.Book.TITLE</code> and
-<code>BooksStore.Book.AUTHORS</code> with <code>LiveFolders._ID</code>,
-<code>LiveFolders.TITLE</code> and <code>LiveFolders.DESCRIPTION</code>:</p>
-
-<pre>private static final HashMap&lt;string, string=""&gt; LIVE_FOLDER_PROJECTION_MAP;
-static {
- LIVE_FOLDER_PROJECTION_MAP = new HashMap&lt;string, string=""&gt;();
- LIVE_FOLDER_PROJECTION_MAP.put(LiveFolders._ID, BooksStore.Book._ID +
- " AS " + LiveFolders._ID);
- LIVE_FOLDER_PROJECTION_MAP.put(LiveFolders.NAME, BooksStore.Book.TITLE +
- " AS " + LiveFolders.NAME);
- LIVE_FOLDER_PROJECTION_MAP.put(LiveFolders.DESCRIPTION, BooksStore.Book.AUTHORS +
- " AS " + LiveFolders.DESCRIPTION);
-}</pre>
-
-<p>Because we are providing a title and a description for each row, Home will
-automatically display each item of the live folder with two lines of text.
-Finally, we implement the <code>query()</code> method by supplying our
-projection map to the SQL query builder:</p>
-
-<pre>public Cursor query(Uri uri, String[] projection, String selection,
- String[] selectionArgs, String sortOrder) {
-
- SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
-
- switch (URI_MATCHER.match(uri)) {
- // ...
- case LIVE_FOLDER_BOOKS:
- qb.setTables("books");
- qb.setProjectionMap(LIVE_FOLDER_PROJECTION_MAP);
- break;
- default:
- throw new IllegalArgumentException("Unknown URI " + uri);
- }
-
- SQLiteDatabase db = mOpenHelper.getReadableDatabase();
- Cursor c = qb.query(db, projection, selection, selectionArgs, null, null, BooksStore.Book.DEFAULT_SORT_ORDER);
- c.setNotificationUri(getContext().getContentResolver(), uri);
-
- return c;
-}</pre>
-
-<p>You can now compile and deploy the application, go to the Home screen and
-try to add a live folder. You can add a books live folder to your Home screen
-and when you open it, see the list of all of your books, with their
-titles and authors, and all it took was a few lines of code:</p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 267px; height: 400px;" src="images/device.png" alt="" id="BLOGGER_PHOTO_ID_5323293545495859234" border="0"></p>
-
-<p>The live folders API is extremely simple and relies only on intents and
-content URI. If you want to see more examples of live folders
-implementation, you can read the source code of the <a href="http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;a=tree;h=refs/heads/cupcake;hb=cupcake">Contacts application</a> and of the <a href="http://android.git.kernel.org/?p=platform/packages/providers/ContactsProvider.git;a=tree;h=refs/heads/cupcake;hb=cupcake">Contacts provider</a>.</p><p>You can also download the result of our exercise, the <a href="http://jext.free.fr/CupcakeShelves.zip">modified version of Shelves with live folders support</a>.</p> \ No newline at end of file
diff --git a/docs/html/resources/articles/live-wallpapers.jd b/docs/html/resources/articles/live-wallpapers.jd
deleted file mode 100644
index 0692a626f766..000000000000
--- a/docs/html/resources/articles/live-wallpapers.jd
+++ /dev/null
@@ -1,102 +0,0 @@
-page.title=Live Wallpapers
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-
-<div id="qv-wrapper">
-<div id="qv">
-
- <h2>See also</h2>
- <ol>
- <li><a href="{@docRoot}resources/samples/CubeLiveWallpaper/index.html">Live Wallpaper
-sample</a></li>
- </ol>
-
-</div>
-</div>
-
-<p>Starting with Android 2.1 (API Level 7), users can now enjoy <em>live
-wallpapers</em> &mdash; richer, animated, interactive backgrounds &mdash; on
-their home screens. A live wallpaper is very similar to a normal Android
-application and has access to all the facilities of the platform: SGL (2D
-drawing), OpenGL (3D drawing), GPS, accelerometers, network access, etc. The
-live wallpapers included on Nexus One demonstrate the use of some of these APIs
-to create fun and interesting user experiences. For instance, the Grass
-wallpaper uses the phone's location to compute sunrise and sunset times in order
-to display the appropriate sky.</p>
-
-<img src="images/live_wallpapers_small.png" style="align:center" />
-
-<p>Creating your own live wallpaper is easy, especially if you have had
-previous experience with {@link android.view.SurfaceView} or {@link
-android.graphics.Canvas}.
-To learn how to create a live wallpaper, you should check out the <a
-href="../samples/CubeLiveWallpaper/index.html">CubeLiveWallpaper sample code</a>.</p>
-
-<p>In terms of implementation, a live wallpaper is very similar to a {@link android.app.Service}.
-The only difference is the addition of a new method, {@link
-android.service.wallpaper.WallpaperService#onCreateEngine()}, whose goal is to create a {@link
-android.service.wallpaper.WallpaperService.Engine}. The engine is responsible for
-handling the lifecycle and drawing of a wallpaper. The system provides a surface
-on which you can draw, just like you would with a {@link android.view.SurfaceView}.
-Drawing a wallpaper can be very expensive so you should optimize your code
-as much as possible to avoid using too much CPU, not only for battery life
-but also to avoid slowing down the rest of the system. That is also why the
-most important part of the lifecycle of a wallpaper is when it becomes visible, as indicated
-by a call to {@link android.service.wallpaper.WallpaperService.Engine#onVisibilityChanged
-onVisibilityChanged()}.
-When invisible, such as when the user launches an application that covers
-the home screen, a wallpaper must stop all activity.</p>
-
-<p>The engine can also implement several methods to interact with the user
-or the home application. For instance, if you want your wallpaper to scroll
-along when the user swipes from one home screen to another, you can use
-{@link android.service.wallpaper.WallpaperService.Engine#onOffsetsChanged
-onOffsetsChanged()}.
-To react to touch events, simply implement {@link
-android.service.wallpaper.WallpaperService.Engine#onTouchEvent onTouchEvent()}.
-Finally, applications can send arbitrary commands to the live wallpaper.
-Currently, only the standard home application sends commands to the
-{@link android.service.wallpaper.WallpaperService.Engine#onCommand onCommand()}
-method of the live wallpaper:</p>
-
-<ul>
-<li><code>android.wallpaper.tap</code>: When the user taps an empty space
-on the workspace. This command is interpreted by the Nexus and Water live
-wallpapers to make the wallpaper react to user interaction. For instance,
-if you tap an empty space on the Water live wallpaper, new ripples appear
-under your finger.</li>
-<li><code>android.home.drop</code>: When the user drops an icon or a widget
-on the workspace. This command is also interpreted by the Nexus and Water
-live wallpapers.</li>
-</ul>
-
-<p>If you are developing a live wallpaper, remember that the feature is
-supported only on Android 2.1 (API level 7) and higher versions of the platform.
-To ensure that your application can only be installed on devices that support
-live wallpapers, remember to add the following to the application's manifest
-before publishing to Google Play:</p>
-
-<ul>
-<li><code>&lt;uses-sdk android:minSdkVersion="7" /&gt;</code>, which indicates
-to Google Play and the platform that your application requires Android 2.1 or
-higher. For more information, see the <a href="{@docRoot}guide/appendix/api-levels.html">API
-Levels</a> and the documentation for the
-<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
-element.</li>
-<li><code>&lt;uses-feature android:name="android.software.live_wallpaper" /&gt;</code>,
-which tells Google Play that your application includes a live wallpaper
-Google Play uses this feature as a filter, when presenting users lists of
-available applications. When you declaring this feature, Google Play
-displays your application only to users whose devices support live wallpapers,
-while hiding it from other devices on which it would not be able to run. For
-more information, see the documentation for the
-<a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
-&lt;uses-feature&gt;</a>
-element.</li>
-</ul>
-
-<p>Many great live wallpapers are already available on Google Play and
-we can't wait to see more!</p>
diff --git a/docs/html/resources/articles/multitasking-android-way.jd b/docs/html/resources/articles/multitasking-android-way.jd
deleted file mode 100644
index 0dc862728aa3..000000000000
--- a/docs/html/resources/articles/multitasking-android-way.jd
+++ /dev/null
@@ -1,103 +0,0 @@
-page.title=Multitasking the Android Way
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-
- <h2>See also</h2>
- <ol>
- <li><a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a></li>
- <li><a href="{@docRoot}guide/topics/fundamentals/services.html">Services</a></li>
- </ol>
-
- <h2>Key classes</h2>
- <ol>
- <li>{@link android.app.Service}</li>
- <li>{@link android.content.BroadcastReceiver}</li>
- </ol>
-
-</div>
-</div>
-
-<p>Android is fairly unique in the ways it allows multiple applications to run at the same time. Developers coming from a different platform may find the way it operates surprising. Understanding its behavior is important for designing applications that will work well and integrate seamlessly with the rest of the Android platform. This article covers the reasons for Android's multitasking design, its impact on how applications work, and how you can best take advantage of Android's unique features.</p>
-<h3>Design considerations</h3>
-<p>Mobile devices have technical limitations and user experience requirements not present in desktop or web systems. Here are the four key constraints we were working under as we designed Android's multitasking:</p>
-<ul>
- <li>
- <p>We did not want to require that users close applications when "done" with them. Such a usage pattern does not work well in a mobile environment, where usage tends to involve repeated brief contact with a wide variety of applications throughout the day.</p>
- </li>
- <li>
- <p>Mobile devices don't have the luxury of swap space, so have fairly hard limits on memory use. Robert Love has <a href="http://blog.rlove.org/2010/04/why-ipad-and-iphone-dont-support.html">a very good article</a> covering the topic.</p>
- </li>
- <li>
- <p>Application switching on a mobile device is extremely critical; we target significantly less than 1 second to launch a new application. This is especially important when the user is switching between a few applications, such as switching to look at a new SMS message while watching a video, and then returning to that video. A noticeable wait in such situations will quickly make users hate you.</p>
- </li>
- <li>
- <p>The available APIs must be sufficient for writing the built-in Google applications, as part of our "all applications are created equal" philosophy. This means background music playback, data syncing, GPS navigation, and application downloading must be implemented with the same APIs that are available to third party developers.</p>
- </li>
-</ul>
-<p>The first two requirements highlight an interesting conflict. We don't want users to worry about closing their apps, but rather make it appear that all of the applications are always running. At the same time, mobile devices have hard limits on memory use, so that a system will degrade or even start failing very quickly as it needs more RAM than is available; a desktop computer, with swap, in contrast will simply start slowing down as it needs to page RAM to its swap space. These competing constraints were a key motivation for Android's design.</p>
-<h3>When does an application "stop"?</h3>
-<p>A common misunderstanding about Android multitasking is the difference between a process and an application. In Android these are not tightly coupled entities: applications may seem present to the user without an actual process currently running the app; multiple applications may share processes, or one application may make use of multiple processes depending on its needs; the process(es) of an application may be kept around by Android even when that application is not actively doing something.</p>
-<p>The fact that you can see an application's process "running" does not mean the application is running or doing anything. It may simply be there because Android needed it at some point, and has decided that it would be best to keep it around in case it needs it again. Likewise, you may leave an application for a little bit and return to it from where you left off, and during that time Android may have needed to get rid of the process for other things.</p>
-<p>A key to how Android handles applications in this way is that processes don't shut down cleanly. When the user leaves an application, its process is kept around in the background, allowing it to continue working (for example downloading web pages) if needed, and come immediately to the foreground if the user returns to it. If a device never runs out of memory, then Android will keep all of these processes around, truly leaving all applications "running" all of the time.</p>
-<p>Of course, there is a limited amount of memory, and to accommodate this Android must decide when to get rid of processes that are not needed. This leads to Android's <a href="{@docRoot}guide/topics/fundamentals.html#proclife">process lifecycle</a>, the rules it uses to decide how important each process is and thus the next one that should be dropped. These rules are based on both how important a process is for the user's current experience, as well as how long it has been since the process was last needed by the user.</p>
-<p>Once Android determines that it needs to remove a process, it does this brutally, simply force-killing it. The kernel can then immediately reclaim all resources needed by the process, without relying on that application being well written and responsive to a polite request to exit. Allowing the kernel to immediately reclaim application resources makes it a lot easier to avoid serious out of memory situations.</p>
-<p>If a user later returns to an application that's been killed, Android needs a way to re-launch it in the same state as it was last seen, to preserve the "all applications are running all of the time" experience. This is done by keeping track of the parts of the application the user is aware of (the Activities), and re-starting them with information about the last state they were seen in. This last state is generated each time the user leaves that part of the application, not when it is killed, so that the kernel can later freely kill it without depending on the application to respond correctly at that point.</p>
-<p>In some ways, Android's process management can be seen as a form of swap space: application processes represent a certain amount of in-use memory; when memory is low, some processes can be killed (swapped out); when those processes are needed again, they can be re-started from their last saved state (swapped in).</p>
-<h3>Explicitly running in the background</h3>
-<p>So far, we have a way for applications to implicitly do work in the background, as long as the process doesn't get killed by Android as part of its regular memory management. This is fine for things like loading web pages in the background, but what about features with harder requirements? Background music playback, data synchronization, location tracking, alarm clocks, etc.</p>
-<p/>
-<p>For these tasks, the application needs a way to tell Android "I would explicitly like to run at this point." There are two main facilities available to applications for this, represented by two kinds of components they can publish in their manifest: <span style="font-style:italic;">broadcast receivers</span> and <span style="font-style:italic;">services</span>.</p>
-<h4>Broadcast Receivers</h4>
-<p>A BroadcastReceiver allows an application to run, for a brief amount of time, in the background as a result of something else happening. It can be used in many ways to build higher-level facilities: for example the AlarmManager allows an application to have a broadcast sent at a certain time in the future, and the LocationManager can send a broadcast when it detects interesting changes in location. Because information about the receiver is part of an application's manifest, Android can find and launch the application even if it isn't running; of course if it already has its process available in the background, the broadcast can very efficiently be directly dispatched to it.</p>
-<p>When handling a broadcast, the application is given a fixed set of time (currently 10 seconds) in which to do its work. If it doesn't complete in that time, the application is considered to be misbehaving, and its process immediately tossed into the background state to be killed for memory if needed.</p>
-<p>Broadcast receivers are great for doing small pieces of work in response to an external stimulus, such as posting a notification to the user after being sent a new GPS location report. They are very lightweight, since the application's process only needs to be around while actively receiving the broadcast. Because they are active for a deterministic amount of time, fairly strong guarantees can be made about not killing their process while running. However they are not appropriate for anything of indeterminate length, such as networking.</p>
-<h4>Services</h4>
-<p>A Service allows an application to implement longer-running background operations. There are actually a lot of other functions that services provide, but for the discussion here their fundamental purpose is for an application to say "hey I would like to continue running even while in the background, until I say I am done." An application controls when its service runs by explicitly starting and stopping the service.</p>
-<p>While services do provide a rich client-server model, its use is optional. Upon starting an application's services, Android simply instantiates the component in the application's process to provide its context. How it is used after that is up to the application: it can put all of the needed code inside of the service itself without interacting with other parts of the application, make calls on other singleton objects shared with other parts of the app, directly retrieve the Service instance from elsewhere if needed, or run it in another process and do a full-blown RPC protocol if that is desired.</p>
-<p>Process management for services is different than broadcast receivers, because an unbounded number of services can ask to be running for an unknown amount of time. There may not be enough RAM to have all of the requesting services run, so as a result no strong guarantees are made about being able to keep them running.</p>
-<p>If there is too little RAM, processes hosting services will be immediately killed like background processes are. However, if appropriate, Android will remember that these services wish to remain running, and restart their process at a later time when more RAM is available. For example, if the user goes to a web page that requires large amounts of RAM, Android may kill background service processes like sync until the browser's memory needs go down.</p>
-<p>Services can further negotiate this behavior by requesting they be considered "foreground." This places the service in a "please don't kill" state, but requires that it include a notification to the user about it actively running. This is useful for services such as background music playback or car navigation, which the user is actively aware of; when you're playing music and using the browser, you can always see the music-playing glyph in the status bar. Android won't try to kill these services, but as a trade-off, ensures the user knows about them and is able to explicitly stop them when desired.</p>
-<h3>The value of generic components</h3>
-<p>Android's generic broadcast receiver and service components allow developers to create a wide variety of efficient background operations, including things that were never originally considered. In Android 1.0 they were used to implement nearly all of the background behavior that the built-in and proprietary Google apps provided:</p>
-<ul>
- <li>
- Music playback runs in a service to allow it to continue operating after the user leaves the music application.
- </li>
- <li>
- The alarm clock schedules a broadcast receiver with the alarm manager, to go off at the next set alarm time.
- </li>
- <li>
- The calendar application likewise schedules an alarm to display or update its notification at the appropriate time for the next calendar event.
- </li>
- <li>
- Background file download is implemented a service that runs when there are any downloads to process.
- </li>
- <li>
- The e-mail application schedules an alarm to wake up a service at regular intervals that looks for and retrieves any new mail.
- </li>
- <li>
- The Google applications maintain a service to receive push notifications from the network; it in turn sends broadcasts to individual apps when it is told that they need to do things like synchronize contacts.</p>
- </li>
-</ul>
-<p>As the platform has evolved, these same basic components have been used to implement many of the major new developer features:
-<ul>
- <li>
- Input methods are implemented by developers as a Service component that Android manages and works with to display as the current IME.
- </li>
- <li>
- Application widgets are broadcast receivers that Android sends broadcasts to when it needs to interact with them. This allows app widgets to be quite lightweight, by not needing their application's process remain running.
- </li>
- <li>
- Accessibility features are implemented as services that Android keeps running while in use and sends appropriate information to about user interactions.
- </li>
- <li>
- Sync adapters introduced in Android 2.0 are services that are run in the background when a particular data sync needs to be performed.
- </li>
- <li>
- Live wallpapers are a service started by Android when selected by the user.
- </li>
-</ul>
diff --git a/docs/html/resources/articles/on-screen-inputs.jd b/docs/html/resources/articles/on-screen-inputs.jd
deleted file mode 100644
index 6a028c8ea231..000000000000
--- a/docs/html/resources/articles/on-screen-inputs.jd
+++ /dev/null
@@ -1,265 +0,0 @@
-page.title=Onscreen Input Methods
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-
-<div id="qv-wrapper">
-<div id="qv">
-
- <h2>See also</h2>
- <ol>
- <li><a href="{@docRoot}resources/articles/creating-input-method.html">Creating an Input
-Method</a></li>
- <li><a href="{@docRoot}resources/samples/SoftKeyboard/index.html">Soft Keyboard sample</a></li>
- </ol>
-
-</div>
-</div>
-
-
-<p>Starting from Android 1.5, the Android platform offers an Input Method
-Framework (IMF) that lets you create on-screen input methods such as software
-keyboards. This article provide an overview of what Android input method editors
-(IMEs) are and what an application needs to do to work well with them. The IMF
-is designed to support new classes of Android devices, such as those without
-hardware keyboards, so it is important that your application works well with the
-IMF and offers a great experience for users.</p>
-
-<h3>What is an input method?</h3>
-
-<p>The Android IMF is designed to support a variety of IMEs, including soft
-keyboard, hand-writing recognizers, and hard keyboard translators. Our focus,
-however, will be on soft keyboards, since this is the kind of input method that
-is currently part of the platform.</p>
-
-<p>A user will usually access the current IME by tapping on a text view to
-edit, as shown here in the home screen:</p>
-
-<img style="width: 320px; height: 480px; margin-right: 10px;" src="images/on-screen-inputs_004.png">
-<img style="width: 320px; height: 480px;" src="images/on-screen-inputs.png">
-
-<p>The soft keyboard is positioned at the bottom of the screen over the
-application's window. To organize the available space between the application
-and IME, we use a few approaches; the one shown here is called <em>pan and
-scan</em>, and simply involves scrolling the application window around so that
-the currently focused view is visible. This is the default mode, since it is the
-safest for existing applications.</p>
-
-<p>Most often the preferred screen layout is a <em>resize</em>, where the
-application's window is resized to be entirely visible. An example is shown
-here, when composing an e-mail message:</p>
-
-<img style="width: 320px; height: 480px; margin-right: 10px;" src="images/on-screen-inputs_005.png">
-<img style="width: 320px; height: 480px;" src="images/on-screen-inputs_003.png">
-
-<p>The size of the application window is changed so that none of it is hidden by
-the IME, allowing full access to both the application and IME. This of course
-only works for applications that have a resizeable area that can be reduced to
-make enough space, but the vertical space in this mode is actually no less than
-what is available in landscape orientation, so very often an application can
-already accommodate it.</p>
-
-<p>The final major mode is <em>fullscreen</em> or <em>extract</em>
-mode. This is used when the IME is too large to reasonably share space
-with the underlying application. With the standard IMEs, you will only
-encounter this situation when the screen is in a landscape orientation,
-although other IMEs are free to use it whenever they desire. In this
-case the application window is left as-is, and the IME simply displays
-fullscreen on top of it, as shown here:</p>
-
-<img style="width: 480px; height: 320px; margin-right: 10px; margin-bottom: 10px;" src="images/on-screen-inputs_006.png">
-<img style="width: 480px; height: 320px;" src="images/on-screen-inputs_002.png">
-
-<p>Because the IME is covering the application, it has its own editing area,
-which shows the text actually contained in the application. There are also some
-limited opportunities the application has to customize parts of the IME (the
-"done" button at the top and enter key label at the bottom) to improve the user
-experience.</p>
-
-<h3>Basic XML attributes for controlling IMEs</h3>
-
-<p>There are a number of things the system does to try to help existing
-applications work with IMEs as well as possible, such as:</p>
-
-<ul>
-<li>Use pan and scan mode by default, unless it can reasonably guess that
-resize mode will work by the existence of lists, scroll views, etc.</li>
-<li>Analyze the various existing TextView attributes to guess at the kind of
-content (numbers, plain text, etc) to help the soft keyboard display an
-appropriate key layout.</li>
-<li>Assign a few default actions to the fullscreen IME, such as "next field"
-and "done".</li>
-</ul>
-
-<p>There are also some simple things you can do in your application that will
-often greatly improve its user experience. Except where explicitly mentioned,
-these will work in any Android platform version, even those previous to Android
-1.5 (since they will simply ignore these new options).</p>
-
-<h4>Specifying each EditText control's input type</h4>
-
-<p>The most important thing for an application to do is to use the new
-<code>android:inputType</code>
-attribute on each <code>EditText</code>. The attribute provides much richer
-information
-about the text content. This attribute actually replaces many existing
-attributes (<code>android:</code><code>password</code>,
-<code>android:</code><code>singleLine</code>,
-<code>android:</code><code>numeric</code>,
-<code>android:</code><code>phoneNumber</code>,
-<code>android:</code><code>capitalize</code>,
-<code>android:</code><code>autoText</code>, and
-<code>android:</code><code>editable</code>). If you specify the older attributes
-and the new <code>android:inputType</code> attribute, the system uses
-<code>android:inputType</code> and ignores the others. </p>
-
-<p>The <code>android:inputType</code> attribute has three pieces:</p>
-
-<ul>
-<li>The <em>class</em> is the overall interpretation of characters. The
-currently supported classes are <code>text</code> (plain text),
-<code>number</code> (decimal number), <code>phone</code> (phone number), and
-<code>datetime</code> (a date or time).</li>
-<li>The <em>variation</em> is a further refinement on the class. In the
-attribute you will normally specify the class and variant together, with the
-class as a prefix. For example, <code>textEmailAddress</code> is a text field
-where the user will enter something that is an e-mail address (foo@bar.com) so
-the key layout will have an '@' character in easy access, and
-<code>numberSigned</code> is a numeric field with a sign. If only the class is
-specified, then you get the default/generic variant.</li>
-<li>Additional <em>flags</em> can be specified that supply further refinement.
-These flags are specific to a class. For example, some flags for the
-<code>text</code> class are <code>textCapSentences</code>,
-<code>textAutoCorrect</code>, and <code>textMultiline</code>.</li>
-</ul>
-
-<p>As an example, here is the new EditText for the IM application's message text view:</p>
-
-<pre> &lt;EditText android:id="@+id/edtInput"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
- android:imeOptions="actionSend|flagNoEnterAction"
- android:maxLines="4"
- android:maxLength="2000"
- android:hint="@string/compose_hint"/&gt;</pre>
-
-<p>A full description of all of the input types can be found in the
-documentation. It is important to make use of the correct input types that are
-available, so that the soft keyboard can use the optimal keyboard layout for the
-text the user will be entering.</p>
-
-<h4>Enabling resize mode and other window features</h4>
-
-<p>The second most important thing for your app to do is to specify the overall
-behavior of your window in relation to the input method. The most visible aspect
-of this is controlling resize vs. pan and scan mode, but there are other things
-you can do as well to improve your user experience.</p>
-
-<p>You will usually control this behavior through the
-<code>android:windowSoftInputMode</code> attribute on each
-<code>&lt;activity&gt;</code> definition in your
-<code>AndroidManifest.xml</code>. Like the input type, there are a couple
-different pieces of data that can be specified here by combining them
-together:</p>
-
-<ul>
-<li>The window adjustment mode is specified with either
-<code>adjustResize</code> or <code>adjustPan</code>. It is highly recommended
-that you always specify one or the other.</li>
-<li>You can further control whether the IME will be shown automatically when
-your activity is displayed and other situations where the user moves to it. The
-system won't automatically show an IME by default, but in some cases it can be
-convenient for the user if an application enables this behavior. You can request
-this with <code>stateVisible</code>. There are also a number of other state
-options for finer-grained control that you can find in the documentation.</li>
-</ul>
-
-<p>A typical example of this field can be see in the edit contact activity,
-which ensures it is resized and automatically displays the IME for the user:</p>
-
-<pre> &lt;activity name="EditContactActivity"
- android:windowSoftInputMode="stateVisible|adjustResize"&gt;
- ...
- &lt;/activity&gt;</pre>
-
-<p class="note"><strong>Note:</strong>Starting from Android 1.5 (API Level 3),
-the platform offers a new method,
-{@link android.view.Window#setSoftInputMode(int mode)},
-that non-Activity windows can use to control their behavior. Calling this method
-in your will make your application incompatible with previous versions of the
-Android platform.</p>
-
-<h4>Controlling the action buttons</h4>
-
-<p>The final customization we will look at is the "action" buttons in the IME.
-There are currently two types of actions:</p>
-
-<ul>
-<li>The enter key on a soft keyboard is typically bound to an action when not
-operating on a mult-line edit text. For example, on the G1 pressing the hard
-enter key will typically move to the next field or the application will
-intercept it to execute an action; with a soft keyboard, this overloading of the
-enter key remains, since the enter button just sends an enter key event.</li>
-<li>When in fullscreen mode, an IME may also put an additional action button to
-the right of the text being edited, giving the user quick access to a common
-application operation.</li>
-</ul>
-
-<p>These options are controlled with the <code>android:imeOptions</code>
-attribute on <code>TextView</code>. The value you supply here can be any
-combination of:</p>
-
-<ul>
-<li>One of the pre-defined action constants (<code>actionGo</code>,
-<code>actionSearch</code>, <code>actionSend</code>, <code>actionNext</code>,
-<code>actionDone</code>). If none of these are specified, the system will infer
-either <code>actionNext</code> or <code>actionDone</code> depending on whether
-there is a focusable field after this one; you can explicitly force no action
-with <code>actionNone</code>.</li>
-<li>The <code>flagNoEnterAction</code> option tells the IME that the action
-should <em>not</em> be available on the enter key, even if the text itself is
-not multi-line. This avoids having unrecoverable actions like (send) that can be
-accidentally touched by the user while typing.</li>
-<li>The <code>flagNoAccessoryAction</code> removes the action button from the
-text area, leaving more room for text.</li><li>The <code>flagNoExtractUi</code>
-completely removes the text area, allowing the application to be seen behind
-it.</li>
-</ul>
-
-<p>The previous IM application message view also provides an example of an
-interesting use of <code>imeOptions</code>, to specify the send action but not
-let it be shown on the enter key:</p>
-
-<pre>android:imeOptions="actionSend|flagNoEnterAction"</pre>
-
-<h3>APIs for controlling IMEs</h3>
-
-<p>For more advanced control over the IME, there are a variety of new APIs you
-can use. Unless special care is taken (such as by using reflection), using these
-APIs will cause your application to be incompatible with previous versions of
-Android, and you should make sure you specify
-<code>android:minSdkVersion="3"</code> in your manifest. For more information,
-see the documentation for the <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk&gt;</a
-> manifest element.</p>
-
-<p>The primary API is the new <code>android.view.inputmethod.InputMethodManager</code> class, which you can retrieve with <code>Context.getSystemService()</code>.
-It allows you to interact with the global input method state, such as
-explicitly hiding or showing the current IME's input area.</p>
-
-<p>There are also new window flags controlling input method interaction, which you can control through the existing <code>Window.addFlags()</code> method and new <code>Window.setSoftInputMode()</code> method. The <code>PopupWindow</code>
-class has grown corresponding methods to control these options on its
-window. One thing in particular to be aware of is the new <code>WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM</code> constant, which is used to control whether a window is on top of or behind the current IME.</p>
-
-<p>Most of the interaction between an active IME and application is done through the <code>android.view.inputmethod.InputConnection</code>
-class. This is the API an application implement, which an IME calls to
-perform the appropriate edit operations on the application. You won't
-normally need to worry about this, since <code>TextView</code> provides its own implementation for itself.</p>
-
-<p>There are also a handful of new <code>View</code> APIs, the most important of these being<code> onCreateInputConnection()</code> which creates a new <code>InputConnection</code> for an IME (and fills in an <code>android.view.inputmethod.EditorInfo</code>
-structure with your input type, IME options, and other data); again,
-most developers won't need to worry about this, since TextView takes
-care of it for you.</p> \ No newline at end of file
diff --git a/docs/html/resources/articles/painless-threading.jd b/docs/html/resources/articles/painless-threading.jd
deleted file mode 100644
index fea7ee21d57e..000000000000
--- a/docs/html/resources/articles/painless-threading.jd
+++ /dev/null
@@ -1,149 +0,0 @@
-page.title=Painless Threading
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>This article discusses the threading model used by Android applications and how applications can ensure best UI performance by spawning worker threads to handle long-running operations, rather than handling them in the main thread. The article also explains the API that your application can use to interact with Android UI toolkit components running on the main thread and spawn managed worker threads. </p>
-
-<h3>The UI thread</h3>
-
-<p>When an application is launched, the system creates a thread called
-"main" for the application. The main thread, also called the <em>UI
-thread</em>, is very important because it is in charge of dispatching the
-events to the appropriate widgets, including drawing events.
-It is also the thread where your application interacts with running
-components of the Android UI toolkit. </p>
-
-<p>For instance, if you touch the a button on screen, the UI thread dispatches
-the touch event to the widget, which in turn sets its pressed state and
-posts an invalidate request to the event queue. The UI thread dequeues
-the request and notifies the widget to redraw itself.</p>
-
-<p>This single-thread model can yield poor performance unless your application
-is implemented properly. Specifically, if everything is happening in a single
-thread, performing long operations such as network access or database
-queries on the UI thread will block the whole user interface. No event
-can be dispatched, including drawing events, while the long operation
-is underway. From the user's perspective, the application appears hung.
-Even worse, if the UI thread is blocked for more than a few seconds
-(about 5 seconds currently) the user is presented with the infamous "<a href="http://developer.android.com/guide/practices/design/responsiveness.html">application not responding</a>" (ANR) dialog.</p>
-
-<p>If you want to see how bad this can look, write a simple application
-with a button that invokes <code>Thread.sleep(2000)</code> in its
-<a href="http://developer.android.com/reference/android/view/View.OnClickListener.html">OnClickListener</a>.
-The button will remain in its pressed state for about 2 seconds before
-going back to its normal state. When this happens, it is very easy for
-the user to <em>perceive</em> the application as slow.</p>
-
-<p>To summarize, it's vital to the responsiveness of your application's UI to
-keep the UI thread unblocked. If you have long operations to perform, you should
-make sure to do them in extra threads (<em>background</em> or <em>worker</em>
-threads). </p>
-
-<p>Here's an example of a click listener downloading an image over the
-network and displaying it in an <a href="http://developer.android.com/reference/android/widget/ImageView.html">ImageView</a>:</p>
-
-<pre class="prettyprint">public void onClick(View v) {
- new Thread(new Runnable() {
- public void run() {
- Bitmap b = loadImageFromNetwork();
- mImageView.setImageBitmap(b);
- }
- }).start();
-}</pre>
-
-<p>At first, this code seems to be a good solution to your problem, as it does
-not block the UI thread. Unfortunately, it violates the single-threaded model
-for the UI: the Android UI toolkit is <em>not thread-safe</em> and must always
-be manipulated on the UI thread. In this piece of code above, the
-<code>ImageView</code> is manipulated on a worker thread, which can cause really
-weird problems. Tracking down and fixing such bugs can be difficult and
-time-consuming.</p>
-
-<p>Android offers several ways to access the UI
-thread from other threads. You may already be familiar with some of
-them but here is a comprehensive list:</p>
-
-<ul>
-<li>{@link android.app.Activity#runOnUiThread(java.lang.Runnable) Activity.runOnUiThread(Runnable)}</li>
-<li>{@link android.view.View#post(java.lang.Runnable) View.post(Runnable)}</li>
-<li>{@link android.view.View#postDelayed(java.lang.Runnable, long) View.postDelayed(Runnable, long)}</li>
-<li>{@link android.os.Handler}</li>
-</ul>
-
-<p>You can use any of these classes and methods to correct the previous code example:</p>
-
-<pre class="prettyprint">public void onClick(View v) {
- new Thread(new Runnable() {
- public void run() {
- final Bitmap b = loadImageFromNetwork();
- mImageView.post(new Runnable() {
- public void run() {
- mImageView.setImageBitmap(b);
- }
- });
- }
- }).start();
-}</pre>
-
-<p>Unfortunately,
-these classes and methods could also tend to make your code more complicated
-and more difficult to read. It becomes even worse when your implement
-complex operations that require frequent UI updates. </p>
-
-<p>To remedy this problem, Android 1.5 and later platforms offer a utility class
-called {@link android.os.AsyncTask}, that simplifies the creation of
-long-running tasks that need to communicate with the user interface.</p>
-
-<p>An <code>AsyncTask</code> equivalent is also available for applications that
-will run on Android 1.0 and 1.1. The name of the class is <a
-href="http://code.google.com/p/shelves/source/browse/trunk/Shelves/src/org/
-curiouscreature/android/shelves/util/UserTask.java">UserTask</a>. It offers the
-exact same API and all you have to do is copy its source code in your
-application.</p>
-
-<p>The goal of <code>AsyncTask</code> is to take care of thread management for
-you. Our previous example can easily be rewritten with
-<code>AsyncTask</code>:</p>
-
-<pre class="prettyprint">public void onClick(View v) {
- new DownloadImageTask().execute("http://example.com/image.png");
-}
-
-private class DownloadImageTask extends AsyncTask&lt;String, Void, Bitmap&gt; {
- protected Bitmap doInBackground(String... urls) {
- return loadImageFromNetwork(urls[0]);
- }
-
- protected void onPostExecute(Bitmap result) {
- mImageView.setImageBitmap(result);
- }
- }</pre>
-
-<p>As you can see, <code>AsyncTask</code> <em>must</em> be used by subclassing
-it. It is also very important to remember that an <code>AsyncTask</code>
-instance has to be created on the UI thread and can be executed only once. You
-can read the <a
-href="http://developer.android.com/reference/android/os/AsyncTask.html">
-AsyncTask documentation</a> for a full understanding on how to use this class,
-but here is a quick overview of how it works:</p>
-
-<ul>
-<li>You can specify the type, using generics, of the parameters, the progress values and the final value of the task</li>
-<li>The method <a href="http://developer.android.com/reference/android/os/AsyncTask.html#doInBackground%28Params...%29">doInBackground()</a> executes automatically on a worker thread</li>
-<li><a href="http://developer.android.com/reference/android/os/AsyncTask.html#onPreExecute%28%29">onPreExecute()</a>, <a href="http://developer.android.com/reference/android/os/AsyncTask.html#onPostExecute%28Result%29">onPostExecute()</a> and <a href="http://developer.android.com/reference/android/os/AsyncTask.html#onProgressUpdate%28Progress...%29">onProgressUpdate()</a> are all invoked on the UI thread</li>
-<li>The value returned by <a href="http://developer.android.com/reference/android/os/AsyncTask.html#doInBackground%28Params...%29">doInBackground()</a> is sent to <a href="http://developer.android.com/reference/android/os/AsyncTask.html#onPostExecute%28Result%29">onPostExecute()</a></li>
-<li>You can call <a href="http://developer.android.com/reference/android/os/AsyncTask.html#publishProgress%28Progress...%29">publishProgress()</a> at anytime in <a href="http://developer.android.com/reference/android/os/AsyncTask.html#doInBackground%28Params...%29">doInBackground()</a> to execute <a href="http://developer.android.com/reference/android/os/AsyncTask.html#onProgressUpdate%28Progress...%29">onProgressUpdate()</a> on the UI thread</li><li>You can cancel the task at any time, from any thread</li>
-</ul>
-
-<p>In addition to the official documentation, you can read several complex examples in the source code of Shelves (<a href="http://code.google.com/p/shelves/source/browse/trunk/Shelves/src/org/curiouscreature/android/shelves/activity/ShelvesActivity.java">ShelvesActivity.java</a> and <a href="http://code.google.com/p/shelves/source/browse/trunk/Shelves/src/org/curiouscreature/android/shelves/activity/AddBookActivity.java">AddBookActivity.java</a>) and Photostream (<a href="http://code.google.com/p/apps-for-android/source/browse/trunk/Photostream/src/com/google/android/photostream/LoginActivity.java">LoginActivity.java</a>, <a href="http://code.google.com/p/apps-for-android/source/browse/trunk/Photostream/src/com/google/android/photostream/PhotostreamActivity.java">PhotostreamActivity.java</a> and <a href="http://code.google.com/p/apps-for-android/source/browse/trunk/Photostream/src/com/google/android/photostream/ViewPhotoActivity.java">ViewPhotoActivity.java</a>). We highly recommend reading the source code of <a href="http://code.google.com/p/shelves/">Shelves</a> to see how to persist tasks across configuration changes and how to cancel them properly when the activity is destroyed.</p>
-
-<p>Regardless of whether or not you use <a href="http://developer.android.com/reference/android/os/AsyncTask.html">AsyncTask</a>,
-always remember these two rules about the single thread model: </p>
-
-<ol>
-<li>Do not block the UI thread, and
-<li>Make sure that you access the Android UI toolkit <em>only</em> on the UI thread.
-</ol>
-
-<p><code>AsyncTask</code> just makes it easier to do both of these things.</p>
diff --git a/docs/html/resources/articles/qsb.jd b/docs/html/resources/articles/qsb.jd
deleted file mode 100644
index 01fb115819eb..000000000000
--- a/docs/html/resources/articles/qsb.jd
+++ /dev/null
@@ -1,169 +0,0 @@
-page.title=Quick Search Box
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-
-<div id="qv-wrapper">
-<div id="qv">
-
- <h2>See also</h2>
- <ol>
- <li><a href="{@docRoot}guide/topics/search/index.html">Search</a></li>
- <li><a href="{@docRoot}resources/samples/SearchableDictionary/index.html">Searchable Dictionary
-sample</a></li>
- </ol>
-
-</div>
-</div>
-
-<div class="figure" style="width:233px">
-<img src="images/qsb_002.png" alt="" height="350" />
-</div>
-
-<p>Starting with Android 1.6, the platform includes support for Quick Search
-Box (QSB), a powerful, system-wide search framework. Quick Search Box makes it
-possible for users to quickly and easily find what they're looking for, both on
-their devices and on the web. It suggests content on your device as you type,
-like apps, contacts, browser history, and music. It also offers results from the
-web search suggestions, local business listings, and other info from
-Google, such as stock quotes, weather, and flight status. All of this is
-available right from the home screen, by tapping on Quick Search Box.</p>
-
-<p>What
-we're most excited about with this new feature is the ability for you,
-the developers, to leverage the QSB framework to provide quicker and
-easier access to the content inside your apps. Your apps can provide
-search suggestions that will surface to users in QSB alongside other
-search results and suggestions. This makes it possible for users to
-access your application's content from outside your application—for
-example, from the home screen.</p>
-
-<p class="note"><strong>Note:</strong> The code fragments in this document are
-related to a sample app called <a
-href="{@docRoot}resources/samples/SearchableDictionary/index.html"
-title="Searchable Dictionary">Searchable Dictionary</a>. The app is
-available for Android 1.6 and later platforms.</p>
-
-<h3>The story before now: searching within your app</h3>
-
-<p>Platform releases versions previous to Android 1.6 already provided a mechanism
-that let you expose search and search suggestions in your app, as described in
-the docs for {@link android.app.SearchManager}. That mechanism has not changed
-and requires the following two things in your
-<code>AndroidManifest.xml</code>:</p>
-
-<p>1) In your <code>&lt;activity&gt;</code>, an intent filter, and a reference
-to a <code>searchable.xml</code> file (described below):</p>
-
-<pre class="prettyprint">&lt;intent-filter&gt;
- &lt;action android:name="android.intent.action.SEARCH" /&gt;
- &lt;category android:name="android.intent.category.DEFAULT" /&gt;
-&lt;/intent-filter&gt;
-
-&lt;meta-data android:name="android.app.searchable"
- android:resource="@xml/searchable" /&gt;</pre>
-
-<p>2) A content provider that can provide search suggestions according to the
-URIs and column formats specified by the
-<a href="{@docRoot}reference/android/app/SearchManager.html#Suggestions">Search Suggestions</a>
-section of the SearchManager docs:</p>
-
-<pre class="prettyprint">&lt;!-- Provides search suggestions for words and their definitions. --&gt;
-&lt;provider android:name="DictionaryProvider"
- android:authorities="dictionary"
- android:syncable="false" /&gt;</pre>
-
-<p>In the <code>searchable.xml</code> file, you specify a few things about how
-you want the search system to present search for your app, including the
-authority of the content provider that provides suggestions for the user as they
-type. Here's an example of the <code>searchable.xml</code> of an Android app
-that provides search suggestions within its own activities:</p>
-
-<pre class="prettyprint">&lt;searchable xmlns:android="http://schemas.android.com/apk/res/android"
- android:label="@string/search_label"
- android:searchSuggestAuthority="dictionary"
- android:searchSuggestIntentAction="android.intent.action.VIEW"&gt;
-&lt;/searchable&gt;</pre>
-
-<p>Note that the <code>android:searchSuggestAuthority</code> attribute refers to
-the authority of the content provider we declared in
-<code>AndroidManifest.xml</code>.</p>
-
-<p>For more details on this, see the
-<a href="{@docRoot}reference/android/app/SearchManager.html#SearchabilityMetadata">Searchability Metadata
-section</a> of the of the SearchManager docs.</p>
-
-<h3>Including your app in Quick Search Box</h3>
-
-<div class="sidebox-wrapper">
-<div class="sidebox">
-<h2>Searchable Dictionary Sample App</h2>
-<p>Quick Search Box provides a really cool way to make it easier and faster for
-users to access your app's content. To help you get your app started with it,
-we've created a sample app that simply provides access to a small dictionary of
-words in QSB. The app is called Searchable Dictionary, and we encourage you to
-<a href="{@docRoot}resources/samples/SearchableDictionary/index.html">check it
-out</a>.</p>
-</div>
-</div>
-
-<p>In Android 1.6, we added a new attribute to the metadata for searchables:
-<code>android:includeInGlobalSearch</code>. By specifying this as
-<code>"true"</code> in your <code>searchable.xml</code>, you allow QSB to pick
-up your search suggestion content provider and include its suggestions along
-with the rest (if the user enables your suggestions from the system search
-settings).</p>
-
-<p>You should also specify a string value for
-<code>android:searchSettingsDescription</code>, which describes to users what
-sorts of suggestions your app provides in the system settings for search.</p>
-
-<pre class="prettyprint">&lt;searchable xmlns:android="http://schemas.android.com/apk/res/android"
- android:label="@string/search_label"
- <span style="background: rgb(255, 255, 0) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">android:searchSettingsDescription="@string/settings_description"</span>
- <span style="background: rgb(255, 255, 0) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">android:includeInGlobalSearch="true"</span>
- android:searchSuggestAuthority="dictionary"
- android:searchSuggestIntentAction="android.intent.action.VIEW"&gt;
-&lt;/searchable&gt;</pre>
-
-<p>These new attributes are supported only in Android 1.6 and later.</p>
-
-<h3>What to expect</h3>
-
-<p>The
-first and most important thing to note is that when a user installs an
-app with a suggestion provider that participates in QSB, this new app
-will <em>not</em> be enabled for QSB by default. The user can choose
-to enable particular suggestion sources from the system settings for
-search (by going to "Search" &gt; "Searchable items" in settings).</p>
-
-<p>You
-should consider how to handle this in your app. Perhaps show a notice
-that instructs the user to visit system settings and enable your app's
-suggestions.</p>
-
-<p>Once the user enables your searchable item, the
-app's suggestions will have a chance to show up in QSB, most likely
-under the "more results" section to begin with. As your app's
-suggestions are chosen more frequently, they can move up in the list.</p>
-
-<img src="images/qsb.png" style="width: 233px; height: 349.5px;">
-<img id="k0vw" src="images/qsb_003.png" style="width: 233px; height: 349.5px;">
-
-<h3>Shortcuts</h3>
-
-<p>One
-of our objectives with QSB is to make it faster for users to access the
-things they access most often. One way we've done this is by
-'shortcutting' some of the previously chosen search suggestions, so
-they will be shown immediately as the user starts typing, instead of
-waiting to query the content providers. Suggestions from your app may
-be chosen as shortcuts when the user clicks on them.</p>
-
-<p>For dynamic suggestions that may wish to change their content (or become invalid)
-in the future, you can provide a 'shortcut id'. This tells QSB to query
-your suggestion provider for up-to-date content for a suggestion after
-it has been displayed. For more details on how to manage shortcuts, see
-the Shortcuts section
-<a href="{@docRoot}reference/android/app/SearchManager.html#ExposingSearchSuggestionsToQuickSearchBox">within the SearchManager docs</a>.</p>
diff --git a/docs/html/resources/articles/service-api-changes-starting-with.jd b/docs/html/resources/articles/service-api-changes-starting-with.jd
deleted file mode 100644
index 7bafd815e96e..000000000000
--- a/docs/html/resources/articles/service-api-changes-starting-with.jd
+++ /dev/null
@@ -1,177 +0,0 @@
-page.title=Service API changes starting with Android 2.0
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-
-<div id="qv-wrapper">
-<div id="qv">
-
- <h2>See also</h2>
- <ol>
- <li><a href="{@docRoot}guide/topics/fundamentals/services.html">Services</a></li>
- </ol>
-
- <h2>Key classes</h2>
- <ol>
- <li>{@link android.app.Service}</li>
- </ol>
-
-</div>
-</div>
-
-<p>Watching developers use the Android platform the last year has shown a number of trouble areas in the Service API as well as growing issues in the ways services operate. As a result, Android 2.0 introduced a number of changes and improvements in this area for both developers and users.</p>
-<p>The three main changes to be aware of are:</p>
-<ul>
- <li>Service.setForeground() is now deprecated and in 2.0 does nothing.</li>
- <li>There were many edge cases in the service lifecycle that made it very easy to accidentally leave a service running; new APIs in 2.0 make this much easier to deal with.</li>
- <li>Android 2.0 also introduces a new UI for end users to monitor and manage the running services on their device.</li>
-</ul>
-<h3>Background on services</h3>
-<p>Before going into the details of 2.0, it may be useful to go over a quick summary of services. The Service API in Android is one of the key mechanisms for applications to do work in the background. Due to the way Android is designed, once an application is no longer visible to the user it is generally considered expendable and a candidate to be killed by the system if it ever needs memory elsewhere. The main way applications get around this is by starting a Service component, which explicitly tells the system that they are doing some valuable work and would prefer that the system not kill their process if it doesn't truly need to.</p>
-<p>This is a very powerful facility but along with that power comes some responsibility: an actively running service is taking resources away from other things that can run (including inactive processes in the background that don't need to be initialized the next time the user visits them). It is thus important that developers take care when designing their services that they only run when truly needed and avoid any bugs where they may accidentally leave the service running for long durations.</p>
-<h3>Redesigning Service.setForeground()</h3>
-<p>During the final stabilization period of Android 1.6 we started to see more issues due to an increasing number of applications using the Service.setForeground() API when they shouldn't be. This is an API that we haven't advertised much because it should not be used by most applications and can be very hard on the system: it asks that the service's process be treated as in the foreground, essentially making it unkillable and thus more difficult for the system to recover from low memory situations.</p>
-<p>At that point in 1.6 it was too late to make any significant changes to the behavior here, but in 2.0 we have done so: Service.setForeground() now does nothing. The API was always intended to be something a service would do in conjunction with putting up an ongoing notification for the user; by saying you are in the foreground, the user should be "aware" that the service is running in some way and know how to stop it. Thus in place of the old API Andriod 2.0 introduces two new APIs that require a notification go along with being in the foreground:</p>
-<pre class="prettyprint">
-public final void startForeground(int id, Notification notification);
-public final void stopForeground(boolean removeNotification);
-</pre>
-<p>This also not coincidentally makes it much easier to manage the notification state along with the service, since the system can now guarantee that there is always a notification while the service is in the foreground, and that the notification goes away whenever the service does.</p>
-<p>Many developers will want to write a service that works on older platforms as well as 2.0 and later; this can be accomplished by using something like the following code to selectively call the new APIs when they are available.</p>
-<pre class="prettyprint">
-private static final Class[] mStartForegroundSignature = new Class[] {
- int.class, Notification.class};
-private static final Class[] mStopForegroundSignature = new Class[] {
- boolean.class};
-
-private NotificationManager mNM;
-private Method mStartForeground;
-private Method mStopForeground;
-private Object[] mStartForegroundArgs = new Object[2];
-private Object[] mStopForegroundArgs = new Object[1];
-
-&#64;Override
-public void onCreate() {
- mNM = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
- try {
- mStartForeground = getClass().getMethod("startForeground",
- mStartForegroundSignature);
- mStopForeground = getClass().getMethod("stopForeground",
- mStopForegroundSignature);
- } catch (NoSuchMethodException e) {
- // Running on an older platform.
- mStartForeground = mStopForeground = null;
- }
-}
-
-/**
- * This is a wrapper around the new startForeground method, using the older
- * APIs if it is not available.
- */
-void startForegroundCompat(int id, Notification notification) {
- // If we have the new startForeground API, then use it.
- if (mStartForeground != null) {
- mStartForegroundArgs[0] = Integer.valueOf(id);
- mStartForegroundArgs[1] = notification;
- try {
- mStartForeground.invoke(this, mStartForegroundArgs);
- } catch (InvocationTargetException e) {
- // Should not happen.
- Log.w("MyApp", "Unable to invoke startForeground", e);
- } catch (IllegalAccessException e) {
- // Should not happen.
- Log.w("MyApp", "Unable to invoke startForeground", e);
- }
- return;
- }
-
- // Fall back on the old API.
- setForeground(true);
- mNM.notify(id, notification);
-}
-
-/**
- * This is a wrapper around the new stopForeground method, using the older
- * APIs if it is not available.
- */
-void stopForegroundCompat(int id) {
- // If we have the new stopForeground API, then use it.
- if (mStopForeground != null) {
- mStopForegroundArgs[0] = Boolean.TRUE;
- try {
- mStopForeground.invoke(this, mStopForegroundArgs);
- } catch (InvocationTargetException e) {
- // Should not happen.
- Log.w("MyApp", "Unable to invoke stopForeground", e);
- } catch (IllegalAccessException e) {
- // Should not happen.
- Log.w("MyApp", "Unable to invoke stopForeground", e);
- }
- return;
- }
-
- // Fall back on the old API. Note to cancel BEFORE changing the
- // foreground state, since we could be killed at that point.
- mNM.cancel(id);
- setForeground(false);
-}
-</pre>
-<h3>Service lifecycle changes</h3>
-<p>Another situation we were increasingly seeing in 1.6 was that, even ignoring the services that inappropriately make themselves foreground, we had a growing number of devices with a large number of services running in the background all fighting each other over the available memory.</p>
-<p>Part of this problem is services that are running more than they should or there simply being too much stuff trying to be done on the device. However, we also found many issues in the interaction between services and the platform that made it easy for an application to leave a service running even when it is trying to do the right thing. Consider this typical scenario:</p>
-<ol>
- <li>An application calls startService().</li>
- <li>That service gets onCreate(), onStart(), and then spawns a background thread to do some work.</li>
- <li>The system is tight on memory, so has to kill the currently running service.</li>
- <li>Later when memory is free, the service is restarted, and gets onCreate() called but not onStart() because there has not been another call to startService() with a new Intent command to send it.</li>
-</ol>
-<p>Now the service will sit there created, not realizing it used to be doing some work, and so not knowing it should stop itself at some point.</p>
-<p>To address this, in Android 2.0 Service.onStart() as been deprecated (though still exists and operates as it used to in previous versions of the platform). It is replaced with a new {@link android.app.Service#onStartCommand(android.content.Intent, int, int)} callback that allows the service to better control how the system should manage it. The key part here is a new result code returned by the function, telling the system what it should do with the service if its process is killed while it is running:</p>
-<ul>
- <li>{@link android.app.Service#START_STICKY} is basically the same as the previous behavior, where the service is left "started" and will later be restarted by the system. The only difference from previous versions of the platform is that it if it gets restarted because its process is killed, onStartCommand() will be called on the next instance of the service with a null Intent instead of not being called at all. Services that use this mode should always check for this case and deal with it appropriately.</li>
- <li>{@link android.app.Service#START_NOT_STICKY} says that, after returning from onStartCreated(), if the process is killed with no remaining start commands to deliver, then the service will be stopped instead of restarted. This makes a lot more sense for services that are intended to only run while executing commands sent to them. For example, a service may be started every 15 minutes from an alarm to poll some network state. If it gets killed while doing that work, it would be best to just let it be stopped and get started the next time the alarm fires.</li>
- <li>{@link android.app.Service#START_REDELIVER_INTENT} is like START_NOT_STICKY, except if the service's process is killed before it calls stopSelf() for a given intent, that intent will be re-delivered to it until it completes (unless after some number of more tries it still can't complete, at which point the system gives up). This is useful for services that are receiving commands of work to do, and want to make sure they do eventually complete the work for each command sent.</li>
-</ul>
-<p>For compatibility with existing applications, the default return code for applications that are targeting an earlier version of the platform is a special {@link android.app.Service#START_STICKY_COMPATIBILITY} code that provides the old behavior of not calling onStart() with a null intent. Once you start targeting API version 5 or later, the default mode is START_STICKY and you must be prepared to deal with onStart() or onStartCommand() being called with a null Intent.</p>
-<p>You can also easily write a Service that uses both the old and new APIs, depending on the platform. All you need to do is compile against the 2.0 SDK with this code:</p>
-<pre class="prettyprint">
-// This is the old onStart method that will be called on the pre-2.0
-// platform. On 2.0 or later we override onStartCommand() so this
-// method will not be called.
-&#64;Override
-public void onStart(Intent intent, int startId) {
- handleStart(intent, startId);
-}
-
-&#64;Override
-public int onStartCommand(Intent intent, int flags, int startId) {
- handleStart(intent, startId);
- return START_NOT_STICKY;
-}
-
-void handleStart(Intent intent, int startId) {
- // do work
-}
-</pre>
-<h3>New "running services" user interface</h3>
-<p>Our final issue to address is the case where there are simply too many service running in the amount of memory available on a device. This may be due to bugs or design flaws in installed applications, or the user simply trying to do too much. Historically users have had no visibility into what is going on at this level in the system, but it has become important to expose this, at least for lower-end devices, as the use of services has had an increasing impact on the user experience.</p>
-<p>To help address this, Android 2.0 introduces a new "Running Services" activity available from the Application system settings. When brought up, it looks something like this:</p>
-<img src="images/service-api-changes-starting-with_runningservices.png" width="192" height="320" alt="Running Services"/>
-<p>The main content is a list of all running services that may be of interest to the user, organized by the processes they run in. In the example here, we see three services:</p>
-<ul>
- <li><b>GTalkService</b> is part of the standard Google application suit; it is running in Google's "gapps" process, which currently consumes 6.8MB. It has been started for 3 hours 55 minutes, which on this device is the time from when it was first booted.</li>
- <li><b>ActivityService</b> is part of the Phonebook app, and its process consumes 4MB. This also has been running since boot.</li>
- <li><b>SoftKeyboard</b> is a third party input method. It has been running since I switched to it, about 4 minutes ago.</li>
-</ul>
-<p>The user can tap on any of these services to control it; for normal services that are running because they were explicitly started, this will present a dialog allowing the user to explicitly stop it:</p>
-<img src="images/service-api-changes-starting-with_stopservice.png" height="320" width="192" alt="Stop Service"/>
-<p>Some other services, like the input method, are running for other reasons. For these, tapping on the service will go to the corresponding UI to manage it (in this case the system's input settings).</p>
-<p>Finally, along the bottom of the screen are some obscure numbers. If you know how to interpret them, this gives you a lot of information on the memory status of your device:</p>
-<ul>
- <li><b>Avail: 38MB+114MB in 25</b> says that the device has 38MB of completely free (or likely used for unrequired caches) memory, and has another 114MB of available memory in 25 background processes it can kill at any time.</li>
- <li><b>Other: 32MB in 3</b> says that the device has 32MB of unavailable memory in 3 unkillable processes (that is, processes that are currently considered to be foreground and must be kept running)</li>
-</ul>
-<p>For most users, this new user interface should be a much more effective way to manage the background applications on their device than the existing "task killer" applications. In the vast majority of cases the reason for a slow running device is too many services trying to run. This prevents the system from being able to run any background processes (which speed up app switching), and ultimately can result in thrashing through the services when not even they can all be kept running. The Running Services UI is intended to provide very specific information about the services that are running, to help make a good decision about what should be stopped. It also does not use the API to force stop an application, which can unintentionally break applications in numerous ways.</p>
-<p>For developers, this is an important tool to ensure your services are well behaved. As you develop your app, be sure to keep an eye on Running Services to ensure that you are not accidentally leaving your services running when they shouldn't be. You should also now keep in mind that users may freely stop any of your services as they wish, without your control, and account for that.</p>
-<p>Android's Services are a very powerful tool, but one of the main and subtle ways that application developers can harm the overall experience a user has with their phone.</p>
diff --git a/docs/html/resources/articles/speech-input.jd b/docs/html/resources/articles/speech-input.jd
deleted file mode 100644
index 2f9cd69d4e58..000000000000
--- a/docs/html/resources/articles/speech-input.jd
+++ /dev/null
@@ -1,94 +0,0 @@
-page.title=Speech Input
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p> People love their mobile phones because they can stay in touch wherever they
-are. That means not just talking, but e-mailing, texting, microblogging, and so
-on. </p>
-
-<p>Speech input adds another dimension to staying in touch.
-Google's Voice Search application, which is pre-installed on many Android devices
-and available on Google Play, provides powerful features like "search by voice"
-and Voice Actions like "Navigate to." Further
-enhancing the voice experience, Android 2.1 introduces a <a
-href="http://www.youtube.com/watch?v=laOlkD8LmZw">
-voice-enabled keyboard</a>, which makes it even easier
-to stay connected. Now you can dictate your message instead of typing it. Just
-tap the new microphone button on the keyboard, and you can speak in just about
-any context in which you would normally type. </p>
-
-<p> We believe speech can
-fundamentally change the mobile experience. We would like to invite every
-Android application developer to consider integrating speech input capabilities
-via the Android SDK. One of our favorite apps on Google Play that integrates
-speech input is <a href="http://www.handcent.com/">Handcent SMS</a>,
-because you can dictate a reply to any SMS with a
-quick tap on the SMS popup window. Here is Speech input integrated into
-Handcent SMS:</p>
-
-<img src="images/speech-input.png"/>
-
-
-<p> The Android SDK makes it easy to integrate speech input directly into your
-own application. Just copy and paste from this <a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/VoiceRecognition.html">sample
-application</a> to get
-started. The sample application first verifies that the target device is able
-to recognize speech input:</p>
-<pre>
-// Check to see if a recognition activity is present
-PackageManager pm = getPackageManager();
-List<ResolveInfo> activities = pm.queryIntentActivities(
- new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);
-if (activities.size() != 0) {
- speakButton.setOnClickListener(this);
-} else {
- speakButton.setEnabled(false);
- speakButton.setText("Recognizer not present");
-}
-</pre>
-<p>
-The sample application then uses {@link
-android.app.Activity#startActivityForResult(android.content.Intent, int)
-startActivityForResult()} to broadcast an intent that requests voice
-recognition, including an extra parameter that specifies one of two language
-models. The voice recognition application that handles the intent processes the
-voice input, then passes the recognized string back to your application by
-calling the {@link android.app.Activity#onActivityResult(int, int,
-android.content.Intent) onActivityResult()} callback. </p>
-
-
-<p>Android is an open platform, so your application can potentially make
-use of any speech recognition service on the device that's registered to receive
-a {@link android.speech.RecognizerIntent}. Google's Voice Search application,
-which is pre-installed on
-many Android devices, responds to a <em>RecognizerIntent</em> by displaying the
-"Speak
-now" dialog and streaming audio to Google's servers -- the same servers used
-when a user taps the microphone button on the search widget or the voice-enabled
-keyboard. You can check whether Voice Search is installed in
-<strong>Settings > Applications > Manage applications</strong>. </p>
-
-<p> One important tip: for speech input to be as accurate as possible, it's
-helpful to have an idea of what words are likely to be spoken. While a message
-like "Mom, I'm writing you this message with my voice!" might be appropriate for
-an email or SMS message, you're probably more likely to say something like
-"weather in Mountain View" if you're using Google Search. You can make sure your
-users have the best experience possible by requesting the appropriate
-<em>language model:</em> {@link
-android.speech.RecognizerIntent#LANGUAGE_MODEL_FREE_FORM free_form} for
-dictation, or {@link android.speech.RecognizerIntent#LANGUAGE_MODEL_WEB_SEARCH
-web_search} for shorter, search-like phrases. We developed the "free form"
-model to improve dictation accuracy for the voice keyboard,
-while the "web search" model is used when users want to search by voice. </p>
-
-<p> Google's servers support many languages for voice input, with more arriving
-regularly. You can use the
-{@link android.speech.RecognizerIntent#ACTION_GET_LANGUAGE_DETAILS}
-broadcast intent to query for the list of supported languages.
-The web search model is available for all languages, while the free-form model
-may not be optimized for all languages. As we work hard to support more models in
-more languages, and to improve the accuracy of the speech recognition technology
-we use in our products, Android developers who integrate speech capabilities
-directly into their applications can reap the benefits as well. </p>
diff --git a/docs/html/resources/articles/timed-ui-updates.jd b/docs/html/resources/articles/timed-ui-updates.jd
deleted file mode 100644
index 7a0804f6fb94..000000000000
--- a/docs/html/resources/articles/timed-ui-updates.jd
+++ /dev/null
@@ -1,151 +0,0 @@
-page.title=Updating the UI from a Timer
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<img style="margin: 1.5em; float: right;" src="images/JFlubber.png" alt="" id="BLOGGER_PHOTO_ID_5135098660116808706" border="0">
-
-<p><strong>Background</strong>: While developing my first useful
-(though small) application for Android, which was a port of an existing
-utility I use when podcasting, I needed a way of updating a clock
-displayed on the UI at regular intervals, but in a lightweight and CPU
-efficient way.</p>
-
-<p><strong>Problem</strong>: In the original application I used
-java.util.Timer to update the clock, but that class is not such a good
-choice on Android. Using a Timer introduces a new thread into the
-application for a relatively minor reason. Thinking in terms of mobile
-applications often means re-considering choices that you might make
-differently for a desktop application with relatively richer resources
-at its disposal. We would like to find a more efficient way of updating
-that clock.</p>
-
-<p><strong>The Application</strong>: The original application is a
-Java Swing and SE application. It is like a stopwatch with a lap timer
-that we use when recording podcasts; when you start the recording, you
-start the stopwatch. Then for every mistake that someone makes, you hit
-the flub button. At the end you can save out the bookmarked mistakes
-which can be loaded into the wonderful
-<a href="http://audacity.sourceforge.net/" title="Audacity">Audacity</a>
-audio editor as a labels track. You can then see where all of the mistakes
-are in the recording and edit them out.</p>
-
-<p>The article describing it is: <a href="http://www.developer.com/java/ent/print.php/3589961" title="http://www.developer.com/java/ent/print.php/3589961">http://www.developer.com/java/ent/print.php/3589961</a></p>
-
-<p>In the original version, the timer code looked like this:</p>
-
-<pre>class UpdateTimeTask extends TimerTask {
- public void run() {
- long millis = System.currentTimeMillis() - startTime;
- int seconds = (int) (millis / 1000);
- int minutes = seconds / 60;
- seconds = seconds % 60;
-
- timeLabel.setText(String.format("%d:%02d", minutes, seconds));
- }
-}</pre><p>And in the event listener to start this update, the following Timer() instance is used:
-</p><pre>if(startTime == 0L) {
- startTime = evt.getWhen();
- timer = new Timer();
- timer.schedule(new UpdateTimeTask(), 100, 200);
-}</pre>
-
-<p>In particular, note the 100, 200 parameters. The first parameter
-means wait 100 ms before running the clock update task the first time.
-The second means repeat every 200ms after that, until stopped. 200 ms
-should not be too noticeable if the second resolution happens to fall
-close to or on the update. If the resolution was a second, you could
-find the clock sometimes not updating for close to 2 seconds, or
-possibly skipping a second in the counting, it would look odd).</p>
-
-<p>When I ported the application to use the Android SDKs, this code
-actually compiled in Eclipse, but failed with a runtime error because
-the Timer() class was not available at runtime (fortunately, this was
-easy to figure out from the error messages). On a related note, the
-String.format method was also not available, so the eventual solution
-uses a quick hack to format the seconds nicely as you will see.</p>
-
-<p>Fortunately, the role of Timer can be replaced by the
-android.os.Handler class, with a few tweaks. To set it up from an event
-listener:</p>
-
-<pre>private Handler mHandler = new Handler();
-
-...
-
-OnClickListener mStartListener = new OnClickListener() {
- public void onClick(View v) {
- if (mStartTime == 0L) {
- mStartTime = System.currentTimeMillis();
- mHandler.removeCallbacks(mUpdateTimeTask);
- mHandler.postDelayed(mUpdateTimeTask, 100);
- }
- }
-};</pre>
-
-<p>A couple of things to take note of here. First, the event doesn't
-have a .getWhen() method on it, which we handily used to set the start
-time for the timer. Instead, we grab the System.currentTimeMillis().
-Also, the Handler.postDelayed() method only takes one time parameter,
-it doesn't have a "repeating" field. In this case we are saying to the
-Handler "call mUpdateTimeTask() after 100ms", a sort of fire and forget
-one time shot. We also remove any existing callbacks to the handler
-before adding the new handler, to make absolutely sure we don't get
-more callback events than we want.</p>
-
-<p>But we want it to repeat, until we tell it to stop. To do this, just
-put another postDelayed at the tail of the mUpdateTimeTask run()
-method. Note also that Handler requires an implementation of Runnable,
-so we change mUpdateTimeTask to implement that rather than extending
-TimerTask. The new clock updater, with all these changes, looks like
-this:</p>
-
-<pre>private Runnable mUpdateTimeTask = new Runnable() {
- public void run() {
- final long start = mStartTime;
- long millis = SystemClock.uptimeMillis() - start;
- int seconds = (int) (millis / 1000);
- int minutes = seconds / 60;
- seconds = seconds % 60;
-
- if (seconds &lt; 10) {
- mTimeLabel.setText("" + minutes + ":0" + seconds);
- } else {
- mTimeLabel.setText("" + minutes + ":" + seconds);
- }
-
- mHandler.postAtTime(this,
- start + (((minutes * 60) + seconds + 1) * 1000));
- }
-};</pre>
-
-<p>and can be defined as a class member field.</p>
-
-<p>The if statement is just a way to make sure the label is set to
-10:06 instead of 10:6 when the seconds modulo 60 are less than 10
-(hopefully String.format() will eventually be available). At the end of
-the clock update, the task sets up another call to itself from the
-Handler, but instead of a hand-wavy 200ms before the update, we can
-schedule it to happen at a particular wall-clock time — the line: start
-+ (((minutes * 60) + seconds + 1) * 1000) does this.</p>
-
-<p>All we need now is a way to stop the timer when the stop button
-is pressed. Another button listener defined like this:</p>
-
-<pre>OnClickListener mStopListener = new OnClickListener() {
- public void onClick(View v) {
- mHandler.removeCallbacks(mUpdateTimeTask);
- }
-};</pre>
-
-<p>will make sure that the next callback is removed when the stop button
-is pressed, thus interrupting the tail iteration.</p>
-
-<p>Handler is actually a better choice than Timer for another reason
-too. The Handler runs the update code as a part of your main thread,
-avoiding the overhead of a second thread and also making for easy
-access to the View hierarchy used for the user interface. Just remember
-to keep such tasks small and light to avoid slowing down the user
-experience.</p>
-
-
diff --git a/docs/html/resources/articles/touch-mode.jd b/docs/html/resources/articles/touch-mode.jd
deleted file mode 100644
index 5eae9b9ea1a7..000000000000
--- a/docs/html/resources/articles/touch-mode.jd
+++ /dev/null
@@ -1,140 +0,0 @@
-page.title=Touch Mode
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>This article explains the <em>touch mode</em>, one of the most
-important principles of Android's UI toolkit.</p>
-
-<p>The touch mode is a state of the view hierarchy that depends solely on the
-user interaction with the phone. By itself, the touch mode is something very
-easy to understand as it simply indicates whether the last user interaction was
-performed with the touch screen. For example, if you are using an
-Android-powered device, selecting a widget with the trackball will take you out
-of touch mode; however, if you touch a button on the screen with your finger,
-you will enter touch mode. When the user is not in touch mode, we talk about the
-trackball mode, navigation mode or keyboard navigation, so do not be surprised
-if you encounter these terms. </p>
-
-<p>There is only one API directly related to touch mode,
-{@link android.view.View#isInTouchMode() View.isInTouchMode()}.</p>
-
-<p>Sounds easy enough, right? Oddly enough, touch mode is deceivingly simple and
-the consequences of entering touch mode are far greater than you might
-think. Let's look at some of the reasons why.</p>
-
-<h4>Touch Mode, Selection, and Focus</h4>
-
-<p>Designing a UI toolkit for mobile devices is difficult because of the various
-interaction mechanisms they provide. Some devices offer only 12 keys, some have
-a touch screen, some require a stylus, some have both a touch screen and a
-keyboard. Based on the hardware capabilities of the he user can interact with
-your application using different mechanisms, so we had to think very hard about
-all the possible issues that could arise. One issue led us to create the touch
-mode.</p>
-
-<p>Imagine a simple application, <a href="{@docRoot}resources/samples/index.html">ApiDemos</a>
-for example, that shows a list of text items. The user can freely
-navigate through the list using the trackball but also, alternatively, scroll
-and fling the list using the touch screen. The issue in this scenario is
-how to handle the selection properly when the user manipulates the list
-through the touch screen. </p>
-
-<p>In this case, if the user selects an item at the top of the list and then
-flings the list towards the bottom, what should happen to the selection? Should
-it remain on the item and scroll off the screen? What should happen if the user
-then decided to move the selection with the trackball? Or worse, what should
-happen if the user presses the trackball to act upon the currently selected
-item, which is not shown on screen anymore? </p>
-
-<p>After careful consideration, we decided to remove the selection altogether,
-when the user manipulates the UI through the touch screen.</p>
-
-<p>In touch mode, there is no focus and no selection. Any selected item in a
-list of in a grid becomes unselected as soon as the user enters touch
-mode. Similarly, any focused widgets become unfocused when the user
-enters touch mode. The image below illustrates what happens when the
-user touches a list after selecting an item with the trackball.</p>
-
-<img style="margin: 0px 7px;" src="images/list02.png" alt="" id="BLOGGER_PHOTO_ID_5272753165743060962" border="0">
-<img style="margin: 0px 7px;" src="images/list01.png" alt="" id="BLOGGER_PHOTO_ID_5272753357441963442" border="0">
-
-<p>To
-make things more natural for the user, the framework knows how to
-resurrect the selection/focus whenever the user leaves touch mode. For
-instance, in the example above, if the user were to use the trackball
-again, the selection would reappear on the previously-selected item.
-This is why some developers are confused when they create a custom view
-and start receiving key events only after moving the trackball once:
-their application is in touch mode, and they need to use the trackball
-to exit touch mode and resurrect the focus.</p>
-
-<p>The relationship between touch mode, selection, and focus means you must not
-rely on selection and/or focus to exist in your application. A very common
-problem with new Android developers is to rely on
-{@link android.widget.AdapterView#getSelectedItemPosition() ListView.getSelectedItemPosition()}.
-In touch mode, this method will return
-{@link android.widget.AdapterView#INVALID_POSITION INVALID_POSITION}.
- You should instead use click listeners (see
-{@link android.widget.AdapterView#setOnItemClickListener(android.widget.AdapterView.OnItemClickListener)})
-or the choice mode (see
-{@link android.widget.ListView#setChoiceMode(int)}).</p>
-
-<h4>Focusable in Touch Mode</h4>
-
-<p>In general, focus doesn't exist in touch mode. However, focus can exist in
-touch mode in a very special way called <em>focusable</em>. This special mode
-was created for widgets that receive text input, such as
-{@link android.widget.EditText} or, when filtering is enabled,
-{@link android.widget.ListView}. The focusable mode is what lets the user enter text
-inside a text field on the screen, without first selecting it with the trackball
-or their finger.</p>
-
-<p>When a user
-touches the screen, the application will enter touch mode if it wasn't
-in touch mode already. What happens during the transition to
-touch mode depends on what the user touched, and what currently has
-focus. If the user touches a widget that is focusable in touch
-mode, that widget will receive focus. Otherwise, any currently
-focused widget will not retain focus unless it is focusable in touch
-mode. For instance, in the picture below, when the user touches
-the screen, the input text field receives the focus.</p>
-
-<img style="margin: 0px 7px;" src="images/text_field.png" alt="" id="BLOGGER_PHOTO_ID_5272755475757779154" border="0">
-
-<p>Fousable in touch mode (see
-{@link android.view.View#setFocusableInTouchMode(boolean) View.setFocusableInTouchMode})
- is a property that you can set yourself, either from code or from XML.
-However, you should use it sparingly and only in very specific situations,
-because it breaks consistency with the normal behavior of the Android UI. A game
-is a good example of an application that could make good use of the focusable in
-touch mode property. MapView, if used in fullscreen as in Google Maps, is
-another good example of where you can use focusable in touch mode correctly.</p>
-
-<p>Below is another example of a focusable in touch mode widget. When the user
-taps an <code>AutoCompleteTextView</code> suggestion with his finger, the focus
-remains on the input text field:</p>
-
-<img style="margin: 0px 7px;" src="images/search01.png" alt="" id="BLOGGER_PHOTO_ID_5272756689821626962" border="0">
-<img style="margin: 0px 7px;" src="images/search02.png" alt="" id="BLOGGER_PHOTO_ID_5272756246104676754" border="0">
-
-<p>Developers new to Android often think that focusable in touch mode is the
-solution they need to "fix" the problem of "disappearing" selection/focus. We
-really encourage you to think very hard before using it. If used incorrectly, it
-can make your application behave differently from the rest of the system and
-simply throw off the user's habits. The Android framework contains all the tools
-you need to handle user interactions without using focusable in touch mode. For
-example, instead of trying to make <code>ListView</code> always keep its
-selection, simply use the appropriate choice mode, as shown in
-{@link android.widget.ListView#setChoiceMode(int)}.
-
-<h4>Touch Mode Cheat Sheet</h4>
-
-<p>Do:</p>
-<ul>
-<li>Remain consistent with the core applications</li><li>Use the appropriate feature if you need persistent selection (radio button, check box, the <code>ListView</code> choice mode, etc.)</li>
-<li>Use focusable in touch mode if you write a game</li>
-</ul>
-
-<p>Don't:</p>
-<ul><li>Do not try to keep the focus or selection in touch mode</li></ul>
diff --git a/docs/html/resources/articles/track-mem.jd b/docs/html/resources/articles/track-mem.jd
deleted file mode 100644
index c4184b5764aa..000000000000
--- a/docs/html/resources/articles/track-mem.jd
+++ /dev/null
@@ -1,64 +0,0 @@
-page.title=Tracking Memory Allocations
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>Writing efficient mobile applications is not always straightforward. In
-particular, Android applications rely on automatic memory management handled by
-Dalvik's garbage collector, which can sometimes cause performance issues if you
-are not careful with memory allocations.</p>
-
-<p>In a performance-sensitive code path, such as the layout or drawing method of
-a view or the logic code of a game, any allocation comes at a price. After too
-many allocations, the garbage collector will kick in and stop your application
-to let it free some memory. Most of the time, garbage collections happen fast
-enough for you not to notice. However, if a collection happens while you are
-scrolling through a list of items or while you are trying to defeat a foe in a
-game, you may suddenly see a drop in performance/responsiveness of the
-application. It's not unusual for a garbage collection to take 100 to 200 ms.
-For comparison, a smooth animation needs to draw each frame in 16 to 33 ms. If
-the animation is suddenly interrupted for 10 frames, you can be certain that
-your users will notice.</p>
-
-<p>Most of the time, garbage collection occurs because of tons of small,
-short-lived objects and some garbage collectors, like generational garbage
-collectors, can optimize the collection of these objects so that the application
-does not get interrupted too often. The Android garbage collector is
-unfortunately not able to perform such optimizations and the creation of
-short-lived objects in performance critical code paths is thus very costly for
-your application.</p>
-
-<p>To help you avoid frequent garbage collections, the Android SDK ships with a
-very useful tool called <em>allocation tracker</em>. This tool is part of DDMS,
-which you must have already used for debugging purposes. To start using the
-allocation tracker, you must first launch the standalone version of DDMS, which
-can be found in the <code>tools/</code> directory of the SDK. The version of
-DDMS included in the Eclipse plugin does not offer you ability to use the
-allocation tracker yet.</p>
-
-<p>Once DDMS is running, simply select your application process and then click
-the <em>Allocation Tracker</em> tab. In the new view, click <em>Start
-Tracking</em> and then use your application to make it execute the code paths
-you want to analyze. When you are ready, click <em>Get Allocations</em>. A list
-of allocated objects will be shown in the first table. By clicking on a line you
-can see, in the second table, the stack trace that led to the allocation. Not
-only you will know what type of object was allocated, but also in which thread,
-in which class, in which file and at which line. The following screenshot shows
-the allocations performed by <a
-href="http://code.google.com/p/shelves">Shelves</a> while scrolling a
-ListView.</p>
-
-<a href="images/ddms_allocation_trackerl.png">
-
-<img style="cursor:hand;width: 320px; height: 250px;" src="images/ddms_allocation_tracker.png" border="0" alt="" />
-</a>
-
-<p>Even though it is not necessary &mdash; and sometimes not possible &mdash; to
-remove all allocations for your performance critical code paths. the allocation
-tracker will help you identify important issues in your code. For instance, a
-common mistake I have seen in many applications is to create a new
-<code>Paint</code> object on every draw. Moving the paint into an instance field
-is a simple fix that helps performance a lot. I highly encourage you to peruse
-the <a href="http://source.android.com/">Android source code</a> to see how we
-reduce allocations in performance-critical code paths. You will also thus
-discover the APIs Android provide to help you reuse objects.</p>
diff --git a/docs/html/resources/articles/tts.jd b/docs/html/resources/articles/tts.jd
deleted file mode 100644
index 929d08438f7e..000000000000
--- a/docs/html/resources/articles/tts.jd
+++ /dev/null
@@ -1,243 +0,0 @@
-page.title=Using Text-to-Speech
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>Starting with Android 1.6 (API Level 4), the Android platform includes a new
-Text-to-Speech (TTS) capability. Also known as "speech synthesis", TTS enables
-your Android device to "speak" text of different languages.</p>
-
-<p>Before we explain how to use the TTS API itself, let's first review a few
-aspects of the engine that will be important to your TTS-enabled application. We
-will then show how to make your Android application talk and how to configure
-the way it speaks.</p>
-
-<h3>Languages and resources</h3>
-
-<p>The TTS engine that ships with the Android platform supports a number of
-languages: English, French, German, Italian and Spanish. Also, depending on
-which side of the Atlantic you are on, American and British accents for English
-are both supported.</p>
-
-<p>The TTS engine needs to know which language to speak, as a word like "Paris",
-for example, is pronounced differently in French and English. So the voice and
-dictionary are language-specific resources that need to be loaded before the
-engine can start to speak.</p>
-
-<p>Although all Android-powered devices that support the TTS functionality ship
-with the engine, some devices have limited storage and may lack the
-language-specific resource files. If a user wants to install those resources,
-the TTS API enables an application to query the platform for the availability of
-language files and can initiate their download and installation. So upon
-creating your activity, a good first step is to check for the presence of the
-TTS resources with the corresponding intent:</p>
-
-<pre>Intent checkIntent = new Intent();
-checkIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA);
-startActivityForResult(checkIntent, MY_DATA_CHECK_CODE);</pre>
-
-<p>A successful check will be marked by a <code>CHECK_VOICE_DATA_PASS</code>
-result code, indicating this device is ready to speak, after the creation of
-our
-{@link android.speech.tts.TextToSpeech} object. If not, we need to let the user
-know to install the data that's required for the device to become a
-multi-lingual talking machine! Downloading and installing the data is
-accomplished by firing off the ACTION_INSTALL_TTS_DATA intent, which will take
-the user to Google Play, and will let her/him initiate the download.
-Installation of the data will happen automatically once the download completes.
-Here is an example of what your implementation of
-<code>onActivityResult()</code> would look like:</p>
-
-<pre>private TextToSpeech mTts;
-protected void onActivityResult(
- int requestCode, int resultCode, Intent data) {
- if (requestCode == MY_DATA_CHECK_CODE) {
- if (resultCode == TextToSpeech.Engine.CHECK_VOICE_DATA_PASS) {
- // success, create the TTS instance
- mTts = new TextToSpeech(this, this);
- } else {
- // missing data, install it
- Intent installIntent = new Intent();
- installIntent.setAction(
- TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);
- startActivity(installIntent);
- }
- }
-}</pre>
-
-<p>In the constructor of the <code>TextToSpeech</code> instance we pass a
-reference to the <code>Context</code> to be used (here the current Activity),
-and to an <code>OnInitListener</code> (here our Activity as well). This listener
-enables our application to be notified when the Text-To-Speech engine is fully
-loaded, so we can start configuring it and using it.</p>
-
-<h4>Languages and Locale</h4>
-
-<p>At Google I/O 2009, we showed an <a title="Google I/O 2009, TTS
-demonstration" href="http://www.youtube.com/watch?v=uX9nt8Cpdqg#t=6m17s"
-id="rnfd">example of TTS</a> where it was used to speak the result of a
-translation from and to one of the 5 languages the Android TTS engine currently
-supports. Loading a language is as simple as calling for instance:</p>
-
-<pre>mTts.setLanguage(Locale.US);</pre><p>to load and set the language to
-English, as spoken in the country "US". A locale is the preferred way to specify
-a language because it accounts for the fact that the same language can vary from
-one country to another. To query whether a specific Locale is supported, you can
-use <code>isLanguageAvailable()</code>, which returns the level of support for
-the given Locale. For instance the calls:</p>
-
-<pre>mTts.isLanguageAvailable(Locale.UK))
-mTts.isLanguageAvailable(Locale.FRANCE))
-mTts.isLanguageAvailable(new Locale("spa", "ESP")))</pre>
-
-<p>will return TextToSpeech.LANG_COUNTRY_AVAILABLE to indicate that the language
-AND country as described by the Locale parameter are supported (and the data is
-correctly installed). But the calls:</p>
-
-<pre>mTts.isLanguageAvailable(Locale.CANADA_FRENCH))
-mTts.isLanguageAvailable(new Locale("spa"))</pre>
-
-<p>will return <code>TextToSpeech.LANG_AVAILABLE</code>. In the first example,
-French is supported, but not the given country. And in the second, only the
-language was specified for the Locale, so that's what the match was made on.</p>
-
-<p>Also note that besides the <code>ACTION_CHECK_TTS_DATA</code> intent to check
-the availability of the TTS data, you can also use
-<code>isLanguageAvailable()</code> once you have created your
-<code>TextToSpeech</code> instance, which will return
-<code>TextToSpeech.LANG_MISSING_DATA</code> if the required resources are not
-installed for the queried language.</p>
-
-<p>Making the engine speak an Italian string while the engine is set to the
-French language will produce some pretty <i>interesting </i>results, but it will
-not exactly be something your user would understand So try to match the
-language of your application's content and the language that you loaded in your
-<code>TextToSpeech</code> instance. Also if you are using
-<code>Locale.getDefault()</code> to query the current Locale, make sure that at
-least the default language is supported.</p>
-
-<h3>Making your application speak</h3>
-
-<p>Now that our <code>TextToSpeech</code> instance is properly initialized and
-configured, we can start to make your application speak. The simplest way to do
-so is to use the <code>speak()</code> method. Let's iterate on the following
-example to make a talking alarm clock:</p>
-
-<pre>String myText1 = "Did you sleep well?";
-String myText2 = "I hope so, because it's time to wake up.";
-mTts.speak(myText1, TextToSpeech.QUEUE_FLUSH, null);
-mTts.speak(myText2, TextToSpeech.QUEUE_ADD, null);</pre>
-
-<p>The TTS engine manages a global queue of all the entries to synthesize, which
-are also known as "utterances". Each <code>TextToSpeech</code> instance can
-manage its own queue in order to control which utterance will interrupt the
-current one and which one is simply queued. Here the first <code>speak()</code>
-request would interrupt whatever was currently being synthesized: the queue is
-flushed and the new utterance is queued, which places it at the head of the
-queue. The second utterance is queued and will be played after
-<code>myText1</code> has completed.</p>
-
-<h4>Using optional parameters to change the playback stream type</h4>
-
-<p>On Android, each audio stream that is played is associated with one stream
-type, as defined in
-{@link android.media.AudioManager android.media.AudioManager}. For a talking
-alarm clock, we would like our text to be played on the
-<code>AudioManager.STREAM_ALARM</code> stream type so that it respects the alarm
-settings the user has chosen on the device. The last parameter of the speak()
-method allows you to pass to the TTS engine optional parameters, specified as
-key/value pairs in a HashMap. Let's use that mechanism to change the stream type
-of our utterances:</p>
-
-<pre>HashMap&lt;String, String&gt; myHashAlarm = new HashMap();
-myHashAlarm.put(TextToSpeech.Engine.KEY_PARAM_STREAM,
- String.valueOf(AudioManager.STREAM_ALARM));
-mTts.speak(myText1, TextToSpeech.QUEUE_FLUSH, myHashAlarm);
-mTts.speak(myText2, TextToSpeech.QUEUE_ADD, myHashAlarm);</pre>
-
-<h4>Using optional parameters for playback completion callbacks</h4>
-
-<p>Note that <code>speak()</code> calls are asynchronous, so they will return
-well before the text is done being synthesized and played by Android, regardless
-of the use of <code>QUEUE_FLUSH</code> or <code>QUEUE_ADD</code>. But you might
-need to know when a particular utterance is done playing. For instance you might
-want to start playing an annoying music after <code>myText2</code> has finished
-synthesizing (remember, we're trying to wake up the user). We will again use an
-optional parameter, this time to tag our utterance as one we want to identify.
-We also need to make sure our activity implements the
-<code>TextToSpeech.OnUtteranceCompletedListener</code> interface:</p>
-
-<pre>mTts.setOnUtteranceCompletedListener(this);
-myHashAlarm.put(TextToSpeech.Engine.KEY_PARAM_STREAM,
- String.valueOf(AudioManager.STREAM_ALARM));
-mTts.speak(myText1, TextToSpeech.QUEUE_FLUSH, myHashAlarm);
-myHashAlarm.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID,
- "end of wakeup message ID");
-// myHashAlarm now contains two optional parameters
-mTts.speak(myText2, TextToSpeech.QUEUE_ADD, myHashAlarm);</pre>
-
-<p>And the Activity gets notified of the completion in the implementation
-of the listener:</p>
-
-<pre>public void onUtteranceCompleted(String uttId) {
- if (uttId == "end of wakeup message ID") {
- playAnnoyingMusic();
- }
-}</pre>
-
-<h4>File rendering and playback</h4>
-
-<p>While the <code>speak()</code> method is used to make Android speak the text
-right away, there are cases where you would want the result of the synthesis to
-be recorded in an audio file instead. This would be the case if, for instance,
-there is text your application will speak often; you could avoid the synthesis
-CPU-overhead by rendering only once to a file, and then playing back that audio
-file whenever needed. Just like for <code>speak()</code>, you can use an
-optional utterance identifier to be notified on the completion of the synthesis
-to the file:</p>
-
-<pre>HashMap&lt;String, String&gt; myHashRender = new HashMap();
-String wakeUpText = "Are you up yet?";
-String destFileName = "/sdcard/myAppCache/wakeUp.wav";
-myHashRender.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, wakeUpText);
-mTts.synthesizeToFile(wakuUpText, myHashRender, destFileName);</pre>
-
-<p>Once you are notified of the synthesis completion, you can play the output
-file just like any other audio resource with
-{@link android.media.MediaPlayer android.media.MediaPlayer}.</p>
-
-<p>But the <code>TextToSpeech</code> class offers other ways of associating
-audio resources with speech. So at this point we have a WAV file that contains
-the result of the synthesis of "Wake up" in the previously selected language. We
-can tell our TTS instance to associate the contents of the string "Wake up" with
-an audio resource, which can be accessed through its path, or through the
-package it's in, and its resource ID, using one of the two
-<code>addSpeech()</code> methods:</p>
-
-<pre>mTts.addSpeech(wakeUpText, destFileName);</pre>
-
-<p>This way any call to speak() for the same string content as
-<code>wakeUpText</code> will result in the playback of
-<code>destFileName</code>. If the file is missing, then speak will behave as if
-the audio file wasn't there, and will synthesize and play the given string. But
-you can also take advantage of that feature to provide an option to the user to
-customize how "Wake up" sounds, by recording their own version if they choose
-to. Regardless of where that audio file comes from, you can still use the same
-line in your Activity code to ask repeatedly "Are you up yet?":</p>
-
-<pre>mTts.speak(wakeUpText, TextToSpeech.QUEUE_ADD, myHashAlarm);</pre>
-
-<h4>When not in use...</h4><p>The text-to-speech functionality relies on a
-dedicated service shared across all applications that use that feature. When you
-are done using TTS, be a good citizen and tell it "you won't be needing its
-services anymore" by calling <code>mTts.shutdown()</code>, in your Activity
-<code>onDestroy()</code> method for instance.</p>
-
-<h3>Conclusion</h3>
-
-<p>Android now talks, and so can your apps. Remember that in order for
-synthesized speech to be intelligible, you need to match the language you select
-to that of the text to synthesize. Text-to-speech can help you push your app in
-new directions. Whether you use TTS to help users with disabilities, to enable
-the use of your application while looking away from the screen, or simply to
-make it cool, we hope you'll enjoy this new feature.</p> \ No newline at end of file
diff --git a/docs/html/resources/articles/ui-1.5.jd b/docs/html/resources/articles/ui-1.5.jd
deleted file mode 100644
index 2edaa2e0e352..000000000000
--- a/docs/html/resources/articles/ui-1.5.jd
+++ /dev/null
@@ -1,50 +0,0 @@
-page.title=UI Framework Changes in Android 1.5
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-
-<p>Android 1.5 offers a different default look for
-the Android UI framework, in relation to Android 1.0 and 1.1. The
-screenshots below show the same activity (creating a new contact) on
-Android 1.1 and Android 1.5:</p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 277px;" src="images/android.png" alt="" id="BLOGGER_PHOTO_ID_5323141124169754690" border="0">
-
-<p>You
-can see in this example that the buttons and checkboxes have a new
-appearance. Even though these changes do not affect binary nor source
-compatibility, they might still break the UI of your apps. As part of
-the UI refresh, the minimum size of some of the widgets has changed.
-For instance, Android 1.1 buttons have a minimum size of 44x48 pixels
-whereas Android 1.5 buttons now have a minimum size of 24x48 pixels.
-The image below compares the sizes of Android 1.1 buttons with Android
-1.5 buttons:</p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 100px; height: 130px;" src="images/buttons.png" alt="" border="0">
-
-<p>If you rely on the button's minimum size, then the layout of your application
-may not be the same in Android 1.5 as it was in Android 1.1 because of this
-change. This would happen for instance if you created a grid of buttons using
-<code>LinearLayout</code> and relying on the minimum size yielded by
-<code>wrap_content</code> to align the buttons properly:</p>
-
-<img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 277px;" src="images/grid.png" alt="" id="BLOGGER_PHOTO_ID_5323147943613255250" border="0">
-
-<p>This layout could easily be fixed by using the
-<code>android:layout_weight</code> attribute or by replacing the
-<code>LinearLayout</code> containers with a <code>TableLayout</code>.</p>
-
-<p>This example is probably the worst-case UI issue you may encounter when
-running your application on Android 1.5. Other changes introduced in Android
-1.5, especially bug fixes in the layout views, may also impact your
-application—especially if it is relying on faulty/buggy behavior of the UI
-framework.</p>
-
-<p>If you encounter issues when running your application on Android 1.5, please
-join us on the <a href="{@docRoot}resources/community-groups.html">Android
-developer groups</a> or <a
-href="{@docRoot}resources/community-more.html">IRC</a> so that we and the
-Android community can help you fix your application.</p>
-
-<p>Happy coding!</p>
diff --git a/docs/html/resources/articles/ui-1.6.jd b/docs/html/resources/articles/ui-1.6.jd
deleted file mode 100644
index b3238e3b0fc9..000000000000
--- a/docs/html/resources/articles/ui-1.6.jd
+++ /dev/null
@@ -1,132 +0,0 @@
-page.title=UI Framework Changes in Android 1.6
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>Android 1.6 introduces numerous enhancements and bug fixes in the UI
-framework. This article highlights two improvements in particular: more flexible
-and robust RelativeLayout and easier click listeners. </p>
-
-<h3>More flexible, more robust RelativeLayout</h3>
-
-<p>RelativeLayout is the most versatile layout offered by the Android UI toolkit
-and can be successfully used to reduce the number of views created by your
-applications. This layout used to suffer from various bugs and limitations,
-sometimes making it difficult to use without having some knowledge of its
-implementation. To make your life easier, Android 1.6 comes with a revamped
-RelativeLayout. </p>
-
-<p>This new implementation not only fixes all known bugs in
-RelativeLayout but also addresses its major limitation: the
-fact that views had to be declared in a particular order. Consider the following
-XML layout:</p>
-
-<pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
-
-&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="64dip"
- android:padding="6dip"&gt;
-
- &lt;TextView
- android:id="@+id/band"
- android:layout_width="fill_parent"
- android:layout_height="26dip"
-
- android:layout_below="@+id/track"
- android:layout_alignLeft="@id/track"
- android:layout_alignParentBottom="true"
-
- android:gravity="top"
- android:text="The Airborne Toxic Event" /&gt;
-
- &lt;TextView
- android:id="@id/track"
- android:layout_marginLeft="6dip"
- android:layout_width="fill_parent"
- android:layout_height="26dip"
-
- android:layout_toRightOf="@+id/artwork"
-
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:gravity="bottom"
- android:text="Sometime Around Midnight" /&gt;
-
- &lt;ImageView
- android:id="@id/artwork"
- android:layout_width="56dip"
- android:layout_height="56dip"
- android:layout_gravity="center_vertical"
-
- android:src="@drawable/artwork" /&gt;
-
-&lt;/RelativeLayout&gt;</pre>
-
-<p>This code builds a very simple layout—an image on the left with two lines of
-text stacked vertically. This XML layout is perfectly fine and contains no
-errors. Unfortunately, Android 1.5's RelativeLayout is incapable of rendering it
-correctly, as shown in the screenshot below.</p>
-
-<img src="images/ui-1.6_002.png" style="width: 320px; height: 480px;">
-
-<p>The problem is that this layout uses forward references. For instance, the
-"band" TextView is positioned below the "track" TextView but "track" is declared
-after "band" and, in Android 1.5, RelativeLayout does not know how to handle
-this case. Now look at the exact same layout running on Android 1.6:</p>
-
-<img src="images/ui-1.6.png" style="width: 320px; height: 480px;">
-
-<p>As you can see Android 1.6 is now better able to handle forward reference.
-The result on screen is exactly what you would expect when writing the
-layout.</p>
-
-<h3>Easier click listeners</h3>
-
-<p>Setting up a click listener on a button is very common task, but
-it requires quite a bit of boilerplate code:</p>
-
-<pre>findViewById(R.id.myButton).setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- // Do stuff
- }
-});</pre>
-
-<p>One way to reduce the amount of boilerplate is to share a single click
-listener between several buttons. While this technique reduces the
-number of classes, it still requires a fair amount of code and it still
-requires giving each button an id in your XML layout file:</p>
-
-<pre>View.OnClickListener handler = View.OnClickListener() {
- public void onClick(View v) {
- switch (v.getId()) {
- case R.id.myButton: // doStuff
- break;
- case R.id.myOtherButton: // doStuff
- break;
- }
- }
-}
-
-findViewById(R.id.myButton).setOnClickListener(handler);
-findViewById(R.id.myOtherButton).setOnClickListener(handler);</pre>
-
-<p>With Android 1.6, none of this is necessary. All you have to do is
-declare a public method in your Activity to handle the click
-(the method <i>must</i> have one View argument):</p>
-
-<pre>class MyActivity extends Activity {
- public void myClickHandler(View target) {
- // Do stuff
- }
-}</pre>
-
-<p>And then reference this method from your XML layout:</p>
-
-<pre>&lt;Button android:onClick="myClickHandler" /&gt;</pre>
-
-<p>This new feature reduces both the amount of Java and XML you have to write,
-leaving you more time to concentrate on your application.</p>
-
-<p>The Android team is committed to helping you write applications in the
-easiest and most efficient way possible. We hope you find these improvements
-useful and we're excited to see your applications on Google Play.</p>
diff --git a/docs/html/resources/articles/using-webviews.jd b/docs/html/resources/articles/using-webviews.jd
deleted file mode 100644
index 3a2430b9496c..000000000000
--- a/docs/html/resources/articles/using-webviews.jd
+++ /dev/null
@@ -1,63 +0,0 @@
-page.title=Using WebViews
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>A small application called <a title="WebViewDemo"
-href="http://code.google.com/p/apps-for-android/source/browse/#svn/trunk/Samples
-/WebViewDemo">WebViewDemo</a> shows how you can add web content to your
-application. You can find it in the <a title="apps-for-android"
-href="http://code.google.com/p/apps-for-android/">apps-for-android</a> project.
-This application demonstrates how you can embed a {@link android.webkit.WebView}
-into an activity and also how you can have two way communication between your
-application and the web content. </p>
-
-<p>A
-WebView uses the same rendering and JavaScript engine as the browser,
-but it runs under the control of your application. The WebView can be
-full screen or you can mix it with other Views. The content for your
-WebView can come from anywhere. The WebView can download content from
-the web, or it can come from local files stored in your assets
-directory. The content can even be dynamically generated by your
-application code. For this example, the HTML comes from a local file
-called <a title="demo.html" href="http://code.google.com/p/apps-for-android/source/browse/trunk/Samples/WebViewDemo/assets/demo.html">demo.html</a>.</p>
-
-<p>This application does not do very much: when you click on the
-android, he raises his arm.</p>
-
-<div style="text-align: center;"><img style="width: 322px; height: 482px;" src="images/webview.png"></div>
-
-<p>This
-could, of course, easily be accomplished with a little bit of
-JavaScript. Instead, though, WebViewDemo takes a slightly more
-complicated path to illustrate two very powerful features of WebView.</p>
-
-<p>First,
-JavaScript running inside the WebView can call out to code in your
-Activity. You can use this to have your JavaScript trigger actions like
-starting a new activity, or it can be used to fetch data from a
-database or {@link android.content.ContentProvider}. The API for this
-is very simple: just call the
-{@link android.webkit.WebView#addJavascriptInterface(java.lang.Object, java.lang.String) addJavascriptInterface()}
-method on your WebView. You pass an object whose methods you want to
-expose to JavaScript and the name to use when making calls. You can see
-the exact syntax in <a title="WebViewDemo.java"
-href="http://code.google.com/p/apps-for-android/source/browse/trunk/Samples/
-WebViewDemo/src/com/google/android/webviewdemo/WebViewDemo.java">WebViewDemo.
-java</a>. Here we are making our DemoJavascriptInterface object available to
-JavaScript where it will be called "window.demo".</p>
-
-<p>Second, your Activity can invoke JavaScript methods. All you have to do
-is call the {@link android.webkit.WebView#loadUrl(java.lang.String) loadUrl}
-method with the appropriate JavaScript call:</p>
-
-<p><code style="padding-left: 25px;">mWebView.loadUrl("javascript:wave()");</code></p>
-
-<p>Our <a title="WebViewDemo"
-href="http://code.google.com/p/apps-for-android/source/browse/#svn/trunk/Samples
-/WebViewDemo">WebViewDemo</a> uses both techniques: when you click on the
-android, it calls out to the activity, which then turns around and calls back
-into the JavaScript. WebViews are very powerful, and they may be a valuable tool
-to help you build your application – especially if you already have a lot of
-HTML content. As it happens, we've used exactly this approach in some of the
-applications we've written.</p>
diff --git a/docs/html/resources/articles/wikinotes-intents.jd b/docs/html/resources/articles/wikinotes-intents.jd
deleted file mode 100644
index 78fe62e101d1..000000000000
--- a/docs/html/resources/articles/wikinotes-intents.jd
+++ /dev/null
@@ -1,257 +0,0 @@
-page.title=WikiNotes: Routing Intents
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-
-<p>In <a href="wikinotes-linkify.html">the Linkify! article</a>, we talked about
-using Linkify to turn wiki words (those that match a regular expression that we
-have defined) into a <code>content:</code> URI and defining a path to data that
-matched a note belonging to that wiki word. As an example, a matching word like
-<code>ToDoList</code> would be turned into a URI such as
-<code>content://com.google.android.wikinotes.db.wikinotes/wikinotes/ToDoList
-</code> and then acted upon using the VIEW action from the Linkify class.</p>
-
-<p>This article examines how the Android system takes this combination of
-<code>VIEW</code> action and <code>content:</code> URI and finds the correct
-activity to fire in order to do something with the data. It will also explain
-how the other default links created by Linkify, such as web URLs and telephone
-numbers, also result in the correct activity to handle that data type being
-fired. Finally, this article will start to examine the custom
-<code>ContentProvider</code> that has been created to handle WikiNotes data. The
-full description of the ContentProvider and what it does will span a couple more
-articles as well, because there is a lot to cover.</p>
-
-<h3>The Linkify-calls-intent Workflow</h3>
-
-<p>At a high level, the steps for Linkify to invoke an intent, and for the
-resulting activity (if any) to handle it, look like this:</p>
-
-<ol>
- <li>Linkify is invoked on a TextView to turn matching text patterns into Intent links.</li>
- <li>Linkify takes over monitoring for those Intent links being selected by the user.</li>
- <li>When the user selects a link, Linkify calls the VIEW action using the content: URI associated with the link.</li>
- <li>Android takes the content: URI that represents the data, and looks for a
-ContentProvider registered in the system that matches the URI.</li>
- <li>If a match is found, Android queries the ContentProvider using the URI,
-and asks what MIME type the data that will be returned from the URI is.</li>
- <li>Android then looks for an activity registered in the system with an
-intent-filter that matches both the VIEW action, and the MIME type for
-the data represented by the content: URI.</li>
- <li>Assuming a match is found, Linkify then invokes the intent for
-the URI, at which point the activity takes over, and is handed
-the content: URI.</li>
- <li>The activity can then use the URI to retrieve the data and act on
-it.</li>
-</ol>
-
-<p>This is actually a simpler process than it
-sounds, and it is quite lightweight as well. Perhaps a more
-understandable statement about how it works might be:</p>
-
-<p>Linkify is used to turn matching text into hot-links. When the user
-selects a hot-link, Android takes the data locator represented by the
-hot-link and looks for a data handler for that data locator. If it
-finds one, it asks for what type of data is returned for that locator.
-It then looks for something registered with the system that handles
-that type of data for the VIEW action, and starts it, including the
-data locator in the request.</p>
-
-<p>The real key here is the MIME type. MIME stands for <a
-href="http://en.wikipedia.org/wiki/MIME">Multipurpose Internet Mail
-Extensions</a> &mdash; a standard for sending attachments over email. The MIME
-type (which is the part Android uses) is a way of describing certain kinds of
-data. That type is then used to look for an Activity that can do something with
-that data type. In this way, ContentProviders and Activities (or other
-IntentReceivers) are decoupled, meaning that a given Content URI might have a
-different ContentProvider to handle it, but could still use the same MIME type
-meaning that the same activity could be called upon to handle the resulting
-data.</p>
-
-<h3>Linkify on a wiki word</h3>
-
-<p>Using the above workflow, let's take a look at exactly how the process
-works in WikiNotes for Android:</p>
-
-<p>First, Linkify is used to turn text matching the wiki word regular expression
-into a link that provides a Content URI for that wiki word, for example
-<code>content://com.google.android.wikinotes.db.wikinotes/wikinotes/ToDoList</code>.</p>
-
-<p>When the user clicks on the wiki word link, Linkify invokes the VIEW
-action on the Content URI. At this point, the Android system takes over
-getting the Intent request to the correct activity.</p>
-
-<p>Next, Android looks for a ContentProvider that has been registered
-with the system to handle URIs matching our Content URI format.</p>
-
-<p>In our case, we have a definition inside
-<a href="http://code.google.com/p/apps-for-android/source/browse/trunk/WikiNotes/AndroidManifest.xml">our application's AndroidManifest.xml</a>
-file that reads:</p>
-
-<pre>&lt;provider name="com.google.android.wikinotes.db.WikiNotesProvider"
- android:authorities="com.google.android.wikinotes.db.wikinotes" /&gt;</pre>
-
-<p>This establishes that we have a ContentProvider defined in our application
-that provides the "root authority":
-<code>com.google.android.wikinotes.db.wikinotes</code>. This is the first part
-of the Content URI that we create for a wiki word link. Root Authority is just
-another way of thinking about a descriptor that is registered with Android to
-allow requests for certain URLs to be routed to the correct class.</p>
-
-<p>So, the whole definition is that a class called
-<code>com.google.android.wikinotes.db.WikiNotesProvider</code> is registered
-with the system as able to handle the
-<code>com.google.android.wikinotes.db.wikinotes</code> root authority (i.e. URIs
-starting with that identifier).</p>
-
-<p>From here, Android takes the rest of the URI and presents it to that
-ContentProvider. If you look at the
-<a href="http://code.google.com/p/apps-for-android/source/browse/trunk/WikiNotes/src/com/google/android/wikinotes/db/WikiNotesProvider.java">WikiNotesProvider
-class</a> and scroll to the very bottom, in the static block there, you can see
-the pattern definitions to match the rest of the URL.</p>
-
-<p>In particular, take a look at the two lines:</p>
-
-<pre>URI_MATCHER.addURI(WikiNote.WIKINOTES_AUTHORITY, "wikinotes", NOTES);
-URI_MATCHER.addURI(WikiNote.WIKINOTES_AUTHORITY, "wikinotes/*", NOTE_NAME);</pre>
-
-<p>These are the definitions of URIs that our ContentProvider recognizes and can
-handle. The first recognizes a full URI of
-<code>content://com.google.android.wikinotes.db.wikinotes/wikinotes</code> and
-associates that with a constant called NOTES. This is used elsewhere in the
-ContentProvider to provide a list of all of the wiki notes in the database when
-the URI is requested.</p>
-
-<p>The second line uses a wildcard &mdash; '*' &mdash; to match a request of the
-form that Linkify will create, e.g.
-<code>content://com.google.android.wikinotes.db.wikinotes/wikinotes/ToDoList
-</code>. In this example, the * matches the ToDoList part of the URI and is
-available to the handler of the request, so that it can fish out the matching
-note for ToDoList and return it as the data. This also associates that match
-with a constant called NOTE_NAME, which again is used as an identifier elsewhere
-in the ContentProvider.</p>
-
-<p>The other matches in this static block are related to forms of
-searching that have been implemented in the WikiNotes for Android
-application, and will be covered in later articles. Likewise, how the
-data is obtained from this matching pattern will be the subject of the
-next article.</p>
-
-<p>For right now we are concerned with the MIME type for the URI. This is
-defined in the <code>getType()</code> method also in the
-<a href="http://code.google.com/p/apps-for-android/source/browse/trunk/WikiNotes/src/com/google/android/wikinotes/db/WikiNotesProvider.java">WikiNotesProvider
-class</a> (about halfway through the file). Take a quick look at this. The key
-parts for now are:</p>
-
-<pre>case NOTES:
- return "vnd.android.cursor.<b>dir</b>/vnd.google.wikinote";</pre>
-
-<p>and</p>
-
-<pre>case NOTE_NAME:
- return "vnd.android.cursor.<b>item</b>/vnd.google.wikinote";</pre>
-
-<p>These are the same constant names we defined in our pattern
-matchers. In the first case, that of the all notes URI, the MIME type
-returned is <code>vnd.android.cursor.dir/vnd.google.wikinote</code>
-which is like saying an Android list (dir) of Google wiki notes (the
-vnd bit is MIME-speak for "vendor specific definition"). Likewise, in
-the case of a NOTE_NAME match, the MIME type returned is
-<code>vnd.android.cursor.item/vnd.google.wikinote</code> which is
-like saying an Android item of Google wiki notes.</p>
-
-<p>Note that if you define your own MIME data types like this, the
-<code>vnd.android.cursor.dir</code> and <code>vnd.android.cursor.item</code>
-categories should be retained, since they have meaning to the Android
-system, but the actual item types should be changed to reflect your
-particular data type.</p>
-
-<p>So far Android has been able to find a ContentProvider that handles
-the Content URI supplied by the Linkify Intent call, and has queried
-the ContentProvider to find out the MIME types for that URI. The final
-step is to find an activity that can handle the VIEW action for that
-MIME type. Take a look in the the
-<a href="http://code.google.com/p/apps-for-android/source/browse/trunk/WikiNotes/AndroidManifest.xml">AndroidManifest.xml file</a>
-again. Inside the WikiNotes activity definition, you will see:</p>
-
-<pre>&lt;intent-filter&gt;
- &lt;action name="android.intent.action.VIEW"/&gt;
- &lt;category name="android.intent.category.DEFAULT"/&gt;
- &lt;category name="android.intent.category.BROWSABLE"/&gt;
- &lt;data mimetype="vnd.android.cursor.item/vnd.google.wikinote"/&gt;
-&lt;/intent-filter&gt;</pre>
-
-<p>This is the correct combination of matches for the VIEW action on a
-WikiNote type that is requested from the LINKIFY class. The DEFAULT
-category indicates that the WikiNotes activity should be treated as a
-default handler (a primary choice) for this kind of data, and the
-BROWSABLE category means it can be invoked from a "browser", in this
-case the marked-up Linkified text.</p>
-
-<p>Using this information, Android can match up the VIEW action request
-for the WikiNotes data type with the WikiNotes activity, and can then
-use the WikiNotes activity to handle the request.</p>
-
-<h3>Why do it like this?</h3>
-
-<p>It's quite a trip through the system, and there is a lot to absorb
-here, but this is one of the main reasons I wanted to write WikiNotes
-in the first place. If you follow and understand the steps here, you'll
-have a good grasp of the whole Intents mechanism in Android, and how it
-helps loosely coupled activities cooperate to get things done.</p>
-
-<p>In this case, we could have found another way to detect wiki words
-based on a regular expression, and maybe written our own handler to
-intercept clicks within the TextView and dig out the right data and
-display it. This would seem to accomplish the same functionality just
-as easily as using intents, so what is the advantage to using the full
-Intents mechanism?</p>
-
-<p>In fact there are several advantages:</p>
-
-<p>The most obvious is that because we are using the standard Intent
-based approach, we are not limited to just linking and navigating to
-other wiki notes. We get similar behavior to a number of other data
-types as well. For example, a telephone number or web URL in a wiki
-note will be marked up by Linkify, and using this same mechanism (VIEW
-action on the linked data type) the browser or dialer activities will
-be automatically fired.</p>
-
-<p>It also means that each operation on a wiki note can be treated as a
-separate life cycle by our activity. We are not dealing with swapping
-data in and out of an existing activity - each activity works on a
-particular wiki note and that's all you have to worry about.</p>
-
-<p>Another advantage is that we now have a public activity to handle
-VIEW actions in WikiNotes no matter where the request comes from.
-Another application could request to view a wiki note (perhaps without
-even knowing what kind of data it is) and our activity could start up
-and handle it.</p>
-
-<p>The backstack is automatically maintained for you too. As you
-forward navigate through WikiNotes, Android maintains the history of
-notes visited, and so when you hit the back button you go back to the
-last note you were on. All this is free because we rely on the Android
-intents mechanism.</p>
-
-<p>Finally, if you run WikiNotes for Android and then start DDMS to
-take a look at the Activity threads in the WikiNotes application while
-it is running, you can see that despite what you might think, letting
-Android manage the navigation is very efficient. Create a few linked
-notes, as many links deep as you like, and then follow them. If you
-follow links hundreds of notes deep, you will still only see a handful
-of WikiNotes activities. Android is managing the activities, closing
-the older ones as necessary and using the life cycle to swap data in
-and out.</p>
-
-<h3>Next Time</h3>
-
-<p>This was a long article, but necessarily so. It demonstrates the
-importance of the Intents mechanism and to reinforce the notion that it
-should be used whenever possible for forward navigation, even within a
-single application. Illustrating this is one of the primary reasons I
-wrote WikiNotes for Android in the first place.</p>
-
-<p>In the next article we will look deeper into the ContentProvider and
-examine how it turns a Content URI into a row (or several rows) of data
-that can be used by an activity.</p>
diff --git a/docs/html/resources/articles/wikinotes-linkify.jd b/docs/html/resources/articles/wikinotes-linkify.jd
deleted file mode 100644
index fb49f8694ee5..000000000000
--- a/docs/html/resources/articles/wikinotes-linkify.jd
+++ /dev/null
@@ -1,115 +0,0 @@
-page.title=WikiNotes: Linkify your Text!
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<img style="margin-left: 1.5em; margin-bottom:1.5em; float: right;"
-src="images/WikiNotes.png" alt="Linkify example" border="0">
-
-<p>This article introduces <a
-href="http://android-developers.blogspot.com/2008/03/announcing-apps-for-android
-.html">WikiNotes for Android</a>, part of the <a
-href="http://code.google.com/p/apps-for-android/">Apps for Android</a>
-project. It covers the use of Linkify to turn ordinary text views
-into richer, link-oriented content that causes Android intents to fire
-when a link is selected.</p>
-
-<p><strong>Linkify</strong>: The {@link android.text.util.Linkify} class in the
-framework is perfect for creating a wiki note pad. It lets you specify a <a
-title="regular expression"
-href="http://en.wikipedia.org/wiki/Regular_expression">regular expression
-&raquo;</a>
-to match, and a scheme to prepend. The scheme is a string that, when
-the matched text is added, forms a Content URI to allow the correct
-data to be looked up.</p>
-
-<p>For example, in our case we want to look for a regular expression match for a
-WikiWord (that is, a word with <a title="word with camel case"
-href="http://en.wikipedia.org/wiki/CamelCase">camel case &raquo;</a> and no
-spaces). Linkify can then turn this into a Content URI &mdash; something like
-<code>content://com.google.android.wikinotes.db.wikinotes/wikinotes/WikiWord</code>,
-which can then be used to locate the correct wiki page from a
-{@link android.content.ContentProvider}.</p>
-
-<p>As a bonus, the Linkify class also defines several default matches,
-in particular it is able to turn web URLs, email addresses and
-telephone numbers into active links which fire Android intents
-automatically.</p>
-
-<p>Linkify can be passed any TextView in your application, and will
-take care of creating the links and enabling their "clickability" for
-you.</p>
-
-<p><strong>Default Linkify</strong>: Using the set of default active
-link options is very straightforward. Simply pass it a handle to a
-TextView with content in it, and the <code>Linkify.ALL</code> flag:</p>
-
-<pre>TextView noteView = (TextView) findViewById(R.id.noteview);
-noteView.setText(someContent);
-Linkify.addLinks(noteView, Linkify.ALL);</pre>
-
-<p>and that's it. The <code>Linkify.ALL</code> flag applies all of the predefined
-link actions, and the TextView will be immediately updated with a set
-of active links which, if you select them, fire default intents for the
-actions (e.g. a web URL will start the browser with that URL, a
-telephone number will bring up the phone dialer with that number ready
-to call, etc.).</p>
-
-<p><strong>Custom Linkify</strong>: So what about our WikiWord? There is no
-pre-defined action for that, so it needs to be defined and associated with a
-scheme.</p>
-
-<p>The first task is to define a regular expression that matches the kind of
-WikiWords we want to find. The regex in this case is:</p>
-
-<pre>\b[A-Z]+[a-z0-9]+[A-Z][A-Za-z0-9]+\b</pre>
-
-<p>Obvious, no? Well actually this is equivalent to the following
-description: "Starting with a word boundary (the \b) find at least one
-upper case letter, followed by at least one lower case letter or a
-numeric digit, followed by another upper case letter, and then any mix
-of upper case, lower case or numeric until the next word boundary (the
-final \b)". Regular expressions are not very pretty, but they are an
-extremely concise and accurate way of specifying a search pattern.</p>
-
-<p>We also need to tell Linkify what to do with a match to the
-WikiWord. Linkify will automatically append whatever is matched to a
-scheme that is supplied to it, so for the sake of argument let's assume
-we have a {@link android.content.ContentProvider} that matches the
-following content URI:</p>
-
-<pre>content://com.google.android.wikinotes.db.wikinotes/wikinotes/WikiWord</pre>
-
-<p>The WikiWord part will be appended by Linkify when it finds a match, so we
-just need the part before that as our scheme.</p>
-
-<p>Now that we have these two things, we use Linkify to connect them up:</p>
-
-<pre>Pattern wikiWordMatcher = Pattern.compile("\\b[A-Z]+[a-z0-9]+[A-Z][A-Za-z0-9]+\\b");
-String wikiViewURL = "content://com.google.android.wikinotes.db.wikinotes/wikinotes/";
-Linkify.addLinks(noteView, wikiWordMatcher, wikiViewURL);</pre>
-
-<p>Note that the \b's had to be escaped with double backslashes for the Java
-Pattern.compile line.</p>
-
-<p>Linkify can be used multiple times on the same view to add more
-links, so using this after the Default Linkify call means that the
-existing active links will be maintained and the new WikiWords will be
-added. You could define more Linkify actions and keep applying them to
-the same TextView if you wanted to.</p>
-
-<p>Now, if we have a WikiWord in the TextView, let's say
-<code>MyToDoList</code>, Linkify will turn it into an active link with the
-content URI:</p>
-
-<pre>content://com.google.android.wikinotes.db.wikinotes/wikinotes/MyToDoList</pre>
-
-<p>and if you click on it, Android will fire the default intent for that content
-URI.</p>
-
-<p>For this to all work, you will need a ContentProvider that
-understands that Content URI, and you will need a default activity
-capable of doing something with the resulting data. I plan to cover
-these in future blog entries (and soon). In fact, the whole Wiki Note
-Pad application is currently undergoing some clean up and review, and
-will then hopefully be released as a sample application.</p>
diff --git a/docs/html/resources/articles/window-bg-speed.jd b/docs/html/resources/articles/window-bg-speed.jd
deleted file mode 100644
index c5e5e9095a98..000000000000
--- a/docs/html/resources/articles/window-bg-speed.jd
+++ /dev/null
@@ -1,127 +0,0 @@
-page.title=Window Backgrounds &amp; UI Speed
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>Some Android applications require to squeeze every bit of performance out of
-the UI toolkit and there are many ways to do so. In this article, you will
-discover how to speed up the drawing and the <em>perceived</em> startup time of
-your activities. Both these techniques rely on a single feature, the window's
-background drawable.</p>
-
-<p>The term <em>window background</em> is a bit misleading, however. When you
-setup your user interface by calling <code>setContentView()</code> on an
-{@link android.app.Activity}, Android adds your views to the <code>Activity</code>'s
-window. The window however does not contain only your views, but a few others
-created for you. The most important one is, in the current implementation used
-on the T-Mobile G1, the <code>DecorView</code>, highlighted in the view
-hierarchy below:</p>
-
-<div style="text-align: center;"><img src="images/window_background_root.png" alt="A typical Android view hierarchy"></div>
-
-<p>The <code>DecorView</code> is the view that actually holds the
-window's background drawable. Calling
-{@link android.view.Window#setBackgroundDrawable(android.graphics.drawable.Drawable) getWindow().setBackgroundDrawable()}
-from your <code>Activity</code> changes the background of the window by changing
-the <code>DecorView</code>'s background drawable. As mentioned before, this
-setup is very specific to the current implementation of Android and can change
-in a future version or even on another device.</p>
-
-<p>If you are using the standard Android themes, a default background drawable
-is set on your activities. The standard theme currently used on the T-Mobile G1
-uses for instance a {@link android.graphics.drawable.ColorDrawable}. For most
-applications, this background drawable works just fine and can be left alone. It
-can however impacts your application's drawing performance. Let's take the
-example of an application that always draws a full screen opaque picture:</p>
-
-<div style="text-align: center;"><img src="images/window_background.png" alt="An opaque user interface doesn't need a window background"></div>
-
-<p>You can see on this screenshot that the window's background is invisible,
-entirely covered by an <code>ImageView</code>. This application is setup to
-redraw as fast as it can and draws at about 44 frames per second, or 22
-milliseconds per frame (<strong>note:</strong> the number of frames per second
-used in this article were obtained on a T-Mobile G1 with my finger on the screen
-so as to reduce the drawing speed which would otherwise be capped at 60 fps.) An
-easy way to make such an application draw faster is to <em>remove</em> the
-background drawable. Since the user interface is entirely opaque, drawing the
-background is simply wasteful. Removing the background improves the performance
-quite nicely:</p>
-
-<div style="text-align: center;"><img src="images/window_background_null.png" alt="Remove the background for faster drawing"></div>
-
-<p>In this new version of the application, the drawing speed went up to 51
-frames per second, or 19 milliseconds per frame. The difference of 3
-milliseconds per is easily explained by the speed of the memory bus on the
-T-Mobile G1: it is exactly the time it takes to move the equivalent of a
-screenful of pixels on the bus. The difference could be even greater if the
-default background was using a more expensive drawable.</p>
-
-<p>Removing the window's background can be achieved very easily by using
-a custom theme. To do so, first create a file called
-<code>res/values/theme.xml</code> containing the following:</p>
-
-<pre class="prettyprint">&lt;resources&gt;
- &lt;style name="Theme.NoBackground" parent="android:Theme"&gt;
- &lt;item name="android:windowBackground"&gt;@null&lt;/item&gt;
- &lt;/style&gt;
-&lt;/resources&gt;</pre>
-
-<p>You then need to apply the theme to your activity by adding the attribute
-<code>android:theme="@style/Theme.NoBackground"</code> to your
-<code>&lt;activity /&gt;</code> or <code>&lt;application /&gt;</code> tag. This
-trick comes in very handy for any app that uses a <code>MapView</code>, a
-<code>WebView</code> or any other full screen opaque view.</p>
-
-<p><strong>Opaque views and Android</strong>: this optimization is currently
-necessary because the Android UI toolkit is not smart enough to prevent the
-drawing of views hidden by opaque children. The main reason why this
-optimization was not implemented is simply because there are usually very few
-opaque views in Android applications. This is however something that I
-definitely plan on implementing as soon as possible and I can only apologize for
-not having been able to do this earlier.</p><p>Using a theme to change the
-window's background is also a fantastic way to improve the <em>perceived</em>
-startup performance of some of your activities. This particular trick can only
-be applied to activities that use a custom background, like a texture or a logo.
-The <a href="http://code.google.com/p/shelves">Shelves</a> application is a good
-example:</p>
-
-<div style="text-align: center;"><img src="images/shelves2.png" alt="Textured backgrounds are good candidates for window's background"></div>
-
-<p>If this application simply set the wooden background in the XML layout or in
-<code>onCreate()</code> the user would see the application startup with the
-default theme and its dark background. The wooden texture would only appear
-after the inflation of the content view and the first layout/drawing pass. This
-causes a jarring effect and gives the user the impression that the application
-takes time to load (which can actually be the case.) Instead, the application
-defines the wooden background in a theme, picked up by the system as soon as the
-application starts. The user never sees the default theme and gets the
-impression that the application is up and running right away. To limit the
-memory and disk usage, the background is a tiled texture defined in
-<code>res/drawable/background_shelf.xml</code>:</p>
-
-<pre class="prettyprint">&lt;bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/shelf_panel"
- android:tileMode="repeat" /&gt;</pre><p>This drawable is simply referenced by the theme:</p>
-
-<pre class="prettyprint">&lt;resources&gt;
- &lt;style name="Theme.Shelves" parent="android:Theme"&gt;
- &lt;item name="android:windowBackground"&gt;@drawable/background_shelf&lt;/item&gt;
- &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
- &lt;/style&gt;
-&lt;/resources&gt;</pre>
-
-<p>The same exact trick is used in the <em>Google Maps application that ships
-with the T-Mobile G1. When the application is launched, the user immediately
-sees the loading tiles of <code>MapView</code>. This is only a trick, the theme
-is simply using a tiled background that looks exactly like the loading tiles of
-<code>MapView</code>.</em></p>
-
-<p>Sometimes the best tricks are also the simplest, so the next time you create
-an activity with an opaque UI or a custom background, remember to change the
-window's background.</p>
-
-<p><a href="http://progx.org/users/Gfx/android/WindowBackground">Download the source code of the first example</a>.</p>
-
-<p><a href="http://code.google.com/p/shelves/">Download the source code of Shelves</a>.</p>
-
-
diff --git a/docs/html/resources/articles/zipalign.jd b/docs/html/resources/articles/zipalign.jd
deleted file mode 100644
index d3c68a6b690f..000000000000
--- a/docs/html/resources/articles/zipalign.jd
+++ /dev/null
@@ -1,100 +0,0 @@
-page.title=Zipalign: an Easy Optimization
-parent.title=Articles
-parent.link=../browser.html?tag=article
-@jd:body
-
-<p>The Android SDK includes a tool called <a
-href="{@docRoot}guide/developing/tools/zipalign.html"><code>zipalign</code></a>
-that optimizes the way an application is packaged. Running zipalign against your
-application enables Android to interact it more efficiently at run time and thus
-has the potential to make it and the overall system run faster. We strongly
-encourage you to use <code>zipalign</code> on both new and already published
-applications and to make the optimized version available &mdash; even if your
-application targets a previous version of Android. This article describes how
-<code>zipalign</code> helps performance and how to use it to optimize your
-app.</p>
-
-<p>In Android, data files stored in each application's apk are accessed by
-multiple processes: the installer reads the manifest to handle the
-permissions associated with that application; the Home application
-reads resources to get the application's name and icon; the system
-server reads resources for a variety of reasons (e.g. to display that
-application's notifications); and last but not least, the resource
-files are obviously used by the application itself.</p>
-
-<p>The resource-handling code in Android can efficiently access resources when
-they're aligned on 4-byte boundaries by memory-mapping them. But for resources
-that are not aligned (that is, when <code>zipalign</code> hasn't been run on an
-apk), it has to fall back to explicitly reading them &mdash; which is slower and
-consumes additional memory.</p>
-
-<p>For an application developer, this fallback mechanism is very
-convenient. It provides a lot of flexibility by allowing for several
-different development methods, including those that don't include
-aligning resources as part of their normal flow.</p>
-
-<p>Unfortunately, for users the situation is reversed &mdash; reading resources
-from unaligned apks is slow and takes a lot of memory. In the best case, the
-only visible result is that both the Home application and the unaligned
-application launch slower than they otherwise should. In the worst case,
-installing several applications with unaligned resources increases memory
-pressure, thus causing the system to thrash around by having to constantly start
-and kill processes. The user ends up with a slow device with a poor battery
-life.</p>
-
-<p>Luckily, it's very easy for you to align the resources in your application:</p>
-
-<ul>
-<li>Using ADT:</li>
-<li style="list-style-type: none; list-style-image: none; list-style-position: outside;">
-<ul>
-<li>The ADT plugin for Eclipse (starting from version 0.9.3) will automatically
-align release application packages if the export wizard is used to create them.
-To use the wizard, right click the project and choose "Android Tools" &gt;
-"Export Signed Application Package..." It can also be accessed from the first
-page of the <code>AndroidManifest.xml</code> editor.</li>
-</ul>
-</li>
-<li>Using Ant:</li><li style="list-style-type: none; list-style-image: none; list-style-position: outside;">
-
-<ul>
-<li>The <em>Ant</em> build script (starting from Android 1.6) can align
-application packages. Targets for older versions of the Android platform are not
-aligned by the <em>Ant</em> build script and need to be manually aligned.</li>
-<li>Starting from the Android 1.6 SDK, Ant aligns and signs packages automatically,
-when building in debug mode.</li>
-<li>In release mode, Ant aligns packages only if it has enough
-information to sign the packages, since aligning has to happen after signing. In
-order to be able to sign packages, and therefore to align them, <em>Ant</em>
-needs to know the location of the keystore and the name of the key in
-<code>ant.properties</code>. The name of the properties are
-<code>key.store</code> and <code>key.alias</code> respectively. If those
-properties are present, the signing tool will prompt to enter the store/key
-passwords during the build, and the script will sign and then align the apk
-file. If the properties are missing, the release package will not be signed, and
-therefore will not get aligned either.</li>
-</ul>
-</li>
-<li>Manually:</li>
-<li style="list-style-type: none; list-style-image: none; list-style-position: outside;">
-<ul>
-<li>In order to manually align a package, <code>zipalign</code>
-is in the <code>tools/</code> folder of Android 1.6 and later SDKs. You can use
-it to align application packages targeting any version of Android. You should run
-it only after signing the apk file, using the following command:
-<br><code>zipalign -v 4 source.apk destination.apk</code></li>
-</ul>
-</li>
-<li>Verifying alignment:</li>
-<li style="list-style-type: none; list-style-image: none; list-style-position: outside;">
-<ul>
-<li>The following command verifies that a package is aligned:<br><code>zipalign -c -v 4 application.apk</code>
-</li>
-</ul>
-</li>
-</ul>
-
-<p>We encourage you manually run <code>zipalign</code>
-on your currently published applications and to make the newly aligned
-versions available to users. Also, don't forget to align any new
-applications going forward!</p>
diff --git a/docs/html/resources/browser.jd b/docs/html/resources/browser.jd
deleted file mode 100644
index 8a0876996ccf..000000000000
--- a/docs/html/resources/browser.jd
+++ /dev/null
@@ -1,49 +0,0 @@
-page.title=Technical Resources
-@jd:body
-
-<style type="text/css">
- {@literal @import} "{@docRoot}assets/android-developer-resource-browser.css";
-</style>
-
-<script type="text/javascript" src="{@docRoot}assets/android-developer-resource-browser.js"></script>
-<script type="text/javascript" src="{@docRoot}assets/microtemplate.js"></script>
-
-<div>
- <p style="display: none; float: right">Filter: <input id="resource-browser-keyword-filter"/></p>
- <p id="resource-browser-search-params">Showing all technical resources:</p>
-</div>
-
-<noscript>
- <p class="note"><strong>Error:</strong>
- You must have JavaScript enabled to view this page. Resources are also
- available offline in the SDK.
- </p>
-</noscript>
-
-<div id="resource-browser-results">
- <div class="no-results">No results.</div>
-</div>
-
-<script type="text/html" id="tmpl_resource_browser_result">
-<div class="result">
- <h3>
- <% if ('external' in tagsHash) { %><strong>External: </strong> <% } %>
- <a href="<%= path %>"><%= title.en %></a>
- <% if ('new' in tagsHash) { %><span class="new">new!</span> <% } %>
- </h3>
- <p class="resource-meta"><%
- var __g = ['', ''];
- if ('article' in tagsHash) {
- __g = ['Article', 'about'];
- } else if ('tutorial' in tagsHash) {
- __g = ['Tutorial', 'on'];
- } else if ('sample' in tagsHash) {
- __g = ['Sample', 'for'];
- } else if ('video' in tagsHash) {
- __g = ['Video', 'about'];
- }
- %>
- <%= __g[0] %><% if (topicsHtml) { %> <%= __g[1] %><% } %> <%= topicsHtml %></p>
- <p><%= description.en %></p>
-</div>
-</script>
diff --git a/docs/html/resources/community-groups.jd b/docs/html/resources/community-groups.jd
deleted file mode 100644
index 6bd347c82735..000000000000
--- a/docs/html/resources/community-groups.jd
+++ /dev/null
@@ -1,120 +0,0 @@
-community=true
-page.title=Developer Forums
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-
- <h2>In this document</h2>
- <ol>
- <li><a href="#StackOverflow">Android on Stack Overflow</a></li>
- <li><a href="#MailingLists">Mailing lists</a>
- <ol>
- <li><a href="#BeforeYouPost">Before you post</a></li>
- <li><a href="#UsingEmail">Using email with the mailing lists</a></li>
- <li><a href="#ApplicationDeveloperLists">Application developer mailing lists</a></li>
- </ol></li>
- <li><a href="#PlayHelp">Google Play Help Forum</a></li>
- </ol>
-
-</div>
-</div>
-
-<p>Welcome to the Android developers community! We're glad you're here and invite you to participate in discussions with other Android application developers on topics that interest you.</p>
-
-<p>The lists on this page are primarily for discussion about Android application development. If you are seeking discussion about Android source code (not application development), then please refer to the <a href="http://source.android.com/community">Open Source Project Mailing lists</a>.</p>
-
-<h2 id="StackOverflow">Stack Overflow</h2>
-
-<p><a href="http://stackoverflow.com">Stack Overflow</a> is a collaboratively edited question and answer site for programmers. It's a great place to ask technical questions about developing and maintaining Android applications. The site is especially useful for asking questions with definite answers, but can also be used for discussing best practices.</p>
-
-<p>On the site, questions and answers relating to Android use the <a href="http://stackoverflow.com/questions/tagged/android">'android' tag</a>. You can look for Android topics by adding '<code>[android]</code>' to your search query, or by visiting the tag page at:</p>
-
-<p style="margin-left: 2em"><a href="http://stackoverflow.com/questions/tagged/android">http://stackoverflow.com/questions/tagged/android</a></p>
-
-<p>If you want to ask a question on Stack Overflow, you can use <a href="http://stackoverflow.com/questions/ask">this form</a>. Before submitting the form, make sure to add the 'android' tag so that other Android developers will be able to find your question. As always, before submitting a new question, take a look at the existing topics to see whether another developer has already asked or answered the question.</p>
-
-<p>If you are getting started with Android development, Stack Overflow may be a great location to ask questions about general Java programming or setting up the Eclipse development environment. Simply tag your questions with the <a href="http://stackoverflow.com/questions/tagged/java">Java</a> or <a href="http://stackoverflow.com/questions/tagged/eclipse">Eclipse</a> tags in these cases.</p>
-
-
-<h2 id="MailingLists">Mailing lists</h2>
-
-<p>There are a number of mailing lists, powered by <a href="http://groups.google.com">Google Groups</a>, available for discussing Android application development.</p>
-
-
-<h3 id="BeforeYouPost">Before you post</h3>
-<p>Before writing a post, please try the following:</p>
-
-<ol>
-
-<li>Look through the support information available in the 'More' section of this tab. You may find the answer to your question in the <a href="{@docRoot}resources/faq/commontasks.html">Common Tasks</a>, <a href="{@docRoot}resources/faq/troubleshooting.html">Troubleshooting Tips</a>, or <a href="{@docRoot}resources/faq/index.html">FAQs</a> sections.</li>
-<li>Type in keywords of your questions in the main Android site's search bar (such as the one above). This search encompasses all previous discussions, across all groups, as well as the full contents of the site, documentation, and blogs. Chances are good that somebody has run into the same issue before.</li>
- </li>
-</ol>
-
-<p>If you can't find your answer, then we encourage you to address the community.
-As you write your post, please do the following:
-<ol>
-<li><strong>Read
-the <a href="http://source.android.com/community/groups-charter.html">mailing list charter</a></strong> that covers the community guidelines.
-</li>
-<li><strong>Select the most appropriate mailing list for your question</strong>. There are several different lists for
-developers, described below.</li>
-<li>
- <strong>Be very clear</strong> about your question
-in the subject -- it helps everyone, both those trying to answer your
-question as well as those who may be looking for information in the
-future.</li>
-<li><strong>Give plenty of details</strong> in your post to
-help others understand your problem. Code or log snippets, as well as
-pointers to screenshots, may also be helpful. For a great guide to
-phrasing your questions, read <a href="http://www.catb.org/%7Eesr/faqs/smart-questions.html">How To Ask Questions The Smart Way</a>.
- </li>
-</ol>
-
-
-<h3 id="UsingEmail">Using email with the mailing lists</h3>
-<p>Instead of using the <a href="http://groups.google.com/">Google Groups</a> site, you can use your email client of choice to participate in the mailing lists.</p>
-<p>To subscribe to a group without using the Google Groups site, use the link under "subscribe via email" in the lists above.</p>
-<p>To set up how you receive mailing list postings by email:</p>
-
-<ol><li>Sign into the group via the Google Groups site. For example, for the android-framework group you would visit <a href="http://groups.google.com/group/android-framework">http://groups.google.com/group/android-framework</a>.</li>
-<li>Click "Edit my membership" on the right side.</li>
-<li>Under "How do you want to read this group?" select one of the email options.</li>
-</ol>
-
-
-<h3 id="ApplicationDeveloperLists">Application developer mailing lists</h3>
-<ul>
-<li><strong><a href="http://groups.google.com/group/android-developers">android-developers</a></strong>
-(<a href="http://groups.google.com/group/android-developers/subscribe">subscribe</a>)<br>
-You're now an experienced Android application developer. You've grasped the basics of Android app development, you're comfortable using the SDK, now you want to move to advanced topics. Get help here with troubleshooting applications, advice on implementation, and strategies for improving your application's performance and user experience. This is the not the right place to discuss user issues (use android-discuss for that) or beginner questions with the Android SDK (use android-beginners for that).
-</li>
-
-<li><strong><a href="http://groups.google.com/group/android-discuss">android-discuss</a></strong>
-(<a href="http://groups.google.com/group/android-discuss/subscribe">subscribe</a>)<br>
-The "water cooler" of Android discussion. You can discuss just about anything Android-related here, ideas for the Android platform, announcements about your applications, discussions about Android devices, community resources... As long as your discussion is related to Android, it's on-topic here. However, if you have a discussion here that could belong on another list, you are probably not reaching all of your target audience here and may want to consider shifting to a more targeted list.
-</li>
-
-<li><strong><a href="http://groups.google.com/group/android-ndk">android-ndk</a></strong>
-(<a href="http://groups.google.com/group/android-ndk/subscribe">subscribe</a>)<br>
-A place for discussing the Android NDK and topics related to using native code in Android applications.
-</li>
-
-<li><strong><a href="http://groups.google.com/group/android-security-discuss">android-security-discuss</a></strong>
-(<a href="http://groups.google.com/group/android-security-discuss/subscribe">subscribe</a>)<br>
-A place for open discussion on secure development, emerging security concerns, and best practices for and by android developers. Please don't disclose vulnerabilities directly on this list, you'd be putting all Android users at risk.
-</li>
-
-<li><strong><a href="http://groups.google.com/group/android-security-announce">android-security-announce</a></strong>
-(<a href="http://groups.google.com/group/android-security-announce/subscribe">subscribe</a>)<br>
-A low-volume group for security-related announcements by the Android Security Team.
-</li>
-</ul>
-
-
-<h2 id="PlayHelp">Google Play Help Forum</h2>
-
-<p>The <a href="http://support.google.com/googleplay">Google Play Help Forum</a> is a web-based discussion forum where you can ask questions or report issues relating to Google Play.</p>
-
-<p style="margin-left: 2em"><a href="http://support.google.com/googleplay">http://support.google.com/googleplay</a></p>
diff --git a/docs/html/resources/community-more.jd b/docs/html/resources/community-more.jd
deleted file mode 100644
index 3089d45aa9b5..000000000000
--- a/docs/html/resources/community-more.jd
+++ /dev/null
@@ -1,71 +0,0 @@
-community=true
-page.title=IRC, G+, Twitter
-@jd:body
-
-<p>In addition to the <a href="community-groups.html">Android developer forums</a>, you can participate in the Android developer community through IRC and you can follow us on Twitter. </p>
-
-<h3 id="irc">IRC</h3>
-
-<p>Several IRC channels are available for discussions about developing Android applications.</p>
-
-<table>
-<tr>
- <th>Channel</th><th>Host</th><th>Description</th>
-</tr>
-<tr>
- <td>#android</td>
- <td>irc.freenode.net</td>
- <td>General discussion about Android (and Android development).</td>
-</tr>
-<tr>
- <td>#android-dev</td>
- <td>irc.freenode.net</td>
- <td>Discussion focused on developing Android apps.</td>
-</tr>
-</table>
-
-<p>If you haven't used IRC before, check <a
-href="http://en.wikipedia.org/wiki/List_of_IRC_clients">http://en.wikipedia.org/wiki/
-List_of_IRC_clients &raquo;</a> for a helpful list of IRC clients. Alternatively, you could also use
-this <a href="http://webchat.freenode.net/?channels=android-dev">web interface &raquo;</a>, which
-does not require any installation, to join discussions on the Android IRC channels. </p>
-
-<p>Here are some tips for using IRC:</h4>
-
-<ul>
-<li>Set your nickname before you join the channel.</li>
-<li>Registering your nickname prevents others from using your nickname or impersonating you later:
-<pre class="no-pretty-print" style="width:50%;">/nick &lt;yournickname&gt;
-/msg nickserv register &lt;password&gt; &lt;email&gt;</pre>
-<p>Afterwards, when you connect, you'll need to supply a password:</p>
-<pre class="no-pretty-print" style="width:50%;">/connect irc.freenode.net
-/nick &lt;yournickname&gt;
-/msg nickserv identify &lt;password&gt;
-/join #android-dev</pre>
-</li>
-</ul>
-
-
-<h3 id="gplus">Google+</h3>
-<p>We use a Google+ page to host Hangouts for developers, talk about the latest
-releases, development and design tips, and much more.</p>
-
-<div style='margin-top:1em'><g:plus href='https://plus.google.com/108967384991768947849'
-size='badge'></g:plus></div>
-
-
-<h3 id="twitter">Twitter</h3>
-<p>You can follow us on Twitter at this account:</p>
-
-<p style="margin-left:2em;"><a href="http://twitter.com/androiddev">http://twitter.com/androiddev</a></p>
-
-<script type="text/javascript" src="https://plus.google.com/108967384991768947849"
-rel="publisher"></script>
-<script type="text/javascript">
-window.___gcfg = {lang: 'en'};
-(function()
-{var po = document.createElement("script");
-po.type = "text/javascript"; po.async = true;po.src = "https://apis.google.com/js/plusone.js";
-var s = document.getElementsByTagName("script")[0];
-s.parentNode.insertBefore(po, s);
-})();</script> \ No newline at end of file
diff --git a/docs/html/resources/dashboard/opengl.jd b/docs/html/resources/dashboard/opengl.jd
deleted file mode 100644
index 4c55522b743d..000000000000
--- a/docs/html/resources/dashboard/opengl.jd
+++ /dev/null
@@ -1,79 +0,0 @@
-page.title=OpenGL ES Versions
-@jd:body
-
-<style type="text/css">
-
-div.dashboard-panel {
- max-width:1000px;
- margin:0 0 2em 0;
- padding:20px 20px 0 20px;
- border:1px solid #d3ecf5;
- border-radius:7px;
- -moz-border-radius:7px;
- -webkit-border-radius:7px;
- background-color: #DAF3FC;
- box-shadow:2px 3px 1px #eee;
- -moz-box-shadow:2px 3px 1px #eee;
- -webkit-box-shadow:2px 3px 1px #eee;
- overflow:hidden;
-}
-#jd-content div.dashboard-panel img {
- margin:0 20px 20px 0;
- padding:0;
- border:1px solid #ccc;
- float:left;
-}
-#jd-content div.dashboard-panel table {
- margin:0 0 20px 0;
- float:left;
- background-color:#fff;
-}
-div.dashboard-panel p {
- clear:left;
-}
-div.dashboard-panel th {
- white-space:nowrap;
-}
-</style>
-
-<p>This page provides data about the relative number of active devices that support a particular
-version of OpenGL ES. Note that support for one particular version of OpenGL ES also implies
-support for any lower version (for example, support for version 2.0 also implies support for
-1.1).</p>
-
-<p>To declare which version of OpenGL ES your application requires, you should use the {@code
-android:glEsVersion} attribute of the <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code &lt;uses-feature&gt;}</a>
-element. You can also use the <a
-href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code
-&lt;supports-gl-texture&gt;}</a> element to declare the GL compression formats that your application
-uses.</p>
-
-<p class="note"><strong>Note:</strong> This data is based on the number
-of Android devices that have accessed Google Play within a 7-day period
-ending on the data collection date noted below.</p>
-
-
-<div class="dashboard-panel">
-
-<img alt="" width="400" height="250"
-src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chco=c4df9b,6fad0c&chl=GL%201.1%20only|GL%202.0%20%26%201.1&chd=t%3A11.9,88.1" />
-
-<table>
-<tr>
-<th scope="col">OpenGL ES Version</th>
-<th scope="col">Distribution</th>
-</tr>
-<tr>
-<td>1.1 only</th>
-<td>11.9%</td>
-</tr>
-<tr>
-<td>2.0 &amp; 1.1</th>
-<td>88.1%</td>
-</tr>
-</table>
-
-<p><em>Data collected during a 7-day period ending on April 2, 2012</em></p>
-</div>
-
diff --git a/docs/html/resources/dashboard/platform-versions.jd b/docs/html/resources/dashboard/platform-versions.jd
deleted file mode 100644
index 2cbbe99dce63..000000000000
--- a/docs/html/resources/dashboard/platform-versions.jd
+++ /dev/null
@@ -1,117 +0,0 @@
-page.title=Platform Versions
-@jd:body
-
-<style type="text/css">
-
-div.dashboard-panel {
- max-width:1000px;
- margin:0 0 2em 0;
- padding:20px 20px 0 20px;
- border:1px solid #d3ecf5;
- border-radius:7px;
- -moz-border-radius:7px;
- -webkit-border-radius:7px;
- background-color: #DAF3FC;
- box-shadow:2px 3px 1px #eee;
- -moz-box-shadow:2px 3px 1px #eee;
- -webkit-box-shadow:2px 3px 1px #eee;
- overflow:hidden;
-}
-#jd-content div.dashboard-panel img {
- margin:0 20px 20px 0;
- padding:0;
- border:1px solid #ccc;
- float:left;
-}
-#jd-content div.dashboard-panel table {
- margin:0 0 20px 0;
- float:left;
- background-color:#fff;
-}
-div.dashboard-panel p {
- clear:left;
-}
-div.dashboard-panel th {
- white-space:nowrap;
-}
-</style>
-
-<p>This page provides data about the relative number of active devices
-running a given version of the Android platform. This can help you
-understand the landscape of device distribution and decide how to prioritize
-the development of your application features for the devices currently in
-the hands of users. For information about how to target your application to devices based on
-platform version, see <a href="{@docRoot}guide/appendix/api-levels.html">API Levels</a>.</p>
-
-
-<h3 id="Current">Current Distribution</h3>
-
-<p>The following pie chart and table is based on the number of Android devices that have accessed
-Google Play within a 14-day period ending on the data collection date noted below.</p>
-
-<div class="dashboard-panel">
-
-<img alt="" height="250" width="470"
-src="http://chart.apis.google.com/chart?&cht=p&chs=460x250&chd=t:0.3,0.7,6.0,23.1,0.5,63.2,0.1,1.0,2.2,0.5,2.4&chl=Android%201.5|Android%201.6|Android%202.1|Android%202.2|Android%202.3|Android%202.3.3|Android%203.0|Android%203.1|Android%203.2|Android%204.0|Android%204.0.3&chco=c4df9b,6fad0c" />
-
-<table>
-<tr>
- <th>Platform</th>
- <th>Codename</th>
- <th>API Level</th>
- <th>Distribution</th>
-</tr>
-<tr><td><a href="{@docRoot}sdk/android-1.5.html">Android 1.5</a></td><td>Cupcake</td> <td>3</td><td>0.3%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-1.6.html">Android 1.6</a></td><td>Donut</td> <td>4</td><td>0.7%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-2.1.html">Android 2.1</a></td><td>Eclair</td> <td>7</td><td>6.0%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-2.2.html">Android 2.2</a></td><td>Froyo</td> <td>8</td><td>23.1%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-2.3.html">Android 2.3 -<br/>
- Android 2.3.2</a></td><td rowspan="2">Gingerbread</td> <td>9</td><td>0.5%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-2.3.3.html">Android 2.3.3 -<br/>
- Android 2.3.7</a></td><!-- Gingerbread --> <td>10</td><td>63.2%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-3.0.html">Android 3.0</a></td>
- <td rowspan="3">Honeycomb</td> <td>11</td><td>0.1%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-3.1.html">Android 3.1</a></td><!-- Honeycomb --><td>12</td><td>1.0%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-3.2.html">Android 3.2</a></td><!-- Honeycomb --><td>13</td><td>2.2%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-4.0.html">Android 4.0 -<br/>
- Android 4.0.2</a></td>
- <td rowspan="2">Ice Cream Sandwich</td><td>14</td><td>0.5%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-4.0.3.html">Android 4.0.3</a></td><!-- ICS --><td>15</td><td>2.4%</td></tr>
-</table>
-
-<p><em>Data collected during a 14-day period ending on April 2, 2012</em></p>
-<!--
-<p style="font-size:.9em">* <em>Other: 0.1% of devices running obsolete versions</em></p>
--->
-</div><!-- end dashboard-panel -->
-
-
-<h3 id="Historical">Historical Distribution</h3>
-
-<p>The following stacked line graph provides a history of the relative number of
-active Android devices running different versions of the Android platform. It also provides a
-valuable perspective of how many devices your application is compatible with, based on the
-platform version.</p>
-
-<p>Notice that the platform versions are stacked on top of each other with the oldest active
-version at the top. This format indicates the total percent of active devices that are compatible
-with a given version of Android. For example, if you develop your application for
-the version that is at the very top of the chart, then your application is
-compatible with 100% of active devices (and all future versions), because all Android APIs are
-forward compatible. Or, if you develop your application for a version lower on the chart,
-then it is currently compatible with the percentage of devices indicated on the y-axis, where the
-line for that version meets the y-axis on the right.</p>
-
-<p>Each dataset in the timeline is based on the number of Android devices that accessed
-Google Play within a 14-day period ending on the date indicated on the x-axis.</p>
-
-<div class="dashboard-panel">
-
-<img alt="" height="250" width="660" style="padding:5px;background:#fff"
-src="http://chart.apis.google.com/chart?&cht=lc&chs=660x250&chxt=x,x,y,r&chxr=0,0,12|1,0,12|2,0,100|3,0,100&chxl=0%3A%7C10/01%7C10/15%7C11/01%7C11/15%7C12/01%7C12/15%7C01/01%7C01/15%7C02/01%7C02/15%7C03/01%7C03/15%7C04/01%7C1%3A%7C2011%7C%7C%7C%7C%7C%7C2012%7C%7C%7C%7C%7C%7C2012%7C2%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25%7C3%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25&chxp=0,0,1,2,3,4,5,6,7,8,9,10,11,12&chxtc=0,5&chd=t:97.7,97.6,97.5,99.4,99.4,99.2,98.9,98.8,99.2,98.9,98.9,99.0,98.8|96.6,96.6,96.5,98.6,98.6,98.5,98.3,98.2,98.6,98.4,98.4,98.6,98.5|95.1,95.4,95.2,97.2,97.3,97.3,97.2,97.2,97.6,97.5,97.6,97.8,97.8|83.3,84.4,84.6,87.0,87.7,88.1,88.7,89.2,89.9,90.3,90.8,91.4,91.8|37.8,40.8,43.5,48.4,52.4,55.2,58.2,60.1,62.0,63.7,65.2,66.8,68.6|0.0,0.0,0.0,2.0,2.3,2.6,3.5,3.6,4.0,4.1,4.3,4.6,5.5|0.0,0.0,0.0,1.0,1.2,1.3,2.0,2.2,2.6,3.0,3.2,3.5,4.5|0.0,0.0,0.0,0.0,0.0,0.0,0.3,0.4,0.7,0.8,1.1,1.3,2.3&chm=b,c3df9b,0,1,0|b,b8dc82,1,2,0|tAndroid%202.1,608920,2,0,15,,t::-5|b,addb67,2,3,0|tAndroid%202.2,517617,3,0,15,,t::-5|b,a3db4b,3,4,0|tAndroid%202.3.3,426210,4,0,15,,t::-5|b,98dc2e,4,5,0|b,8cd41b,5,6,0|b,7ec113,6,7,0|B,6fad0c,7,8,0&chg=7,25&chdl=Android%201.5|Android%201.6|Android%202.1|Android%202.2|Android%202.3.3|Android%203.1|Android%203.2|Android%204.0.3&chco=add274,a2d15a,97d13e,8bcb28,7dba1e,6ea715,5f920e,507d08" />
-
-<p><em>Last historical dataset collected during a 14-day period ending on April 2, 2012</em></p>
-
-
-</div><!-- end dashboard-panel -->
-
diff --git a/docs/html/resources/dashboard/screens.jd b/docs/html/resources/dashboard/screens.jd
deleted file mode 100644
index e5c79a125d33..000000000000
--- a/docs/html/resources/dashboard/screens.jd
+++ /dev/null
@@ -1,101 +0,0 @@
-page.title=Screen Sizes and Densities
-@jd:body
-
-<style type="text/css">
-
-div.dashboard-panel {
- max-width:1000px;
- margin:0 0 2em 0;
- padding:20px 20px 0 20px;
- border:1px solid #d3ecf5;
- border-radius:7px;
- -moz-border-radius:7px;
- -webkit-border-radius:7px;
- background-color: #DAF3FC;
- box-shadow:2px 3px 1px #eee;
- -moz-box-shadow:2px 3px 1px #eee;
- -webkit-box-shadow:2px 3px 1px #eee;
- overflow:hidden;
-}
-#jd-content div.dashboard-panel img {
- margin:0 20px 20px 0;
- padding:0;
- border:1px solid #ccc;
- float:left;
-}
-#jd-content div.dashboard-panel table {
- margin:0 0 20px 0;
- float:left;
- background-color:#fff;
-}
-div.dashboard-panel p {
- clear:left;
-}
-div.dashboard-panel th {
- white-space:nowrap;
-}
-</style>
-
-<p> This page provides data about the relative number of active devices that have a particular
-screen configuration, defined by a combination of screen size and density. To simplify the way that
-you design your user interfaces for different screen configurations, Android divides the range of
-actual screen sizes and densities into:</p>
-
-<ul>
-<li>A set of four generalized <strong>sizes</strong>: <em>small</em>, <em>normal</em>,
-<em>large</em>, and <em>xlarge</em></em></li>
-<li>A set of four generalized <strong>densities</strong>: <em>ldpi</em> (low), <em>mdpi</em>
-(medium), <em>hdpi</em> (high), and <em>xhdpi</em> (extra high)</li>
-</ul>
-
-<p>For information about how you can support multiple screen configurations in your
-application, see <a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
-Screens</a>.</p>
-
-<p class="note"><strong>Note:</strong> This data is based on the number
-of Android devices that have accessed Google Play within a 7-day period
-ending on the data collection date noted below.</p>
-
-
-<div class="dashboard-panel">
-
-<img alt="" width="400" height="250"
-src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chco=c4df9b,6fad0c&chl=Xlarge%20/%20mdpi|Large%20/%20ldpi|Large%20/%20mdpi|Normal%20/%20hdpi|Normal%20/%20ldpi|Normal%20/%20mdpi|Normal%20/%20xhdpi|Small%20/%20hdpi|Small%20/%20ldpi&chd=t%3A5.8,0.2,2.3,64.6,0.7,19.6,2.4,2.5,1.9" />
-
-<table>
-<tr>
-<th></th>
-<th scope="col">ldpi</th>
-<th scope="col">mdpi</th>
-<th scope="col">hdpi</th>
-<th scope="col">xhdpi</th>
-</tr>
-<tr><th scope="row">small</th>
-<td>1.9%</td> <!-- small/ldpi -->
-<td></td> <!-- small/mdpi -->
-<td>2.5%</td> <!-- small/hdpi -->
-<td></td> <!-- small/xhdpi -->
-</tr>
-<tr><th scope="row">normal</th>
-<td>0.7%</td> <!-- normal/ldpi -->
-<td>19.6%</td> <!-- normal/mdpi -->
-<td>64.6%</td> <!-- normal/hdpi -->
-<td>2.4%</td> <!-- normal/xhdpi -->
-</tr>
-<tr><th scope="row">large</th>
-<td>0.2%</td> <!-- large/ldpi -->
-<td>2.3%</td> <!-- large/mdpi -->
-<td></td> <!-- large/hdpi -->
-<td></td> <!-- large/xhdpi -->
-</tr>
-<tr><th scope="row">xlarge</th>
-<td></td> <!-- xlarge/ldpi -->
-<td>5.8%</td> <!-- xlarge/mdpi -->
-<td></td> <!-- xlarge/hdpi -->
-<td></td> <!-- xlarge/xhdpi -->
-</tr>
-</table>
-
-<p><em>Data collected during a 7-day period ending on April 2, 2012</em></p>
-</div>
-
diff --git a/docs/html/resources/samples/images/ActionBarCompat1.png b/docs/html/resources/images/ActionBarCompat1.png
index 64d3e66f621b..64d3e66f621b 100644
--- a/docs/html/resources/samples/images/ActionBarCompat1.png
+++ b/docs/html/resources/images/ActionBarCompat1.png
Binary files differ
diff --git a/docs/html/resources/samples/images/ActionBarCompat2.png b/docs/html/resources/images/ActionBarCompat2.png
index 04a7e6c5feca..04a7e6c5feca 100644
--- a/docs/html/resources/samples/images/ActionBarCompat2.png
+++ b/docs/html/resources/images/ActionBarCompat2.png
Binary files differ
diff --git a/docs/html/resources/samples/images/BluetoothChat1.png b/docs/html/resources/images/BluetoothChat1.png
index f87da6a952b1..f87da6a952b1 100644
--- a/docs/html/resources/samples/images/BluetoothChat1.png
+++ b/docs/html/resources/images/BluetoothChat1.png
Binary files differ
diff --git a/docs/html/resources/samples/images/BluetoothChat2.png b/docs/html/resources/images/BluetoothChat2.png
index 6218eff5ffea..6218eff5ffea 100644
--- a/docs/html/resources/samples/images/BluetoothChat2.png
+++ b/docs/html/resources/images/BluetoothChat2.png
Binary files differ
diff --git a/docs/html/resources/samples/images/BluetoothHDP.png b/docs/html/resources/images/BluetoothHDP.png
index c04cfde46681..c04cfde46681 100644
--- a/docs/html/resources/samples/images/BluetoothHDP.png
+++ b/docs/html/resources/images/BluetoothHDP.png
Binary files differ
diff --git a/docs/html/resources/samples/images/BusinessCard1.png b/docs/html/resources/images/BusinessCard1.png
index 55ff7e565c8d..55ff7e565c8d 100644
--- a/docs/html/resources/samples/images/BusinessCard1.png
+++ b/docs/html/resources/images/BusinessCard1.png
Binary files differ
diff --git a/docs/html/resources/samples/images/BusinessCard2.png b/docs/html/resources/images/BusinessCard2.png
index 347c317f185f..347c317f185f 100644
--- a/docs/html/resources/samples/images/BusinessCard2.png
+++ b/docs/html/resources/images/BusinessCard2.png
Binary files differ
diff --git a/docs/html/resources/samples/images/ContactManager1.png b/docs/html/resources/images/ContactManager1.png
index d787ffd17d23..d787ffd17d23 100644
--- a/docs/html/resources/samples/images/ContactManager1.png
+++ b/docs/html/resources/images/ContactManager1.png
Binary files differ
diff --git a/docs/html/resources/samples/images/ContactManager2.png b/docs/html/resources/images/ContactManager2.png
index f7837498ebb2..f7837498ebb2 100644
--- a/docs/html/resources/samples/images/ContactManager2.png
+++ b/docs/html/resources/images/ContactManager2.png
Binary files differ
diff --git a/docs/html/resources/samples/images/CubeLiveWallpaper1.png b/docs/html/resources/images/CubeLiveWallpaper1.png
index 55bc1e9ed004..55bc1e9ed004 100644
--- a/docs/html/resources/samples/images/CubeLiveWallpaper1.png
+++ b/docs/html/resources/images/CubeLiveWallpaper1.png
Binary files differ
diff --git a/docs/html/resources/samples/images/CubeLiveWallpaper3.png b/docs/html/resources/images/CubeLiveWallpaper3.png
index 2747a88e5750..2747a88e5750 100644
--- a/docs/html/resources/samples/images/CubeLiveWallpaper3.png
+++ b/docs/html/resources/images/CubeLiveWallpaper3.png
Binary files differ
diff --git a/docs/html/resources/samples/images/HomeSample.png b/docs/html/resources/images/HomeSample.png
index 990bebbdb485..990bebbdb485 100644
--- a/docs/html/resources/samples/images/HomeSample.png
+++ b/docs/html/resources/images/HomeSample.png
Binary files differ
diff --git a/docs/html/resources/samples/images/JetBoy.png b/docs/html/resources/images/JetBoy.png
index 3da044827d7a..3da044827d7a 100644
--- a/docs/html/resources/samples/images/JetBoy.png
+++ b/docs/html/resources/images/JetBoy.png
Binary files differ
diff --git a/docs/html/resources/samples/images/KeyChainDemo1.png b/docs/html/resources/images/KeyChainDemo1.png
index d426c225a45e..d426c225a45e 100644
--- a/docs/html/resources/samples/images/KeyChainDemo1.png
+++ b/docs/html/resources/images/KeyChainDemo1.png
Binary files differ
diff --git a/docs/html/resources/samples/images/KeyChainDemo2.png b/docs/html/resources/images/KeyChainDemo2.png
index e181e5877a5e..e181e5877a5e 100755
--- a/docs/html/resources/samples/images/KeyChainDemo2.png
+++ b/docs/html/resources/images/KeyChainDemo2.png
Binary files differ
diff --git a/docs/html/resources/samples/images/KeyChainDemo3.png b/docs/html/resources/images/KeyChainDemo3.png
index acfdd89f1a07..acfdd89f1a07 100755
--- a/docs/html/resources/samples/images/KeyChainDemo3.png
+++ b/docs/html/resources/images/KeyChainDemo3.png
Binary files differ
diff --git a/docs/html/resources/samples/images/KeyChainDemo4.png b/docs/html/resources/images/KeyChainDemo4.png
index a9101abaee61..a9101abaee61 100755
--- a/docs/html/resources/samples/images/KeyChainDemo4.png
+++ b/docs/html/resources/images/KeyChainDemo4.png
Binary files differ
diff --git a/docs/html/resources/samples/images/MultiResolution.png b/docs/html/resources/images/MultiResolution.png
index 8b245d99532a..8b245d99532a 100644
--- a/docs/html/resources/samples/images/MultiResolution.png
+++ b/docs/html/resources/images/MultiResolution.png
Binary files differ
diff --git a/docs/html/resources/samples/images/NewsReader.png b/docs/html/resources/images/NewsReader.png
index f44c6494f09d..f44c6494f09d 100644
--- a/docs/html/resources/samples/images/NewsReader.png
+++ b/docs/html/resources/images/NewsReader.png
Binary files differ
diff --git a/docs/html/resources/samples/images/NfcDemo.png b/docs/html/resources/images/NfcDemo.png
index c175d12b5d7e..c175d12b5d7e 100644
--- a/docs/html/resources/samples/images/NfcDemo.png
+++ b/docs/html/resources/images/NfcDemo.png
Binary files differ
diff --git a/docs/html/resources/samples/images/SampleSyncAdapter1.png b/docs/html/resources/images/SampleSyncAdapter1.png
index 242fd3672a6f..242fd3672a6f 100644
--- a/docs/html/resources/samples/images/SampleSyncAdapter1.png
+++ b/docs/html/resources/images/SampleSyncAdapter1.png
Binary files differ
diff --git a/docs/html/resources/samples/images/SampleSyncAdapter2.png b/docs/html/resources/images/SampleSyncAdapter2.png
index 055beafb55df..055beafb55df 100644
--- a/docs/html/resources/samples/images/SampleSyncAdapter2.png
+++ b/docs/html/resources/images/SampleSyncAdapter2.png
Binary files differ
diff --git a/docs/html/resources/samples/images/SampleSyncAdapter3.png b/docs/html/resources/images/SampleSyncAdapter3.png
index 8ec468e308aa..8ec468e308aa 100644
--- a/docs/html/resources/samples/images/SampleSyncAdapter3.png
+++ b/docs/html/resources/images/SampleSyncAdapter3.png
Binary files differ
diff --git a/docs/html/resources/samples/images/SearchableDictionary1.png b/docs/html/resources/images/SearchableDictionary1.png
index ebb4604f8607..ebb4604f8607 100644
--- a/docs/html/resources/samples/images/SearchableDictionary1.png
+++ b/docs/html/resources/images/SearchableDictionary1.png
Binary files differ
diff --git a/docs/html/resources/samples/images/SearchableDictionary2.png b/docs/html/resources/images/SearchableDictionary2.png
index 34746cd15563..34746cd15563 100644
--- a/docs/html/resources/samples/images/SearchableDictionary2.png
+++ b/docs/html/resources/images/SearchableDictionary2.png
Binary files differ
diff --git a/docs/html/resources/samples/images/SipDemo.png b/docs/html/resources/images/SipDemo.png
index 999bea944719..999bea944719 100755
--- a/docs/html/resources/samples/images/SipDemo.png
+++ b/docs/html/resources/images/SipDemo.png
Binary files differ
diff --git a/docs/html/resources/samples/images/Snake.png b/docs/html/resources/images/Snake.png
index c5211d8835dd..c5211d8835dd 100644
--- a/docs/html/resources/samples/images/Snake.png
+++ b/docs/html/resources/images/Snake.png
Binary files differ
diff --git a/docs/html/resources/samples/images/SoftKeyboard.png b/docs/html/resources/images/SoftKeyboard.png
index 8a4ec6322cc8..8a4ec6322cc8 100644
--- a/docs/html/resources/samples/images/SoftKeyboard.png
+++ b/docs/html/resources/images/SoftKeyboard.png
Binary files differ
diff --git a/docs/html/resources/samples/images/SpinnerTest1.png b/docs/html/resources/images/SpinnerTest1.png
index 21442f20b983..21442f20b983 100644
--- a/docs/html/resources/samples/images/SpinnerTest1.png
+++ b/docs/html/resources/images/SpinnerTest1.png
Binary files differ
diff --git a/docs/html/resources/samples/images/SpinnerTest2.png b/docs/html/resources/images/SpinnerTest2.png
index 79ffeb6a929f..79ffeb6a929f 100644
--- a/docs/html/resources/samples/images/SpinnerTest2.png
+++ b/docs/html/resources/images/SpinnerTest2.png
Binary files differ
diff --git a/docs/html/resources/samples/images/StackWidget.png b/docs/html/resources/images/StackWidget.png
index f2f83a0adcb0..f2f83a0adcb0 100644
--- a/docs/html/resources/samples/images/StackWidget.png
+++ b/docs/html/resources/images/StackWidget.png
Binary files differ
diff --git a/docs/html/resources/samples/images/TicTacToeLib.png b/docs/html/resources/images/TicTacToeLib.png
index 398eff38ffb4..398eff38ffb4 100644
--- a/docs/html/resources/samples/images/TicTacToeLib.png
+++ b/docs/html/resources/images/TicTacToeLib.png
Binary files differ
diff --git a/docs/html/resources/samples/images/TicTacToeMain.png b/docs/html/resources/images/TicTacToeMain.png
index 44cee11b9519..44cee11b9519 100644
--- a/docs/html/resources/samples/images/TicTacToeMain.png
+++ b/docs/html/resources/images/TicTacToeMain.png
Binary files differ
diff --git a/docs/html/resources/samples/images/VoicemailProviderDemo.png b/docs/html/resources/images/VoicemailProviderDemo.png
index 1a45d7aa440a..1a45d7aa440a 100644
--- a/docs/html/resources/samples/images/VoicemailProviderDemo.png
+++ b/docs/html/resources/images/VoicemailProviderDemo.png
Binary files differ
diff --git a/docs/html/resources/samples/images/WeatherListWidget.png b/docs/html/resources/images/WeatherListWidget.png
index f0cbdaff095f..f0cbdaff095f 100644
--- a/docs/html/resources/samples/images/WeatherListWidget.png
+++ b/docs/html/resources/images/WeatherListWidget.png
Binary files differ
diff --git a/docs/html/resources/samples/images/WifiDirect.png b/docs/html/resources/images/WifiDirect.png
index 86f7f2f2e946..86f7f2f2e946 100644
--- a/docs/html/resources/samples/images/WifiDirect.png
+++ b/docs/html/resources/images/WifiDirect.png
Binary files differ
diff --git a/docs/html/resources/samples/images/Wiktionary.png b/docs/html/resources/images/Wiktionary.png
index 78fee7c4494c..78fee7c4494c 100644
--- a/docs/html/resources/samples/images/Wiktionary.png
+++ b/docs/html/resources/images/Wiktionary.png
Binary files differ
diff --git a/docs/html/resources/samples/images/WiktionarySimple.png b/docs/html/resources/images/WiktionarySimple.png
index 57cd11d9a5a9..57cd11d9a5a9 100644
--- a/docs/html/resources/samples/images/WiktionarySimple.png
+++ b/docs/html/resources/images/WiktionarySimple.png
Binary files differ
diff --git a/docs/html/resources/samples/images/XmlPhotosAdapter.png b/docs/html/resources/images/XmlPhotosAdapter.png
index c018d54c83ec..c018d54c83ec 100644
--- a/docs/html/resources/samples/images/XmlPhotosAdapter.png
+++ b/docs/html/resources/images/XmlPhotosAdapter.png
Binary files differ
diff --git a/docs/html/resources/samples/images/XmlRssReader.png b/docs/html/resources/images/XmlRssReader.png
index 00f841b3482b..00f841b3482b 100644
--- a/docs/html/resources/samples/images/XmlRssReader.png
+++ b/docs/html/resources/images/XmlRssReader.png
Binary files differ
diff --git a/docs/html/resources/samples/images/hcgallery-phone1.png b/docs/html/resources/images/hcgallery-phone1.png
index 9f0c2805581d..9f0c2805581d 100644
--- a/docs/html/resources/samples/images/hcgallery-phone1.png
+++ b/docs/html/resources/images/hcgallery-phone1.png
Binary files differ
diff --git a/docs/html/resources/samples/images/hcgallery-phone2.png b/docs/html/resources/images/hcgallery-phone2.png
index b049a6559ab8..b049a6559ab8 100644
--- a/docs/html/resources/samples/images/hcgallery-phone2.png
+++ b/docs/html/resources/images/hcgallery-phone2.png
Binary files differ
diff --git a/docs/html/resources/samples/images/hcgallery.png b/docs/html/resources/images/hcgallery.png
index 42b018341fc2..42b018341fc2 100644
--- a/docs/html/resources/samples/images/hcgallery.png
+++ b/docs/html/resources/images/hcgallery.png
Binary files differ
diff --git a/docs/html/resources/samples/images/randommusicplayer.png b/docs/html/resources/images/randommusicplayer.png
index e16e0677da00..e16e0677da00 100644
--- a/docs/html/resources/samples/images/randommusicplayer.png
+++ b/docs/html/resources/images/randommusicplayer.png
Binary files differ
diff --git a/docs/html/resources/samples/images/sample_lunarlander.png b/docs/html/resources/images/sample_lunarlander.png
index a2ff75ab6467..a2ff75ab6467 100644
--- a/docs/html/resources/samples/images/sample_lunarlander.png
+++ b/docs/html/resources/images/sample_lunarlander.png
Binary files differ
diff --git a/docs/html/resources/samples/images/sample_note.png b/docs/html/resources/images/sample_note.png
index 8fc9dcc0e627..8fc9dcc0e627 100644
--- a/docs/html/resources/samples/images/sample_note.png
+++ b/docs/html/resources/images/sample_note.png
Binary files differ
diff --git a/docs/html/resources/samples/images/sample_notepad.png b/docs/html/resources/images/sample_notepad.png
index 46f221104b20..46f221104b20 100644
--- a/docs/html/resources/samples/images/sample_notepad.png
+++ b/docs/html/resources/images/sample_notepad.png
Binary files differ
diff --git a/docs/html/resources/samples/images/sample_notepadtest_junit.png b/docs/html/resources/images/sample_notepadtest_junit.png
index 4cda54e94eae..4cda54e94eae 100644
--- a/docs/html/resources/samples/images/sample_notepadtest_junit.png
+++ b/docs/html/resources/images/sample_notepadtest_junit.png
Binary files differ
diff --git a/docs/html/resources/samples/images/vpn-confirmation.png b/docs/html/resources/images/vpn-confirmation.png
index ae2e58332089..ae2e58332089 100755
--- a/docs/html/resources/samples/images/vpn-confirmation.png
+++ b/docs/html/resources/images/vpn-confirmation.png
Binary files differ
diff --git a/docs/html/resources/index.jd b/docs/html/resources/index.jd
deleted file mode 100644
index 905586884018..000000000000
--- a/docs/html/resources/index.jd
+++ /dev/null
@@ -1,90 +0,0 @@
-page.title=Developer Resources
-@jd:body
-
-<style type="text/css">
- #resource-list-table td {
- border: 0;
- padding: 0 24px;
- width: 33%;
- max-width: 250px;
- border-right: 1px solid #ddd;
- }
-
- #resource-list-table td.last {
- border-right: 0;
- padding-right: 0;
- }
-</style>
-
-<p>
-This section provides articles, tutorials, sample code, and other
-information to help you quickly implement the features you want in your
-application. To return to this page later, just click the "Resources"
-tab while any Resources page is loaded.
-</p>
-
-<h2>Technical Resources</h2>
-
-<table id="resource-list-table">
-<tr>
- <td>
- <a href="{@docRoot}resources/browser.html?tag=sample">
- <img src="{@docRoot}assets/images/resource-big-sample.png"/>
- </a>
- <h3><a href="{@docRoot}resources/browser.html?tag=sample">
- Sample Code
- </a></h3>
- <p>Fully-functioning sample applications that you can build and run
- to learn about how Android works. Feel free to reuse any of the code or
- techniques in the samples.</p>
- </td>
- <td>
- <a href="{@docRoot}resources/browser.html?tag=article">
- <img src="{@docRoot}assets/images/resource-big-article.png"/>
- </a>
- <h3><a href="{@docRoot}resources/browser.html?tag=article">
- Articles
- </a></h3>
- <p>Focused discussions about Android development subjects, including
- optimizations, tips, interesting implementations, "how-tos",
- and so on.</p>
- </td>
- <td>
- <a href="{@docRoot}resources/browser.html?tag=tutorial">
- <img src="{@docRoot}assets/images/resource-big-tutorial.png"/>
- </a>
- <h3><a href="{@docRoot}resources/browser.html?tag=tutorial">
- Tutorials
- </a></h3>
- <p>Step-by-step instructions demonstrating how to build an Android application
- that has the specific features you want.</p>
- </td>
- <!-- <td class="last">
- <a href="{@docRoot}resources/browser.html?tag=video">
- <img src="{@docRoot}assets/images/resource-big-video.png"/>
- </a>
- <h3><a href="{@docRoot}resources/browser.html?tag=video">
- Videos &amp; Screencasts
- </a></h3>
- <p>Videos and presentation slides from developer events, along with
- screencasts to walk you through common Android development
- workflows.</p>
- </td> -->
-</tr>
-</table>
-
-<h2>Other Resources</h2>
-
-<dl>
-<dt><b>Community</b></dt>
-<dd>Links to the Android discussion groups and information about other ways to
-collaborate with other developers. </dd>
-
-<dt><b>Device Dashboard</b></dt>
-<dd>Device distribution data, grouped by various dimensions such as screen size
-and Android platform version. </dd>
-
-<dt><b>More</b></dt>
-<dd>Quick development tips, troubleshooting information, and frequently asked
-questions (FAQs). </dd>
-</dl>
diff --git a/docs/html/resources/resources-data.js b/docs/html/resources/resources-data.js
deleted file mode 100644
index fb4225dc8a2d..000000000000
--- a/docs/html/resources/resources-data.js
+++ /dev/null
@@ -1,946 +0,0 @@
-var ANDROID_TAGS = {
- type: {
- 'article': 'Article',
- 'tutorial': 'Tutorial',
- 'sample': 'Sample',
- 'video': 'Video',
- 'library': 'Code Library'
- },
- topic: {
- 'accessibility': 'Accessibility',
- 'accountsync': 'Accounts &amp; Sync',
- 'bestpractice': 'Best Practices',
- 'communication': 'Communication',
- 'compatibility': 'Compatibility',
- 'data': 'Data Access',
- 'drawing': 'Canvas Drawing',
- 'gamedev': 'Game Development',
- 'gl': 'OpenGL ES',
- 'input': 'Input Methods',
- 'intent': 'Intents',
- 'layout': 'Layouts/Views',
- 'media': 'Multimedia',
- 'multitasking': 'Multi-tasking',
- 'newfeature': 'New Features',
- 'performance': 'Performance',
- 'search': 'Search',
- 'testing': 'Testing',
- 'ui': 'User Interface',
- 'web': 'Web Content',
- 'widgets': 'App Widgets'
- },
- misc: {
- 'external': 'External',
- 'new': 'New',
- 'updated': 'Updated'
- }
-};
-
-var ANDROID_RESOURCES = [
-
-//////////////////////////
-/// TECHNICAL ARTICLES ///
-//////////////////////////
-
- {
- tags: ['article', 'performance', 'bestpractice'],
- path: 'articles/avoiding-memory-leaks.html',
- title: {
- en: 'Avoiding Memory Leaks'
- },
- description: {
- en: 'Mobile devices often have limited memory, and memory leaks can cause your application to waste this valuable resource without your knowledge. This article provides tips to help you avoid common causes of memory leaks on the Android platform.'
- }
- },
- {
- tags: ['article', 'compatibility'],
- path: 'articles/backward-compatibility.html',
- title: {
- en: 'Backward Compatibility'
- },
- description: {
- en: 'The Android platform strives to ensure backwards compatibility. However, sometimes you want to use new features which aren\'t supported on older platforms. This article discusses strategies for selectively using these features based on availability, allowing you to keep your applications portable across a wide range of devices.'
- }
- },
- {
- tags: ['article', 'intent'],
- path: 'articles/can-i-use-this-intent.html',
- title: {
- en: 'Can I Use this Intent?'
- },
- description: {
- en: 'Android offers a very powerful and yet easy-to-use message type called an intent. You can use intents to turn applications into high-level libraries and make code modular and reusable. While it is nice to be able to make use of a loosely coupled API, there is no guarantee that the intent you send will be received by another application. This article describes a technique you can use to find out whether the system contains any application capable of responding to the intent you want to use.'
- }
- },
- {
- tags: ['article', 'input'],
- path: 'articles/creating-input-method.html',
- title: {
- en: 'Creating an Input Method'
- },
- description: {
- en: 'Input Method Editors (IMEs) provide the mechanism for entering text into text fields and other Views. Android devices come bundled with at least one IME, but users can install additional IMEs. This article covers the basics of developing an IME for the Android platform.'
- }
- },
- {
- tags: ['article', 'drawing', 'ui'],
- path: 'articles/drawable-mutations.html',
- title: {
- en: 'Drawable Mutations'
- },
- description: {
- en: 'Drawables are pluggable drawing containers that allow applications to display graphics. This article explains some common pitfalls when trying to modify the properties of multiple Drawables.'
- }
- },
- {
- tags: ['article', 'bestpractice', 'ui'],
- path: 'articles/faster-screen-orientation-change.html',
- title: {
- en: 'Faster Screen Orientation Change'
- },
- description: {
- en: 'When an Android device changes its orientation, the default behavior is to automatically restart the current activity with a new configuration. However, this can become a bottleneck in applications that access a large amount of external data. This article discusses how to gracefully handle this situation without resorting to manually processing configuration changes.'
- }
- },
- {
- tags: ['article', 'compatibility'],
- path: 'articles/future-proofing.html',
- title: {
- en: 'Future-Proofing Your Apps'
- },
- description: {
- en: 'A collection of common sense advice to help you ensure that your applications don\'t break when new versions of the Android platform are released.'
- }
- },
- {
- tags: ['article', 'input'],
- path: 'articles/gestures.html',
- title: {
- en: 'Gestures'
- },
- description: {
- en: 'Touch screens allow users to perform gestures, such as tapping, dragging, flinging, or sliding, to perform various actions. The gestures API enables your application to recognize even complicated gestures with ease. This article explains how to integrate this API into an application.'
- }
- },
- {
- tags: ['article', 'gamedev', 'gl'],
- path: 'articles/glsurfaceview.html',
- title: {
- en: 'Introducing GLSurfaceView'
- },
- description: {
- en: 'This article provides an overview of GLSurfaceView, a class that makes it easy to implement 2D or 3D OpenGL rendering inside of an Android application.'
- }
- },
- {
- tags: ['article', 'ui', 'layout'],
- path: 'articles/layout-tricks-reuse.html',
- title: {
- en: 'Layout Tricks: Creating Reusable UI Components'
- },
- description: {
- en: 'Learn how to combine multiple standard UI widgets into a single high-level component, which can be reused throughout your application.'
- }
- },
- {
- tags: ['article', 'layout', 'ui', 'performance', 'bestpractice'],
- path: 'articles/layout-tricks-efficiency.html',
- title: {
- en: 'Layout Tricks: Creating Efficient Layouts'
- },
- description: {
- en: 'Learn how to optimize application layouts as this article walks you through converting a LinearLayout into a RelativeLayout, and analyzes the resulting implications on performance.'
- }
- },
- {
- tags: ['article', 'layout', 'ui', 'performance', 'bestpractice'],
- path: 'articles/layout-tricks-stubs.html',
- title: {
- en: 'Layout Tricks: Using ViewStubs'
- },
- description: {
- en: 'Learn about using ViewStubs inside an application\'s layout in order to inflate rarely used UI elements, without the performance implications which would otherwise be caused by using the <code>&lt;include&gt;</code> tag.'
- }
- },
- {
- tags: ['article', 'layout', 'ui', 'performance', 'bestpractice'],
- path: 'articles/layout-tricks-merge.html',
- title: {
- en: 'Layout Tricks: Merging Layouts'
- },
- description: {
- en: 'Learn how to use the <code>&lt;merge&gt;</code> tag in your XML layouts in order to avoid unnecessary levels of hierarchy within an application\'s view tree.'
- }
- },
- {
- tags: ['article', 'ui', 'performance'],
- path: 'articles/listview-backgrounds.html',
- title: {
- en: 'ListView Backgrounds: An Optimization'
- },
- description: {
- en: 'ListViews are very popular widgets within the Android framework. This article describes some of the optimizations used by the ListView widget, and how to avoid some common issues that this causes when trying to use a custom background.'
- }
- },
- {
- tags: ['article', 'ui'],
- path: 'articles/live-folders.html',
- title: {
- en: 'Live Folders'
- },
- description: {
- en: 'Live Folders allow users to display any source of data on their home screen without launching an application. This article discusses how to export an application\'s data in a format suitable for display inside of a live folder.'
- }
- },
- {
- tags: ['article', 'ui'],
- path: 'articles/live-wallpapers.html',
- title: {
- en: 'Live Wallpapers'
- },
- description: {
- en: 'Live wallpapers are richer, animated, interactive backgrounds that users can display in their home screens. Learn how to create a live wallpaper and bundle it in an application that users can install on their devices.'
- }
- },
- {
- tags: ['article', 'bestpractice', 'multitasking'],
- path: 'articles/multitasking-android-way.html',
- title: {
- en: 'Multitasking the Android Way'
- },
- description: {
- en: 'This article describes best practices and user experience guidelines for multi-tasking on Android.'
- }
- },
- {
- tags: ['article', 'input'],
- path: 'articles/on-screen-inputs.html',
- title: {
- en: 'Onscreen Input Methods'
- },
- description: {
- en: 'The Input Method Framework (IMF) allows users to take advantage of on-screen input methods, such as software keyboards. This article provides an overview of Input Method Editors (IMEs) and how applications interact with them.'
- }
- },
- {
- tags: ['article', 'performance', 'bestpractice'],
- path: 'articles/painless-threading.html',
- title: {
- en: 'Painless Threading'
- },
- description: {
- en: 'This article discusses the threading model used by Android applications and how applications can ensure best UI performance by spawning worker threads to handle long-running operations, rather than handling them in the main thread. The article also explains the API that your application can use to interact with Android UI toolkit components running on the main thread and spawn managed worker threads.'
- }
- },
- {
- tags: ['article', 'ui', 'search'],
- path: 'articles/qsb.html',
- title: {
- en: 'Quick Search Box'
- },
- description: {
- en: 'Quick Search Box (QSB) is a powerful, system-wide search framework. QSB makes it possible for users to quickly and easily find what they\'re looking for, both on their devices and on the web. This article discusses how to work with the QSB framework to add new search results for an installed application.'
- }
- },
- {
- tags: ['article', 'input', 'search', 'ui'],
- path: 'articles/speech-input.html',
- title: {
- en: 'Speech Input'
- },
- description: {
- en: 'This articles describes the basics of integrating speech recognition into Android applications.'
- }
- },
- {
- tags: ['article', 'compatibility', 'multitasking'],
- path: 'articles/service-api-changes-starting-with.html',
- title: {
- en: 'Service API changes starting with Android 2.0'
- },
- description: {
- en: 'This article describes the changes and improvements to services introduced in Android 2.0, as well as strategies for compatibility with older versions of the platform.'
- }
- },
- {
- tags: ['article', 'input', 'ui'],
- path: 'articles/spell-checker-framework.html',
- title: {
- en: 'The Android Spell Checker Framework'
- },
- description: {
- en: 'This article describes the Android spell checker framework and how to use to implement spell checking in applications.'
- }
- },
-
- {
- tags: ['article', 'ui'],
- path: 'articles/touch-mode.html',
- title: {
- en: 'Touch Mode'
- },
- description: {
- en: 'This article explains the touch mode, one of the most important principles of Android\'s UI toolkit. Whenever a user interacts with a device\'s touch screen, the system enters touch mode. While simple in concept, there are important implications touch mode that are often overlooked.'
- }
- },
- {
- tags: ['article', 'performance', 'bestpractice'],
- path: 'articles/track-mem.html',
- title: {
- en: 'Tracking Memory Allocations'
- },
- description: {
- en: 'This article discusses how to use the Allocation Tracker tool to observe memory allocations and avoid performance problems that would otherwise be caused by ignoring the effect of Dalvik\'s garbage collector.'
- }
- },
- {
- tags: ['article'],
- path: 'articles/ui-1.5.html',
- title: {
- en: 'UI Framework Changes in Android 1.5'
- },
- description: {
- en: 'Explore the UI changes that were introduced in Android 1.5, compared with the UI provided in Android 1.0 and 1.1.'
- }
- },
- {
- tags: ['article'],
- path: 'articles/ui-1.6.html',
- title: {
- en: 'UI Framework Changes in Android 1.6'
- },
- description: {
- en: 'Explore the UI changes that were introduced in Android 1.6, compared with the UI provided in Android 1.5. In particular, this article discusses changes to RelativeLayouts and click listeners.'
- }
- },
- {
- tags: ['article', 'ui', 'bestpractice'],
- path: 'articles/timed-ui-updates.html',
- title: {
- en: 'Updating the UI from a Timer'
- },
- description: {
- en: 'Learn about how to use Handlers as a more efficient replacement for java.util.Timer on the Android platform.'
- }
- },
- {
- tags: ['article', 'ui', 'accessibility'],
- path: 'articles/tts.html',
- title: {
- en: 'Using Text-to-Speech'
- },
- description: {
- en: 'The text-to-speech API lets your application "speak" to users, in any of several languages. This article provides an overview of the TTS API and how you use to add speech capabilities to your application.'
- }
- },
- {
- tags: ['article', 'accountsync', 'data'],
- path: 'articles/contacts.html',
- title: {
- en: 'Using the Contacts API'
- },
- description: {
- en: 'Android provides a Contacts API for managing and integrating contacts from multiple accounts and data sources and allows apps to read various information about individual contacts.'
- }
- },
- {
- tags: ['article', 'ui', 'web'],
- path: 'articles/using-webviews.html',
- title: {
- en: 'Using WebViews'
- },
- description: {
- en: 'WebViews allow an application to dynamically display HTML and execute JavaScript, without relinquishing control to a separate browser application. This article introduces the WebView classes and provides a sample application that demonstrates its use.'
- }
- },
- {
- tags: ['article', 'ui'],
- path: 'articles/wikinotes-linkify.html',
- title: {
- en: 'WikiNotes: Linkify your Text!'
- },
- description: {
- en: 'This article introduces WikiNotes for Android, part of the Apps for Android project. It covers the use of Linkify to turn ordinary text views into richer, link-oriented content that causes Android intents to fire when a link is selected.'
- }
- },
- {
- tags: ['article', 'intent'],
- path: 'articles/wikinotes-intents.html',
- title: {
- en: 'WikiNotes: Routing Intents'
- },
- description: {
- en: 'This article illustrates how an application, in this case the WikiNotes sample app, can use intents to route various types of linked text to the application that handles that type of data. For example, an app can use intents to route a linked telephone number to a dialer app and a web URL to a browser.'
- }
- },
- {
- tags: ['article', 'ui', 'performance'],
- path: 'articles/window-bg-speed.html',
- title: {
- en: 'Window Backgrounds & UI Speed'
- },
- description: {
- en: 'Some Android applications need to squeeze every bit of performance out of the UI toolkit and there are many ways to do so. In this article, you will discover how to speed up the drawing and the perceived startup time of your activities. Both of these techniques rely on a single feature, the window\'s background drawable.'
- }
- },
- {
- tags: ['article', 'performance', 'bestpractice'],
- path: 'articles/zipalign.html',
- title: {
- en: 'Zipalign: an Easy Optimization'
- },
- description: {
- en: 'The Android SDK includes a tool called zipalign that optimizes the way an application is packaged. Running zipalign against your application enables Android to interact with it more efficiently at run time and thus has the potential to make it and the overall system run faster. This article provides a high-level overview of the zipalign tool and its use.'
- }
- },
-
-///////////////////
-/// SAMPLE CODE ///
-///////////////////
-
- {
- tags: ['sample'],
- path: 'samples/AccelerometerPlay/index.html',
- title: {
- en: 'Accelerometer Play'
- },
- description: {
- en: 'An example of using the accelerometer to integrate the device\'s acceleration to a position using the Verlet method. This is illustrated with a very simple particle system comprised of a few iron balls freely moving on an inclined wooden table. The inclination of the virtual table is controlled by the device\'s accelerometer.'
- }
- },
- {
- tags: ['sample', 'new', 'ui', 'compatibility', 'newfeature'],
- path: 'samples/ActionBarCompat/index.html',
- title: {
- en: 'Action Bar Compatibility'
- },
- description: {
- en: 'Shows how to use the action bar on both pre-API 11 and API 11+ devices, maximizing code re-use.'
- }
- },
- {
- tags: ['sample', 'new'],
- path: 'samples/AndroidBeamDemo/index.html',
- title: {
- en: 'Android Beam Demo'
- },
- description: {
- en: 'An example of how to use the Android Beam feature to send messages between two Android-powered devices (API level 14 or later) that support NFC.'
- }
- },
- {
- tags: ['sample', 'layout', 'ui', 'updated'],
- path: 'samples/ApiDemos/index.html',
- title: {
- en: 'API Demos'
- },
- description: {
- en: 'A variety of small applications that demonstrate an extensive collection of framework topics.'
- }
- },
- {
- tags: ['sample', 'layout', 'ui', 'fragment', 'loader'],
- path: 'samples/Support4Demos/index.html',
- title: {
- en: 'API 4+ Support Demos'
- },
- description: {
- en: 'A variety of small applications that demonstrate the use of the helper classes in the Android API 4+ Support Library (classes which work down to API level 4 or version 1.6 of the platform).'
- }
- },
- {
- tags: ['sample', 'layout', 'ui'],
- path: 'samples/Support13Demos/index.html',
- title: {
- en: 'API 13+ Support Demos'
- },
- description: {
- en: 'A variety of small applications that demonstrate the use of the helper classes in the Android API 13+ Support Library (classes which work down to API level 13 or version 3.2 of the platform).'
- }
- },
- {
- tags: ['sample', 'data', 'newfeature', 'accountsync'],
- path: 'samples/BackupRestore/index.html',
- title: {
- en: 'Backup and Restore'
- },
- description: {
- en: 'Illustrates a few different approaches that an application developer can take when integrating with the Android Backup Manager using the BackupAgent API introduced in Android 2.2.'
- }
- },
- {
- tags: ['sample', 'communication'],
- path: 'samples/BluetoothChat/index.html',
- title: {
- en: 'Bluetooth Chat'
- },
- description: {
- en: 'An application for two-way text messaging over Bluetooth.'
- }
- },
- {
- tags: ['sample', 'communication', 'new'],
- path: 'samples/BluetoothHDP/index.html',
- title: {
- en: 'Bluetooth HDP Demo'
- },
- description: {
- en: 'A sample application that demonstrates how to communicate with a Bluetooth Health Device Profile (HDP) device.'
- }
- },
- {
- tags: ['sample', 'accountsync'],
- path: 'samples/BusinessCard/index.html',
- title: {
- en: 'BusinessCard'
- },
- description: {
- en: 'An application that demonstrates how to launch the built-in contact picker from within an activity. This sample also uses reflection to ensure that the correct version of the contacts API is used, depending on which API level the application is running under.'
- }
- },
- {
- tags: ['sample', 'accountsync'],
- path: 'samples/ContactManager/index.html',
- title: {
- en: 'Contact Manager'
- },
- description: {
- en: 'An application that demonstrates how to query the system contacts provider using the <code>ContactsContract</code> API, as well as insert contacts into a specific account.'
- }
- },
- {
- tags: ['sample', 'ui'],
- path: 'samples/CubeLiveWallpaper/index.html',
- title: {
- en: 'Cube Live Wallpaper'
- },
- description: {
- en: 'An application that demonstrates how to create a live wallpaper and bundle it in an application that users can install on their devices.'
- }
- },
- {
- tags: ['sample', 'new'],
- path: 'samples/training/device-management-policy/index.html',
- title: {
- en: 'Device Policy Management'
- },
- description: {
- en: 'This is a security-aware sample application that demonstrates the enforcement of device administration policies on Android 2.2 or above platforms.'
- }
- },
- {
- tags: ['sample'],
- path: 'samples/Home/index.html',
- title: {
- en: 'Home'
- },
- description: {
- en: 'A home screen replacement application.'
- }
- },
- {
- tags: ['sample', 'updated', 'newfeature', 'ui'],
- path: 'samples/HoneycombGallery/index.html',
- title: {
- en: 'Honeycomb Gallery'
- },
- description: {
- en: 'An image gallery application that demonstrates a variety of new APIs in Android 3.0 (Honeycomb). In addition to providing a tablet-optimized design, it also supports handsets running Android 4.0 (Ice Cream Sandwich) and beyond, so is a good example of how to reuse Fragments to support different screen sizes.'
- }
- },
- {
- tags: ['sample', 'gamedev', 'media'],
- path: 'samples/JetBoy/index.html',
- title: {
- en: 'JetBoy'
- },
- description: {
- en: 'A game that demonstrates the SONiVOX JET interactive music technology, with <code><a href="/reference/android/media/JetPlayer.html">JetPlayer</a></code>.'
- }
- },
- {
- tags: ['sample', 'new'],
- path: 'samples/KeyChainDemo/index.html',
- title: {
- en: 'KeyChain Demo'
- },
- description: {
- en: 'A demo application to demonstrate how to use KeyChain APIs.'
- }
- },
- {
- tags: ['sample', 'gamedev', 'media'],
- path: 'samples/LunarLander/index.html',
- title: {
- en: 'Lunar Lander'
- },
- description: {
- en: 'A classic Lunar Lander game.'
- }
- },
- {
- tags: ['sample', 'new'],
- path: 'samples/training/ads-and-ux/index.html',
- title: {
- en: 'Mobile Advertisement Integration'
- },
- description: {
- en: 'This sample demonstrates the integration of a mobile ad SDK with your application.'
- }
- },
- {
- tags: ['sample', 'ui', 'bestpractice', 'layout'],
- path: 'samples/MultiResolution/index.html',
- title: {
- en: 'Multiple Resolutions'
- },
- description: {
- en: 'A sample application that shows how to use resource directory qualifiers to provide different resources for different screen configurations.'
- }
- },
- {
- tags: ['sample', 'new', 'bestpractices'],
- path: 'samples/newsreader/index.html',
- title: {
- en: 'News Reader'
- },
- description: {
- en: 'A sample app demonstrating best practices to support multiple screen sizes and densities.'
- }
- },
- {
- tags: ['sample', 'data'],
- path: 'samples/NFCDemo/index.html',
- title: {
- en: 'NFC Demo'
- },
- description: {
- en: 'An application for reading NFC Forum Type 2 Tags using the NFC APIs'
- }
- },
- {
- tags: ['sample', 'data'],
- path: 'samples/NotePad/index.html',
- title: {
- en: 'Note Pad'
- },
- description: {
- en: 'An application for saving notes. Similar (but not identical) to the <a href="/resources/tutorials/notepad/index.html">Notepad tutorial</a>.'
- }
- },
- {
- tags: ['sample', 'media', 'updated'],
- path: 'samples/RandomMusicPlayer/index.html',
- title: {
- en: 'Random Music Player'
- },
- description: {
- en: 'Demonstrates how to write a multimedia application that plays music from the device and from URLs. It manages media playback from a service and can play music in the background, respecting audio focus changes. Also shows how to use the new Remote Control APIs in API level 14.'
- }
- },
- {
- tags: ['sample', 'newfeature', 'performance', 'gamedev', 'gl', 'updated'],
- path: 'samples/RenderScript/index.html',
- title: {
- en: 'RenderScript'
- },
- description: {
- en: 'A set of samples that demonstrate how to use various features of the RenderScript APIs.'
- }
- },
- {
- tags: ['sample', 'input', 'new'],
- path: 'samples/SpellChecker/SampleSpellCheckerService/index.html',
- title: {
- en: 'Spell Checker Service'
- },
- description: {
- en: 'An example spell checker service, using the <a href="'+toRoot+'reference/android/service/textservice/SpellCheckerService.html"><code>SpellCheckerService</code></a>.'
- }
- },
- {
- tags: ['sample', 'input', 'new'],
- path: 'samples/SpellChecker/HelloSpellChecker/index.html',
- title: {
- en: 'Spell Checker Client'
- },
- description: {
- en: 'An example spell checker client, using the <a href="'+toRoot+'reference/android/view/textservice/TextServicesManager.html"><code>TextServicesManager</code></a> and <a href="'+toRoot+'reference/android/view/textservice/SpellCheckerSession.html"><code>SpellCheckerSession</code></a>.'
- }
- },
- {
- tags: ['sample', 'accountsync', 'updated'],
- path: 'samples/SampleSyncAdapter/index.html',
- title: {
- en: 'SampleSyncAdapter'
- },
- description: {
- en: 'Demonstrates how an application can communicate with a cloud-based service and synchronize its data with data stored locally in a content provider. The sample uses two related parts of the Android framework &mdash; the account manager and the synchronization manager (through a sync adapter).'
- }
- },
- {
- tags: ['sample', 'ui', 'search'],
- path: 'samples/SearchableDictionary/index.html',
- title: {
- en: 'Searchable Dictionary v2'
- },
- description: {
- en: 'A sample application that demonstrates Android\'s search framework, including how to provide search suggestions for Quick Search Box.'
- }
- },
- {
- tags: ['sample'],
- path: 'samples/SipDemo/index.html',
- title: {
- en: 'SIP Demo'
- },
- description: {
- en: 'A demo application highlighting how to make internet-based calls with the SIP API.'
- }
- },
- {
- tags: ['sample', 'layout', 'ui'],
- path: 'samples/Snake/index.html',
- title: {
- en: 'Snake'
- },
- description: {
- en: 'An implementation of the classic game "Snake."'
- }
- },
- {
- tags: ['sample', 'input'],
- path: 'samples/SoftKeyboard/index.html',
- title: {
- en: 'Soft Keyboard'
- },
- description: {
- en: 'An example of writing an input method for a software keyboard.'
- }
- },
- {
- tags: ['sample', 'testing'],
- path: 'samples/Spinner/index.html',
- title: {
- en: 'Spinner'
- },
- description: {
- en: 'A simple application that serves as an application under test for the SpinnerTest example.'
- }
- },
- {
- tags: ['sample', 'testing'],
- path: 'samples/SpinnerTest/index.html',
- title: {
- en: 'SpinnerTest'
- },
- description: {
- en: 'The test application for the Activity Testing tutorial. It tests the Spinner example application.'
- }
- },
- {
- tags: ['sample', 'newfeature', 'widgets'],
- path: 'samples/StackWidget/index.html',
- title: {
- en: 'StackView Widget'
- },
- description: {
- en: 'Demonstrates how to create a simple collection widget containing a StackView.'
- }
- },
- {
- tags: ['sample', 'newfeature'],
- path: 'samples/TicTacToeLib/index.html',
- title: {
- en: 'TicTacToeLib'
- },
- description: {
- en: 'An example of an Android library project, a type of project that lets you store and manage shared code and resources in one place, then make them available to your other Android applications.'
- }
- },
- {
- tags: ['sample', 'newfeature',],
- path: 'samples/TicTacToeMain/index.html',
- title: {
- en: 'TicTacToeMain'
- },
- description: {
- en: 'Demonstrates how an application can make use of shared code and resources stored in an Android library project.'
- }
- },
- {
- tags: ['sample', 'communication', 'new'],
- path: 'samples/ToyVpn/index.html',
- title: {
- en: 'Toy VPN Client'
- },
- description: {
- en: 'A sample application that illustrates the creation of a custom VPN client.'
- }
- },
- {
- tags: ['sample', 'newfeature'],
- path: 'samples/USB/index.html',
- title: {
- en: 'USB'
- },
- description: {
- en: 'A set of samples that demonstrate how to use various features of the USB APIs.'
- }
- },
- {
- tags: ['sample', 'data', 'new'],
- path: 'samples/VoicemailProviderDemo/index.html',
- title: {
- en: 'Voicemail Provider'
- },
- description: {
- en: 'A sample application to demonstrate how to use voicemail content provider APIs in Android 4.0.'
- }
- },
- {
- tags: ['sample','newfeature', 'new'],
- path: 'samples/WiFiDirectDemo/index.html',
- title: {
- en: 'Wi-Fi Direct Demo'
- },
- description: {
- en: 'A demo application to demonstrate how to use Wi-Fi Direct APIs.'
- }
- },
- {
- tags: ['sample', 'ui', 'widgets'],
- path: 'samples/Wiktionary/index.html',
- title: {
- en: 'Wiktionary'
- },
- description: {
- en: 'An example of creating interactive widgets for display on the Android home screen.'
- }
- },
- {
- tags: ['sample', 'ui', 'widgets'],
- path: 'samples/WiktionarySimple/index.html',
- title: {
- en: 'Wiktionary (Simplified)'
- },
- description: {
- en: 'A simple Android home screen widgets example.'
- }
- },
- {
- tags: ['sample', 'widgets', 'newfeature'],
- path: 'samples/WeatherListWidget/index.html',
- title: {
- en: 'Weather List Widget'
- },
- description: {
- en: 'A more complex collection-widget example which uses a ContentProvider as its data source.'
- }
- },
- {
- tags: ['sample', 'layout'],
- path: 'samples/XmlAdapters/index.html',
- title: {
- en: 'XML Adapters'
- },
- description: {
- en: 'Binding data to views using XML Adapters examples.'
- }
- },
- {
- tags: ['sample', 'new', 'accessibility'],
- path: 'samples/TtsEngine/index.html',
- title: {
- en: 'Text To Speech Engine'
- },
- description: {
- en: 'An example Text To Speech engine written using the Android text to speech engine API in Android 4.0.'
- }
- },
-
-/////////////////
-/// TUTORIALS ///
-/////////////////
-
- {
- tags: ['tutorial'],
- path: 'tutorials/hello-world.html',
- title: {
- en: 'Hello World'
- },
- description: {
- en: 'Beginning basic application development with the Android SDK.'
- }
- },
- {
- tags: ['tutorial', 'ui', 'layout'],
- path: 'tutorials/views/index.html',
- title: {
- en: 'Hello Views'
- },
- description: {
- en: 'A walk-through of the various types of layouts and views available in the Android SDK.'
- }
- },
- {
- tags: ['tutorial', 'ui', 'bestpractice'],
- path: 'tutorials/localization/index.html',
- title: {
- en: 'Hello Localization'
- },
- description: {
- en: 'The basics of localizing your applications for multiple languages and locales.'
- }
- },
- {
- tags: ['tutorial', 'data'],
- path: 'tutorials/notepad/index.html',
- title: {
- en: 'Notepad Tutorial'
- },
- description: {
- en: 'A multi-part tutorial discussing intermediate-level concepts such as data access.'
- }
- },
- {
- tags: ['tutorial', 'gl'],
- path: 'tutorials/opengl/opengl-es10.html',
- title: {
- en: 'OpenGL ES 1.0'
- },
- description: {
- en: 'The basics of implementing an application using the OpenGL ES 1.0 APIs.'
- }
- },
- {
- tags: ['tutorial', 'gl'],
- path: 'tutorials/opengl/opengl-es20.html',
- title: {
- en: 'OpenGL ES 2.0'
- },
- description: {
- en: 'The basics of implementing an application using the OpenGL ES 2.0 APIs.'
- }
- },
- {
- tags: ['tutorial', 'testing'],
- path: 'tutorials/testing/helloandroid_test.html',
- title: {
- en: 'Hello Testing'
- },
- description: {
- en: 'A basic introduction to the Android testing framework.'
- }
- },
- {
- tags: ['tutorial', 'testing'],
- path: 'tutorials/testing/activity_test.html',
- title: {
- en: 'Activity Testing'
- },
- description: {
- en: 'A more advanced demonstration of the Android testing framework and tools.'
- }
- }
-];
diff --git a/docs/html/resources/samples/get.jd b/docs/html/resources/samples/get.jd
deleted file mode 100644
index 751965ff5b99..000000000000
--- a/docs/html/resources/samples/get.jd
+++ /dev/null
@@ -1,92 +0,0 @@
-page.title=Getting the Samples
-parent.title=Sample Code
-parent.link=../browser.html?tag=sample
-
-@jd:body
-
-<p>Sometimes, the best way to learn how things are done is to look at some
-code.</p>
-
-<p>To help you get started quickly, the Android SDK includes a variety of sample
-code and tutorials that illustrate key concepts and techniques of Android
-application development. For example, the samples show the structure of the
-manifest file and the use of activities, services, resources,
-intents, content providers, and permissions. They also show how to add
-specialized capabilities to your apps, such as Bluetooth and Contacts
-integration, multiple screens support, Live Wallpaper, and more. </p>
-
-<p>The SDK provides the samples both as source code and as browseable HTML, as
-described in the sections below. All of the samples included in the SDK are
-licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
-2.0 license</a>, so feel free to use any of the code in your own applications as
-needed!</p>
-
-<h3 id="downloading">Downloading the Sample Code</h3>
-
-<p>The SDK sample code is available to you as a set of downloadable SDK
-components, each of which contains the samples for a specific Android platform
-version. Once you have installed the SDK, you can download one or more samples
-component(s) into your SDK environment using the Android SDK Manager
-tool, which is pre-installed in the SDK. </p>
-
-<p>To download the samples, launch the Android SDK Manager tool and
-select one of the samples components from the <strong>Available
-Packages</strong> panel, for example "Samples for SDK API 7". Select
-<strong>Install Selected</strong>, verify and accept the download, then select
-<strong>Install Accepted</strong> to download the component into your SDK. If
-you aren't familiar with the Android SDK Manager and how to launch or
-use it, please read the <a href="{@docRoot}sdk/adding-components.html">Adding
-SDK Components</a> document. </p>
-
-<p>When the download is complete, you can find the samples sources on your
-computer in this location:</p>
-
-<p style="margin-left:2em">
-<code><em>&lt;sdk&gt;</em>/samples/android-&lt;<em>level</em>&gt;/</code>
-</p>
-
-<p>You can easily create new Android projects with the downloaded samples, modify them
-if you'd like, and then run them on an emulator or device. </p>
-
-<p>For example, if you are developing in Eclipse with the ADT Plugin, you can
-create a project for the "API Demos" sample app by starting a new Android
-Project, selecting "Create project from existing source", and then browsing to
-the <code><em>&lt;sdk&gt;</em>/samples/android-&lt;<em>level</em>&gt;/ApiDemos</code>
-directory (the <code>samples</code> directory for the platform version you are
-using).</p>
-
-<p>If you are not working in Eclipse, you can create a project for the API Demos
-sample using the <code>android</code> tool, by executing this command:</p>
-
-<pre class="no-pretty-print">
-android update project -s -n API Demos -t <em>&lt;target_ID></em> -p &lt;<em>path</em>&gt;</em>samples/android-&lt;<em>level</em>&gt;/ApiDemos/
-</pre>
-
-<h3 id="browsing">Browsing the Sample Code</h3>
-
-<p>For your convenience, the SDK provides browseable source code for the latest
-versions of the samples. You can use your browser to navigate through the
-structure of each sample and look at the source code in each of its files. </p>
-
-<p>To browse the samples, go to the <a
-href="{@docRoot}resources/samples/index.html">List of Sample Apps</a> first.
-From there you can read a short summary of each sample application and what
-types of concepts, features, or APIs it includes. Then, use the links provided
-to move through the directories and files of each sample. The browseable source
-is generated from the same source code that is downloadable through the Android
-SDK Manager, as described above. </p>
-
-<p>The browseable samples files are available online, at the Android Developers
-site only and are not included in the downloadable offline documentation.
-Note that, although samples for several platform versions are available for
-download, only the samples for the latest platform version are browseable online.
-</p>
-
-
-<h3 id="more">More Sample Code</h3>
-
-<p>If you are looking for more sample code, check out
-<a href="http://code.google.com/p/apps-for-android/">apps-for-android</a>, a
-collection of open source applications that demonstrate various Android APIs.</p>
-
-
diff --git a/docs/html/resources/samples/index.jd b/docs/html/resources/samples/index.jd
deleted file mode 100644
index acb80e826781..000000000000
--- a/docs/html/resources/samples/index.jd
+++ /dev/null
@@ -1,11 +0,0 @@
-page.title=List of Sample Apps
-@jd:body
-
-<script type="text/javascript">
- window.location = toRoot + "resources/browser.html?tag=sample";
-</script>
-
-<p><strong>This document has moved. Please go to <a
-href="http://developer.android.com/resources/browser.html?tag=sample">List of Sample
-Apps</a>.</strong></p>
-
diff --git a/docs/html/resources/topics.jd b/docs/html/resources/topics.jd
deleted file mode 100644
index b5960ffcbebf..000000000000
--- a/docs/html/resources/topics.jd
+++ /dev/null
@@ -1,72 +0,0 @@
-page.title=Technical Resource Topics
-@jd:body
-
-<style type="text/css">
- #resource-topic-table td {
- border: 0;
- padding: 0;
- margin: 0;
- padding-left: 1em;
- width: 18em;
- }
-
- #resource-topic-table ul {
- padding: 0;
- margin: 0;
- }
-
- #resource-topic-table li {
- list-style: none;
- margin: 0;
- padding: 0;
- }
-</style>
-
-<p>
-You can browse the list of technical resources by topic by clicking on the
-links below. Over time, as more topics are added, they will be added to the
-list below.
-</p>
-
-<noscript>
- <p class="note"><strong>Error:</strong>
- You must have JavaScript enabled to view this page. Resources are also
- available offline in the SDK.
- </p>
-</noscript>
-
-<table id="resource-topic-table">
- <tr></tr>
-</table>
-
-<script type="text/javascript">
-<!--
-(function() {
- var topics = [];
- for (var topic in ANDROID_TAGS['topic']) {
- topics.push({name:topic,title:ANDROID_TAGS['topic'][topic]});
- }
- topics.sort(function(x,y){ return (x.title < y.title) ? -1 : 1; });
- var topicParent = null;
- for (var i = 0; i < topics.length; i++) {
- if (topicParent == null || i % 10 == 0) {
- // create a new column
- topicParent = $('ul', $('<td><ul>').appendTo('#resource-topic-table tr'));
- }
-
- topicParent.append(
- $('<li>').append(
- $('<h3>').append(
- $('<a>')
- .attr('href', toRoot + "resources/browser.html?tag=" + topics[i].name)
- .append($('<span>')
- .addClass('en')
- .html(topics[i].title)
- )
- )
- )
- );
- }
-})();
-//-->
-</script> \ No newline at end of file
diff --git a/docs/html/resources/tutorials/hello-world.jd b/docs/html/resources/tutorials/hello-world.jd
deleted file mode 100644
index 70ba06c002e4..000000000000
--- a/docs/html/resources/tutorials/hello-world.jd
+++ /dev/null
@@ -1,607 +0,0 @@
-page.title=Hello, World
-parent.title=Tutorials
-parent.link=../browser.html?tag=tutorial
-@jd:body
-<div id="qv-wrapper">
-<div id="qv">
- <h2>In this document</h2>
- <ol>
- <li><a href="#platform">Install a Platform</a></li>
- <li><a href="#avd">Create an AVD</a></li>
- <li><a href="#create">Create the Project</a></li>
- <li><a href="#ui">Construct the UI</a></li>
- <li><a href="#run">Run the Code</a></li>
- <li><a href="#upgrading">Upgrade the UI to an XML Layout</a></li>
- <li><a href="#debugging">Debug Your Project</a></li>
- <li><a href="#noeclipse">Creating the Project Without Eclipse</a></li>
- </ol>
- </div>
-</div>
-
-<p>As a developer, you know that the first impression of a development framework is how easy it is
-to write "Hello, World." Well, on Android, it's pretty easy. It's particularly easy if you're using
-Eclipse as your IDE, because we've provided a great plugin that handles your project creation and
-management to greatly speed up your development cycles.</p>
-
-<p>This tutorial assumes that you're using Eclipse. If you're using the command line, see
-<a href="{@docRoot}guide/developing/building/building-cmdline.html">Building and Running from the
-Command Line</a>. You can then return to this tutorial and ignore anything about Eclipse.</p>
-
-<p>Before you start, you should already have the SDK installed, and if you're
-using Eclipse, you should have installed the ADT plugin as well. If you have not
-installed these, see <a href="{@docRoot}sdk/installing.html">Installing the
-Android SDK</a> and return here when you've completed the installation.</p>
-
-<h2 id="platform">Install a Platform</h2>
-
-<p>To run the Hello World application, you need to install at least one Android
-platform in your SDK environment. If you have not already performed this step,
-you need to do it now.</p>
-
-<p>To install a platform in Eclipse:</p>
-
-<ol>
-
- <li>In the Android SDK Manager, choose <strong>Available
-Packages</strong> in the left panel.</li>
-
-<li>In the right panel, expand the Android Repository list to display
-the components available for installation.</li>
-
- <li>Select at least one platform to install, and click <strong>Install
-Selected</strong>. If you aren't sure which platform to install, use the latest
-version.</li>
-</ol>
-
-<h2 id="avd">Create an AVD</h2>
-
-<div class="sidebox-wrapper">
- <div class="sidebox">
- <p>To learn more about how to use AVDs and the options
- available to you, see <a href="{@docRoot}guide/developing/devices/index.html">Managing
- Virtual Devices</a>.</p>
- </div>
-</div>
-
-<p>In this tutorial, you will run your application in the Android Emulator.
-Before you can launch the emulator, you must create an
-Android Virtual Device (AVD). An AVD defines the system image and
-device settings used by the emulator.</p>
-
-
-
-<p>To create an AVD:</p>
-<ol>
- <li>In Eclipse, select <strong>Window &gt; AVD Manager</strong>.</li>
- <li>Select <strong>Virtual Devices</strong> in the left panel.</li>
-
- <li>Click <strong>New...</strong>.
- <p>The <strong>Create New AVD</strong> dialog appears.</p>
- </li>
- <li>Type the name of the AVD, such as "my_avd".</li>
- <li>Choose a target.
- <p>The target is the platform (that is, the version of the Android SDK, such as 2.3.3) you want
- to run on the emulator. For this tutorial, choose the latest platform that you have installed
- and ignore the rest of the fields.</p>
- </li>
- <li>Click <strong>Create AVD</strong>.</li>
-</ol>
-<h2 id="create">Create a New Android Project</h2>
-
-<p>After you've created an AVD you can move to the next step and start a new Android project in
-Eclipse.</p>
-
-<ol>
- <li>In Eclipse, select <strong>File &gt; New &gt; Project...</strong>.
- <p>If the ADT
- Plugin for Eclipse has been successfully installed, the resulting dialog
- should have a folder labeled "Android" which should contain
- "Android Project". (After you create one or more Android projects, an entry for
- "Android XML File" will also be available.)</p>
- </li>
-
- <li>Select "Android Project" and click <strong>Next</strong>.<br/>
- <a href="images/hello_world_0.png"><img src="images/hello_world_0.png" style="height:230px" alt="" /></a>
- </li>
-
- <li>Fill in the project details with the following values:
- <ul>
- <li><em>Project name:</em> HelloAndroid</li>
- <li><em>Build Target:</em> Select a platform version that is equal to or lower than the
- target you chose for your AVD.</li>
- <li><em>Application name:</em> Hello, Android</li>
- <li><em>Package name:</em> com.example.helloandroid (or your own private namespace)</li>
- <li><em>Create Activity:</em> HelloAndroid</li>
- </ul>
- <p>Click <strong>Finish</strong>.</p>
-
- <a href="images/hello_world_1.png"><img src="images/hello_world_1.png" style="height:400px" alt="" /></a>
-
- <p>Here is a description of each field:</p>
-
- <dl>
- <dt><em>Project Name</em></dt>
- <dd>This is the Eclipse project name &mdash; the name of the directory
- that contains the project files.</dd>
- <dt><em>Build Target</em></dt>
- <dd>This is the version of the Android SDK that you're using to build your
- application. For example, if you choose Android 2.1, your application will be
- compiled against the Android 2.1 platform library. The target you choose here
- does not have to match the target you chose for your AVD; however, the target must
- be equal to or lower than the target you chose for your AVD. Android
- applications are forward-compatible, which means an application will run on the
- platform against which it is built as well as all platforms that are released in the
- future. For example, an application that is built against the 2.1 platform library
- will run normally on an AVD or device that is running the 2.3.3. The reverse is not
- true.</dd>
- <dt><em>Application Name</em></dt>
- <dd>This is the human-readable title for your application &mdash; the name that
- appears on the Android device.</dd>
- <dt><em>Package Name</em></dt>
- <dd>This is the package namespace (following the same rules as for
- packages in the Java programming language) that you want all your source code to
- reside under. This also sets the package name under which the stub
- Activity is generated.
- <p>Your package name must be unique across
- all packages installed on the Android system; for this reason, it's
- important to use a standard domain-style package for your
- applications. The example above uses the "com.example" namespace, which is
- a namespace reserved for example documentation &mdash;
- when you develop your own applications, you should use a namespace that's
- appropriate to your organization or entity.</p></dd>
- <dt><em>Create Activity</em></dt>
- <dd>This is the name for the class stub that is generated by the plugin.
- This is a subclass of Android's {@link android.app.Activity} class. An
- Activity is simply a class that can run and do work. It can create a UI if it
- chooses, but it doesn't need to. As the checkbox suggests, this is optional, but an
- Activity is almost always used as the basis for an application.</dd>
- <dt><em>Min SDK Version</em></dt>
- <dd>This value specifies the minimum API Level on which your application will run.
- The <em>Min SDK Version</em> should be the same as the <em>Build Target</em> you
- chose. For example, if the <em>Build Target</em> is Android 2.1, then the <em>Min
- SDK Version</em> should be 7 or lower (it can never be higher than 7). For more
- information, see
- <a href="{@docRoot}guide/appendix/api-levels.html">Android API Levels</a>.
- </dd>
- </dl>
-
- <p><em>Other fields</em>: The checkbox for "Use default location" allows you to change
- the location on disk where the project's files are generated and stored.</p>
- </li>
-</ol>
-
-<p>Your Android project is now ready. It should be visible in the Package Explorer on the left. Open
-the <code>HelloAndroid.java</code> file, located inside <em>HelloAndroid > src >
-com.example.helloandroid</em>). It should look like this:</p>
-
-<pre>
-package com.example.helloandroid;
-
-import android.app.Activity;
-import android.os.Bundle;
-
-public class HelloAndroid extends Activity {
- /** Called when the activity is first created. */
- &#64;Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
- }
-}</pre>
-
-<p>Notice that the class is based on the {@link android.app.Activity} class. An Activity is a
-single application entity that is used to perform actions. An application may have many separate
-activities, but the user interacts with them one at a time. The
-{@link android.app.Activity#onCreate(Bundle) onCreate()} method
-is called by the Android system when your Activity starts &mdash;
-it is where you should perform all initialization and UI setup. An activity is not required to
-have a user interface, but usually does.</p>
-
-<p>Now let's modify some code! </p>
-
-
-<h2 id="ui">Construct the UI</h2>
-
-<p>Take a look at the revised code below and then make the same changes to your HelloAndroid class.
-The bold items are lines that have been added.</p>
-
-<pre>
-package com.example.helloandroid;
-
-import android.app.Activity;
-import android.os.Bundle;
-<strong>import android.widget.TextView;</strong>
-
-public class HelloAndroid extends Activity {
- /** Called when the activity is first created. */
- &#64;Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- <strong>TextView tv = new TextView(this);
- tv.setText(&quot;Hello, Android&quot;);
- setContentView(tv);</strong>
- }
-}</pre>
-
-<p class="note"><strong>Tip:</strong> An easy way to add import packages to your project is
-to press <strong>Ctrl-Shift-O</strong> (<strong>Cmd-Shift-O</strong>, on Mac). This is an Eclipse
-shortcut that identifies missing packages based on your code and adds them for you. You may have
-to expand the <code>import</code> statements in your code for this to work.</p>
-
-<p>An Android user interface is composed of hierarchies of objects called
-Views. A {@link android.view.View} is a drawable object used as an element in your UI layout,
-such as a button, image, or (in this case) a text label. Each of these objects is a subclass
-of the View class and the subclass that handles text is {@link android.widget.TextView}.</p>
-
-<p>In this change, you create a TextView with the class constructor, which accepts
-an Android {@link android.content.Context} instance as its parameter. A
-Context is a handle to the system; it provides services like
-resolving resources, obtaining access to databases and preferences, and so
-on. The Activity class inherits from Context, and because your
-HelloAndroid class is a subclass of Activity, it is also a Context. So, you can
-pass <code>this</code> as your Context reference to the TextView.</p>
-
-<p>Next, you define the text content with
-{@link android.widget.TextView#setText(CharSequence) setText()}.</p>
-
-<p>Finally, you pass the TextView to
-{@link android.app.Activity#setContentView(View) setContentView()} in order to
-display it as the content for the Activity UI. If your Activity doesn't
-call this method, then no UI is present and the system will display a blank
-screen.</p>
-
-<p>There it is &mdash; "Hello, World" in Android! The next step, of course, is
-to see it running.</p>
-
-
-<h2 id="run">Run the Application</h2>
-
-<p>The Eclipse plugin makes it easy to run your applications:</p>
-
-<ol>
- <li>Select <strong>Run > Run</strong>.</li>
- <li>Select "Android Application".</li>
-</ol>
-
-<div class="sidebox-wrapper">
- <div class="sidebox">
- <p>To learn more about creating and editing run configurations in Eclipse, refer to
- <a href="{@docRoot}guide/developing/eclipse-adt.html#RunConfig">Developing In Eclipse,
- with ADT</a>.</p>
- </div>
-</div>
-
-<p>The Eclipse plugin automatically creates a new run configuration for your project
-and then launches the Android Emulator. Depending on your environment, the Android
-emulator might take several minutes to boot fully, so please be patient. When the
-emulator is booted, the Eclipse plugin installs your application
-and launches the default Activity. You should now see something like this:</p>
-
- <a href="images/hello_world_5.png"><img src="images/hello_world_5.png" style="height:230px" alt="" /></a>
-
-<p>The "Hello, Android" you see in the grey bar is actually the application title. The Eclipse plugin
-creates this automatically (the string is defined in the <code>res/values/strings.xml</code> file and referenced
-by your <code>AndroidManifest.xml</code> file). The text below the title is the actual text that you have
-created in the TextView object.</p>
-
-<p>That concludes the basic "Hello World" tutorial, but you should continue reading for some more
-valuable information about developing Android applications.</p>
-
-
-<h2 id="upgrading">Upgrade the UI to an XML Layout</h2>
-
-<p>The "Hello, World" example you just completed uses what is called a "programmatic"
-UI layout. This means that you constructed and built your application's UI
-directly in source code. If you've done much UI programming, you're
-probably familiar with how brittle that approach can sometimes be: small
-changes in layout can result in big source-code headaches. It's also
-easy to forget to properly connect Views together, which can result in errors in
-your layout and wasted time debugging your code.</p>
-
-<p>That's why Android provides an alternate UI construction model: XML-based
-layout files. The easiest way to explain this concept is to show an
-example. Here's an XML layout file that is identical in behavior to the
-programmatically-constructed example:</p>
-
-<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;TextView xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
- android:id=&quot;@+id/textview&quot;
- android:layout_width=&quot;fill_parent&quot;
- android:layout_height=&quot;fill_parent&quot;
- android:text=&quot;@string/hello&quot;/&gt;</pre>
-
-<p>The general structure of an Android XML layout file is simple: it's a tree
-of XML elements, wherein each node is the name of a View class
-(this example, however, is just one View element). You can use the
-name of any class that extends {@link android.view.View} as an element in your XML layouts,
-including custom View classes you define in your own code. This
-structure makes it easy to quickly build up UIs, using a more simple
-structure and syntax than you would use in a programmatic layout. This model is inspired
-by the web development model, wherein you can separate the presentation of your
-application (its UI) from the application logic used to fetch and fill in data.</p>
-
-<p>In the above XML example, there's just one View element: the <code>TextView</code>,
-which has five XML attributes. Here's a summary of what they mean:</p>
-
-<table>
- <tbody>
- <tr>
- <th>
- Attribute
- </th>
- <th>
- Meaning
- </th>
- </tr>
- <tr>
- <td>
- <code>xmlns:android</code>
- </td>
- <td>
- This is an XML namespace declaration that tells the Android tools that you are going to refer to common attributes defined in the Android namespace. The outermost tag in every Android layout file must have this attribute.<br>
- </td>
- </tr>
- <tr>
- <td>
- <code>android:id</code>
- </td>
- <td>
- This attribute assigns a unique identifier to the <code>TextView</code> element.
- You can use the assigned ID to reference this View from your source code or from other
- XML resource declarations.
- </td>
- </tr>
- <tr>
- <td>
- <code>android:layout_width</code>
- </td>
- <td>
- This attribute defines how much of the available width on the screen this View should consume.
- In this case, it's the only View so you want it to take up the entire screen, which is what a value of "fill_parent" means.<br>
- </td>
- </tr>
- <tr>
- <td>
- <code>android:layout_height</code>
- </td>
- <td>
- This is just like android:layout_width, except that it refers to available screen height.
- </td>
- </tr>
- <tr>
- <td>
- <code>android:text</code>
- </td>
- <td>
- This sets the text that the TextView should display. In this example, you use a string
- resource instead of a hard-coded string value.
- The <em>hello</em> string is defined in the <em>res/values/strings.xml</em> file. This is the
- recommended practice for inserting strings to your application, because it makes the localization
- of your application to other languages graceful, without need to hard-code changes to the layout file.
- For more information, see <a href="{@docRoot}guide/topics/resources/resources-i18n.html">Resources
- and Internationalization</a>.
- </td>
- </tr>
- </tbody>
-</table>
-
-
-<p>These XML layout files belong in the <code>res/layout/</code> directory of your project. The "res" is
-short for "resources" and the directory contains all the non-code assets that
-your application requires. In addition to layout files, resources also include assets
-such as images, sounds, and localized strings.</p>
-
-<div class="sidebox-wrapper">
-<div class="sidebox">
- <h2>Landscape layout</h2>
- <p>When you want a different design for landscape, put your layout XML file
- inside /res/layout-land. Android will automatically look here when the layout changes.
- Without this special landscape layout defined, Android will stretch the default layout.</p>
-</div>
-</div>
-
-<p>The Eclipse plugin automatically creates one of these layout files for you: main.xml.
-In the "Hello World" application you just completed, this file was ignored and you created a
-layout programmatically. This was meant to teach you more
-about the Android framework, but you should almost always define your layout
-in an XML file instead of in your code.
-The following procedures will instruct you how to change your
-existing application to use an XML layout.</p>
-
-<ol>
- <li>In the Eclipse Package Explorer, expand the
-<code>/res/layout/</code> folder and open <code>main.xml</code> (once opened, you might need to click
-the "main.xml" tab at the bottom of the window to see the XML source). Replace the contents with
-the following XML:
-
-<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;TextView xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
- android:id=&quot;@+id/textview&quot;
- android:layout_width=&quot;fill_parent&quot;
- android:layout_height=&quot;fill_parent&quot;
- android:text=&quot;@string/hello&quot;/&gt;</pre>
-<p>Save the file.</p>
-</li>
-
-<li>Inside the <code>res/values/</code> folder, open <code>strings.xml</code>.
-This is where you should save all default text strings for your user interface. If you're using Eclipse, then
-ADT will have started you with two strings, <em>hello</em> and <em>app_name</em>.
-Revise <em>hello</em> to something else. Perhaps "Hello, Android! I am a string resource!"
-The entire file should now look like this:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;resources>
- &lt;string name="hello">Hello, Android! I am a string resource!&lt;/string>
- &lt;string name="app_name">Hello, Android&lt;/string>
-&lt;/resources>
-</pre>
-</li>
-
-<li>Now open and modify your <code>HelloAndroid</code> class and use the
-XML layout. Edit the file to look like this:
-<pre>
-package com.example.helloandroid;
-
-import android.app.Activity;
-import android.os.Bundle;
-
-public class HelloAndroid extends Activity {
- /** Called when the activity is first created. */
- &#64;Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
- }
-}</pre>
-
-<p>When you make this change, type it by hand to try the
-code-completion feature. As you begin typing "R.layout.main" the plugin will offer you
-suggestions. You'll find that it helps in a lot of situations.</p>
-
-<p>Instead of passing <code>setContentView()</code> a View object, you give it a reference
-to the layout resource.
-The resource is identified as <code>R.layout.main</code>, which is actually a compiled object representation of
-the layout defined in <code>/res/layout/main.xml</code>. The Eclipse plugin automatically creates this reference for
-you inside the project's R.java class. If you're not using Eclipse, then the R.java class will be generated for you
-when you run Ant to build the application. (More about the R class in a moment.)</p>
-</li>
-</ol>
-
-<p>Now re-run your application &mdash; because you've created a launch configuration, all
-you need to do is click the green arrow icon to run, or select
-<strong>Run &gt; Run History &gt; Android Activity</strong>. Other than the change to the TextView
-string, the application looks the same. After all, the point was to show that the two different
-layout approaches produce identical results.</p>
-
-<p class="note"><strong>Note:</strong> You may have to unlock the screen on the emulator to see
-your application &mdash; just as you would unlock the screen on a device. If you have problems
-running the emulator, see <a href="{@docRoot}guide/developing/devices/emulator.html">Using the
-Android Emulator</a>.</p>
-
-<p>Continue reading for an introduction
-to debugging and a little more information on using other IDEs. When you're ready to learn more,
-read <a href="{@docRoot}guide/topics/fundamentals.html">Application
-Fundamentals</a> for an introduction to all the elements that make Android applications work.
-Also refer to the <a href="{@docRoot}guide/index.html">Developer's Guide</a>
-introduction page for an overview of the <em>Dev Guide</em> documentation.</p>
-
-
-<div class="special">
-<h3>R class</h3>
-<p>In Eclipse, open the file named <code>R.java</code> (in the <code>gen/</code> [Generated Java Files] folder).
-It should look something like this:</p>
-
-<pre>
-package com.example.helloandroid;
-
-public final class R {
- public static final class attr {
- }
- public static final class drawable {
- public static final int icon=0x7f020000;
- }
- public static final class id {
- public static final int textview=0x7f050000;
- }
- public static final class layout {
- public static final int main=0x7f030000;
- }
- public static final class string {
- public static final int app_name=0x7f040001;
- public static final int hello=0x7f040000;
- }
-}
-</pre>
-
-<p>A project's <code>R.java</code> file is an index into all the resources defined in the
-file. You use this class in your source code as a sort of short-hand
-way to refer to resources you've included in your project. This is
-particularly powerful with the code-completion features of IDEs like Eclipse
-because it lets you quickly and interactively locate the specific reference
-you're looking for.</p>
-
-<p>It's possible yours looks slightly different than this (perhaps the hexadecimal values are
-different).
-For now, notice the inner class named "layout", and its
-member field "main". The Eclipse plugin noticed the XML
-layout file named main.xml and generated a class for it here. As you add other
-resources to your project (such as strings in the <code>res/values/string.xml</code> file or drawables inside
-the <code>res/drawable/</code> directory) you'll see <code>R.java</code> change to keep up.</p>
-<p>When not using Eclipse, this class file will be generated for you at build time (with the Ant tool).</p>
-<p><em>You should never edit this file by hand.</em></p>
-</div>
-
-<h2 id="debugging">Debug Your Project</h2>
-
-<p>The Android Plugin for Eclipse also has excellent integration with the Eclipse
-debugger. To demonstrate this, introduce a bug into
-your code. Change your HelloAndroid source code to look like this:</p>
-
-<pre>
-package com.example.helloandroid;
-
-import android.app.Activity;
-import android.os.Bundle;
-
-public class HelloAndroid extends Activity {
- /** Called when the activity is first created. */
- &#64;Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- Object o = null;
- o.toString();
- setContentView(R.layout.main);
- }
-}</pre>
-
-<p>This change simply introduces a NullPointerException into your code. If
-you run your application again, you'll eventually see this:</p>
-
- <a href="images/hello_world_8.png"><img src="images/hello_world_8.png" style="height:230px" alt="" /></a>
-
-<p>Press "Force Quit" to terminate the application and close the emulator window.</p>
-
-<p>To find out more about the error, set a breakpoint in your source code
-on the line <code>Object o = null;</code> (double-click on the marker bar next to the source code line). Then select <strong>Run &gt; Debug History &gt; Hello,
-Android</strong> from the menu to enter debug mode. Your app will restart in the
-emulator, but this time it will suspend when it reaches the breakpoint you
-set. You can then step through the code in Eclipse's Debug Perspective,
-just as you would for any other application.</p>
-
- <a href="images/hello_world_9.png"><img src="images/hello_world_9.png" style="height:230px" alt="" /></a>
-
-
-<h2 id="noeclipse">Creating the Project without Eclipse</h2>
-
- <p>If you don't use Eclipse (such as if you prefer another IDE, or simply use text
- editors and command line tools) then the Eclipse plugin can't help you.
- Don't worry though &mdash; you don't lose any functionality just because you don't
- use Eclipse.</p>
-
- <p>The Android Plugin for Eclipse is really just a wrapper around a set of tools
- included with the Android SDK. (These tools, like the emulator, aapt, adb,
- ddms, and others are <a href="{@docRoot}guide/developing/tools/index.html">documented elsewhere.</a>)
- Thus, it's possible to
- wrap those tools with another tool, such as an 'ant' build file.</p>
-
- <p>The Android SDK includes a tool named "android" that can be
- used to create all the source code and directory stubs for your project, as well
- as an ant-compatible <code>build.xml</code> file. This allows you to build your project
- from the command line, or integrate it with the IDE of your choice.</p>
-
- <p>For example, to create a HelloAndroid project similar to the one created
- in Eclipse, use this command:</p>
-
- <pre>
-android create project \
- --package com.example.helloandroid \
- --activity HelloAndroid \
- --target 2 \
- --path <em>&lt;path-to-your-project></em>/HelloAndroid
-</pre>
-
- <p>This creates the required folders and files for the project at the location
- defined by the <em>path</em>.</p>
-
- <p>For more information on how to use the SDK tools to create and build projects, please read
-<a href="{@docRoot}guide/developing/other-ide.html">Developing in Other IDEs</a>.</p> \ No newline at end of file
diff --git a/docs/html/resources/tutorials/index.html b/docs/html/resources/tutorials/index.html
deleted file mode 100644
index 4881acf44581..000000000000
--- a/docs/html/resources/tutorials/index.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=../index.html">
-</head>
-<body>
-<a href="../index.html">click here</a> if you are not redirected.
-</body>
-</html> \ No newline at end of file
diff --git a/docs/html/resources/tutorials/localization/index.jd b/docs/html/resources/tutorials/localization/index.jd
deleted file mode 100755
index de4433b3092a..000000000000
--- a/docs/html/resources/tutorials/localization/index.jd
+++ /dev/null
@@ -1,595 +0,0 @@
-page.title=Hello, L10N
-parent.title=Tutorials
-parent.link=../../browser.html?tag=tutorial
-@jd:body
-
-<div id="qv-wrapper">
- <div id="qv">
- <h2>In this document</h2>
- <ol>
- <li><a href="#unlocalized">Create an Unlocalized App</a>
- <ol>
- <li><a href="#create">Create the Project and Layout</a></li>
- <li><a href="#default">Create Default Resources</a></li>
- </ol>
- </li>
- <li><a href="#run">Run the Unlocalized App</a></li>
- <li><a href="#plan">Plan the Localization</a></li>
- <li><a href="#localize">Localize the App</a>
- <ol>
- <li><a href="#localize_strings">Localize the Strings</a></li>
- <li><a href="#localize_images">Localize the Images</a></li>
- </ol>
- </li>
- <li><a href="#test_localized">Run and Test the Localized App</a></li>
- </ol>
- <h2>See also</h2>
- <ol>
-<li>{@link android.widget.Button}</li>
-<li>{@link android.widget.TextView}</li>
-<li>{@link android.app.AlertDialog}</li>
-</ol>
- </div>
-</div>
-
-<p>In this tutorial, we will create a Hello, L10N application that uses the
-Android framework to selectively load resources. Then we will localize the
-application by adding resources to the <code>res/</code> directory. </p>
-
-<p>This tutorial uses the practices described in the <a
-href="{@docRoot}guide/topics/resources/localization.html">Localization</a>
-document. </p>
-
-
-<h2 id="unlocalized">Create an Unlocalized Application</h2>
-
-<p>The first version of the Hello, L10N application will use only the default
-resource directories (<code>res/drawable</code>, <code>res/layout</code>, and
-<code>res/values</code>). These resources are not localized &#8212; they are the
-graphics, layout, and strings that we expect the application to use most often.
-When a user runs the application in the default locale, or in a locale that the
-application does not specifically support, the application will load resources
-from these default directories.</p>
-
-<p>The application consists of a simple user interface that displays two
-{@link android.widget.TextView} objects and a {@link android.widget.Button} image with a
- background image of a national flag. When clicked, the button displays an
-{@link android.app.AlertDialog} object that shows additional text. </p>
-
-<h3 id="create">Create the Project and Layout</h3>
-
-<p>For this application, the default language will be British English and the
-default location the United Kingdom. </p>
-
-<ol>
- <li>Start a new project and Activity called &quot;HelloL10N.&quot; If you are
-using Eclipse, fill out these values in the New Android Project wizard:
- <ul>
- <li><em>Project name:</em> HelloL10N</li>
- <li><em>Application name:</em> Hello, L10N</li>
- <li><em>Package name:</em> com.example.hellol10n (or your own private
-namespace)</li>
- <li><em>Create Activity:</em> HelloL10N</li>
- <li><em>Min SDK Version:</em> 3</li>
- </ul>
- <p>The basic project contains a <code>res/</code> directory with
-subdirectories for the three most common types of resources: graphics
-(<code>res/drawable/</code>), layouts (<code>res/layout/</code>) and strings
-(<code>res/values/</code>). Most of the localization work you do later in this
-tutorial will involve adding more subdirectories to the <code>res/</code>
-directory.</p>
- <img src="{@docRoot}images/hello_l10n/plain_project.png" alt="plain project" width="194"
-height="229">
- </li>
- <li>Open the <code>res/layout/main.xml</code> file and replace it with the
-following code:
- <pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
- android:orientation=&quot;vertical&quot;
- android:layout_width=&quot;fill_parent&quot;
- android:layout_height=&quot;fill_parent&quot;
- &gt;
-&lt;TextView
- android:layout_width=&quot;fill_parent&quot;
- android:layout_height=&quot;wrap_content&quot;
- android:gravity=&quot;center_horizontal&quot;
- android:text=&quot;@string/text_a&quot;
- /&gt;
-&lt;TextView
- android:layout_width=&quot;fill_parent&quot;
- android:layout_height=&quot;wrap_content&quot;
- android:gravity=&quot;center_horizontal&quot;
- android:text=&quot;@string/text_b&quot;
- /&gt;
-&lt;Button
- android:id=&quot;@+id/flag_button&quot;
- android:layout_width=&quot;wrap_content&quot;
- android:layout_height=&quot;wrap_content&quot;
- android:layout_gravity=&quot;center&quot;
- /&gt;
-&lt;/LinearLayout&gt;
- </pre>
-
- <p>The LinearLayout has two {@link android.widget.TextView} objects that will
-display localized text and one {@link android.widget.Button} that shows a flag.
-</p>
- </li>
-</ol>
-
-<h3 id="default">Create Default Resources</h3>
-
-<p>The layout refers to resources that need to be defined. </p>
-
-<ol>
- <li>Create default text strings. To do this, open the <code>res/values/strings.xml</code> file and replace it with the following code:<br>
- <pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;resources&gt;
- &lt;string name=&quot;app_name&quot;&gt;Hello, L10N&lt;/string&gt;
- &lt;string name=&quot;text_a&quot;&gt;Shall I compare thee to a summer&quot;'&quot;s day?&lt;/string&gt;
- &lt;string name=&quot;text_b&quot;&gt;Thou art more lovely and more temperate.&lt;/string&gt;
- &lt;string name=&quot;dialog_title&quot;&gt;No Localisation&lt;/string&gt;
- &lt;string name=&quot;dialog_text&quot;&gt;This dialog box&quot;'&quot;s strings are not localised. For every locale, the text here will come from values/strings.xml.&lt;/string&gt;
-&lt;/resources&gt;</pre>
-
- <p>This code provides British English text for each string that the application
-will use. When we localize this application, we will provide alternate text in
-German, French, and Japanese for some of the strings.</p>
- </li>
- <li>Add a default flag graphic to the <code>res/drawable</code> folder by
-saving <a href="../../../images/hello_l10n/flag.png">flag.png</a> as
-<code>res/drawable/flag.png</code>. When the application is not localized, it
-will show a British flag.<br>
-
- </li>
- <li>Open HelloL10N.java (in the <code>src/</code> directory) and add the
-following code inside the <code>onCreate()</code> method (after
-<code>setContentView</code>).
-
- <pre>// assign flag.png to the button, loading correct flag image for current locale
-Button b;
-(b = (Button)findViewById(R.id.flag_button)).setBackgroundDrawable(this.getResources().getDrawable(R.drawable.flag));
-
-// build dialog box to display when user clicks the flag
-AlertDialog.Builder builder = new AlertDialog.Builder(this);
-builder.setMessage(R.string.dialog_text)
- .setCancelable(false)
- .setTitle(R.string.dialog_title)
- .setPositiveButton("Done", new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- dialog.dismiss();
- }
- });
-final AlertDialog alert = builder.create();
-
-// set click listener on the flag to show the dialog box
-b.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- alert.show();
- }
- });</pre>
-
- <p class="note"><strong>Tip:</strong> In Eclipse, use
-<strong>Ctrl-Shift-O</strong> (<strong>Cmd-Shift-O</strong>, on Mac) to find and
-add missing import packages to your project, then save the HelloL10N.java
-file.</p>
-
- <p>The code that you added does the following:</p>
-
- <ul>
- <li>It assigns the correct flag icon to the button.
- For now, no resources are defined other than the default, so this code
-will always assign the contents of <code>res/drawable/flag.png</code> (the
-British flag) as the flag icon, no matter what the locale. Once we add more
-flags for different locales, this code will sometimes assign a different flag.
-</li>
- <li>It creates an {@link android.app.AlertDialog} object and sets a click listener so that when the
-user clicks the button, the AlertDialog will display.
- We will not localize the dialog text;
-the AlertDialog will always display the <code>dialog_text</code> that is located
-within <code>res/values/strings.xml</code>. </li>
- </ul>
-
- </li>
-</ol>
-
-<p>The project structure now looks like this:</p>
-
- <img src="{@docRoot}images/hello_l10n/nonlocalized_project.png" alt="nonlocalized" width="394"
-height="320">
-
-<p class="note"><strong>Tip:</strong> If you will want to run the application on
-a device and not just on an emulator, open <code>AndroidManifest.xml</code> and
-add <code>android:debuggable="true"</code> inside the
-<code>&lt;application&gt;</code> element. For information about setting up the
-device itself so it can run applications from your system, see <a
-href="{@docRoot}guide/developing/device.html">Developing on a Device</a>.</p>
-
-
-<h2 id="run">Run the Unlocalized Application</h2>
-
-<p>Save the project and run the application to see how it works. No matter what
-locale your device or emulator is set to, the application runs the same way. It
-should look something like this:</p>
-
-<table border="0" cellspacing="0" cellpadding="30">
- <tr>
- <th scope="col">The unlocalized application, running in any locale:</th>
- <th scope="col">After clicking the flag, in any locale:</th>
- </tr>
- <tr>
- <td valign="top"><img src="{@docRoot}images/hello_l10n/nonlocalized_screenshot1.png"
-alt="nonlocalized" width="321" height="366"></td>
- <td><img src="{@docRoot}images/hello_l10n/nonlocalized_screenshot2.png" alt="nonlocalized2"
-width="321" height="366"></td>
- </tr>
-</table>
-<h2 id="plan">Plan the Localization</h2>
-<p>The first step in localizing an application is to plan how the application
-will render differently in different locales. In this application, the default
-locale will be the United Kingdom. We will add some locale-specific information
-for Germany, France, Canada, Japan, and the United States. Table 1 shows the
-plan for how the application will appear in different locales.</p>
-
-<p class="caption">Table 1</p>
-
-<table border="0" cellspacing="0" cellpadding="10">
- <tr>
- <th scope="col" valign="bottom">Region /<br />
- Language</th>
- <th scope="col">United Kingdom</th>
- <th scope="col">Germany</th>
- <th scope="col">France</th>
- <th scope="col">Canada</th>
- <th scope="col">Japan</th>
- <th scope="col">United States</th>
- <th scope="col">Other Location</th>
- </tr>
- <tr>
- <th scope="row"><br>
- English</th>
- <td> British English text; British flag <em>(default)</em></td>
- <td><em>-</em></td>
- <td><em>-</em></td>
- <td> British English text; Canadian flag</td>
- <td>-</td>
- <td> British English text; U.S. flag</td>
- <td> British English text; British flag <em>(default)</em></td>
- </tr>
- <tr>
- <th scope="row">German</th>
- <td>-</td>
- <td>German text for <code>app_name</code>, <code>text_a</code> and
-<code>text_b</code>; German flag</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>German text for <code>app_name</code>, <code>text_a</code> and
-<code>text_b</code>; British flag</td>
- </tr>
- <tr>
- <th scope="row">French</th>
- <td>-</td>
- <td>-</td>
- <td>French text for <code>app_name</code>, <code>text_a</code> and
-<code>text_b</code>; French flag</td>
- <td>French text for <code>app_name</code>, <code>text_a</code> and
-<code>text_b</code>; Canadian flag</td>
- <td>-</td>
- <td>-</td>
- <td>French text for <code>app_name</code>, <code>text_a</code> and
-<code>text_b</code>; British flag</td>
- </tr>
- <tr>
- <th scope="row">Japanese</th>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>Japanese text for <code>text_a</code> and <code>text_b</code>; Japanese
-flag</td>
- <td>-</td>
- <td>Japanese text for <code>text_a</code> and <code>text_b</code>; British
-flag</td>
- </tr>
- <tr>
- <th scope="row">Other Language</th>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td> British English text; British flag <em>(default)</em></td>
- </tr>
-</table>
-
-<p class="note"> Note that other behaviors are possible; for example, the
-application could support Canadian English or U.S. English text. But given the
-small amount of text involved, adding more versions of English would not make
-this application more useful.</p>
-
-<p>As shown in the table above, the plan calls for five flag icons in addition
-to the British flag that is already in the <code>res/drawable/</code> folder. It
-also calls for three sets of text strings other than the text that is in
-<code>res/values/strings.xml</code>.</p>
-
-<p>Table 2 shows where the needed text strings and flag icons will go, and
-specifies which ones will be loaded for which locales. (For more about the
-locale codes, <em></em>see <a
-href="{@docRoot}guide/topics/resources/resources-i18n.html#AlternateResources">
-Alternate Resources</a>.)</p>
-<p class="caption" id="table2">Table 2</p>
-
-<table border="1" cellspacing="0" cellpadding="5">
- <tr>
- <th scope="col">Locale Code</th>
- <th scope="col">Language / Country</th>
- <th scope="col">Location of strings.xml</th>
- <th scope="col">Location of flag.png</th>
- </tr>
- <tr>
- <td><em>Default</em></td>
- <td>English / United Kingdom</td>
- <td>res/values/</td>
- <td>res/drawable/</td>
- </tr>
- <tr>
- <td>de-rDE</td>
- <td>German / Germany</td>
- <td>res/values-de/</td>
- <td>res/drawable-de-rDE/</td>
- </tr>
- <tr>
- <td>fr-rFR</td>
- <td>French / France</td>
- <td>res/values-fr/</td>
- <td>res/drawable-fr-rFR/</td>
- </tr>
- <tr>
- <td>fr-rCA</td>
- <td>French / Canada</td>
- <td>res/values-fr/</td>
- <td>res/drawable-fr-rCA/</td>
- </tr>
- <tr>
- <td>en-rCA</td>
- <td>English / Canada</td>
- <td><em>(res/values/)</em></td>
- <td>res/drawable-en-rCA/</td>
- </tr>
- <tr>
- <td>ja-rJP</td>
- <td>Japanese / Japan</td>
- <td>res/values-ja/</td>
- <td>res/drawable-ja-rJP/</td>
- </tr>
- <tr>
- <td>en-rUS</td>
- <td>English / United States</td>
- <td><em>(res/values/)</em></td>
- <td>res/drawable-en-rUS/</td>
- </tr>
-</table>
-
-<p class="note"><strong>Tip: </strong>A folder qualifer cannot specify a region
-without a language. Having a folder named <code>res/drawable-rCA/</code>,
-for example, will prevent the application from compiling. </p>
-
-<p>At run time, the application will select a set of resources to load based on the locale
-that is set in the user's device. In cases where no locale-specific resources
-are available, the application will fall back on the defaults. </p>
-
-<p>For example, assume that the device's language is set to German and its
-location to Switzerland. Because this application does not have a
-<code>res/drawable-de-rCH/</code> directory with a <code>flag.png</code> file in it, the system
-will fall back on the default, which is the UK flag located in
-<code>res/drawable/flag.png</code>. The language used will be German. Showing a
-British flag to German speakers in Switzerland is not ideal, but for now we will
-just leave the behavior as it is. There are several ways you could improve this
-application's behavior if you wanted to:</p>
-
-<ul>
- <li>Use a generic default icon. In this application, it might be something
-that represents Shakespeare. </li>
- <li>Create a <code>res/drawable-de/</code> folder that includes an icon that
-the application will use whenever the language is set to German but the location
-is not Germany. </li>
-</ul>
-
-
-<h2 id="localize">Localize the Application</h2>
-
-<h3 id="localize_strings">Localize the Strings</h3>
-
-<p>The application requires three more <code>strings.xml</code> files, one
-each for German, French, and Japanese. To create these resource files within
-Eclipse:</p>
-
-<ol>
-<li>Select <strong>File</strong> &gt; <strong>New</strong> &gt; <strong>Android
-XML File</strong> to open the New Android XML File wizard. You can also open
-the wizard by clicking its icon in the toolbar:<br />
-<img src="{@docRoot}images/hello_l10n/xml_file_wizard_shortcut.png"
-alt="file_wizard_shortcut" width="297"
-height="90" style="margin:15px"></li>
- <li>Select L10N for the Project field, and type <code>strings.xml</code> into
-the File field. In the left-hand list, select Language, then click the right arrow.<br>
-<img src="{@docRoot}images/hello_l10n/xml_wizard1.png" alt="res_file_copy" width="335"
-height="406" style="margin:15px"></li>
- <li>Type <code>de</code> in the Language box and click Finish.<br>
- <img src="{@docRoot}images/hello_l10n/xml_wizard2.png" alt="res_file_copy" width="306"
-height="179">
-<p>A new file, <code>res/values-de/strings.xml</code>, now appears among the project
-files.</p></li>
-<li>Repeat the steps twice more, for the language codes <code>fr</code> and
- <code>ja</code>.
-Now the project includes these new skeleton files: <br />
- <code>res/<strong>values-de</strong>/strings.xml</code><br />
- <code>res/<strong>values-fr</strong>/strings.xml</code><br />
- <code>res/<strong>values-ja</strong>/strings.xml</code><br />
- </li>
- <li>Add localized text to the new files. To do
-this, open the <code>res/values-<em>&lt;qualifier&gt;</em>/strings.xml</code> files and
-replace the code as follows:</li>
-</ol>
-
-<table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <th scope="col">File</th>
- <th scope="col">Replace the contents with the following code:</th>
- </tr>
- <tr>
- <td><code>res/values-de/strings.xml</code></td>
- <td><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;resources&gt;
- &lt;string name=&quot;app_name&quot;&gt;Hallo, Lokalisierung&lt;/string&gt;
- &lt;string name=&quot;text_a&quot;&gt;Soll ich dich einem Sommertag vergleichen,&lt;/string&gt;
- &lt;string name=&quot;text_b&quot;&gt;Der du viel lieblicher und sanfter bist?&lt;/string&gt;
-&lt;/resources&gt;</pre></td>
- </tr>
- <tr>
- <td><code>res/values-fr/strings.xml</code></td>
- <td><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;resources&gt;
- &lt;string name=&quot;app_name&quot;&gt;Bonjour, Localisation&lt;/string&gt;
- &lt;string name=&quot;text_a&quot;&gt;Irai-je te comparer au jour d'été?&lt;/string&gt;
- &lt;string name=&quot;text_b&quot;&gt;Tu es plus tendre et bien plus tempéré.&lt;/string&gt;
-&lt;/resources&gt; </pre></td>
- </tr>
- <tr>
- <td><code>res/values-ja/strings.xml</code></td>
- <td>
-<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;resources&gt;
- &lt;string name=&quot;text_a&quot;&gt;あなたをなにかにたとえるとしたら夏の一日でしょうか?&lt;/string&gt;
- &lt;string name=&quot;text_b&quot;&gt;だがあなたはもっと美しく、もっとおだやかです。&lt;/string&gt;
-&lt;/resources&gt;</pre></td>
- </tr>
-</table>
-
-<p class="note"><b>Tip:</b> In the
-<code>values-<em>&lt;qualifier&gt;</em>/strings.xml</code> files, you only need to
-include text for strings that are different from the default strings. For
-example, when the application runs on a device that is configured for Japanese,
-the plan is for <code>text_a</code> and <code>text_b</code> to be in Japanese
-while all the other text is in English, so
-<code>res/values-ja/strings.xml</code> only needs to include <code>text_a</code>
-and <code>text_b</code>.</p>
-
-<h3 id="localize_images">Localize the Images</h3>
-
-<p>As shown in <a href="#table2">Table 2</a>, the application needs six more
-drawable folders, each containing a <code>flag.png</code> icon. Add the needed
-icons and folders to your project:</p>
-
-<ol>
- <li>Save this <a href="../../../images/hello_l10n/drawable-de-rDE/flag.png">German flag icon</a>
-as <code>res/drawable-de-rDE/flag.png</code> in the application's project
-workspace.
- <p>For example:</p>
- <ol>
- <li>Click the link to open the flag image.</li>
- <li>Save the image in
-<code><em>your-workspace</em>/HelloL10N/res/drawable-de-rDE/</code> .</li>
- </ol>
- </li>
- <li>Save this <a href="../../../images/hello_l10n/drawable-fr-rFR/flag.png">French flag icon</a>
-as <code>res/drawable-fr-rFR/flag.png</code> in the application's project
-workspace. </li>
- <li>Save this <a href="../../../images/hello_l10n/drawable-fr-rCA/flag.png">Canadian flag icon</a>
-as <code>res/drawable-fr-rCA/flag.png</code> in the project workspace. </li>
- <li>Save the <a href="../../../images/hello_l10n/drawable-en-rCA/flag.png">Canadian flag icon</a>
-again, this time as <code>res/drawable-en-rCA/flag.png</code> in the project
-workspace. (Why not have just <em>one</em> folder that contains the Canadian
-flag? Because a folder qualifer cannot specify a region without a language.
-You cannot have a folder named <code>drawable-rCA/</code>; instead you must
-create two separate folders, one for each of the Canadian languages represented
-in the application.)</li>
- <li>Save this <a href="../../../images/hello_l10n/drawable-ja-rJP/flag.png">Japanese flag icon</a>
-as <code>res/drawable-ja-rJP/flag.png</code> in the project workspace. </li>
- <li>Save this <a href="../../../images/hello_l10n/drawable-en-rUS/flag.png">United States flag
-icon</a> as <code>res/drawable-en-rUS/flag.png</code> in the project workspace.
- </li>
-</ol>
-
-<p>If you are using Eclipse, refresh the project (F5). The new
-<code>res/drawable-<em>&lt;qualifier&gt;</em>/</code> folders should appear in the
-project view. </p>
-
-
-<h2 id="test_localized">Run and Test the Localized Application</h2>
-
-<p>Once you've added the localized string and image resources, you are ready to
- run the application and test its handling of them. To change the locale
- on a device or in the emulator, use the Settings
-application (Home &gt; Menu &gt; Settings &gt; Locale &amp; text &gt; Select
-locale). Depending on how a device was configured, it might not offer any
-alternate locales via the Settings application, or might offer only a few. The
-emulator, on the other hand, will offer a selection of all the locales that are
-available in the Android system image. </p>
-
-<p>To set the emulator to a locale that is not available in the system image,
-use the Custom Locale application, which is available in the Application
-tab:</p>
-
-<p><img src="{@docRoot}images/hello_l10n/custom_locale_app.png" alt="custom locale app" width="163"
-height="158" style="margin-left:15px"></p>
-
-<p>To switch to a new locale, long-press a locale name:</p>
-
-<p><img src="{@docRoot}images/hello_l10n/using_custom_locale.png" alt="using custom locale"
-width="512" height="299" style="margin-left:15px"></p>
-
-<p>For a list of locales available on different versions of the Android platform,
-refer to the platform notes documents, listed under "Downloadable SDK Components"
-in the "SDK" tab. For example, <a
-href="{@docRoot}sdk/android-2.0.html#locs">Android 2.0 locales</a>.</p>
-
-<p>Run the application for each of the expected locales, plus one unexpected
-locale. Here are some of the results you should see:</p>
-
-<table border="0" cellspacing="0" cellpadding="05">
- <tr>
- <th scope="col">Locale</th>
- <th scope="col">Opening screen of application</th>
- </tr>
- <tr>
- <td>German / Germany
- <br />Specifically supported by the Hello, L10N application.</td>
- <td><img src="{@docRoot}images/hello_l10n/german_screenshot.png" alt="custom locale app"
-width="321" height="175" align="right"
-style="margin-left:10px;margin-right:20px"></td>
- </tr>
- <tr>
- <td>French / Canada
- <br />Specifically supported by the Hello, L10N application.</td>
- <td><img src="{@docRoot}images/hello_l10n/frenchCA_screenshot.png" alt="custom locale app"
-width="321" height="175" align="right"
-style="margin-left:10px;margin-right:20px"></td>
- </tr>
- <tr>
- <td>German / Switzerland
- <br />Only the language is specifically supported by
-the Hello, L10N application.</td>
- <td><img src="{@docRoot}images/hello_l10n/germanCH_screenshot.png" alt="custom locale app"
-width="321" height="175" align="right"
-style="margin-left:10px;margin-right:20px">`</td>
- </tr>
- <tr>
- <td>Japanese
- <br />Specifically supported by the Hello, L10N application.
- </td>
- <td><img src="{@docRoot}images/hello_l10n/japanese_screenshot.png" alt="custom locale app"
-width="321" height="220" align="right"
-style="margin-left:10px;margin-right:20px">`</td>
- </tr>
- <tr>
- <td>Romansh / Switzerland (custom locale <code>rm_CH</code>)
- <br />Not specifically supported by the Hello, L10N
-application, so the application uses the default resources.</td>
- <td><img src="{@docRoot}images/hello_l10n/romanshCH_screenshot.png" alt="custom locale app"
-width="321" height="175" align="right"
-style="margin-left:10px;margin-right:20px"></td>
- </tr>
-</table>
diff --git a/docs/html/resources/tutorials/notepad/index.jd b/docs/html/resources/tutorials/notepad/index.jd
index dd9218451a0c..1f37c410a55a 100644
--- a/docs/html/resources/tutorials/notepad/index.jd
+++ b/docs/html/resources/tutorials/notepad/index.jd
@@ -44,11 +44,11 @@ steps in your environment. </p>
<p>The tutorial assumes that you have some familiarity with basic Android
application concepts and terminology. If you are not, you
-should read <a href="{@docRoot}guide/topics/fundamentals.html">Application
+should read <a href="{@docRoot}guide/components/fundamentals.html">Application
Fundamentals</a> before continuing. </p>
<p>This tutorial also builds on the introductory information provided in the
-<a href="{@docRoot}resources/tutorials/hello-world.html">Hello World</a>
+<a href="{@docRoot}training/basics/firstapp/index.html">Building Your First App</a>
tutorial, which explains how to set up your Eclipse environment
for building Android applications. We recommend you complete the Hello World
tutorial before starting this one.</p>
diff --git a/docs/html/resources/tutorials/notepad/notepad-ex1.jd b/docs/html/resources/tutorials/notepad/notepad-ex1.jd
index cf7765e1693a..13ab0a6ac331 100644
--- a/docs/html/resources/tutorials/notepad/notepad-ex1.jd
+++ b/docs/html/resources/tutorials/notepad/notepad-ex1.jd
@@ -33,7 +33,7 @@ selections. </em></li>
<p><code>Notepadv1</code> is a project that is provided as a starting point. It
takes care of some of the boilerplate work that you have already seen if you
- followed the <a href="{@docRoot}resources/tutorials/hello-world.html">Hello,
+ followed the <a href="{@docRoot}training/basics/firstapp/index.html">Hello,
World</a> tutorial.</p>
<ol>
diff --git a/docs/html/resources/tutorials/notepad/notepad-ex3.jd b/docs/html/resources/tutorials/notepad/notepad-ex3.jd
index 557738e4c105..e31ecda2e20b 100644
--- a/docs/html/resources/tutorials/notepad/notepad-ex3.jd
+++ b/docs/html/resources/tutorials/notepad/notepad-ex3.jd
@@ -204,7 +204,7 @@ and populate the View elements with them.</p>
state it was in when it was killed.</p>
<p>
Activities have a <a
-href="{@docRoot}guide/topics/fundamentals/activities.html#Lifecycle">well-defined life
+href="{@docRoot}guide/components/activities.html#Lifecycle">well-defined life
cycle</a>.
Lifecycle events can happen even if you are not handing off control to
another Activity explicitly. For example, perhaps a call comes in to the
diff --git a/docs/html/resources/tutorials/notepad/notepad-extra-credit.jd b/docs/html/resources/tutorials/notepad/notepad-extra-credit.jd
index 0d59b56b7a7b..d5fd7716d262 100644
--- a/docs/html/resources/tutorials/notepad/notepad-extra-credit.jd
+++ b/docs/html/resources/tutorials/notepad/notepad-extra-credit.jd
@@ -65,6 +65,6 @@ when.</p>
<p>The Android Eclipse plugin not only offers excellent debugging support for
your application development, but also superb profiling support. You can also
-try using <a href="{@docRoot}guide/developing/tools/traceview.html">Traceview</a> to profile your application. If your application is running too slow, this can help you
+try using <a href="{@docRoot}tools/help/traceview.html">Traceview</a> to profile your application. If your application is running too slow, this can help you
find the bottlenecks and fix them.</p>
diff --git a/docs/html/resources/tutorials/opengl/opengl-es10.jd b/docs/html/resources/tutorials/opengl/opengl-es10.jd
deleted file mode 100644
index 2b4462059217..000000000000
--- a/docs/html/resources/tutorials/opengl/opengl-es10.jd
+++ /dev/null
@@ -1,532 +0,0 @@
-page.title=OpenGL ES 1.0
-parent.title=Tutorials
-parent.link=../../browser.html?tag=tutorial
-@jd:body
-
-
-<div id="qv-wrapper">
- <div id="qv">
- <h2>In this document</h2>
-
- <ol>
- <li><a href="#creating">Create an Activity with GLSurfaceView</a></li>
- <li>
- <a href="#drawing">Draw a Shape on GLSurfaceView</a>
- <ol>
- <li><a href="#define-triangle">Define a Triangle</a></li>
- <li><a href="#draw-triangle">Draw the Triangle</a></li>
- </ol>
- </li>
- <li><a href="#projection-and-views">Apply Projection and Camera Views</a></li>
- <li><a href="#motion">Add Motion</a></li>
- <li><a href="#touch">Respond to Touch Events</a></li>
- </ol>
- <h2 id="code-samples-list">Related Samples</h2>
- <ol>
- <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
-index.html">API Demos - graphics</a></li>
- <li><a
- href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
-GLSurfaceViewActivity.html">OpenGL ES 1.0 Sample</a></li>
- <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
-TouchRotateActivity.html">TouchRotateActivity</a></li>
- </ol>
- <h2>See also</h2>
- <ol>
- <li><a href="{@docRoot}guide/topics/graphics/opengl.html">3D with OpenGL</a></li>
- <li><a href="{@docRoot}resources/tutorials/opengl/opengl-es20.html">OpenGL
-ES 2.0</a></li>
- </ol>
- </div>
- </div>
-
-<p>This tutorial shows you how to create a simple Android application that uses the OpenGL ES 1.0
-API to perform some basic graphics operations. You'll learn how to:</p>
-
-<ul>
- <li>Create an activity using {@link android.opengl.GLSurfaceView} and {@link
-android.opengl.GLSurfaceView.Renderer}</li>
- <li>Create and draw a graphic object</li>
- <li>Define a projection to correct for screen geometry</li>
- <li>Define a camera view</li>
- <li>Rotate a graphic object</li>
- <li>Make graphics touch-interactive</li>
-</ul>
-
-<p>The Android framework supports both the OpenGL ES 1.0/1.1 and OpenGL ES 2.0 APIs. You should
-carefully consider which version of the OpenGL ES API (1.0/1.1 or 2.0) is most appropriate for your
-needs. For more information, see
-<a href="{@docRoot}guide/topics/graphics/opengl.html#choosing-version">Choosing an OpenGL API
-Version</a>. If you would prefer to use OpenGL ES 2.0, see the <a
-href="{@docRoot}resources/tutorials/opengl/opengl-es20.html">OpenGL ES 2.0 tutorial</a>.</p>
-
-<p>Before you start, you should understand how to create a basic Android application. If you do not
-know how to create an app, follow the <a href="{@docRoot}resources/tutorials/hello-world.html">Hello
-World Tutorial</a> to familiarize yourself with the process.</p>
-
-<h2 id="creating">Create an Activity with GLSurfaceView</h2>
-
-<p>To get started using OpenGL, you must implement both a {@link android.opengl.GLSurfaceView} and a
-{@link android.opengl.GLSurfaceView.Renderer}. The {@link android.opengl.GLSurfaceView} is the main
-view type for applications that use OpenGL and the {@link android.opengl.GLSurfaceView.Renderer}
-controls what is drawn within that view. (For more information about these classes, see the <a
-href="{@docRoot}guide/topics/graphics/opengl.html">3D with OpenGL</a> document.)</p>
-
-<p>To create an activity using {@code GLSurfaceView}:</p>
-
-<ol>
- <li>Start a new Android project that targets Android 1.6 (API Level 4) or higher.
- </li>
- <li>Name the project <strong>HelloOpenGLES10</strong> and make sure it includes an activity called
-{@code HelloOpenGLES10}.
- </li>
- <li>Modify the {@code HelloOpenGLES10} class as follows:
-<pre>
-package com.example.android.apis.graphics;
-
-import android.app.Activity;
-import android.content.Context;
-import android.opengl.GLSurfaceView;
-import android.os.Bundle;
-
-public class HelloOpenGLES10 extends Activity {
-
- private GLSurfaceView mGLView;
-
- &#64;Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- // Create a GLSurfaceView instance and set it
- // as the ContentView for this Activity.
- mGLView = new HelloOpenGLES10SurfaceView(this);
- setContentView(mGLView);
- }
-
- &#64;Override
- protected void onPause() {
- super.onPause();
- // The following call pauses the rendering thread.
- // If your OpenGL application is memory intensive,
- // you should consider de-allocating objects that
- // consume significant memory here.
- mGLView.onPause();
- }
-
- &#64;Override
- protected void onResume() {
- super.onResume();
- // The following call resumes a paused rendering thread.
- // If you de-allocated graphic objects for onPause()
- // this is a good place to re-allocate them.
- mGLView.onResume();
- }
-}
-
-class HelloOpenGLES10SurfaceView extends GLSurfaceView {
-
- public HelloOpenGLES10SurfaceView(Context context){
- super(context);
-
- // Set the Renderer for drawing on the GLSurfaceView
- setRenderer(new HelloOpenGLES10Renderer());
- }
-}
-</pre>
- <p class="note"><strong>Note:</strong> You will get a compile error for the {@code
-HelloOpenGLES10Renderer} class reference. That's expected; you will fix this error in the next step.
- </p>
-
- <p>As shown above, this activity uses a single {@link android.opengl.GLSurfaceView} for its
-view. Notice that this activity implements crucial lifecycle callbacks for pausing and resuming its
-work.</p>
-
- <p>The {@code HelloOpenGLES10SurfaceView} class in this example code above is just a thin wrapper
-for an instance of {@link android.opengl.GLSurfaceView} and is not strictly necessary for this
-example. However, if you want your application to monitor and respond to touch screen
-events&#8212;and we are guessing you do&#8212;you must extend {@link android.opengl.GLSurfaceView}
-to add touch event listeners, which you will learn how to do in the <a href="#touch">Reponding to
-Touch Events</a> section.</p>
-
- <p>In order to draw graphics in the {@link android.opengl.GLSurfaceView}, you must define an
-implementation of {@link android.opengl.GLSurfaceView.Renderer}. In the next step, you create
-a renderer class to complete this OpenGL application.</p>
- </li>
-
- <li>Create a new file for the following class {@code HelloOpenGLES10Renderer}, which implements
-the {@link android.opengl.GLSurfaceView.Renderer} interface:
-
-<pre>
-package com.example.android.apis.graphics;
-
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.opengles.GL10;
-
-import android.opengl.GLSurfaceView;
-
-public class HelloOpenGLES10Renderer implements GLSurfaceView.Renderer {
-
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- // Set the background frame color
- gl.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
- }
-
- public void onDrawFrame(GL10 gl) {
- // Redraw background color
- gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
- }
-
- public void onSurfaceChanged(GL10 gl, int width, int height) {
- gl.glViewport(0, 0, width, height);
- }
-
-}
-</pre>
- <p>This minimal implementation of {@link android.opengl.GLSurfaceView.Renderer} provides the
-code structure needed to use OpenGL drawing methods:
-<ul>
- <li>{@link
- android.opengl.GLSurfaceView.Renderer#onSurfaceCreated(javax.microedition.khronos.opengles.GL10,
- javax.microedition.khronos.egl.EGLConfig) onSurfaceCreated()} is called once to set up the
-{@link android.opengl.GLSurfaceView}
-environment.</li>
- <li>{@link
- android.opengl.GLSurfaceView.Renderer#onDrawFrame(javax.microedition.khronos.opengles.GL10)
- onDrawFrame()} is called for each redraw of the {@link
-android.opengl.GLSurfaceView}.</li>
- <li>{@link
- android.opengl.GLSurfaceView.Renderer#onSurfaceChanged(javax.microedition.khronos.opengles.GL10,
- int, int) onSurfaceChanged()} is called if the geometry of the {@link
-android.opengl.GLSurfaceView} changes, for example when the device's screen orientation
-changes.</li>
-</ul>
- </p>
- <p>For more information about these methods, see the <a
-href="{@docRoot}guide/topics/graphics/opengl.html">3D with OpenGL</a> document.
-</p>
- </li>
-</ol>
-
-<p>The code example above creates a simple Android application that displays a grey screen using
-OpenGL ES 1.0 calls. While this application does not do anything very interesting, by creating these
-classes, you have layed the foundation needed to start drawing graphic elements with OpenGL ES
-1.0.</p>
-
-<p>If you are familiar with the OpenGL ES APIs, these classes should give you enough information
-to use the OpenGL ES 1.0 API and create graphics. However, if you need a bit more help getting
-started with OpenGL, head on to the next sections for a few more hints.</p>
-
-<h2 id="drawing">Draw a Shape on GLSurfaceView</h2>
-
-<p>Once you have implemented a {@link android.opengl.GLSurfaceView.Renderer}, the next step is to
-draw something with it. This section shows you how to define and draw a triangle.</p>
-
-<h3 id="define-triangle">Define a Triangle</h3>
-
-<p>OpenGL allows you to define objects using coordinates in three-dimensional space. So, before you
- can draw a triangle, you must define its coordinates. In OpenGL, the typical way to do this is to
- define a vertex array for the coordinates.</p>
-
-<p>By default, OpenGL ES assumes a coordinate system where [0,0,0] (X,Y,Z) specifies the center of
- the {@link android.opengl.GLSurfaceView} frame, [1,1,0] is the top right corner of the frame and
-[-1,-1,0] is bottom left corner of the frame.</p>
-
-<p>To define a vertex array for a triangle:</p>
-
-<ol>
- <li>In your {@code HelloOpenGLES10Renderer} class, add new member variable to contain the
-vertices of a triangle shape:
-<pre>
- private FloatBuffer triangleVB;
-</pre>
- </li>
-
- <li>Create a method, {@code initShapes()} which populates this member variable:
-<pre>
- private void initShapes(){
-
- float triangleCoords[] = {
- // X, Y, Z
- -0.5f, -0.25f, 0,
- 0.5f, -0.25f, 0,
- 0.0f, 0.559016994f, 0
- };
-
- // initialize vertex Buffer for triangle
- ByteBuffer vbb = ByteBuffer.allocateDirect(
- // (# of coordinate values * 4 bytes per float)
- triangleCoords.length * 4);
- vbb.order(ByteOrder.nativeOrder());// use the device hardware's native byte order
- triangleVB = vbb.asFloatBuffer(); // create a floating point buffer from the ByteBuffer
- triangleVB.put(triangleCoords); // add the coordinates to the FloatBuffer
- triangleVB.position(0); // set the buffer to read the first coordinate
-
- }
-</pre>
- <p>This method defines a two-dimensional triangle with three equal sides.</p>
- </li>
- <li>Modify your {@code onSurfaceCreated()} method to initialize your triangle:
- <pre>
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
-
- // Set the background frame color
- gl.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
-
- // initialize the triangle vertex array
- initShapes();
- }
-</pre>
- <p class="caution"><strong>Caution:</strong> Shapes and other static objects should be initialized
- once in your {@code onSurfaceCreated()} method for best performance. Avoid initializing the
- new objects in {@code onDrawFrame()}, as this causes the system to re-create the objects
- for every frame redraw and slows down your application.
- </p>
- </li>
-
-</ol>
-
-<p>You have now defined a triangle shape, but if you run the application, nothing appears. What?!
-You also have to tell OpenGL to draw the triangle, which you'll do in the next section.
-</p>
-
-
-<h3 id="draw-triangle">Draw the Triangle</h3>
-
-<p>Before you can draw your triangle, you must tell OpenGL that you are using vertex arrays. After
-that setup step, you can call the drawing APIs to display the triangle.</p>
-
-<p>To draw the triangle:</p>
-
-<ol>
- <li>Add the {@code glEnableClientState()} method to the end of {@code onSurfaceCreated()} to
-enable vertex arrays.
-<pre>
- // Enable use of vertex arrays
- gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
-</pre>
- <p>At this point, you are ready to draw the triangle object in the OpenGL view.</p>
- </li>
-
- <li>Add the following code to the end of your {@code onDrawFrame()} method to draw the triangle.
-<pre>
- // Draw the triangle
- gl.glColor4f(0.63671875f, 0.76953125f, 0.22265625f, 0.0f);
- gl.glVertexPointer(3, GL10.GL_FLOAT, 0, triangleVB);
- gl.glDrawArrays(GL10.GL_TRIANGLES, 0, 3);
-</pre>
- </li>
- <li id="squashed-triangle">Run the app! Your application should look something like this:
- </li>
-</ol>
-
-<img src="{@docRoot}images/opengl/helloopengl-es10-1.png">
-<p class="img-caption">
- <strong>Figure 1.</strong> Triangle drawn without a projection or camera view.
-</p>
-
-<p>There are a few problems with this example. First of all, it is not going to impress your
-friends. Secondly, the triangle is a bit squashed and changes shape when you change the screen
-orientation of the device. The reason the shape is skewed is due to the fact that the object is
-being rendered in a frame which is not perfectly square. You'll fix that problem using a projection
-and camera view in the next section.</p>
-
-<p>Lastly, because the triangle is stationary, the system is redrawing the object repeatedly in
-exactly the same place, which is not the most efficient use of the OpenGL graphics pipeline. In the
-<a href="#motion">Add Motion</a> section, you'll make this shape rotate and justify
-this use of processing power.</p>
-
-<h2 id="projection-and-views">Apply Projection and Camera View</h2>
-
-<p>One of the basic problems in displaying graphics is that Android device displays are typically
-not square and, by default, OpenGL happily maps a perfectly square, uniform coordinate
-system onto your typically non-square screen. To solve this problem, you can apply an OpenGL
-projection mode and camera view (eye point) to transform the coordinates of your graphic objects
-so they have the correct proportions on any display. For more information about OpenGL coordinate
-mapping, see <a href="{@docRoot}guide/topics/graphics/opengl.html#coordinate-mapping">Mapping
-Coordinates for Drawn Objects</a>.</p>
-
-<p>To apply projection and camera view transformations to your triangle:
-</p>
-<ol>
- <li>Modify your {@code onSurfaceChanged()} method to enable {@link
- javax.microedition.khronos.opengles.GL10#GL_PROJECTION GL10.GL_PROJECTION} mode, calculate the
- screen ratio and apply the ratio as a transformation of the object coordinates.
-<pre>
- public void onSurfaceChanged(GL10 gl, int width, int height) {
- gl.glViewport(0, 0, width, height);
-
- // make adjustments for screen ratio
- float ratio = (float) width / height;
- gl.glMatrixMode(GL10.GL_PROJECTION); // set matrix to projection mode
- gl.glLoadIdentity(); // reset the matrix to its default state
- gl.glFrustumf(-ratio, ratio, -1, 1, 3, 7); // apply the projection matrix
- }
-</pre>
- </li>
-
- <li>Next, modify your {@code onDrawFrame()} method to apply the {@link
-javax.microedition.khronos.opengles.GL10#GL_MODELVIEW GL_MODELVIEW} mode and set
-a view point using {@link android.opengl.GLU#gluLookAt(javax.microedition.khronos.opengles.GL10,
-float, float, float, float, float, float, float, float, float) GLU.gluLookAt()}.
-<pre>
- public void onDrawFrame(GL10 gl) {
- // Redraw background color
- gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
-
- // Set GL_MODELVIEW transformation mode
- gl.glMatrixMode(GL10.GL_MODELVIEW);
- gl.glLoadIdentity(); // reset the matrix to its default state
-
- // When using GL_MODELVIEW, you must set the view point
- GLU.gluLookAt(gl, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f);
-
- // Draw the triangle
- ...
- }
-</pre>
- </li>
- <li>Run the updated application and you should see something like this:</li>
-</ol>
-
-<img src="{@docRoot}images/opengl/helloopengl-es10-2.png">
-<p class="img-caption">
- <strong>Figure 2.</strong> Triangle drawn with a projection and camera view applied.
-</p>
-
-<p>Now that you have applied this transformation, the triangle has three equal sides, instead of the
-<a href="#squashed-triangle">squashed triangle</a> in the earlier version.</p>
-
-<h2 id="motion">Add Motion</h2>
-
-<p>While it may be an interesting exercise to create static graphic objects with OpenGL ES, chances
-are you want at least <em>some</em> of your objects to move. In this section, you'll add motion to
-your triangle by rotating it.</p>
-
-<p>To add rotation to your triangle:</p>
-<ol>
- <li>Modify your {@code onDrawFrame()} method to rotate the triangle object:
-<pre>
- public void onDrawFrame(GL10 gl) {
- ...
- // When using GL_MODELVIEW, you must set the view point
- GLU.gluLookAt(gl, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f);
-
- // Create a rotation for the triangle
- long time = SystemClock.uptimeMillis() % 4000L;
- float angle = 0.090f * ((int) time);
- gl.glRotatef(angle, 0.0f, 0.0f, 1.0f);
-
- // Draw the triangle
- ...
- }
-</pre>
- </li>
- <li>Run the application and your triangle should rotate around its center.</li>
-</ol>
-
-
-<h2 id="touch">Respond to Touch Events</h2>
-<p>Making objects move according to a preset program like the rotating triangle is useful for
-getting some attention, but what if you want to have users interact with your OpenGL graphics? In
-this section, you'll learn how listen for touch events to let users interact with objects in your
-{@code HelloOpenGLES10SurfaceView}.</p>
-
-<p>The key to making your OpenGL application touch interactive is expanding your implementation of
-{@link android.opengl.GLSurfaceView} to override the {@link
-android.view.View#onTouchEvent(android.view.MotionEvent) onTouchEvent()} to listen for touch events.
-Before you do that, however, you'll modify the renderer class to expose the rotation angle of the
-triangle. Afterwards, you'll modify the {@code HelloOpenGLES10SurfaceView} to process touch events
-and pass that data to your renderer.</p>
-
-<p>To make your triangle rotate in response to touch events:</p>
-
-<ol>
- <li>Modify your {@code HelloOpenGLES10Renderer} class to include a new, public member so that
-your {@code HelloOpenGLES10SurfaceView} class is able to pass new rotation values your renderer:
-<pre>
- public float mAngle;
-</pre>
- </li>
- <li>In your {@code onDrawFrame()} method, comment out the code that generates an angle and
-replace the {@code angle} variable with {@code mAngle}.
-<pre>
- // Create a rotation for the triangle (Boring! Comment this out:)
- // long time = SystemClock.uptimeMillis() % 4000L;
- // float angle = 0.090f * ((int) time);
-
- // Use the mAngle member as the rotation value
- gl.glRotatef(mAngle, 0.0f, 0.0f, 1.0f);
-</pre>
- </li>
- <li>In your {@code HelloOpenGLES10SurfaceView} class, add the following member variables.
-<pre>
- private final float TOUCH_SCALE_FACTOR = 180.0f / 320;
- private HelloOpenGLES10Renderer mRenderer;
- private float mPreviousX;
- private float mPreviousY;
-</pre>
- </li>
- <li>In the constructor method for {@code HelloOpenGLES10SurfaceView}, set the {@code mRenderer}
-member so you have a handle to pass in rotation input and set the render mode to {@link
-android.opengl.GLSurfaceView#RENDERMODE_WHEN_DIRTY}.
-<pre>
- public HelloOpenGLES10SurfaceView(Context context){
- super(context);
- // set the mRenderer member
- mRenderer = new HelloOpenGLES10Renderer();
- setRenderer(mRenderer);
-
- // Render the view only when there is a change
- setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
- }
-</pre>
- </li>
- <li>In your {@code HelloOpenGLES10SurfaceView} class, override the {@link
-android.view.View#onTouchEvent(android.view.MotionEvent) onTouchEvent()} method to listen for touch
-events and pass them to your renderer.
-<pre>
- &#64;Override
- public boolean onTouchEvent(MotionEvent e) {
- // MotionEvent reports input details from the touch screen
- // and other input controls. In this case, you are only
- // interested in events where the touch position changed.
-
- float x = e.getX();
- float y = e.getY();
-
- switch (e.getAction()) {
- case MotionEvent.ACTION_MOVE:
-
- float dx = x - mPreviousX;
- float dy = y - mPreviousY;
-
- // reverse direction of rotation above the mid-line
- if (y &gt; getHeight() / 2) {
- dx = dx * -1 ;
- }
-
- // reverse direction of rotation to left of the mid-line
- if (x &lt; getWidth() / 2) {
- dy = dy * -1 ;
- }
-
- mRenderer.mAngle += (dx + dy) * TOUCH_SCALE_FACTOR;
- requestRender();
- }
-
- mPreviousX = x;
- mPreviousY = y;
- return true;
- }
-</pre>
- <p class="note"><strong>Note:</strong> Touch events return pixel coordinates which <em>are not the
-same</em> as OpenGL coordinates. Touch coordinate [0,0] is the bottom-left of the screen and the
-highest value [max_X, max_Y] is the top-right corner of the screen. To match touch events to OpenGL
-graphic objects, you must translate touch coordinates into OpenGL coordinates.</p>
- </li>
- <li>Run the application and drag your finger or cursor around the screen to rotate the
-triangle.</li>
-</ol>
-<p>For another example of OpenGL touch event functionality, see <a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
-TouchRotateActivity.html">TouchRotateActivity</a>.</p> \ No newline at end of file
diff --git a/docs/html/resources/tutorials/opengl/opengl-es20.jd b/docs/html/resources/tutorials/opengl/opengl-es20.jd
deleted file mode 100644
index dd23dbf2051c..000000000000
--- a/docs/html/resources/tutorials/opengl/opengl-es20.jd
+++ /dev/null
@@ -1,652 +0,0 @@
-page.title=OpenGL ES 2.0
-parent.title=Tutorials
-parent.link=../../browser.html?tag=tutorial
-@jd:body
-
-
-<div id="qv-wrapper">
- <div id="qv">
- <h2>In this document</h2>
-
- <ol>
- <li><a href="#creating">Create an Activity with GLSurfaceView</a></li>
- <li>
- <a href="#drawing">Draw a Shape on GLSurfaceView</a>
- <ol>
- <li><a href="#define-triangle">Define a Triangle</a></li>
- <li><a href="#draw-triangle">Draw the Triangle</a></li>
- </ol>
- </li>
- <li><a href="#projection-and-views">Apply Projection and Camera Views</a></li>
- <li><a href="#motion">Add Motion</a></li>
- <li><a href="#touch">Respond to Touch Events</a></li>
- </ol>
- <h2 id="code-samples-list">Related Samples</h2>
- <ol>
- <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
-index.html">API Demos - graphics</a></li>
- <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
-GLES20Activity.html">OpenGL ES 2.0 Sample</a></li>
- <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
-TouchRotateActivity.html">TouchRotateActivity</a></li>
- </ol>
- <h2>See also</h2>
- <ol>
- <li><a href="{@docRoot}guide/topics/graphics/opengl.html">3D with OpenGL</a></li>
- <li><a href="{@docRoot}resources/tutorials/opengl/opengl-es10.html">OpenGL
-ES 1.0</a></li>
- </ol>
- </div>
- </div>
-
-<p>This tutorial shows you how to create a simple Android application that uses the OpenGL ES 2.0
-API to perform some basic graphics operations. You'll learn how to:</p>
-
-<ul>
- <li>Create an activity using {@link android.opengl.GLSurfaceView} and {@link
-android.opengl.GLSurfaceView.Renderer}</li>
- <li>Create and draw a graphic object</li>
- <li>Define a projection to correct for screen geometry</li>
- <li>Define a camera view</li>
- <li>Rotate a graphic object</li>
- <li>Make graphics touch interactive</li>
-</ul>
-
-<p>The Android framework supports both the OpenGL ES 1.0/1.1 and OpenGL ES 2.0 APIs. You should
-carefully consider which version of the OpenGL ES API (1.0/1.1 or 2.0) is most appropriate for your
-needs. For more information, see
-<a href="{@docRoot}guide/topics/graphics/opengl.html#choosing-version">Choosing an OpenGL API
-Version</a>. If you would prefer to use OpenGL ES 1.0, see the <a
-href="{@docRoot}resources/tutorials/opengl/opengl-es10.html">OpenGL ES 1.0 tutorial</a>.</p>
-
-<p>Before you start, you should understand how to create a basic Android application. If you do not
-know how to create an app, follow the <a href="{@docRoot}resources/tutorials/hello-world.html">Hello
-World Tutorial</a> to familiarize yourself with the process.</p>
-
-<p class="caution"><strong>Caution:</strong> OpenGL ES 2.0 <em>is currently not supported</em> by
-the Android Emulator. You must have a physical test device running Android 2.2 (API Level 8) or
-higher in order to run and test the example code in this tutorial.</p>
-
-<h2 id="creating">Create an Activity with GLSurfaceView</h2>
-
-<p>To get started using OpenGL, you must implement both a {@link android.opengl.GLSurfaceView} and a
-{@link android.opengl.GLSurfaceView.Renderer}. The {@link android.opengl.GLSurfaceView} is the main
-view type for applications that use OpenGL and the {@link android.opengl.GLSurfaceView.Renderer}
-controls what is drawn within that view. (For more information about these classes, see the <a
-href="{@docRoot}guide/topics/graphics/opengl.html">3D with OpenGL</a> document.)</p>
-
-<p>To create an activity using {@code GLSurfaceView}:</p>
-
-<ol>
- <li>Start a new Android project that targets Android 2.2 (API Level 8) or higher.
- </li>
- <li>Name the project <strong>HelloOpenGLES20</strong> and make sure it includes an activity called
-{@code HelloOpenGLES20}.
- </li>
- <li>Modify the {@code HelloOpenGLES20} class as follows:
-<pre>
-package com.example.android.apis.graphics;
-
-import android.app.Activity;
-import android.content.Context;
-import android.opengl.GLSurfaceView;
-import android.os.Bundle;
-
-public class HelloOpenGLES20 extends Activity {
-
- private GLSurfaceView mGLView;
-
- &#64;Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- // Create a GLSurfaceView instance and set it
- // as the ContentView for this Activity
- mGLView = new HelloOpenGLES20SurfaceView(this);
- setContentView(mGLView);
- }
-
- &#64;Override
- protected void onPause() {
- super.onPause();
- // The following call pauses the rendering thread.
- // If your OpenGL application is memory intensive,
- // you should consider de-allocating objects that
- // consume significant memory here.
- mGLView.onPause();
- }
-
- &#64;Override
- protected void onResume() {
- super.onResume();
- // The following call resumes a paused rendering thread.
- // If you de-allocated graphic objects for onPause()
- // this is a good place to re-allocate them.
- mGLView.onResume();
- }
-}
-
-class HelloOpenGLES20SurfaceView extends GLSurfaceView {
-
- public HelloOpenGLES20SurfaceView(Context context){
- super(context);
-
- // Create an OpenGL ES 2.0 context.
- setEGLContextClientVersion(2);
- // Set the Renderer for drawing on the GLSurfaceView
- setRenderer(new HelloOpenGLES20Renderer());
- }
-}
-</pre>
- <p class="note"><strong>Note:</strong> You will get a compile error for the {@code
-HelloOpenGLES20Renderer} class reference. That's expected; you will fix this error in the next step.
- </p>
-
- <p>As shown above, this activity uses a single {@link android.opengl.GLSurfaceView} for its
-view. Notice that this activity implements crucial lifecycle callbacks for pausing and resuming its
-work.</p>
-
- <p>The {@code HelloOpenGLES20SurfaceView} class in this example code above is just a thin wrapper
-for an instance of {@link android.opengl.GLSurfaceView} and is not strictly necessary for this
-example. However, if you want your application to monitor and respond to touch screen
-events&#8212;and we are guessing you do&#8212;you must extend {@link android.opengl.GLSurfaceView}
-to add touch event listeners, which you will learn how to do in the <a href="#touch">Reponding to
-Touch Events</a> section.</p>
-
- <p>In order to draw graphics in the {@link android.opengl.GLSurfaceView}, you must define an
-implementation of {@link android.opengl.GLSurfaceView.Renderer}. In the next step, you create
-a renderer class to complete this OpenGL application.</p>
- </li>
-
- <li>Create a new file for the following class {@code HelloOpenGLES20Renderer}, which implements
-the {@link android.opengl.GLSurfaceView.Renderer} interface:
-
-<pre>
-package com.example.android.apis.graphics;
-
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.opengles.GL10;
-
-import android.opengl.GLES20;
-import android.opengl.GLSurfaceView;
-
-public class HelloOpenGLES20Renderer implements GLSurfaceView.Renderer {
-
- public void onSurfaceCreated(GL10 unused, EGLConfig config) {
-
- // Set the background frame color
- GLES20.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
- }
-
- public void onDrawFrame(GL10 unused) {
-
- // Redraw background color
- GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);
- }
-
- public void onSurfaceChanged(GL10 unused, int width, int height) {
- GLES20.glViewport(0, 0, width, height);
- }
-
-}
-</pre>
- <p>This minimal implementation of {@link android.opengl.GLSurfaceView.Renderer} provides the
-code structure needed to use OpenGL drawing methods:
-<ul>
- <li>{@link
- android.opengl.GLSurfaceView.Renderer#onSurfaceCreated(javax.microedition.khronos.opengles.GL10,
- javax.microedition.khronos.egl.EGLConfig) onSurfaceCreated()} is called once to set up the
-{@link android.opengl.GLSurfaceView}
-environment.</li>
- <li>{@link
- android.opengl.GLSurfaceView.Renderer#onDrawFrame(javax.microedition.khronos.opengles.GL10)
- onDrawFrame()} is called for each redraw of the {@link
-android.opengl.GLSurfaceView}.</li>
- <li>{@link
- android.opengl.GLSurfaceView.Renderer#onSurfaceChanged(javax.microedition.khronos.opengles.GL10,
- int, int) onSurfaceChanged()} is called if the geometry of the {@link
-android.opengl.GLSurfaceView} changes, for example when the device's screen orientation
-changes.</li>
-</ul>
- </p>
- <p>For more information about these methods, see the <a
-href="{@docRoot}guide/topics/graphics/opengl.html">3D with OpenGL</a> document.
-</p>
- </li>
-</ol>
-
-<p>The code example above creates a simple Android application that displays a grey screen using
-OpenGL ES 2.0 calls. While this application does not do anything very interesting, by creating these
-classes, you have layed the foundation needed to start drawing graphic elements with OpenGL ES
-2.0.</p>
-
-<p>If you are familiar with the OpenGL ES APIs, these classes should give you enough information
-to use the OpenGL ES 2.0 API and create graphics. However, if you need a bit more help getting
-started with OpenGL, head on to the next sections for a few more hints.</p>
-
-<p class="note"><strong>Note:</strong> If your application requires OpenGL 2.0, make sure you
-declare this in your manifest:</p>
-<pre>
- &lt;!-- Tell the system this app requires OpenGL ES 2.0. --&gt;
- &lt;uses-feature android:glEsVersion="0x00020000" android:required="true" /&gt;
-</pre>
-<p>For more information, see <a
-href="{@docRoot}guide/topics/graphics/opengl.html#manifest">OpenGL manifest declarations</a> in the
-<em>3D with OpenGL</em> document.</p>
-
-
-<h2 id="drawing">Draw a Shape on GLSurfaceView</h2>
-
-<p>Once you have implemented a {@link android.opengl.GLSurfaceView.Renderer}, the next step is to
-draw something with it. This section shows you how to define and draw a triangle.</p>
-
-<h3 id="define-triangle">Define a Triangle</h3>
-
-<p>OpenGL allows you to define objects using coordinates in three-dimensional space. So, before you
- can draw a triangle, you must define its coordinates. In OpenGL, the typical way to do this is to
- define a vertex array for the coordinates.</p>
-
-<p>By default, OpenGL ES assumes a coordinate system where [0,0,0] (X,Y,Z) specifies the center of
- the {@link android.opengl.GLSurfaceView} frame, [1,1,0] is the top-right corner of the frame and
-[-1,-1,0] is bottom-left corner of the frame.</p>
-
-<p>To define a vertex array for a triangle:</p>
-
-<ol>
- <li>In your {@code HelloOpenGLES20Renderer} class, add new member variable to contain the
-vertices of a triangle shape:
-<pre>
- private FloatBuffer triangleVB;
-</pre>
- </li>
-
- <li>Create a method, {@code initShapes()} which populates this member variable:
-<pre>
- private void initShapes(){
-
- float triangleCoords[] = {
- // X, Y, Z
- -0.5f, -0.25f, 0,
- 0.5f, -0.25f, 0,
- 0.0f, 0.559016994f, 0
- };
-
- // initialize vertex Buffer for triangle
- ByteBuffer vbb = ByteBuffer.allocateDirect(
- // (# of coordinate values * 4 bytes per float)
- triangleCoords.length * 4);
- vbb.order(ByteOrder.nativeOrder());// use the device hardware's native byte order
- triangleVB = vbb.asFloatBuffer(); // create a floating point buffer from the ByteBuffer
- triangleVB.put(triangleCoords); // add the coordinates to the FloatBuffer
- triangleVB.position(0); // set the buffer to read the first coordinate
-
- }
-</pre>
- <p>This method defines a two-dimensional triangle shape with three equal sides.</p>
- </li>
- <li>Modify your {@code onSurfaceCreated()} method to initialize your triangle:
-<pre>
- public void onSurfaceCreated(GL10 unused, EGLConfig config) {
-
- // Set the background frame color
- GLES20.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
-
- // initialize the triangle vertex array
- initShapes();
- }
-</pre>
- <p class="caution"><strong>Caution:</strong> Shapes and other static objects should be initialized
- once in your {@code onSurfaceCreated()} method for best performance. Avoid initializing the
- new objects in {@code onDrawFrame()}, as this causes the system to re-create the objects
- for every frame redraw and slows down your application.
- </p>
- </li>
-
-</ol>
-
-<p>You have now defined a triangle shape, but if you run the application, nothing appears. What?!
-You also have to tell OpenGL to draw the triangle, which you'll do in the next section.
-</p>
-
-
-<h3 id="draw-triangle">Draw the Triangle</h3>
-
-<p>The OpenGL ES 2.0 requires a bit more code than OpenGL ES 1.0/1.1 in order to draw objects. In
-this section, you'll create vertex and fragment shaders, a shader loader, apply the shaders, enable
-the use of vertex arrays for your triangle and, finally, draw it on screen.</p>
-
-<p>To draw the triangle:</p>
-
-<ol>
- <li>In your {@code HelloOpenGLES20Renderer} class, define a vertex shader and a fragment
-shader. Shader code is defined as a string which is compiled and run by the OpenGL ES 2.0 rendering
-engine.
-<pre>
- private final String vertexShaderCode =
- "attribute vec4 vPosition; \n" +
- "void main(){ \n" +
- " gl_Position = vPosition; \n" +
- "} \n";
-
- private final String fragmentShaderCode =
- "precision mediump float; \n" +
- "void main(){ \n" +
- " gl_FragColor = vec4 (0.63671875, 0.76953125, 0.22265625, 1.0); \n" +
- "} \n";
-</pre>
- <p>The vertex shader controls how OpenGL positions and draws the vertices of shapes in space.
-The fragment shader controls what OpenGL draws <em>between</em> the vertices of shapes.</p>
- </li>
- <li>In your {@code HelloOpenGLES20Renderer} class, create a method for loading the shaders.
-<pre>
- private int loadShader(int type, String shaderCode){
-
- // create a vertex shader type (GLES20.GL_VERTEX_SHADER)
- // or a fragment shader type (GLES20.GL_FRAGMENT_SHADER)
- int shader = GLES20.glCreateShader(type);
-
- // add the source code to the shader and compile it
- GLES20.glShaderSource(shader, shaderCode);
- GLES20.glCompileShader(shader);
-
- return shader;
- }
-</pre>
- </li>
-
- <li>Add the following members to your {@code HelloOpenGLES20Renderer} class for an OpenGL
-Program and the positioning control for your triangle.
-<pre>
- private int mProgram;
- private int maPositionHandle;
-</pre>
- <p>In OpenGL ES 2.0, you attach vertex and fragment shaders to a <em>Program</em> and then
-apply the program to the OpenGL graphics pipeline.</p>
- </li>
-
- <li>Add the following code to the end of your {@code onSurfaceCreated()} method to load the
-shaders and attach them to an OpenGL Program.
-<pre>
- int vertexShader = loadShader(GLES20.GL_VERTEX_SHADER, vertexShaderCode);
- int fragmentShader = loadShader(GLES20.GL_FRAGMENT_SHADER, fragmentShaderCode);
-
- mProgram = GLES20.glCreateProgram(); // create empty OpenGL Program
- GLES20.glAttachShader(mProgram, vertexShader); // add the vertex shader to program
- GLES20.glAttachShader(mProgram, fragmentShader); // add the fragment shader to program
- GLES20.glLinkProgram(mProgram); // creates OpenGL program executables
-
- // get handle to the vertex shader's vPosition member
- maPositionHandle = GLES20.glGetAttribLocation(mProgram, "vPosition");
-</pre>
- <p>At this point, you are ready to draw the triangle object in the OpenGL view.</p>
- </li>
-
- <li>Add the following code to the end of your {@code onDrawFrame()} method apply the OpenGL
-program you created, load the triangle object and draw the triangle.
-<pre>
- // Add program to OpenGL environment
- GLES20.glUseProgram(mProgram);
-
- // Prepare the triangle data
- GLES20.glVertexAttribPointer(maPositionHandle, 3, GLES20.GL_FLOAT, false, 12, triangleVB);
- GLES20.glEnableVertexAttribArray(maPositionHandle);
-
- // Draw the triangle
- GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 3);
-</pre>
- </li>
- <li id="squashed-triangle">Run the app! Your application should look something like this:
- </li>
-</ol>
-
-<img src="{@docRoot}images/opengl/helloopengl-es20-1.png">
-<p class="img-caption">
- <strong>Figure 1.</strong> Triangle drawn without a projection or camera view.
-</p>
-
-<p>There are a few problems with this example. First of all, it is not going to impress your
-friends. Secondly, the triangle is a bit squashed and changes shape when you change the screen
-orientation of the device. The reason the shape is skewed is due to the fact that the object is
-being rendered in a frame which is not perfectly square. You'll fix that problem using a projection
-and camera view in the next section.</p>
-
-<p>Lastly, because the triangle is stationary, the system is redrawing the object repeatedly in
-exactly the same place, which is not the most efficient use of the OpenGL graphics pipeline. In the
-<a href="#motion">Add Motion</a> section, you'll make this shape rotate and justify
-this use of processing power.</p>
-
-<h2 id="projection-and-views">Apply Projection and Camera View</h2>
-
-<p>One of the basic problems in displaying graphics is that Android device displays are typically
-not square and, by default, OpenGL happily maps a perfectly square, uniform coordinate
-system onto your typically non-square screen. To solve this problem, you can apply an OpenGL
-projection mode and camera view (eye point) to transform the coordinates of your graphic objects
-so they have the correct proportions on any display. For more information about OpenGL coordinate
-mapping, see <a href="{@docRoot}guide/topics/graphics/opengl.html#coordinate-mapping">Mapping
-Coordinates for Drawn Objects</a>.</p>
-
-<p>To apply projection and camera view transformations to your triangle:
-</p>
-<ol>
- <li>Add the following members to your {@code HelloOpenGLES20Renderer} class.
-<pre>
- private int muMVPMatrixHandle;
- private float[] mMVPMatrix = new float[16];
- private float[] mMMatrix = new float[16];
- private float[] mVMatrix = new float[16];
- private float[] mProjMatrix = new float[16];
-</pre>
- </li>
- <li>Modify your {@code vertexShaderCode} string to add a variable for a model view
-projection matrix.
-<pre>
- private final String vertexShaderCode =
- // This matrix member variable provides a hook to manipulate
- // the coordinates of the objects that use this vertex shader
- "uniform mat4 uMVPMatrix; \n" +
-
- "attribute vec4 vPosition; \n" +
- "void main(){ \n" +
-
- // the matrix must be included as a modifier of gl_Position
- " gl_Position = uMVPMatrix * vPosition; \n" +
-
- "} \n";
-</pre>
- </li>
- <li>Modify the {@code onSurfaceChanged()} method to calculate the device screen ratio and
-create a projection matrix.
-<pre>
- public void onSurfaceChanged(GL10 unused, int width, int height) {
- GLES20.glViewport(0, 0, width, height);
-
- float ratio = (float) width / height;
-
- // this projection matrix is applied to object coodinates
- // in the onDrawFrame() method
- Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);
- }
-</pre>
- </li>
- <li>Add the following code to the end of your {@code onSurfaceChanged()} method to
-reference the {@code uMVPMatrix} shader matrix variable you added in step 2.
-<pre>
- muMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uMVPMatrix");
-</pre>
- </li>
- <li>Add the following code to the end of your {@code onSurfaceChanged()} method to define
-a camera view matrix.
-<pre>
- Matrix.setLookAtM(mVMatrix, 0, 0, 0, -3, 0f, 0f, 0f, 0f, 1.0f, 0.0f);
-</pre>
- </li>
- <li>Finally, modify your {@code onDrawFrame()} method to combine the projection and
-camera view matrices and then apply the combined transformation to the OpenGL rendering pipeline.
-<pre>
- public void onDrawFrame(GL10 unused) {
- ...
- // Apply a ModelView Projection transformation
- Matrix.multiplyMM(mMVPMatrix, 0, mProjMatrix, 0, mVMatrix, 0);
- GLES20.glUniformMatrix4fv(muMVPMatrixHandle, 1, false, mMVPMatrix, 0);
-
- // Draw the triangle
- ...
- }
-</pre>
- </li>
- <li>Run the updated application and you should see something like this:</li>
-</ol>
-
-<img src="{@docRoot}images/opengl/helloopengl-es20-2.png">
-<p class="img-caption">
- <strong>Figure 2.</strong> Triangle drawn with a projection and camera view applied.
-</p>
-
-<p>Now that you have applied this transformation, the triangle has three equal sides, instead of the
-<a href="#squashed-triangle">squashed triangle</a> in the earlier version.</p>
-
-<h2 id="motion">Add Motion</h2>
-
-<p>While it may be an interesting exercise to create static graphic objects with OpenGL ES, chances
-are you want at least <em>some</em> of your objects to move. In this section, you'll add motion to
-your triangle by rotating it.</p>
-
-<p>To add rotation to your triangle:</p>
-<ol>
- <li>Add an additional tranformation matrix member to your {@code HelloOpenGLES20Renderer}
-class.
- <pre>
- private float[] mMMatrix = new float[16];
- </pre>
- </li>
- <li>Modify your {@code onDrawFrame()} method to rotate the triangle object.
-<pre>
- public void onDrawFrame(GL10 gl) {
- ...
-
- // Create a rotation for the triangle
- long time = SystemClock.uptimeMillis() % 4000L;
- float angle = 0.090f * ((int) time);
- Matrix.setRotateM(mMMatrix, 0, angle, 0, 0, 1.0f);
- Matrix.multiplyMM(mMVPMatrix, 0, mVMatrix, 0, mMMatrix, 0);
- Matrix.multiplyMM(mMVPMatrix, 0, mProjMatrix, 0, mMVPMatrix, 0);
-
- // Apply a ModelView Projection transformation
- GLES20.glUniformMatrix4fv(muMVPMatrixHandle, 1, false, mMVPMatrix, 0);
-
- // Draw the triangle
- ...
- }
-</pre>
- </li>
- <li>Run the application and your triangle should rotate around its center.</li>
-</ol>
-
-
-<h2 id="touch">Respond to Touch Events</h2>
-<p>Making objects move according to a preset program like the rotating triangle is useful for
-getting some attention, but what if you want to have users interact with your OpenGL graphics? In
-this section, you'll learn how listen for touch events to let users interact with objects in your
-{@code HelloOpenGLES20SurfaceView}.</p>
-
-<p>The key to making your OpenGL application touch interactive is expanding your implementation of
-{@link android.opengl.GLSurfaceView} to override the {@link
-android.view.View#onTouchEvent(android.view.MotionEvent) onTouchEvent()} to listen for touch events.
-Before you do that, however, you'll modify the renderer class to expose the rotation angle of the
-triangle. Afterwards, you'll modify the {@code HelloOpenGLES20SurfaceView} to process touch events
-and pass that data to your renderer.</p>
-
-<p>To make your triangle rotate in response to touch events:</p>
-
-<ol>
- <li>Modify your {@code HelloOpenGLES20Renderer} class to include a new, public member so that
-your {@code HelloOpenGLES10SurfaceView} class is able to pass new rotation values your renderer:
-<pre>
- public float mAngle;
-</pre>
- </li>
- <li>In your {@code onDrawFrame()} method, comment out the code that generates an angle and
-replace the {@code angle} variable with {@code mAngle}.
-<pre>
- // Create a rotation for the triangle (Boring! Comment this out:)
- // long time = SystemClock.uptimeMillis() % 4000L;
- // float angle = 0.090f * ((int) time);
-
- // Use the mAngle member as the rotation value
- Matrix.setRotateM(mMMatrix, 0, mAngle, 0, 0, 1.0f);
-</pre>
- </li>
- <li>In your {@code HelloOpenGLES20SurfaceView} class, add the following member variables.
-<pre>
- private final float TOUCH_SCALE_FACTOR = 180.0f / 320;
- private HelloOpenGLES20Renderer mRenderer;
- private float mPreviousX;
- private float mPreviousY;
-</pre>
- </li>
- <li>In the constructor method for {@code HelloOpenGLES20SurfaceView}, set the {@code mRenderer}
-member so you have a handle to pass in rotation input and set the render mode to {@link
-android.opengl.GLSurfaceView#RENDERMODE_WHEN_DIRTY}.<pre>
- public HelloOpenGLES20SurfaceView(Context context){
- super(context);
- // Create an OpenGL ES 2.0 context.
- setEGLContextClientVersion(2);
-
- // set the mRenderer member
- mRenderer = new HelloOpenGLES20Renderer();
- setRenderer(mRenderer);
-
- // Render the view only when there is a change
- setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
- }
-</pre>
- </li>
- <li>In your {@code HelloOpenGLES20SurfaceView} class, override the {@link
-android.view.View#onTouchEvent(android.view.MotionEvent) onTouchEvent()} method to listen for touch
-events and pass them to your renderer.
-<pre>
- &#64;Override
- public boolean onTouchEvent(MotionEvent e) {
- // MotionEvent reports input details from the touch screen
- // and other input controls. In this case, you are only
- // interested in events where the touch position changed.
-
- float x = e.getX();
- float y = e.getY();
-
- switch (e.getAction()) {
- case MotionEvent.ACTION_MOVE:
-
- float dx = x - mPreviousX;
- float dy = y - mPreviousY;
-
- // reverse direction of rotation above the mid-line
- if (y &gt; getHeight() / 2) {
- dx = dx * -1 ;
- }
-
- // reverse direction of rotation to left of the mid-line
- if (x &lt; getWidth() / 2) {
- dy = dy * -1 ;
- }
-
- mRenderer.mAngle += (dx + dy) * TOUCH_SCALE_FACTOR;
- requestRender();
- }
-
- mPreviousX = x;
- mPreviousY = y;
- return true;
- }
-</pre>
- <p class="note"><strong>Note:</strong> Touch events return pixel coordinates which <em>are not the
-same</em> as OpenGL coordinates. Touch coordinate [0,0] is the bottom-left of the screen and the
-highest value [max_X, max_Y] is the top-right corner of the screen. To match touch events to OpenGL
-graphic objects, you must translate touch coordinates into OpenGL coordinates.</p>
- </li>
- <li>Run the application and drag your finger or cursor around the screen to rotate the
-triangle.</li>
-</ol>
-<p>For another example of OpenGL touch event functionality, see <a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/
-TouchRotateActivity.html">TouchRotateActivity</a>.</p> \ No newline at end of file
diff --git a/docs/html/resources/tutorials/testing/helloandroid_test.jd b/docs/html/resources/tutorials/testing/helloandroid_test.jd
deleted file mode 100644
index 4d949c86b079..000000000000
--- a/docs/html/resources/tutorials/testing/helloandroid_test.jd
+++ /dev/null
@@ -1,508 +0,0 @@
-page.title=Hello, Testing
-parent.title=Tutorials
-parent.link=../../browser.html?tag=tutorial
-@jd:body
- <div id="qv-wrapper">
- <div id="qv">
- <h2>In this document</h2>
- <ol>
- <li>
- <a href="#CreateTestProject">Creating the Test Project</a>
- </li>
- <li>
- <a href="#CreateTestClass">Creating the Test Case Class</a>
- <ol>
- <li>
- <a href="#CreateTestCaseClassFile">Adding the test case class file</a>
- </li>
- <li>
- <a href="#CreateConstructor">Adding the test case constructor</a>
- </li>
- <li>
- <a href="#CreateSetUp">Adding a setup method</a>
- </li>
- <li>
- <a href="#CreatePreConditions">Adding a preconditions test</a>
- </li>
- <li>
- <a href="#CreateText">Adding a unit test</a>
- </li>
- <li>
- <a href="#CompleteTest">The finished test case class</a>
- </li>
- </ol>
- </li>
- <li>
- <a href="#RunTest">Running the Tests and Seeing the Results</a>
- </li>
- <li>
- <a href="#NextSteps">Next Steps</a>
- </li>
- </ol>
-<h2>Related Tutorials</h2>
-<ol>
- <li>
- <a href="{@docRoot}resources/tutorials/hello-world.html">Hello, World</a>
- </li>
- <li>
- <a href="{@docRoot}resources/tutorials/testing/activity_test.html">Activity Testing</a>
- </li>
-</ol>
-<h2>See Also</h2>
-<ol>
- <li>
- <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Android Applications</a>
- </li>
- <li>
- {@link android.test.ActivityInstrumentationTestCase2}
- </li>
- <li>
- {@link android.test.InstrumentationTestRunner}
- </li>
-</ol>
-
-</div>
-</div>
-<p>
- Android offers a powerful but easy-to-use testing framework that is well integrated with the SDK tools. Because writing
- tests is an important part of any development effort, this tutorial introduces the basics of testing and helps you get started testing quickly.
-
- To keep things simple, this tutorial builds on the <a href="{@docRoot}resources/tutorials/hello-world.html">Hello World</a> tutorial, which you may have already completed.
- It guides you through the process of setting up a test project, adding a test, and running the test against the Hello World application, all from inside the Eclipse environment.
- Of course, when you are done with this tutorial, you will want to create a test project for your own app and add various types of tests to it.
-</p>
-<p>
- If you'd like to read an overview of the test and instrumentation framework and the core test case classes available, look at
- the <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Android Applications</a> topic.
- If you prefer a more advanced testing tutorial, try the
- <a href="{@docRoot}resources/tutorials/testing/activity_test.html">Activity Testing</a> tutorial.
-</p>
-<h2 id="Prerequisites">Prerequisites</h2>
- <p>
- This tutorial and its code depend on the Hello World tutorial. If you haven't completed that tutorial already,
- do so now. You will learn the fundamentals of Android application development, and you will
- have an Android application that is ready to be tested. The tutorial guides you through the
- setup of an Android test project using the ADT Plugin for Eclipse and other SDK tools.
- You will need an SDK development platform that is version 1.5
- (API level 3) or higher.
- </p>
- <p>
- If you aren't developing in Eclipse with ADT or you would like to run tests directly from the
- command line, please see the topic <a href="{@docRoot}guide/developing/testing/testing_otheride.html">Testing in Other IDEs</a>
- for instructions.
- </p>
-<h2 id="CreateTestProject">Creating the Test Project</h2>
-<p>
- In the Hello World tutorial you created Android application project called
- HelloAndroid. A test of an Android application is also an Android
- application, and you create it within an Eclipse project. The Eclipse with ADT
- <strong>New Android Test Project</strong> dialog creates a new test project and the
- framework of a new test application at the same time.
-</p>
-<p>
- To create the test project and test application framework in Eclipse with ADT, follow these steps
-</p>
- <ol>
- <li>
- In Eclipse, select <strong>New</strong> &gt; <strong>Project</strong> &gt; <strong>Android</strong> &gt; <strong>Android Test Project</strong>.
- <p>
- <a href="{@docRoot}images/testing/hwtest_new_test_project_menu.png">
- <img alt="New Android Test Project menu" src="{@docRoot}images/testing/hwtest_new_test_project_menu.png" style="height:230px"/>
- </a>
- </p>
- <p>
- The New Android Test Project dialog appears.
- </p>
- </li>
- <li>
- Set the following values:
- <ul>
- <li>
- <em>Test Project Name:</em> &quot;HelloAndroidTest&quot;
- </li>
- <li>
- <em>Test Target:</em> Set &quot;An existing Android project&quot;, click Browse, and then
- select &quot;HelloAndroid&quot; from the list of projects.
- </li>
- <li>
- <em>Build Target:</em> Set a target whose platform is Android 1.5 or above.
- </li>
- <li>
- <em>Application name:</em> &quot;HelloAndroidTest&quot;
- </li>
- <li>
- <em>Package name:</em> &quot;<code>com.example.helloandroid.test</code>&quot;
- </li>
- </ul>
- <p>
- The dialog should now look like this:
- </p>
- <a href="{@docRoot}images/testing/hwtest_new_test_project_dialog_complete_callouts.png">
- <img alt="New Android Test Project dialog with entries" src="{@docRoot}images/testing/hwtest_new_test_project_dialog_complete_callouts.png" style="height:230px"/>
- </a>
- </li>
- <li>
- Click Finish. The new project appears in the Package Explorer.
- </li>
- </ol>
-<h2 id="CreateTestClass">Creating the Test Case Class</h2>
-<p>
- You now have a test project HelloAndroidTest, and the basic structure of a test application
- also called HelloAndroidTest. The basic structure includes all the files and directories you
- need to build and run a test application, <em>except for</em> the class that contains
- your tests (the <strong>test case class</strong>).
-</p>
-<p>
- The next step is to define the test case class. In this tutorial, you define a test case class
- that extends one of Android's test case classes designed for Activities. The class contains
- definitions for four methods:
-</p>
- <ol>
- <li>
- <code>HelloAndroidTest</code>: This defines the constructor for the class. It is
- required by the Android testing framework.
- </li>
- <li>
- <code>setUp()</code>: This overrides the JUnit <code>setUp()</code> method. You use
- it to initialize the environment before each test runs.
- </li>
- <li>
- <code>testPreconditions()</code>: This defines a small test that ensures the Hello, Android
- application starts up correctly.
- </li>
- <li>
- <code>testText()</code>: This tests that what is displayed on the screen is the
- same as what is contained in the application's string resources. It is an example of
- a real unit test you would perform against an application's UI.
- </li>
- </ol>
-<p>
- The following sections contain the code for the test case class and its methods.
-</p>
-
-<h3 id="CreateTestCaseClassFile">Adding the test case class file</h3>
-<p>
- To add the Java file for the test case class, follow these steps
-</p>
- <ol>
- <li>
- In Eclipse, open the HelloAndroidTest project if it is not already open.
- </li>
- <li>
- Within HelloAndroidTest, expand the <code>src/</code> folder and
- then find the package icon for <code>com.example.helloandroid.test</code>.
- Right-click on the package icon and select <strong>New</strong> &gt; <strong>Class</strong>:
- <p>
- <a href="{@docRoot}images/testing/hwtest_create_test_class_menu_callouts.png">
- <img alt="Menu for creating a new class in the test application" src="{@docRoot}images/testing/hwtest_create_test_class_menu_callouts.png" style="height:230px"/>
- </a>
- </p>
- <p>
- The New Java Class dialog appears.
- </p>
- </li>
- <li>
- In the dialog, enter the following:
- <ul>
- <li>
- <em>Name:</em> &quot;HelloAndroidTest&quot;. This becomes the name of your test class.
- </li>
- <li>
- <em>Superclass:</em> &quot;<code>android.test.ActivityInstrumentationTestCase2&lt;HelloAndroid&gt;</code>&quot;.
- The superclass is parameterized by an Activity class name.
- <p>
- The dialog should now look like this:
- </p>
- <a href="{@docRoot}images/testing/hwtest_new_test_class_dialog_complete_callouts.png">
- <img alt="New Java Class dialog with entries" src="{@docRoot}images/testing/hwtest_new_test_class_dialog_complete_callouts.png" style="height:230px"/>
- </a>
- </li>
- </ul>
- <p>
- Do not change any of the other settings. Click Finish.
- </p>
- </li>
- <li>
- You now have a new file <code>HelloAndroidTest.java</code> in the project.
- This file contains the class <code>HelloAndroidTest</code>,
- which extends the Activity test case class
- <code>ActivityInstrumentationTestCase2&lt;T&gt;</code>. You parameterize the
- class with <code>HelloAndroid</code>, which is the class name of the activity under test.
- </li>
- <li>
- Open <code>HelloAndroidTest.java</code>. It should look like this:
-<pre class="prettyprint">
-package com.example.helloandroid.test;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-public class HelloAndroidTest extends ActivityInstrumentationTestCase2&lt;HelloAndroid&gt; {
-}
-</pre>
- </li>
- <li>
- The test case class depends on the <code>HelloAndroid</code> class, which is not
- yet imported. To import the class, add the following line just before the current
- <code>import</code> statement:
-<pre class="prettyprint">
-import com.example.helloandroid.HelloAndroid;
-</pre>
- </li>
- </ol>
-<h3 id="CreateConstructor">Adding the test case constructor</h3>
-<p>
- The test case class constructor is used by the Android testing framework when you run the test.
- It calls the super constructor with parameters that tell the framework what Android application
- should be tested.
-</p>
-<p>
- Add the following constructor method immediately after the class definition:
-</p>
-<pre class="prettyprint">
- public HelloAndroidTest() {
- super("com.example.helloandroid", HelloAndroid.class);
- }
-</pre>
-<p>
- Save the file <code>HelloAndroidTest.java</code>.
-</p>
-<h3 id="CreateSetUp">Adding a setup method</h3>
-<p>
- The <code>setUp()</code> method overrides the JUnit {@link junit.framework.TestCase#setUp() setUp()}
- method, which the Android testing framework calls prior to running each test method. You use
- <code>setUp()</code> to initialize variables and prepare the test environment. For this
- test case, the <code>setUp()</code> method starts the Hello, Android application,
- retrieves the text being displayed on the screen, and retrieves the text string in the
- resource file.
-</p>
-<p>
- First, add the following code immediately after the constructor method:
-</p>
-<pre class="prettyprint">
- &#064;Override
- protected void setUp() throws Exception {
- super.setUp();
- mActivity = this.getActivity();
- mView = (TextView) mActivity.findViewById(com.example.helloandroid.R.id.textview);
- resourceString = mActivity.getString(com.example.helloandroid.R.string.hello);
- }
-</pre>
-<p>
- For this code to work, you must also add some class members and another import statement. To
- add the class members, add the following code immediately after the class definition:
-</p>
-<pre class="prettyprint">
- private HelloAndroid mActivity;
- private TextView mView;
- private String resourceString;
-</pre>
-<p>
- To add the import statement, add the following statement just after the import for
- <code>android.test.ActivityInstrumentationTestCase2</code>:
-</p>
-<pre class="prettyprint">
- import android.widget.TextView;
-</pre>
-<h3 id="CreatePreConditions">Adding a preconditions test</h3>
-<p>
- A preconditions test checks the initial application conditions prior to executing other tests.
- It's similar to <code>setUp()</code>, but with less overhead, since it only runs once.
-</p>
-<p>
- Although a preconditions test can check for a variety of different conditions,
- in this application it only needs to check whether the application under test is
- initialized properly and the target TextView exists.
- To do this, it calls the inherited
- {@link junit.framework.Assert#assertNotNull(Object) assertNotNull()}
- method, passing a reference to the TextView.
- The test succeeds only if the object reference is not null.
-</p>
-<pre class="prettyprint">
- public void testPreconditions() {
- assertNotNull(mView);
- }
-</pre>
-<h3 id="CreateText">Adding a unit test</h3>
-<p>
- Now add a simple unit test to the test case class.
- The method <code>testText()</code> will call a
- {@link junit.framework.Assert JUnit Assert}
- method to check whether the target TextView is displaying the expected text.
-</p>
-<p>
- For this example, the test expects that the TextView is
- displaying the string resource that was originally declared for it in HelloAndroid's
- <code>main.xml</code> file, referred to by the resource ID <code>hello</code>.
- The call to
- {@link junit.framework.Assert#assertEquals(String, String) assertEquals(String,String)}
- compares the expected value, read directly from the <code>hello</code>string resource,
- to the text displayed by the TextView, obtained from the
- TextView's <code>getText()</code> method. The test succeeds only if the strings match.
-</p>
-<p>
- To add this test, add the following code
- immediately after the <code>testPreconditions()</code> method:
-</p>
-<pre class="prettyprint">
- public void testText() {
- assertEquals(resourceString,(String)mView.getText());
- }
-</pre>
-<h3 id="CompleteTest">The finished test case class</h3>
-<p>
- You have now finished writing the test. This is what the complete test case class
- should look like:
-</p>
-<pre class="prettyprint">
-package com.example.helloandroid.test;
-
-import com.example.helloandroid.HelloAndroid;
-import android.test.ActivityInstrumentationTestCase2;
-import android.widget.TextView;
-
-public class HelloAndroidTest extends ActivityInstrumentationTestCase2&lt;HelloAndroid&gt; {
- private HelloAndroid mActivity; // the activity under test
- private TextView mView; // the activity's TextView (the only view)
- private String resourceString;
-
- public HelloAndroidTest() {
- super("com.example.helloandroid", HelloAndroid.class);
- }
- &#064;Override
- protected void setUp() throws Exception {
- super.setUp();
- mActivity = this.getActivity();
- mView = (TextView) mActivity.findViewById(com.example.helloandroid.R.id.textview);
- resourceString = mActivity.getString(com.example.helloandroid.R.string.hello);
- }
- public void testPreconditions() {
- assertNotNull(mView);
- }
- public void testText() {
- assertEquals(resourceString,(String)mView.getText());
- }
-}
-</pre>
-<h2 id="RunTest">Running the Tests and Seeing the Results</h2>
-<p>
- You can now run the tests you've created against the Hello, Android application. In Eclipse with
- ADT, you run a test application as an <strong>Android JUnit test</strong> rather than a regular
- Android application.
-</p>
-<p>
- To run the test application as an Android JUnit test, in the Package Explorer right-click
- the HelloAndroidTest project and select <strong>Run As</strong> &gt; <strong>Android JUnit Test</strong>
-</p>
- <a href="{@docRoot}images/testing/hwtest_runas_menu_callouts.png">
- <img alt="Menu to run Hello, World as an Android JUnit test"
- src="{@docRoot}images/testing/hwtest_runas_menu_callouts.png" style="height:230px">
- </a>
-<p>
- The ADT plugin then launches the test application and the application
- under test on a the target emulator or device. When both applications are running,
- the testing framework runs the tests and reports the results in the JUnit view of Eclipse,
- which appears by default as a tab next to the Package Explorer.
-</p>
-<p>
- As shown below, the JUnit view shows test results in two separate panes:
- an upper pane summarizes the tests that were run and a lower pane reports the failure traces
- for the tests. In this case, the tests in this example have run successfully, so there is no
- failure reported in the view:
-</p>
- <a href="{@docRoot}images/testing/hwtest_junit_success.png">
- <img src="{@docRoot}images/testing/hwtest_junit_success.png"
- alt="JUnit test run success" style="height:230px"/>
- </a>
-<p>
- The upper pane summarizes the test:
-</p>
- <ul>
- <li>
- &quot;Finished after <em>x</em> seconds&quot;: How long the test took to run.
- </li>
- <li>
- &quot;Runs&quot;: The number of tests run.
- </li>
- <li>
- &quot;Errors:&quot;: The number of program errors and exceptions encountered during
- the test run.
- </li>
- <li>
- &quot;Failures:&quot;: The number of assertion failures encountered during the
- test run.
- </li>
- <li>
- A progress bar. The progress bar extends from left to right as the tests run.
- <p>
- If all the tests succeed, the bar remains green.
- If a test fails, the bar turns from green to red.
- </p>
- </li>
- <li>
- A test method summary. Below the bar, you see a line for each class in the
- test application, labeled by its fully-qualified class name.
- To look at the results for the individual methods in a test case class,
- click the arrow at the left of the class to expand the line.
- You see the name of each test method. To the right of the method name, you see the
- time needed to run that method. You can look at the method's code by
- double-clicking its name.
- </li>
- </ul>
- <p>
- The lower pane contains the failure trace. If all the tests are successful,
- this pane is empty. If some tests fail, then if you select a failed test in the
- upper pane, the lower view contains a stack trace for the test.
- </p>
-<h2 id="NextSteps">Next Steps</h2>
-<p>
- This simple example test application has shown you how to create a test project,
- create a test class and test cases, and then run the tests against a target application.
- Now that you are familiar with these fundamentals, here are some suggested next steps:
-</p>
-<p>
- <strong>Learn more about testing on Android</strong>
-</p>
-<ul>
- <li>
- The
- <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Android Applications</a>
- document in the <em>Dev Guide</em> provides an overview of how testing on Android works.
- If you are just getting started with Android testing, reading that document will
- help you understand the tools available to you, so that you can develop effective
- tests.
- </li>
-</ul>
-<p>
- <strong>Learn more about the testing classes available in Android</strong>
-</p>
-<ul>
- <li>
- For an overview of the types of testing classes you can use,
- browse through the reference documentation for
- {@link android.test.ActivityInstrumentationTestCase2},
- {@link android.test.ProviderTestCase2},
- {@link android.test.ServiceTestCase}, and
- {@link junit.framework.Assert}.
- </li>
-</ul>
-<p>
- <strong>Explore the Android instrumentation framework</strong>
-</p>
-<ul>
- <li>
- The {@link android.test.InstrumentationTestRunner} class contains the code that Android uses
- to run tests against an application. The {@link android.test.InstrumentationTestCase} class
- is the base class for test case classes that use additional instrumentation features.
- </li>
-</ul>
-<p>
- <strong>Follow the Activity Testing tutorial</strong>
-</p>
-<ul>
- <li>
- The <a href="{@docRoot}resources/tutorials/testing/activity_test.html">Activity Testing</a>
- tutorial is an excellent follow-up to this tutorial.
- It guides you through a more complex testing scenario that you develop against a
- more realistic application.
- </li>
-</ul>
diff --git a/docs/html/resources/tutorials/views/hello-autocomplete.jd b/docs/html/resources/tutorials/views/hello-autocomplete.jd
deleted file mode 100644
index e26683de19e6..000000000000
--- a/docs/html/resources/tutorials/views/hello-autocomplete.jd
+++ /dev/null
@@ -1,173 +0,0 @@
-page.title=Auto Complete
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>To create a text entry widget that provides auto-complete suggestions, use
-the {@link android.widget.AutoCompleteTextView} widget. Suggestions are received from a
-collection of strings associated with the widget through an {@link
-android.widget.ArrayAdapter}.</p>
-
-<p>In this tutorial, you will create a {@link android.widget.AutoCompleteTextView} widget that
-provides suggestions for a country name.</p>
-
-
-<ol>
- <li>Start a new project named <em>HelloAutoComplete</em>.</li>
- <li>Create an XML file named <code>list_item.xml</code> and save it inside the
-<code>res/layout/</code> folder. Edit the file to look like this:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:padding="10dp"
- android:textSize="16sp"
- android:textColor="#000">
-&lt;/TextView>
-</pre>
- <p>This file defines a simple {@link android.widget.TextView} that will be used for each
-item that appears in the list of suggestions.</p>
- </li>
- <li>Open the <code>res/layout/main.xml</code> file and insert the following:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:padding="5dp">
- &lt;TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Country" />
- &lt;AutoCompleteTextView android:id="@+id/autocomplete_country"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="5dp"/>
-&lt;/LinearLayout>
-</pre>
- <p>The {@link android.widget.TextView} is a label that introduces the {@link
-android.widget.AutoCompleteTextView} widget.
-</li>
-
-<li>Open <code>HelloAutoComplete.java</code> and insert the following code for the {@link
-android.app.Activity#onCreate(Bundle) onCreate()} method:
-<pre>
-&#64;Override
-protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.autocomplete_country);
- ArrayAdapter&lt;String> adapter = new ArrayAdapter&lt;String>(this, R.layout.list_item, COUNTRIES);
- textView.setAdapter(adapter);
-}
-</pre>
-
-<p>After the content view is set to the <code>main.xml</code> layout, the {@link
-android.widget.AutoCompleteTextView} widget is captured from the layout with {@link
-android.app.Activity#findViewById(int)}. A new {@link
-android.widget.ArrayAdapter} is then initialized to bind the <code>list_item.xml</code> layout
-to each list item in the <code>COUNTRIES</code> string array (defined in the next step).
-Finally, {@link android.widget.AutoCompleteTextView#setAdapter(T) setAdapter()} is called to
-associate the {@link android.widget.ArrayAdapter} with the
-{@link android.widget.AutoCompleteTextView} widget so that the string array will populate
-the list of suggestions.</p>
-</li>
-
-<li>Inside the <code>HelloAutoComplete</code> class, add the string array:
-<pre>
-static final String[] COUNTRIES = new String[] {
- "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra",
- "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina",
- "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan",
- "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium",
- "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia",
- "Bosnia and Herzegovina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory",
- "British Virgin Islands", "Brunei", "Bulgaria", "Burkina Faso", "Burundi",
- "Cote d'Ivoire", "Cambodia", "Cameroon", "Canada", "Cape Verde",
- "Cayman Islands", "Central African Republic", "Chad", "Chile", "China",
- "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo",
- "Cook Islands", "Costa Rica", "Croatia", "Cuba", "Cyprus", "Czech Republic",
- "Democratic Republic of the Congo", "Denmark", "Djibouti", "Dominica", "Dominican Republic",
- "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea",
- "Estonia", "Ethiopia", "Faeroe Islands", "Falkland Islands", "Fiji", "Finland",
- "Former Yugoslav Republic of Macedonia", "France", "French Guiana", "French Polynesia",
- "French Southern Territories", "Gabon", "Georgia", "Germany", "Ghana", "Gibraltar",
- "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau",
- "Guyana", "Haiti", "Heard Island and McDonald Islands", "Honduras", "Hong Kong", "Hungary",
- "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica",
- "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Kuwait", "Kyrgyzstan", "Laos",
- "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg",
- "Macau", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands",
- "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia", "Moldova",
- "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia",
- "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand",
- "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "North Korea", "Northern Marianas",
- "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru",
- "Philippines", "Pitcairn Islands", "Poland", "Portugal", "Puerto Rico", "Qatar",
- "Reunion", "Romania", "Russia", "Rwanda", "Sqo Tome and Principe", "Saint Helena",
- "Saint Kitts and Nevis", "Saint Lucia", "Saint Pierre and Miquelon",
- "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Saudi Arabia", "Senegal",
- "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands",
- "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "South Korea",
- "Spain", "Sri Lanka", "Sudan", "Suriname", "Svalbard and Jan Mayen", "Swaziland", "Sweden",
- "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "The Bahamas",
- "The Gambia", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey",
- "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Virgin Islands", "Uganda",
- "Ukraine", "United Arab Emirates", "United Kingdom",
- "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan",
- "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Wallis and Futuna", "Western Sahara",
- "Yemen", "Yugoslavia", "Zambia", "Zimbabwe"
-};
-</pre>
-<p>This is the list of suggestions that will be provided in a drop-down list when the user types into
-the {@link android.widget.AutoCompleteTextView} widget.</p>
-</li>
-
-<li>Run the application.</li>
-</ol>
-<p>As you type, you should see something like this:</p>
-<img src="images/hello-autocomplete.png" width="150px" />
-
-
-<h2>More Information</h2>
-
-<p>Note that using a hard-coded string array is not a recommended design practice because your
-application code should focus on behavior, not content. Application content such as strings
-should be externalized from the code in order to make modifications to the content easier and
-facilitate localization of the content. The hard-coded strings are used in this tutorial only to
-make it simple and focus on the {@link android.widget.AutoCompleteTextView} widget.
-Instead, your application should declare such string arrays in an XML file. This can be done
-with a {@code &lt;string-array&lt;} resource in your project {@code res/values/strings.xml} file.
-For example:</p>
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;resources>
- &lt;string-array name="countries_array">
- &lt;item>Bahrain&lt;/item>
- &lt;item>Bangladesh&lt;/item>
- &lt;item>Barbados&lt;/item>
- &lt;item>Belarus&lt;/item>
- &lt;item>Belgium&lt;/item>
- &lt;item>Belize&lt;/item>
- &lt;item>Benin&lt;/item>
- &lt;/string-array>
-&lt;/resources>
-</pre>
-<p>To use these resource strings for the {@link android.widget.ArrayAdapter}, replace the original
-{@link android.widget.ArrayAdapter} constructor line with the following:</p>
-<pre>
-String[] countries = getResources().getStringArray(R.array.countries_array);
-ArrayAdapter&lt;String> adapter = new ArrayAdapter&lt;String>(this, R.layout.list_item, countries);
-</pre>
-
-
-<h3>References</h3>
-<ul>
- <li>{@link android.widget.ArrayAdapter}</li>
- <li>{@link android.widget.AutoCompleteTextView}</li>
-</ul>
-
-
diff --git a/docs/html/resources/tutorials/views/hello-datepicker.jd b/docs/html/resources/tutorials/views/hello-datepicker.jd
deleted file mode 100644
index c50d6500f58b..000000000000
--- a/docs/html/resources/tutorials/views/hello-datepicker.jd
+++ /dev/null
@@ -1,173 +0,0 @@
-page.title=Date Picker
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>To provide a widget for selecting a date, use the {@link android.widget.DatePicker}
-widget, which allows the user to select the month, day, and year, in a familiar interface.</p>
-
-<p>In this tutorial, you'll create a {@link android.app.DatePickerDialog}, which presents the
-date picker in a floating dialog box at the press of a button. When the date is set by
-the user, a {@link android.widget.TextView} will update with the new date.</p>
-
-<ol>
- <li>Start a new project named <em>HelloDatePicker</em>.</li>
- <li>Open the <code>res/layout/main.xml</code> file and insert the following:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- &lt;TextView android:id="@+id/dateDisplay"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text=""/>
- &lt;Button android:id="@+id/pickDate"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Change the date"/>
-&lt;/LinearLayout>
-</pre>
- <p>This creates a basic {@link android.widget.LinearLayout} with a {@link android.widget.TextView}
- that will display the date and a {@link android.widget.Button} that will open the {@link
- android.app.DatePickerDialog}.</p>
- </li>
-
- <li>Open <code>HelloDatePicker.java</code> and add the following members to the class:
-<pre>
- private TextView mDateDisplay;
- private Button mPickDate;
- private int mYear;
- private int mMonth;
- private int mDay;
-
- static final int DATE_DIALOG_ID = 0;
-</pre>
- <p>The first group of members define variables for the layout {@link android.view.View}s and the
-date items. The <code>DATE_DIALOG_ID</code> is a static integer that uniquely identifies the {@link
-android.app.Dialog} that will display the date picker.</p>
- </li>
-
- <li>Now add the following code for the {@link android.app.Activity#onCreate(Bundle) onCreate()}
-method:
-<pre>
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- // capture our View elements
- mDateDisplay = (TextView) findViewById(R.id.dateDisplay);
- mPickDate = (Button) findViewById(R.id.pickDate);
-
- // add a click listener to the button
- mPickDate.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- showDialog(DATE_DIALOG_ID);
- }
- });
-
- // get the current date
- final Calendar c = Calendar.getInstance();
- mYear = c.get(Calendar.YEAR);
- mMonth = c.get(Calendar.MONTH);
- mDay = c.get(Calendar.DAY_OF_MONTH);
-
- // display the current date (this method is below)
- updateDisplay();
- }
-</pre>
-
-<p>First, the content is set to the <code>main.xml</code> layout. Then the {@link
-android.widget.TextView} and {@link android.widget.Button} elements are captured from the layout
-with {@link android.app.Activity#findViewById(int)}. A
-new {@link android.view.View.OnClickListener} is created for the
-{@link android.widget.Button}, so that when it is clicked, it
-will call {@link android.app.Activity#showDialog(int)}, passing the unique integer ID for
-the date picker dialog. Using {@link android.app.Activity#showDialog(int)} allows the {@link
-android.app.Activity} to manage the life-cycle of the dialog and will call the {@link
-android.app.Activity#onCreateDialog(int)} callback method to request the {@link android.app.Dialog}
-that should be displayed (which you'll
-define later). After the on-click listener is set, a new {@link java.util.Calendar} is created
-and the current year, month and day are acquired. Finally, the private
-<code>updateDisplay()</code> method is called in order to fill the {@link android.widget.TextView}
-with the current date.</p>
-</li>
-
-<li>Add the <code>updateDisplay()</code> method:
-<pre>
- // updates the date in the TextView
- private void updateDisplay() {
- mDateDisplay.setText(
- new StringBuilder()
- // Month is 0 based so add 1
- .append(mMonth + 1).append("-")
- .append(mDay).append("-")
- .append(mYear).append(" "));
- }
-</pre>
-<p>This method uses the member date values declared for the class to write the date to the layout's
-{@link android.widget.TextView}, {@code mDateDisplay}, which was also declared and initialized
-above.</p>
-</li>
-
-<li>Initialize a new {@link android.app.DatePickerDialog.OnDateSetListener} as a member of the
-<code>HelloDatePicker</code> class:
-<pre>
- // the callback received when the user "sets" the date in the dialog
- private DatePickerDialog.OnDateSetListener mDateSetListener =
- new DatePickerDialog.OnDateSetListener() {
-
- public void onDateSet(DatePicker view, int year,
- int monthOfYear, int dayOfMonth) {
- mYear = year;
- mMonth = monthOfYear;
- mDay = dayOfMonth;
- updateDisplay();
- }
- };
-</pre>
-<p>The {@link android.app.DatePickerDialog.OnDateSetListener} listens for when the user
-has set the date (by clicking the "Set" button). At that time, the {@link
-android.app.DatePickerDialog.OnDateSetListener#onDateSet(DatePicker,int,int,int) onDateSet()}
-callback method is called, which is defined to update the {@code mYear}, {@code mMonth}, and
-{@code mDay} member fields with the new date then call the private <code>updateDisplay()</code>
-method to update the {@link android.widget.TextView}.</p>
-</li>
-
-<li>Now add the {@link android.app.Activity#onCreateDialog(int)} callback method to the {@code
-HelloDatePicker} class:
-<pre>
-&#64;Override
-protected Dialog onCreateDialog(int id) {
- switch (id) {
- case DATE_DIALOG_ID:
- return new DatePickerDialog(this,
- mDateSetListener,
- mYear, mMonth, mDay);
- }
- return null;
-}
-</pre>
-<p>This is an {@link android.app.Activity} callback method that is passed the integer ID given to
-{@link android.app.Activity#showDialog(int)} (which is called by the button's {@link
-android.view.View.OnClickListener}). When the ID matches the switch case defined here, a {@link
-android.app.DatePickerDialog} is instantiated with the {@link
-android.app.DatePickerDialog.OnDateSetListener} created in the previous
-step, along with the date variables to initialize the widget date.</p>
-</li>
-
-<li>Run the application.</li>
-</ol>
-<p>When you press the "Change the date" button, you should see the following:</p>
-<img src="images/hello-datepicker.png" width="150px" />
-
-<h3>References</h3>
-<ul>
-<li>{@link android.app.DatePickerDialog}</li>
-<li>{@link android.app.DatePickerDialog.OnDateSetListener}</li>
-<li>{@link android.widget.Button}</li>
-<li>{@link android.widget.TextView}</li>
-<li>{@link java.util.Calendar}</li>
-</ul>
-
diff --git a/docs/html/resources/tutorials/views/hello-formstuff.jd b/docs/html/resources/tutorials/views/hello-formstuff.jd
deleted file mode 100644
index 1ddd1df7fe84..000000000000
--- a/docs/html/resources/tutorials/views/hello-formstuff.jd
+++ /dev/null
@@ -1,400 +0,0 @@
-page.title=Form Stuff
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>This tutorial introduces a variety of widgets that are useful when creating forms, such as
-image buttons, text fields, checkboxes and radio buttons.</p>
-
-
-<ol>
- <li>Start a new project named <em>HelloFormStuff</em>.</li>
- <li>Your <code>res/layout/main.xml</code> file should already have a basic {@link
-android.widget.LinearLayout}:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" >
-&lt;/LinearLayout>
-</pre>
- <p>For each widget you want to add, just put the respective View inside this {@link
-android.widget.LinearLayout}.</p>
- </li>
-</ol>
-<p>Each section below also assumes that your <code>HelloFormStuff</code> Activity has the following
-default implementation of the {@link android.app.Activity#onCreate(Bundle) onCreate()} method:</p>
-<pre>
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-}
-</pre>
-
-<p>Now select which kind of form widget you'd like to create:</p>
-<ul>
- <li><a href="#CustomButton">Custom Button</a></li>
- <li><a href="#EditText">Edit Text</a></li>
- <li><a href="#Checkbox">Checkbox</a></li>
- <li><a href="#RadioButtons">Radio Buttons</a></li>
- <li><a href="#ToggleButton">Toggle Button</a></li>
- <li><a href="#RatingBar">Rating Bar</a></li>
-</ul>
-
-
-
-<h2 id="CustomButton">Custom Button</h2>
-
-<p>In this section, you will create a button with a custom image instead of text, using the {@link
-android.widget.Button} widget and an XML file that defines three different images to use for the
-different button states. When the button is pressed, a short message will be displayed.</p>
-
-<img src="images/android_pressed.png" style="float:right;" title="android_pressed.png"/>
-<img src="images/android_focused.png" style="float:right;clear:right;" title="android_focused.png"/>
-<img src="images/android_normal.png" style="float:right;clear:right;" title="android_normal.png"/>
-<ol>
- <li>Copy the images on the right into the <code>res/drawable/</code> directory of
-your project. These will be used for the different button states.</li>
- <li>Create a new file in the <code>res/drawable/</code> directory named
-<code>android_button.xml</code>.
-Insert the following XML:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;selector xmlns:android="http://schemas.android.com/apk/res/android">
- &lt;item android:drawable="@drawable/android_pressed"
- android:state_pressed="true" />
- &lt;item android:drawable="@drawable/android_focused"
- android:state_focused="true" />
- &lt;item android:drawable="@drawable/android_normal" />
-&lt;/selector>
-</pre>
- <p>This defines a single drawable resource, which will change its image based on the current
-state of the button. The first <code>&lt;item></code> defines
-<code>android_pressed.png</code> as the image when the button is pressed (it's been
-activated); the second <code>&lt;item></code> defines <code>android_focused.png</code> as the image
-when the button is focused (when the button is highlighted using the trackball or directional
-pad); and the third <code>&lt;item></code> defines <code>android_normal.png</code> as the image
-for the normal state (when neither pressed nor focused). This XML file now represents a single
-drawable resource and when referenced by a {@link android.widget.Button} for its background,
-the image displayed will change based on these three states.</p>
- <p class="note"><strong>Note:</strong> The order of the <code>&lt;item></code> elements is
-important. When this drawable is referenced, the <code>&lt;item></code>s are traversed in-order to
-determine which one is appropriate for the current button state. Because the "normal" image is last,
-it is only applied when the conditions <code>android:state_pressed</code> and
-<code>android:state_focused</code> have both evaluated false.</li>
- <li>Open the <code>res/layout/main.xml</code> file and add the {@link
-android.widget.Button} element:
-<pre>
- &lt;Button
- android:id="@+id/button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="10dp"
- android:background="@drawable/android_button"
- android:onClick="onButtonClicked"/>
-</pre>
- <p>The <code>android:background</code> attribute specifies the drawable resource to use for the
-button background (which, when saved at <code>res/drawable/android.xml</code>, is
-referenced as <code>@drawable/android</code>). This replaces the normal background image
-applied by the system with the drawable created above, which changes its image based on
-the button state.</p>
- <p>The attribute <code>android:onClick</code> specifies the name of a method in your activity
-that the system should call when the user clicks the button. You'll create that method next.</p>
-</li>
-
-<li>To make the button do something when pressed, add the following
-method inside your {@link android.app.Activity} class:
-<pre>
-public void onButtonClicked(View v) {
- // Do something when the button is clicked
- Toast.makeText(HelloFormStuff.this, "Button clicked", Toast.LENGTH_SHORT).show();
-}
-</pre>
-<p>When you specify this kind of method, which is used in your layout file with the {@code
-android:onClick} attribute, the method must be <code>public</code>, have a <code>void</code> return
-value, and accept a single {@code android.view.View} parameter. When the system calls this method,
-it passes the {@code android.view.View} that was clicked.</p>
-</li>
-<li>Now run the application.</li>
-</ol>
-
-
-
-<h2 id="EditText">Edit Text</h2>
-
-<p>In this section, you will create a text field for user input, using the {@link
-android.widget.EditText} widget. Once text has been entered into the field, the "Enter" key will
-display the text in a toast message.</p>
-
-<ol>
- <li>Open the <code>res/layout/main.xml</code> file and add the {@link android.widget.EditText}
-element (inside the {@link android.widget.LinearLayout}):
-<pre>
- &lt;EditText
- android:id="@+id/edittext"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"/>
-</pre>
-</li>
-<li>To do something with the text that the user types, add the following code
-to the end of the {@link android.app.Activity#onCreate(Bundle) onCreate()} method:
-<pre>
-final EditText edittext = (EditText) findViewById(R.id.edittext);
-edittext.setOnKeyListener(new OnKeyListener() {
- public boolean onKey(View v, int keyCode, KeyEvent event) {
- // If the event is a key-down event on the "enter" button
- if ((event.getAction() == KeyEvent.ACTION_DOWN) &amp;&amp;
- (keyCode == KeyEvent.KEYCODE_ENTER)) {
- // Perform action on key press
- Toast.makeText(HelloFormStuff.this, edittext.getText(), Toast.LENGTH_SHORT).show();
- return true;
- }
- return false;
- }
-});
-</pre>
-<p>This captures the {@link android.widget.EditText} element from the layout and adds an {@link
-android.view.View.OnKeyListener}. The {@link android.view.View.OnKeyListener} must implement the
-{@link android.view.View.OnKeyListener#onKey(View,int,KeyEvent)} method, which
-defines the action to be made when a key is pressed while the widget has focus. In this case, the
-method is defined to listen for the Enter key (when pressed down), then pop up a {@link
-android.widget.Toast} message with the text that has been entered. The {@link
-android.view.View.OnKeyListener#onKey(View,int,KeyEvent)} method should always return
-<code>true</code> if the event has been handled, so that the event doesn't bubble-up (which would
-result in a carriage return in the text field).</p>
-</li>
-<li>Run the application.</li>
-</ol>
-
-
-
-<h2 id="Checkbox">Checkbox</h2>
-
-<p>In this section, you will create a checkbox for selecting items, using the {@link
-android.widget.CheckBox} widget. When the checkbox is pressed, a toast message will
-indicate the current state of the checkbox.</p>
-
-<ol>
- <li>Open the <code>res/layout/main.xml</code> file and add the {@link android.widget.CheckBox}
-element (inside the {@link android.widget.LinearLayout}):
-<pre>
- &lt;CheckBox android:id="@+id/checkbox"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="check it out"
- android:onClick="onCheckboxClicked"/>
-</pre>
- <p>The attribute <code>android:onClick</code> specifies the name of a method in your activity
-that the system should call when the user clicks the check box. You'll create that method next.</p>
-</li>
-<li>To do something when the state is changed, add the following method inside your {@link
-android.app.Activity} class:</p>
-
-<pre>
-public void onCheckboxClicked(View v) {
- // Perform action on clicks, depending on whether it's now checked
- if (((CheckBox) v).isChecked()) {
- Toast.makeText(HelloFormStuff.this, "Selected", Toast.LENGTH_SHORT).show();
- } else {
- Toast.makeText(HelloFormStuff.this, "Not selected", Toast.LENGTH_SHORT).show();
- }
-}
-</pre>
-
-<p>When you specify this kind of method, which is used in your layout file with the {@code
-android:onClick}
-attribute, the method must be <code>public</code>, have a <code>void</code> return value, and
-accept a single {@code android.view.View} parameter. When the system calls this method, it
-passes the {@code android.view.View} that was clicked. In this example, the {@code
-android.view.View} is cast to a {@link android.widget.CheckBox} to determine whether the widget
-has been checked or unchecked. The {@link android.widget.CheckBox} widget
-handles its own state changes, so you only need to query the current state.</p>
-</li>
-<li>Run it.</li>
-</ol>
-<p class="note"><strong>Tip:</strong> If you need to change the state
-yourself (such as when loading a saved {@link android.preference.CheckBoxPreference}),
-use the {@link android.widget.CompoundButton#setChecked(boolean)} or {@link
-android.widget.CompoundButton#toggle()} method.</p>
-
-
-
-<h2 id="RadioButtons">Radio Buttons</h2>
-
-<p>In this section, you will create two mutually-exclusive radio buttons (enabling one disables
-the other), using the {@link android.widget.RadioGroup} and {@link android.widget.RadioButton}
-widgets. When either radio button is pressed, a toast message will be displayed.</p>
-
-<ol>
- <li>Open the <code>res/layout/main.xml</code> file and add two {@link
-android.widget.RadioButton}s, nested in a {@link android.widget.RadioGroup} (inside the {@link
-android.widget.LinearLayout}):
-<pre>
- &lt;RadioGroup
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- &lt;RadioButton android:id="@+id/radio_red"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Red"
- android:onClick="onRadioButtonClicked"/>
- &lt;RadioButton android:id="@+id/radio_blue"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Blue"
- android:onClick="onRadioButtonClicked"/>
- &lt;/RadioGroup>
-</pre>
-<p>It's important that the {@link android.widget.RadioButton}s are grouped together by the {@link
-android.widget.RadioGroup} element so that no more than one can be selected at a time. This logic
-is automatically handled by the Android system. When one {@link android.widget.RadioButton} within
-a group is selected, all others are automatically deselected.</p>
- <p>The attribute <code>android:onClick</code> specifies the name of a method in your activity
-that the system should call when the user clicks the radio button. You'll create that method
-next.</p>
-</li>
-
-<li>To do something when each {@link android.widget.RadioButton} is selected, add the following
-method inside your {@link android.app.Activity} class:</p>
-
-<pre>
-public void onRadioButtonClicked(View v) {
- // Perform action on clicks
- RadioButton rb = (RadioButton) v;
- Toast.makeText(HelloFormStuff.this, rb.getText(), Toast.LENGTH_SHORT).show();
-}
-</pre>
-
-<p>When you specify this kind of method, which is used in your layout file with the {@code
-android:onClick}
-attribute, the method must be <code>public</code>, have a <code>void</code> return value, and
-accept a single {@code android.view.View} parameter. When the system calls this method, it
-passes the {@code android.view.View} that was clicked.</p>
-<p>Because each {@link android.widget.RadioButton} widget is grouped into a {@link
-android.widget.RadioGroup}, each widget handles its own state changes when a new button is
-selected.</p>
-</li>
-<li>Run the application.</li>
-</ol>
-
-<p class="note"><strong>Tip:</strong> If you need to change the state
-yourself (such as when loading a saved {@link android.preference.CheckBoxPreference}),
-use the {@link android.widget.CompoundButton#setChecked(boolean)} or {@link
-android.widget.CompoundButton#toggle()} method.</p>
-
-
-
-<h2 id="ToggleButton">Toggle Button</h2>
-
-<p>In this section, you'll create a button used specifically for toggling between two
-states, using the {@link android.widget.ToggleButton} widget. This widget is an excellent
-alternative to radio buttons if you have two simple states that are mutually exclusive ("on" and
-"off", for example).</p>
-
-<ol>
- <li>Open the <code>res/layout/main.xml</code> file and add the {@link android.widget.ToggleButton}
-element (inside the {@link android.widget.LinearLayout}):
-<pre>
- &lt;ToggleButton android:id="@+id/togglebutton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textOn="Vibrate on"
- android:textOff="Vibrate off"
- android:onClick="onToggleClicked"/>
-</pre>
- <p>The attributes <code>android:textOn</code> and <code>android:textOff</code> specify the text
-for the button when the button has been toggled on or off. The default values are "ON" and
-"OFF".</p>
- <p>The attribute <code>android:onClick</code> specifies the name of a method in your activity
-that the system should call when the user clicks the button. You'll create that method next.</p>
-</li>
-<li>To do something when the user clicks the button, add the following
-method inside your {@link android.app.Activity} class:</p>
-
-<pre>
-public void onToggleClicked(View v) {
- // Perform action on clicks
- if (((ToggleButton) v).isChecked()) {
- Toast.makeText(HelloFormStuff.this, "Toggle on", Toast.LENGTH_SHORT).show();
- } else {
- Toast.makeText(HelloFormStuff.this, "Toggle off", Toast.LENGTH_SHORT).show();
- }
-}
-</pre>
-
-<p>When you specify this kind of method, which is used in your layout file with the {@code
-android:onClick}
-attribute, the method must be <code>public</code>, have a <code>void</code> return value, and
-accept a single {@code android.view.View} parameter. When the system calls this method, it
-passes the {@code android.view.View} that was clicked.</p>
-<p>In this example, the callback
-method checks the new state of the button, then shows a {@link android.widget.Toast} message that
-indicates the current state.</p>
-
-<p>Notice that the {@link android.widget.ToggleButton} handles its own state change between checked
-and unchecked, so you just ask which it is.</p>
-<li>Run the application.</li>
-</ol>
-
-<p class="note"><strong>Tip:</strong> If you need to change the state
-yourself (such as when loading a saved {@link android.preference.CheckBoxPreference}),
-use the {@link android.widget.CompoundButton#setChecked(boolean)} or {@link
-android.widget.CompoundButton#toggle()} method.</p>
-
-
-
-
-<h2 id="RatingBar">Rating Bar</h2>
-
-<p>In this section, you'll create a widget that allows the user to provide a rating,
-with the {@link android.widget.RatingBar} widget.</p>
-
-<ol>
- <li>Open the <code>res/layout/main.xml</code> file and add the {@link android.widget.RatingBar}
-element (inside the {@link android.widget.LinearLayout}):
-<pre>
- &lt;RatingBar android:id="@+id/ratingbar"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:numStars="5"
- android:stepSize="1.0"/>
-</pre>
- <p>The <code>android:numStars</code> attribute defines how many stars to display for the rating
-bar. The <code>android:stepSize</code> attribute defines the granularity for each
-star (for example, a value of <code>0.5</code> would allow half-star ratings). </p>
-</li>
-<li>To do something when a new rating has been set, add the following code
-to the end of the {@link android.app.Activity#onCreate(Bundle) onCreate()} method:
-<pre>
-final RatingBar ratingbar = (RatingBar) findViewById(R.id.ratingbar);
-ratingbar.setOnRatingBarChangeListener(new OnRatingBarChangeListener() {
- public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromUser) {
- Toast.makeText(HelloFormStuff.this, "New Rating: " + rating, Toast.LENGTH_SHORT).show();
- }
-});
-</pre>
-<p>This captures the {@link android.widget.RatingBar} widget from the layout with {@link
-android.app.Activity#findViewById(int)} and then sets an {@link
-android.widget.RatingBar.OnRatingBarChangeListener}. The {@link
-android.widget.RatingBar.OnRatingBarChangeListener#onRatingChanged(RatingBar,float,boolean)
-onRatingChanged()} callback method then defines the action to perform when the user sets a rating.
-In this case, a simple {@link android.widget.Toast} message displays the new rating.</p>
-
-<li>Run the application.</li>
-</ol>
-
-<p>If you've added all the form widgets above, your application should look like this:</p>
-<img src="images/hello-formstuff.png" width="150px" />
-
-<h3>References</h3>
-<ul>
- <li>{@link android.widget.ImageButton}</li>
- <li>{@link android.widget.EditText}</li>
- <li>{@link android.widget.CheckBox}</li>
- <li>{@link android.widget.RadioButton}</li>
- <li>{@link android.widget.ToggleButton}</li>
- <li>{@link android.widget.RatingBar}</li>
-</ul>
-
diff --git a/docs/html/resources/tutorials/views/hello-gallery.jd b/docs/html/resources/tutorials/views/hello-gallery.jd
deleted file mode 100644
index 5f2ed32b6ff6..000000000000
--- a/docs/html/resources/tutorials/views/hello-gallery.jd
+++ /dev/null
@@ -1,171 +0,0 @@
-page.title=Gallery
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>{@link android.widget.Gallery} is a layout widget used to display items in a
-horizontally scrolling list and positions the current selection at the center of the view.</p>
-
-<p>In this tutorial, you'll create a gallery of photos and then display a toast message each time a
-gallery item is selected.</p>
-
-
-<ol>
- <li>Start a new project named <em>HelloGallery</em>.</li>
- <li>Find some photos you'd like to use, or use these <a
-href="{@docRoot}shareables/sample_images.zip">sample images</a>. Save the images into the project's
-<code>res/drawable/</code> directory.</li>
- <li>Open the <code>res/layout/main.xml</code> file and insert the following:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;Gallery xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/gallery"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
-/>
-</pre>
- </li>
-
-<li>Open the <code>HelloGallery.java</code> file and insert the following code for the
-{@link android.app.Activity#onCreate(Bundle) onCreate()} method:
-<pre>
-&#64;Override
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- Gallery gallery = (Gallery) findViewById(R.id.gallery);
- gallery.setAdapter(new ImageAdapter(this));
-
- gallery.setOnItemClickListener(new OnItemClickListener() {
- public void onItemClick(AdapterView parent, View v, int position, long id) {
- Toast.makeText(HelloGallery.this, "" + position, Toast.LENGTH_SHORT).show();
- }
- });
-}
-</pre>
- <p>This starts by setting the {@code main.xml} layout as the content view and then capturing the
-{@link android.widget.Gallery} from
-the layout with {@link
-android.app.Activity#findViewById(int)}. A custom {@link android.widget.BaseAdapter} called
-<code>ImageAdapter</code> is
-instantiated and applied to the {@link android.widget.Gallery} with {@link
-android.widget.AdapterView#setAdapter(T) setAdapter()}. (The <code>ImageAdapter</code> class is
-defined next.)
-Then an anonymous {@link android.widget.AdapterView.OnItemClickListener} is instantiated. The
-{@link android.widget.AdapterView.OnItemClickListener#onItemClick(AdapterView,View,int,long)}
-callback method receives the {@link android.widget.AdapterView} where the click occurred, the
-specific {@link android.view.View} that received the click, the
-position of the {@link android.view.View} clicked (zero-based), and the row ID of the item clicked
-(if applicable). In this example, all that's needed is the position of the click to show a {@link
-android.widget.Toast} message that says the position of the item, using
-{@link android.widget.Toast#makeText(Context,CharSequence,int)} and {@link
-android.widget.Toast#show()} (in a real world scenario, this ID could be used to get the full sized
-image for some other task).
-</p>
-</li>
- <li>Create a new XML file in the <code>res/values/</code> directory named <code>attrs.xml</code>.
-Insert the following:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;resources>
- &lt;declare-styleable name="HelloGallery">
- &lt;attr name="android:galleryItemBackground" />
- &lt;/declare-styleable>
-&lt;/resources>
-</pre>
- <p>This is a custom styleable resource that can be applied to a layout. In this case, it will be
-applied to the individual items placed into the {@link android.widget.Gallery} widget. The
-<code>&lt;attr></code> element defines a specific attribute for the styleable, and in this case, it
-refers to an existing platform attribute, {@link android.R.attr#galleryItemBackground}, which
-defines a border styling for gallery items. In the next step, you'll
-see how this attribute is referenced and then later applied to each item in the gallery.</p>
- </li>
-
- <li>Go back to the <code>HelloGallery.java</code> file. After the {@link
- android.app.Activity#onCreate(Bundle)} method, define the custom <code>ImageAdapter</code> class:
-<pre>
-public class ImageAdapter extends BaseAdapter {
- int mGalleryItemBackground;
- private Context mContext;
-
- private Integer[] mImageIds = {
- R.drawable.sample_1,
- R.drawable.sample_2,
- R.drawable.sample_3,
- R.drawable.sample_4,
- R.drawable.sample_5,
- R.drawable.sample_6,
- R.drawable.sample_7
- };
-
- public ImageAdapter(Context c) {
- mContext = c;
- TypedArray attr = mContext.obtainStyledAttributes(R.styleable.HelloGallery);
- mGalleryItemBackground = attr.getResourceId(
- R.styleable.HelloGallery_android_galleryItemBackground, 0);
- attr.recycle();
- }
-
- public int getCount() {
- return mImageIds.length;
- }
-
- public Object getItem(int position) {
- return position;
- }
-
- public long getItemId(int position) {
- return position;
- }
-
- public View getView(int position, View convertView, ViewGroup parent) {
- ImageView imageView = new ImageView(mContext);
-
- imageView.setImageResource(mImageIds[position]);
- imageView.setLayoutParams(new Gallery.LayoutParams(150, 100));
- imageView.setScaleType(ImageView.ScaleType.FIT_XY);
- imageView.setBackgroundResource(mGalleryItemBackground);
-
- return imageView;
- }
-}
-</pre>
-<p>First, there are a few member variables, including an array of IDs that reference
-the images saved in the drawable resources directory ({@code res/drawable/}).</p>
-<p>Next is the class constructor, where the {@link android.content.Context} for an {@code
-ImageAdapter} instance is defined and the styleable
-resource defined in the last step is acquired and saved to a local field. At the end of the
-constructor, {@link android.content.res.TypedArray#recycle()} is called on the {@link
-android.content.res.TypedArray} so it can be re-used by the system.</p>
-<p>The methods {@link android.widget.Adapter#getCount()}, {@link
-android.widget.Adapter#getItem(int)}, and {@link android.widget.Adapter#getItemId(int)} are methods
-that must be implemented for simple queries on the {@link android.widget.Adapter}.
-The {@link android.widget.Adapter#getView(int,View,ViewGroup) method does the
-work to apply an image to an {@link android.widget.ImageView} that will be embedded in the
-{@link android.widget.Gallery}. In this method, the member {@link android.content.Context} is used
-to create a new {@link android.widget.ImageView}. The {@link android.widget.ImageView} is prepared
-by applying an image from the local array of drawable resources, setting the {@link
-android.widget.Gallery.LayoutParams} height and width for the image, setting the scale to fit the
-{@link android.widget.ImageView} dimensions, and then finally setting the background to use the
-styleable attribute acquired in the constructor.</p>
-
-<p>See {@link android.widget.ImageView.ScaleType} for other image scaling options.</p>
-</li>
-
-<li>Run the application.</li>
-</ol>
-
-<p>You should see something like this:</p>
-<img src="images/hello-gallery.png" width="150px" />
-
-
-<h3>References</h3>
-<ul>
- <li>{@link android.widget.BaseAdapter}</li>
- <li>{@link android.widget.Gallery}</li>
- <li>{@link android.widget.ImageView}</li>
- <li>{@link android.widget.AdapterView.OnItemClickListener}</li>
-</ul>
-
-
diff --git a/docs/html/resources/tutorials/views/hello-linearlayout.jd b/docs/html/resources/tutorials/views/hello-linearlayout.jd
deleted file mode 100644
index 8e072b14e182..000000000000
--- a/docs/html/resources/tutorials/views/hello-linearlayout.jd
+++ /dev/null
@@ -1,133 +0,0 @@
-page.title=Linear Layout
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>{@link android.widget.LinearLayout} is a {@link android.view.ViewGroup} that displays child
-{@link android.view.View} elements in a linear direction, either vertically or horizontally.</p>
-
-<p>You should be careful about over-using the {@link android.widget.LinearLayout}. If you begin
-nesting multiple {@link android.widget.LinearLayout}s, you may want to consider using a {@link
-android.widget.RelativeLayout} instead.</p>
-
-<ol>
- <li>Start a new project named <em>HelloLinearLayout</em>.</li>
- <li>Open the <code>res/layout/main.xml</code> file and insert the following:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
-
- &lt;LinearLayout
- android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_weight="1">
- &lt;TextView
- android:text="red"
- android:gravity="center_horizontal"
- android:background="#aa0000"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_weight="1"/>
- &lt;TextView
- android:text="green"
- android:gravity="center_horizontal"
- android:background="#00aa00"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_weight="1"/>
- &lt;TextView
- android:text="blue"
- android:gravity="center_horizontal"
- android:background="#0000aa"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_weight="1"/>
- &lt;TextView
- android:text="yellow"
- android:gravity="center_horizontal"
- android:background="#aaaa00"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_weight="1"/>
- &lt;/LinearLayout>
-
- &lt;LinearLayout
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_weight="1">
- &lt;TextView
- android:text="row one"
- android:textSize="15pt"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
- &lt;TextView
- android:text="row two"
- android:textSize="15pt"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
- &lt;TextView
- android:text="row three"
- android:textSize="15pt"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
- &lt;TextView
- android:text="row four"
- android:textSize="15pt"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
- &lt;/LinearLayout>
-
-&lt;/LinearLayout>
-</pre>
-
-<p>Carefully inspect this XML. There is a root {@link android.widget.LinearLayout} that defines
-its orientation to be vertical&mdash;all child {@link android.view.View}s (of which it has two) will
-be stacked vertically. The first child is
-another {@link android.widget.LinearLayout} that uses a horizontal orientation and the second child
-is a {@link android.widget.LinearLayout} that uses a vertical orientation. Each of these nested
-{@link android.widget.LinearLayout}s contain several {@link android.widget.TextView} elements, which
-are oriented with each other in the manner defined by their parent {@link
-android.widget.LinearLayout}.</p>
-</li>
-<li>Now open <code>HelloLinearLayout.java</code> and be sure it loads the
-<code>res/layout/main.xml</code> layout in the
-{@link android.app.Activity#onCreate(Bundle) onCreate()} method:</p>
-<pre>
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-}
-</pre>
-<p>The {@link android.app.Activity#setContentView(int)} method loads the
-layout file for the {@link android.app.Activity}, specified by the resource
-ID &mdash; <code>R.layout.main</code> refers to the <code>res/layout/main.xml</code> layout
-file.</p>
-</li>
-<li>Run the application.</li>
-</ol>
-<p>You should see the following:</p>
-<img src="images/hello-linearlayout.png" width="150px" />
-
-<p>Notice how the XML attributes define each View's behavior. Try
-experimenting with different values for <code>android:layout_weight</code> to see how the screen
-real estate is distributed based on the weight of each element. See the <a
-href="{@docRoot}guide/topics/ui/layout-objects.html#linearlayout">Common Layout Objects</a>
-document for more about how {@link android.widget.LinearLayout} handles the
-<code>android:layout_weight</code> attribute.</p>
-
-<h3>References</h3>
-<ul>
- <li>{@link android.widget.LinearLayout}</li>
- <li>{@link android.widget.TextView}</li>
-</ul>
-
-
diff --git a/docs/html/resources/tutorials/views/hello-listview.jd b/docs/html/resources/tutorials/views/hello-listview.jd
deleted file mode 100644
index 194258ed838d..000000000000
--- a/docs/html/resources/tutorials/views/hello-listview.jd
+++ /dev/null
@@ -1,170 +0,0 @@
-page.title=List View
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>{@link android.widget.ListView} is a {@link android.view.ViewGroup} that creates a list of
-scrollable items. The list items are automatically inserted to the list using a {@link
-android.widget.ListAdapter}.</p>
-
-<p>In this tutorial, you'll create a scrollable list of country names that are read from a string array.
-When a list item is selected, a toast message will display the position of the item in the list.</p>
-
-<ol>
- <li>Start a new project named <em>HelloListView</em>.</li>
- <li>Create an XML file named <code>list_item.xml</code> and save it inside the
-<code>res/layout/</code> folder. Insert the following:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:padding="10dp"
- android:textSize="16sp" >
-&lt;/TextView>
-</pre>
- <p>This file defines the layout for each item that will be placed in the {@link
-android.widget.ListView}.</p>
- </li>
-
- <li>Open the <code>HelloListView.java</code> and make the class extend {@link
-android.app.ListActivity} (instead of {@link android.app.Activity}):
- <pre>public class HelloListView extends ListActivity {</pre>
- </li>
- <li>Insert the following code for the {@link android.app.Activity#onCreate(Bundle) onCreate()}
-method:
-<pre>
-&#64;Override
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- setListAdapter(new ArrayAdapter&lt;String>(this, R.layout.list_item, COUNTRIES));
-
- ListView lv = getListView();
- lv.setTextFilterEnabled(true);
-
- lv.setOnItemClickListener(new OnItemClickListener() {
- public void onItemClick(AdapterView&lt;?> parent, View view,
- int position, long id) {
- // When clicked, show a toast with the TextView text
- Toast.makeText(getApplicationContext(), ((TextView) view).getText(),
- Toast.LENGTH_SHORT).show();
- }
- });
-}
-</pre>
-<p>Notice that this does not load a layout file for the Activity (which you usually do with {@link
-android.app.Activity#setContentView(int)}). Instead, {@link
-android.app.ListActivity#setListAdapter(ListAdapter)} automatically
-adds a {@link android.widget.ListView} to fill the entire screen of the {@link
-android.app.ListActivity}. This method takes an {@link android.widget.ArrayAdapter}, which
-manages the array of list items that will be placed into the {@link android.widget.ListView}. The
-{@link android.widget.ArrayAdapter} constructor takes the application {@link
-android.content.Context}, the
-layout description for each list item (created in
-the previous step), and a {@link java.util.List} of objects to insert in the {@link
-android.widget.ListView} (defined next).</p>
-
-<p>The {@link android.widget.ListView#setTextFilterEnabled(boolean)} method turns on text filtering
-for the {@link android.widget.ListView}, so that when the user begins typing, the list will be
-filtered.</p>
-
-<p>The {@link android.widget.ListView#setOnItemClickListener(OnItemClickListener)} method defines
-the on-click listener for each item. When an item in the {@link android.widget.ListView} is clicked,
-the {@link android.widget.AdapterView.OnItemClickListener#onItemClick(AdapterView,View,int,long)
-onItemClick()} method is called and a {@link android.widget.Toast} message is displayed, using the
-text from the clicked item.</p>
-
-<p class="note"><strong>Tip:</strong> You can use list item designs provided by the platform
-instead of defining your own layout file for the {@link android.widget.ListAdapter}. For example,
-try using <code>android.R.layout.simple_list_item_1</code> instead of
-<code>R.layout.list_item</code>.</p>
-</li>
-
-<li>After the {@link android.app.Activity#onCreate(Bundle) onCreate()} method, add the string
-array:
-<pre>
- static final String[] COUNTRIES = new String[] {
- "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra",
- "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina",
- "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan",
- "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium",
- "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia",
- "Bosnia and Herzegovina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory",
- "British Virgin Islands", "Brunei", "Bulgaria", "Burkina Faso", "Burundi",
- "Cote d'Ivoire", "Cambodia", "Cameroon", "Canada", "Cape Verde",
- "Cayman Islands", "Central African Republic", "Chad", "Chile", "China",
- "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo",
- "Cook Islands", "Costa Rica", "Croatia", "Cuba", "Cyprus", "Czech Republic",
- "Democratic Republic of the Congo", "Denmark", "Djibouti", "Dominica", "Dominican Republic",
- "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea",
- "Estonia", "Ethiopia", "Faeroe Islands", "Falkland Islands", "Fiji", "Finland",
- "Former Yugoslav Republic of Macedonia", "France", "French Guiana", "French Polynesia",
- "French Southern Territories", "Gabon", "Georgia", "Germany", "Ghana", "Gibraltar",
- "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau",
- "Guyana", "Haiti", "Heard Island and McDonald Islands", "Honduras", "Hong Kong", "Hungary",
- "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica",
- "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Kuwait", "Kyrgyzstan", "Laos",
- "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg",
- "Macau", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands",
- "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia", "Moldova",
- "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia",
- "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand",
- "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "North Korea", "Northern Marianas",
- "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru",
- "Philippines", "Pitcairn Islands", "Poland", "Portugal", "Puerto Rico", "Qatar",
- "Reunion", "Romania", "Russia", "Rwanda", "Sqo Tome and Principe", "Saint Helena",
- "Saint Kitts and Nevis", "Saint Lucia", "Saint Pierre and Miquelon",
- "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Saudi Arabia", "Senegal",
- "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands",
- "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "South Korea",
- "Spain", "Sri Lanka", "Sudan", "Suriname", "Svalbard and Jan Mayen", "Swaziland", "Sweden",
- "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "The Bahamas",
- "The Gambia", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey",
- "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Virgin Islands", "Uganda",
- "Ukraine", "United Arab Emirates", "United Kingdom",
- "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan",
- "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Wallis and Futuna", "Western Sahara",
- "Yemen", "Yugoslavia", "Zambia", "Zimbabwe"
- };
-</pre>
- <p>This is the array of strings that will be placed into the {@link android.widget.ListView}.</p>
-</li>
-<li>Run the application.</li>
-</ol>
-<p>You can scroll the list, or type to filter it, then click an item to see a message. You
-should see something like this:</p>
-<img src="images/hello-listview.png" width="150px" />
-
-<p>Note that using a hard-coded string array is not the best design practice. One is
-used in this tutorial for simplicity, in order to demonstrate the {@link
-android.widget.ListView} widget. The better practice is to reference a string array
-defined by an external resource, such as with a {@code &lt;string-array&gt;}
-resource in your project {@code res/values/strings.xml} file. For example:</p>
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;resources>
- &lt;string-array name="countries_array">
- &lt;item>Bahrain&lt;/item>
- &lt;item>Bangladesh&lt;/item>
- &lt;item>Barbados&lt;/item>
- &lt;item>Belarus&lt;/item>
- &lt;item>Belgium&lt;/item>
- &lt;item>Belize&lt;/item>
- &lt;item>Benin&lt;/item>
- &lt;/string-array>
-&lt;/resources>
-</pre>
-<p>To use these resource strings for the {@link android.widget.ArrayAdapter}, replace the original
-{@link android.app.ListActivity#setListAdapter(ListAdapter)} line with the following:</p>
-<pre>
-String[] countries = getResources().getStringArray(R.array.countries_array);
-setListAdapter(new ArrayAdapter&lt;String>(this, R.layout.list_item, countries));
-</pre>
-
-<h3>References</h3>
-<ul>
- <li>{@link android.widget.ListView}</li>
- <li>{@link android.widget.ListAdapter}</li>
-</ul>
-
diff --git a/docs/html/resources/tutorials/views/hello-mapview.jd b/docs/html/resources/tutorials/views/hello-mapview.jd
deleted file mode 100644
index 7a0bedf5dd69..000000000000
--- a/docs/html/resources/tutorials/views/hello-mapview.jd
+++ /dev/null
@@ -1,303 +0,0 @@
-page.title=Google Map View
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>Using the Google Maps library, you can create your own map-viewing Activity. In this
-tutorial, you'll create a simple map application in two parts. In Part 1, you'll create an app that
-shows a map the user can pan and zoom. In Part 2, you'll add overlay items that mark
-points of interest.</p>
-
-<div class="special">
-<p>This tutorial requires that you have the external Google Maps library
-installed in your SDK environment. The Maps library is included with the Google APIs
-add-on, which you can install using the Android SDK and
-AVD Manager. To learn how, see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
-Components</a>.</p>
-
-<p>After installing the Google APIs add-on in your SDK, set your project properties to use the build
-target called "Google APIs by Google Inc.". See the instructions for setting a build
-target in <a href="{@docRoot}guide/developing/projects/projects-eclipse.html#CreatingAProject">
-Creating and Managing Projects in Eclipse</a> or <a
-href="{@docRoot}guide/developing/projects/projects-cmdline.html#CreatingAProject">
-Creating and Managing Projects on the Command Line</a>, as appropriate for your environment.</p>
-
-<p>You will also need to set up a new AVD that uses the same Google APIs deployment target. See <a
-href="{@docRoot}guide/developing/devices/index.html">Creating and Managing Virtual Devices</a> for
-more information.</p>
-
-<p>For reference material, see the <a
-href="http://code.google.com/android/add-ons/google-apis/reference/index.html">Google Maps
-library documentation</a>.</p>
-
-</div>
-
-<h2>Part 1: Creating a Map Activity</h2>
-
-<ol>
- <li>Start a new project named <em>HelloGoogleMaps</em>.</li>
-
- <li>Because the Maps library is not a part of the standard Android library, you must
- declare it in the Android Manifest. Open the <code>AndroidManifest.xml</code>
- file and add the following as a child of the <code>&lt;application></code> element:
- <pre>&lt;uses-library android:name="com.google.android.maps" /></pre>
- </li>
-
- <li>You also need access to the Internet in order to retrieve map tiles,
- so you must also request the {@link android.Manifest.permission#INTERNET} permission.
- In the manifest file, add the following as a child of the <code>&lt;manifest></code> element:
- <pre>&lt;uses-permission android:name="android.permission.INTERNET" /></pre>
- </li>
-
- <li>While you're in the manifest, give the map some more space by getting rid of the title bar
-with the "NoTitleBar" theme:
-<pre>
-&lt;activity android:name=".HelloGoogleMaps" android:label="@string/app_name"
- <strong>android:theme="@android:style/Theme.NoTitleBar"</strong>&gt;
-</pre>
- </li>
-
-
- <li>Open the <code>res/layout/main.xml</code> file and add a single
- {@code com.google.android.maps.MapView} as the root node:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;com.google.android.maps.MapView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/mapview"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:clickable="true"
- android:apiKey="<em>Your Maps API Key goes here</em>"
-/>
-</pre>
- <p>The <code>android:clickable</code> attribute defines whether you want to allow
- user-interaction with the map. If this is "false" then touching the map does nothing.</p>
-
- <p>The <code>android:apiKey</code> attribute holds the Maps API Key for your
- application, which proves your application and signer certificate has been registered with the
- Maps service. This is required in order to receive the map data, even while you are
- developing. Registration to the service is free and it only takes a couple
- minutes to register your certificate and get a Maps API Key.</p>
- <p>Go now to get a key. For instructions, read
- <a href="http://code.google.com/android/add-ons/google-apis/mapkey.html">Obtaining a Maps API
- Key</a>. For the purpose of this tutorial, you should <a
- href="http://code.google.com/android/add-ons/google-apis/mapkey.html#getdebugfingerprint">register
- with the SDK debug certificate</a>, which will only be valid while your application is signed
- with the debug key (once you sign with your private key, you will need a new API key).
- When you get your key, insert it for the value of <code>android:apiKey</code>.</p>
- </li>
-
- <li>Now open the <code>HelloGoogleMaps.java</code> file. For this Activity, extend
- {@code MapActivity} (instead of {@code android.app.Activity}):</p>
-
- <pre>public class HelloGoogleMaps extends MapActivity {</pre>
- <p>This is a special sub-class of {@link android.app.Activity}, provided by the Maps
- library, which provides important map capabilities.</p>
-
- <li>Inside every {@code MapActivity}, the <code>isRouteDisplayed()</code> method is required, so
- override this method:
-<pre>
-&#64;Override
-protected boolean isRouteDisplayed() {
- return false;
-}
-</pre>
-<p>This method is required for some accounting from the Maps service to see if you're currently
-displaying any route information. In this case, you're not, so return false.</p>
-</li>
-
-<li>Now add the standard {@link android.app.Activity#onCreate(Bundle) onCreate()} callback method
-to the class:
-<pre>
-&#64;Override
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-}
-</pre>
-<p>This loads the layout file created above. In fact, this is now a workable application that will
-display map tiles and allow the user to pan around the map. But there's no ability to zoom.
-Fortunately, there's a very simple zoom feature built into the {@code MapView} class, which you can
-summon with {@code setBuiltInZoomControls(boolean)}. Do this at the end of the {@link
-android.app.Activity#onCreate(Bundle) onCreate()} method:</p>
-<pre>
- MapView mapView = (MapView) findViewById(R.id.mapview);
- mapView.setBuiltInZoomControls(true);
-</pre>
-</li>
-<li>That's all there is to it. Run the application. (Remember, you must have an <a
-href="{@docRoot}guide/developing/devices/index.html">AVD</a> configured to use the Google APIs
-target, or be using a development device that includes the Maps library.)</li>
-</ol>
-
-<h2>Part 2: Adding Overlay Items</h2>
-
-<p>So, now you have a map, but in many cases you'll also want to create your own map
-markers and lay-overs. That's what you'll do now. In order to do so, you must implement the
-{@code ItemizedOverlay} class, which can manage a whole set of {@code Overlay} (which are the
-individual items placed on the map).</p>
-
-<ol>
- <li>Create a new Java class named <code>HelloItemizedOverlay</code> that implements
- {@code ItemizedOverlay}.
-
- <p>When using Eclipse, right-click the package name in the Eclipse Package Explorer, and
- select <strong>New > Class</strong>. Fill-in
- the Name field as <em>HelloItemizedOverlay</em>. For the Superclass, enter
- "com.google.android.maps.ItemizedOverlay". Click the checkbox for <em>Constructors from
- superclass</em>. Click Finish.</p></li>
-
- <li>First, you need an <code>OverlayItem</code> {@link java.util.ArrayList}, in which you'll put
- each of the <code>OverlayItem</code> objects you want on the map. Add this at the top of the
- <code>HelloItemizedOverlay</code> class:
-
- <pre>private ArrayList&lt;OverlayItem> mOverlays = new ArrayList&lt;OverlayItem>();</pre>
- </li>
-
- <li>Now define the <code>HelloItemizedOverlay</code> constructors. The constructor must
- define the default marker for each of the {@code OverlayItem}s. In order for the {@link
- android.graphics.drawable.Drawable} to actually get drawn, it must have its bounds defined. Most
- commonly, you want the center-point at the bottom of the image to be the point at which it's
- attached to the map coordinates. This is handled for you with the {@code boundCenterBottom()}
- method. Wrap this around our defaultMarker, so the super constructor call looks like this:
-<pre>
-public HelloItemizedOverlay(Drawable defaultMarker) {
- super(boundCenterBottom(defaultMarker));
-}
-</pre>
- </li>
-
- <li>In order to add new {@code OverlayItem}s to the ArrayList, you need a new method:
-<pre>
-public void addOverlay(OverlayItem overlay) {
- mOverlays.add(overlay);
- populate();
-}</pre>
- <p>Each time you add a new {@code OverlayItem} to the ArrayList, you must call
- <code>populate()</code> for the {@code ItemizedOverlay}, which will read each of the
- {@code OverlayItem}s and prepare them to be drawn.</p>
- </li>
-
- <li>When the <code>populate()</code> method executes, it will call <code>createItem(int)</code> in
- the {@code ItemizedOverlay} to retrieve each {@code OverlayItem}. You must override this method to
- properly read from the ArrayList and return the {@code OverlayItem} from the position specified
- by the given integer. Your override method should look like this:
-
-<pre>
-&#64;Override
-protected OverlayItem createItem(int i) {
- return mOverlays.get(i);
-}
-</pre>
- </li>
-
- <li>You must also override the <code>size()</code> method to return the current number of
- items in the ArrayList:
-<pre>
-&#64;Override
-public int size() {
- return mOverlays.size();
-}
-</pre>
- </li>
-
- <li>Now set up the ability to handle touch events on the overlay items. First, you're
- going to need a reference to the application {@link android.content.Context} as a member of
- this class. So add {@code Context mContext} as a class member, then initialize it with a
- new class constructor:
-<pre>
-public HelloItemizedOverlay(Drawable defaultMarker, Context context) {
- super(boundCenterBottom(defaultMarker));
- mContext = context;
-}
-</pre>
- <p>This passes the {@code defaultMarker} up to the default constructor to bound its coordinates
- and then initialize {@code mContext} with the given {@link android.content.Context}.</p>
-
- <p>Then override the {@code onTap(int)} callback method, which will handle the event
- when an item is tapped by the user:</p>
-<pre>
-&#64;Override
-protected boolean onTap(int index) {
- OverlayItem item = mOverlays.get(index);
- AlertDialog.Builder dialog = new AlertDialog.Builder(mContext);
- dialog.setTitle(item.getTitle());
- dialog.setMessage(item.getSnippet());
- dialog.show();
- return true;
-}
-</pre>
- <p>This uses the member {@code android.content.Context} to create a new {@link
-android.app.AlertDialog.Builder} and uses the tapped {@code OverlayItem}'s title and snippet for
-the dialog's title and message text. (You'll see the {@code OverlayItem} title and snippet defined
-when you create it below.)</p>
- </li>
-
-</ol>
-
-<p>You're now done with the <code>HelloItemizedOverlay</code> class and can start using it
-to add items on the map.</p>
-
-<p>Go back to the <code>HelloGoogleMaps</code> class. In the following procedure, you'll create an
-{@code OverlayItem} and add it to an instance of the <code>HelloItemizedOverlay</code> class, then
-add the <code>HelloItemizedOverlay</code> to the <code>MapView</code> using a {@code GeoPoint}
-to define its coordinates on the map.</p>
-
-<img src="images/androidmarker.png" align="right" />
-<ol>
- <li>First, you need the image for the map overlay. If you don't have one handy, use the Android on
- the right. Drag this image (or your own) into the <code>res/drawable/</code> directory of your
- project.</li>
-
- <li>At the end of your existing {@code onCreate()} method, instantiate :
-
-<pre>
-List&lt;Overlay> mapOverlays = mapView.getOverlays();
-Drawable drawable = this.getResources().getDrawable(R.drawable.androidmarker);
-HelloItemizedOverlay itemizedoverlay = new HelloItemizedOverlay(drawable, this);</pre>
-
- <p>All overlay elements on a map are held by the {@code MapView}, so when you want to add some,
- you have to get a list from the <code>getOverlays()</code> method. Then instantiate the {@link
- android.graphics.drawable.Drawable} used for the map marker, which was saved in the {@code
- res/drawable/} directory. The constructor for {@code HelloItemizedOverlay} (your custom {@code
- ItemizedOverlay}) takes the Drawable in order to set the default marker for all overlay
- items.</p>
- </li>
-
- <li>Now create a {@code GeoPoint} that defines the map coordinates for the first overlay item,
- and pass it to a new {@code OverlayItem}:
-<pre>
-GeoPoint point = new GeoPoint(19240000,-99120000);
-OverlayItem overlayitem = new OverlayItem(point, "Hola, Mundo!", "I'm in Mexico City!");
-</pre>
-
- <p>{@code GeoPoint} coordinates are specified in microdegrees (<code>degrees * 1e6</code>). The
- {@code OverlayItem} constructor accepts the {@code GeoPoint} location, a string for the
- item's title, and a string for the item's snippet text, respectively.</p>
- </li>
-
- <li>All that's left is to add this {@code OverlayItem} to your collection in the
- {@code HelloItemizedOverlay} instance, then add the {@code HelloItemizedOverlay} to the MapView:
-<pre>
-itemizedoverlay.addOverlay(overlayitem);
-mapOverlays.add(itemizedoverlay);
-</pre>
- </li>
-
- <li>Now run the application.</li>
-</ol>
-
-<p>You should see the following:</p>
-<img src="images/hello-mapview.png" width="150px" />
-<p>When you tap the overlay item, you'll see the dialog appear.</p>
-
-<p>Because the {@code ItemizedOverlay} class uses an {@code java.util.ArrayList} for all of the
-{@code OverlayItem}s, it's easy to add more. Try adding another one. Before the
-<code>addOverlay()</code> method is called, add these lines:</p>
-<pre>
-GeoPoint point2 = new GeoPoint(35410000, 139460000);
-OverlayItem overlayitem2 = new OverlayItem(point2, "Sekai, konichiwa!", "I'm in Japan!");
-</pre>
-<p>Run the application again. (You probably need to move the map to find the new overlay item.)</p>
-
diff --git a/docs/html/resources/tutorials/views/hello-relativelayout.jd b/docs/html/resources/tutorials/views/hello-relativelayout.jd
deleted file mode 100644
index adc117946d21..000000000000
--- a/docs/html/resources/tutorials/views/hello-relativelayout.jd
+++ /dev/null
@@ -1,89 +0,0 @@
-page.title=Relative Layout
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>{@link android.widget.RelativeLayout} is a {@link android.view.ViewGroup} that displays
-child {@link android.view.View} elements in relative positions. The position of a {@link
-android.view.View} can be specified as relative to sibling elements (such as to the left-of or below
-a given element) or in positions relative to the {@link android.widget.RelativeLayout} area (such as
-aligned to the bottom, left of center).</p>
-
-<p>A {@link android.widget.RelativeLayout} is a very powerful utility for designing a user
-interface because it can eliminate nested {@link android.view.ViewGroup}s. If you find
-yourself using several nested {@link android.widget.LinearLayout} groups, you may be able to
-replace them with a single {@link android.widget.RelativeLayout}.</p>
-
-<ol>
- <li>Start a new project named <em>HelloRelativeLayout</em>.</li>
- <li>Open the <code>res/layout/main.xml</code> file and insert the following:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- &lt;TextView
- android:id="@+id/label"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Type here:"/>
- &lt;EditText
- android:id="@+id/entry"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="@android:drawable/editbox_background"
- android:layout_below="@id/label"/>
- &lt;Button
- android:id="@+id/ok"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/entry"
- android:layout_alignParentRight="true"
- android:layout_marginLeft="10dip"
- android:text="OK" />
- &lt;Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@id/ok"
- android:layout_alignTop="@id/ok"
- android:text="Cancel" />
-&lt;/RelativeLayout>
-</pre>
-<p>Notice each of the <code>android:layout_*</code> attributes, such as <code>layout_below</code>,
-<code>layout_alignParentRight</code>, and <code>layout_toLeftOf</code>. When using a {@link
-android.widget.RelativeLayout}, you can use these attributes to describe
-how you want to position each {@link android.view.View}. Each one of these attributes define a
-different kind
-of relative position. Some attributes use the resource ID of a sibling {@link android.view.View}
-to define its own relative position. For example, the last {@link android.widget.Button} is
-defined to lie to the left-of and aligned-with-the-top-of the {@link android.view.View}
-identified by the ID <code>ok</code> (which is the previous {@link android.widget.Button}).</p>
-<p>All of the available layout attributes are defined in {@link
-android.widget.RelativeLayout.LayoutParams}.</p>
-</li>
-<li>Make sure you load this layout in the
-{@link android.app.Activity#onCreate(Bundle) onCreate()} method:</p>
-<pre>
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-}
-</pre>
-<p>The {@link android.app.Activity#setContentView(int)} method loads the
-layout file for the {@link android.app.Activity}, specified by the resource
-ID &mdash; <code>R.layout.main</code> refers to the <code>res/layout/main.xml</code> layout
-file.</p>
-</li>
-<li>Run the application.</li>
-</ol>
-<p>You should see the following layout:</p>
-<img src="images/hello-relativelayout.png" width="150px" />
-
-<h3>Resources</h3>
-<ul>
- <li>{@link android.widget.RelativeLayout}</li>
- <li>{@link android.widget.RelativeLayout.LayoutParams}</li>
- <li>{@link android.widget.TextView}</li>
- <li>{@link android.widget.EditText}</li>
- <li>{@link android.widget.Button}</li>
-</ul>
diff --git a/docs/html/resources/tutorials/views/hello-spinner.jd b/docs/html/resources/tutorials/views/hello-spinner.jd
deleted file mode 100644
index e9dc20fb7ba8..000000000000
--- a/docs/html/resources/tutorials/views/hello-spinner.jd
+++ /dev/null
@@ -1,149 +0,0 @@
-page.title=Spinner
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>{@link android.widget.Spinner} is a widget similar to a drop-down list for selecting items.</p>
-
-<p>In this tutorial, you'll create
-a simple spinner widget that displays a list of planets. When one is selected, a toast message
-will display the selected item.</p>
-
-<ol>
- <li>Start a new project named <em>HelloSpinner</em>.</li>
- <li>Open the <code>res/layout/main.xml</code> file and insert the following:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:padding="10dip"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
- &lt;TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="10dip"
- android:text="@string/planet_prompt"
- />
- &lt;Spinner
- android:id="@+id/spinner"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:prompt="@string/planet_prompt"
- />
-&lt;/LinearLayout>
-</pre>
- <p>Notice that the {@link android.widget.TextView}'s <code>android:text</code> attribute and the
-{@link android.widget.Spinner}'s <code>android:prompt</code> attribute both reference the same
-string resource. This text behaves as a title for the widget. When applied to the {@link
-android.widget.Spinner}, the title text will appear
-in the selection dialog that appears upon selecting the widget.</p>
-</li>
-
-<li>Create a <code>strings.xml</code> file in <code>res/values/</code> and edit the file to look
-like this:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;resources>
- &lt;string name="planet_prompt">Choose a planet&lt;/string>
- &lt;string-array name="planets_array">
- &lt;item>Mercury&lt;/item>
- &lt;item>Venus&lt;/item>
- &lt;item>Earth&lt;/item>
- &lt;item>Mars&lt;/item>
- &lt;item>Jupiter&lt;/item>
- &lt;item>Saturn&lt;/item>
- &lt;item>Uranus&lt;/item>
- &lt;item>Neptune&lt;/item>
- &lt;/string-array>
-&lt;/resources>
-</pre>
- <p>The {@code &lt;string>} element defines the title string referenced by the {@link
-android.widget.TextView} and {@link android.widget.Spinner} in the layout above. The {@code
-&lt;string-array} element defines the list of strings that will be displayed as the list in
-the {@link android.widget.Spinner} widget.</p>
-</li>
-
-<li>Now open the <code>HelloSpinner.java</code> file and insert the following code for the {@link
-android.app.Activity#onCreate(Bundle) onCreate()} method:
-<pre>
-&#64;Override
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- Spinner spinner = (Spinner) findViewById(R.id.spinner);
- ArrayAdapter&lt;CharSequence> adapter = ArrayAdapter.createFromResource(
- this, R.array.planets_array, android.R.layout.simple_spinner_item);
- adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
- spinner.setAdapter(adapter);
-}
-</pre>
- <p>After the {@code main.xml} layout is set as the content view, the {@link
-android.widget.Spinner} widget is captured from the layout with {@link
-android.app.Activity#findViewById(int)}. The {@link
-android.widget.ArrayAdapter#createFromResource(Context,int,int) createFromResource()} method then
-creates a new {@link android.widget.ArrayAdapter}, which binds each item in the string array
-to the initial appearance for the {@link android.widget.Spinner} (which is how each item will
-appear in the spinner when selected). The {@code
-R.array.planets_array} ID references the {@code string-array} defined above and the
-{@code android.R.layout.simple_spinner_item} ID references a layout for the standard spinner
-appearance, defined by the platform. Then {@link
-android.widget.ArrayAdapter#setDropDownViewResource(int)} is called to define the appearance for
-each item when the widget is opened ({@code simple_spinner_dropdown_item} is
-another standard layout defined by the platform). Finally, the {@link android.widget.ArrayAdapter}
-is set to associate all of its items with the {@link android.widget.Spinner} by calling {@link
-android.widget.AdapterView#setAdapter(T)}.</p>
-</li>
-
-<li>Now create a nested class that implements {@link
-android.widget.AdapterView.OnItemSelectedListener}. This will provide a callback method that will
-notify your application when an item has been selected from the {@link
-android.widget.Spinner}. Here's what this class should look like:
-<pre>
-public class MyOnItemSelectedListener implements OnItemSelectedListener {
-
- public void onItemSelected(AdapterView&lt;?> parent,
- View view, int pos, long id) {
- Toast.makeText(parent.getContext(), "The planet is " +
- parent.getItemAtPosition(pos).toString(), Toast.LENGTH_LONG).show();
- }
-
- public void onNothingSelected(AdapterView<?> parent) {
- // Do nothing.
- }
-}
-</pre>
-<p>The {@link android.widget.AdapterView.OnItemSelectedListener} requires the {@link
-android.widget.AdapterView.OnItemSelectedListener#onItemSelected(AdapterView,View,int,long)
-onItemSelected()} and {@link
-android.widget.AdapterView.OnItemSelectedListener#onNothingSelected(AdapterView)
-onNothingSelected()} callback methods. The former is called when an item from the {@link
-android.widget.AdapterView} is selected, in which case, a short {@link android.widget.Toast}
-message displays the selected text; and the latter is called when a selection disappears from the
-{@link android.widget.AdapterView}, which doesn't happen in this case, so it's ignored.</p>
-</li>
-
-<li>Now the {@code MyOnItemSelectedListener} needs to be applied to the {@link
-android.widget.Spinner}. Go back to the {@link android.app.Activity#onCreate(Bundle) onCreate()}
-method and add the following line to the end:
-<pre>
- spinner.setOnItemSelectedListener(new MyOnItemSelectedListener());
-</pre>
-<p>This creates a new anonymous instance of the {@code MyOnItemSelectedListener} and sets it as the
-listener for the {@link android.widget.Spinner}.</p>
-</li>
-
-<li>Run the application.</li>
-</ol>
-<p>It should look like this:</p>
-<img src="images/hello-spinner.png" width="150px" />
-
-
-<h3>Resources</h3>
-<ul>
- <li>{@link android.R.layout}</li>
- <li>{@link android.widget.ArrayAdapter}</li>
- <li>{@link android.widget.Spinner}</li>
-</ul>
-
diff --git a/docs/html/resources/tutorials/views/hello-timepicker.jd b/docs/html/resources/tutorials/views/hello-timepicker.jd
deleted file mode 100644
index cf16c8ecd32a..000000000000
--- a/docs/html/resources/tutorials/views/hello-timepicker.jd
+++ /dev/null
@@ -1,167 +0,0 @@
-page.title=Time Picker
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>To provide a widget for selecting a time, use the {@link android.widget.TimePicker}
-widget, which allows the user to select the hour and minute in a familiar interface.</p>
-
-<p>In this tutorial, you'll create a {@link android.app.TimePickerDialog}, which presents the
-time picker in a floating dialog box at the press of a button. When the time is set by
-the user, a {@link android.widget.TextView} will update with the new date.</p>
-
-<ol>
- <li>Start a new project named <em>HelloTimePicker</em>.</li>
- <li>Open the <code>res/layout/main.xml</code> file and insert the following:
- <pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- &lt;TextView android:id="@+id/timeDisplay"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text=""/>
- &lt;Button android:id="@+id/pickTime"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Change the time"/>
-&lt;/LinearLayout>
-</pre>
-<p>This is a basic {@link android.widget.LinearLayout} with a {@link android.widget.TextView}
-that will display the time and a {@link android.widget.Button} that will open the {@link
-android.app.TimePickerDialog}.</p>
- </li>
-
- <li>Open <code>HelloTimePicker.java</code> and insert the following class members:
-<pre>
- private TextView mTimeDisplay;
- private Button mPickTime;
-
- private int mHour;
- private int mMinute;
-
- static final int TIME_DIALOG_ID = 0;
-</pre>
-<p>This declares variables for the layout elements and time fields.
-The <code>TIME_DIALOG_ID</code> is a static integer that uniquely identifies the dialog.</p>
- </li>
- <li>Now insert the following code for the {@link android.app.Activity#onCreate(Bundle) onCreate()}
-method:
-<pre>
- &#64;Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- // capture our View elements
- mTimeDisplay = (TextView) findViewById(R.id.timeDisplay);
- mPickTime = (Button) findViewById(R.id.pickTime);
-
- // add a click listener to the button
- mPickTime.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- showDialog(TIME_DIALOG_ID);
- }
- });
-
- // get the current time
- final Calendar c = Calendar.getInstance();
- mHour = c.get(Calendar.HOUR_OF_DAY);
- mMinute = c.get(Calendar.MINUTE);
-
- // display the current date
- updateDisplay();
- }
-</pre>
-
-<p>First, the content is set to the <code>main.xml</code> layout and then the {@link
-android.widget.TextView} and {@link android.widget.Button} are captured with {@link
-android.app.Activity#findViewById(int)}.
-Then an {@link android.view.View.OnClickListener} is created for the {@link android.widget.Button},
-so that when clicked, it will call {@link
-android.app.Activity#showDialog(int)}, passing the unique integer ID for the time picker
-dialog. Using {@link android.app.Activity#showDialog(int)} allows the {@link
-android.app.Activity} to manage the life-cycle of the dialog and will call the {@link
-android.app.Activity#onCreateDialog(int)} callback method to request the {@link android.app.Dialog}
-that should be displayed (which you'll define later). After the on-click listener is set, a new
-{@link java.util.Calendar} is created to get the current hour and minute. Finally, the
-private <code>updateDisplay()</code> method is called in order to fill the {@link
-android.widget.TextView} with the current time.</p>
-</li>
-
-<li>Add the <code>updateDisplay()</code> and <code>pad()</code> methods:
-<pre>
-// updates the time we display in the TextView
-private void updateDisplay() {
- mTimeDisplay.setText(
- new StringBuilder()
- .append(pad(mHour)).append(":")
- .append(pad(mMinute)));
-}
-
-private static String pad(int c) {
- if (c >= 10)
- return String.valueOf(c);
- else
- return "0" + String.valueOf(c);
-}
-</pre>
-<p>The <code>updateDisplay()</code> method uses the member fields for the time and inserts them in
-the <code>mTimeDisplay</code> {@link android.widget.TextView}. The <code>pad()</code> method returns
-the appropriate string representation of the hour or minute&mdash;it will prefix a zero to the
-number if it's a single digit.</p>
-</li>
-
-<li>Add a class member for a {@link android.app.TimePickerDialog.OnTimeSetListener} that will be
-called when the user sets a new time:
-<pre>
-// the callback received when the user "sets" the time in the dialog
-private TimePickerDialog.OnTimeSetListener mTimeSetListener =
- new TimePickerDialog.OnTimeSetListener() {
- public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
- mHour = hourOfDay;
- mMinute = minute;
- updateDisplay();
- }
- };
-</pre>
-<p>When the user is done setting the time (clicks the "Set" button), the
-<code>onTimeSet()</code> method is called and it updates the member fields with
-the new time and updates the layout's {@link android.widget.TextView}.</p>
-</li>
-
-<li>Add the {@link android.app.Activity#onCreateDialog(int)} callback method:
-<pre>
-&#64;Override
-protected Dialog onCreateDialog(int id) {
- switch (id) {
- case TIME_DIALOG_ID:
- return new TimePickerDialog(this,
- mTimeSetListener, mHour, mMinute, false);
- }
- return null;
-}
-</pre>
-<p>This is an {@link android.app.Activity} callback that is passed the identifier you passed to
-{@link android.app.Activity#showDialog(int)}, in the {@link android.widget.Button}'s on-click
-listener. When the ID matches, this initializes the {@link android.app.TimePickerDialog} with the
-member variables initialized at the end of <code>onCreate()</code> and the {@link
-android.app.TimePickerDialog.OnTimeSetListener} created in the previous step.</p>
-</li>
-
-<li>Run the application.</li>
-</ol>
-<p>When you press the "Change the time" button, you should see the following:</p>
-<img src="images/hello-timepicker.png" width="150px" />
-
-<h3>References</h3>
-<ol>
- <li>{@link android.widget.TimePicker}</li>
- <li>{@link android.app.TimePickerDialog.OnTimeSetListener}</li>
- <li>{@link android.widget.Button}</li>
- <li>{@link android.widget.TextView}</li>
- <li>{@link java.util.Calendar}</li>
-</ol>
-
diff --git a/docs/html/resources/tutorials/views/hello-webview.jd b/docs/html/resources/tutorials/views/hello-webview.jd
deleted file mode 100644
index f6a6a7188b26..000000000000
--- a/docs/html/resources/tutorials/views/hello-webview.jd
+++ /dev/null
@@ -1,131 +0,0 @@
-page.title=Web View
-parent.title=Hello, Views
-parent.link=index.html
-@jd:body
-
-<p>{@link android.webkit.WebView} allows you to create your own window for viewing web pages (or even
-develop a complete browser). In this tutorial, you'll create a simple {@link android.app.Activity}
-that can view and navigate web pages.</p>
-
-<ol>
- <li>Create a new project named <em>HelloWebView</em>.</li>
- <li>Open the <code>res/layout/main.xml</code> file and insert the following:
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;WebView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/webview"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
-/>
-</pre>
- </li>
-
- <li>Now open the <code>HelloWebView.java</code> file.
- At the top of the class, declare a {@link android.webkit.WebView} object:
-<pre>WebView mWebView;</pre>
- <p>Then use the following code for the {@link android.app.Activity#onCreate(Bundle) onCreate()}
- method:</p>
-<pre>
-public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- mWebView = (WebView) findViewById(R.id.webview);
- mWebView.getSettings().setJavaScriptEnabled(true);
- mWebView.loadUrl("http://www.google.com");
-}
-</pre>
- <p>This initializes the member {@link android.webkit.WebView} with the one from the
- {@link android.app.Activity} layout; requests a {@link android.webkit.WebSettings} object with
- {@link android.webkit.WebView#getSettings()}; and enables JavaScript for the {@link
- android.webkit.WebView} with {@link android.webkit.WebSettings#setJavaScriptEnabled(boolean)}.
- Finally, an initial web page is loaded with {@link
- android.webkit.WebView#loadUrl(String)}.</p>
- </li>
-
- <li>Because this application needs access to the Internet, you need to add the appropriate
- permissions to the Android manifest file. Open the <code>AndroidManifest.xml</code> file
- and add the following as a child of the <code>&lt;manifest></code> element:
-
- <pre>&lt;uses-permission android:name="android.permission.INTERNET" /></pre></li>
-
- <li>While you're in the manifest, give some more space for web pages by removing the title
- bar, with the "NoTitleBar" theme:
-<pre>
-&lt;activity android:name=".HelloWebView" android:label="@string/app_name"
- <strong>android:theme="@android:style/Theme.NoTitleBar"</strong>&gt;
-</pre>
- </li>
-
- <li>Now run the application.
- <p>You now have a simplest web page viewer.
- It's not quite a browser yet because as soon as you click a link, the default Android Browser
- handles the Intent to view a web page, because this {@link android.app.Activity} isn't
- technically enabled to do so. Instead of adding an intent filter to view web pages, you can
- override the {@link android.webkit.WebViewClient} class and enable this {@link
- android.app.Activity} to handle its own URL requests.</p>
- </li>
-
- <li>In the <code>HelloAndroid</code> Activity, add this nested class:
-<pre>
-private class HelloWebViewClient extends WebViewClient {
- &#64;Override
- public boolean shouldOverrideUrlLoading(WebView view, String url) {
- view.loadUrl(url);
- return true;
- }
-}
-</pre>
- </li>
- <li>Then towards the end of the {@link android.app.Activity#onCreate(Bundle)} method, set an
- instance of the <code>HelloWebViewClient</code> as the {@link android.webkit.WebViewClient}:
- <pre>mWebView.setWebViewClient(new HelloWebViewClient());</pre>
-
- <p>This line can go anywhere following the initialization of the {@link
- android.webkit.WebView} object.</p>
- <p>This creates a {@link android.webkit.WebViewClient} that will load any URL selected from this
- {@link android.webkit.WebView} into the same {@link android.webkit.WebView}. The
- {@link android.webkit.WebViewClient#shouldOverrideUrlLoading(WebView,String)} method is passed
-the current {@link android.webkit.WebView} and the URL requested, so all it needs to do is load
-the URL in the given view. Returning <code>true</code> says that the method has handled the URL
-and the event should not propagate (in which case, an Intent would be created that's handled by
-the Browser application).</p>
- <p>If you run the application again, new pages will now load in this Activity.
- However, you can't navigate back to previous pages. To do this, you need to handle the BACK
- button on the device, so that it will return to the previous page, rather than exit the
- application.</p>
- </li>
-
- <li>To handle the BACK button key press, add the following method inside the
- <code>HelloWebView</code> Activity:
-<pre>
-&#64;Override
-public boolean onKeyDown(int keyCode, KeyEvent event) {
- if ((keyCode == KeyEvent.KEYCODE_BACK) &amp;&amp; mWebView.canGoBack()) {
- mWebView.goBack();
- return true;
- }
- return super.onKeyDown(keyCode, event);
-}
-</pre>
- <p>This {@link android.app.Activity#onKeyDown(int,KeyEvent)} callback method will be called
- anytime a button is pressed while in the Activity. The condition inside uses the {@link
- android.view.KeyEvent} to check whether the key pressed is the BACK button and whether the
- {@link android.webkit.WebView} is actually capable of navigating back (if it has a history). If
- both are true, then the {@link android.webkit.WebView#goBack()} method is called,
- which will navigate back one step in the {@link android.webkit.WebView}
- history.Returning <code>true</code> indicates that the event has been handled. If this condition
- is not met, then the event is sent back to the system.</p>
-</li>
-<li>Run the application again. You'll now be able to follow links and navigate back through the
-page history.</li>
-</ol>
-<p>When you open the application, it should look like this:</p>
-<img src="images/hello-webview.png" width="150px" />
-
-<h3>Resource</h3>
-<ul>
-<li>{@link android.webkit.WebView}</li>
-<li>{@link android.webkit.WebViewClient}</li>
-<li>{@link android.view.KeyEvent}</li>
-</ul>
diff --git a/docs/html/resources/tutorials/views/images/android.png b/docs/html/resources/tutorials/views/images/android.png
deleted file mode 100755
index 39a1ac729394..000000000000
--- a/docs/html/resources/tutorials/views/images/android.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/androidmarker.png b/docs/html/resources/tutorials/views/images/androidmarker.png
deleted file mode 100755
index 8c43d4668218..000000000000
--- a/docs/html/resources/tutorials/views/images/androidmarker.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/hello-autocomplete.png b/docs/html/resources/tutorials/views/images/hello-autocomplete.png
deleted file mode 100644
index 0b3e6803bb1f..000000000000
--- a/docs/html/resources/tutorials/views/images/hello-autocomplete.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/hello-datepicker.png b/docs/html/resources/tutorials/views/images/hello-datepicker.png
deleted file mode 100755
index 2075066bfdc1..000000000000
--- a/docs/html/resources/tutorials/views/images/hello-datepicker.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/hello-formstuff.png b/docs/html/resources/tutorials/views/images/hello-formstuff.png
deleted file mode 100644
index 949319f7c2d4..000000000000
--- a/docs/html/resources/tutorials/views/images/hello-formstuff.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/hello-gallery.png b/docs/html/resources/tutorials/views/images/hello-gallery.png
deleted file mode 100755
index 22d1eaf6d145..000000000000
--- a/docs/html/resources/tutorials/views/images/hello-gallery.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/hello-gridview.png b/docs/html/resources/tutorials/views/images/hello-gridview.png
deleted file mode 100755
index 2def0df666a4..000000000000
--- a/docs/html/resources/tutorials/views/images/hello-gridview.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/hello-linearlayout.png b/docs/html/resources/tutorials/views/images/hello-linearlayout.png
deleted file mode 100755
index dfef819ef9d1..000000000000
--- a/docs/html/resources/tutorials/views/images/hello-linearlayout.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/hello-relativelayout.png b/docs/html/resources/tutorials/views/images/hello-relativelayout.png
deleted file mode 100755
index ec4d9d44b0c6..000000000000
--- a/docs/html/resources/tutorials/views/images/hello-relativelayout.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/hello-spinner.png b/docs/html/resources/tutorials/views/images/hello-spinner.png
deleted file mode 100755
index 42e2a915cb47..000000000000
--- a/docs/html/resources/tutorials/views/images/hello-spinner.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/hello-tablelayout.png b/docs/html/resources/tutorials/views/images/hello-tablelayout.png
deleted file mode 100755
index 3d80e7f8a55a..000000000000
--- a/docs/html/resources/tutorials/views/images/hello-tablelayout.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/tutorials/views/images/hello-timepicker.png b/docs/html/resources/tutorials/views/images/hello-timepicker.png
deleted file mode 100755
index bd5a1eeadaae..000000000000
--- a/docs/html/resources/tutorials/views/images/hello-timepicker.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/resources/tutorials/views/index.jd b/docs/html/resources/tutorials/views/index.jd
deleted file mode 100644
index bba833070958..000000000000
--- a/docs/html/resources/tutorials/views/index.jd
+++ /dev/null
@@ -1,121 +0,0 @@
-page.title=Hello, Views
-parent.title=Tutorials
-parent.link=../../browser.html?tag=tutorial
-@jd:body
-
-<style>
-.view {float:left; margin:10px; font-size:120%; font-weight:bold;}
-#jd-content .view img {border:1px solid black; margin:8px 0 0 0; padding:5px;}
-</style>
-
-<p>This is a collection of "Hello World"-style tutorials designed
-to get you started quickly with common Android layouts and widgets.</p>
-
-<p>A certain amount of knowledge is assumed for these tutorials. Before you start,
-you should have completed the <a href="{@docRoot}resources/tutorials/hello-world.html">Hello,
-World</a> tutorial&mdash;it will teach you several things about basic
-Android development. More specifically, you should know:</p>
-<ul>
- <li>How to create an Android project and run it</li>
- <li>The basic structure of an Android project (resource files, layout files, etc.)</li>
- <li>The basic components of an {@link android.app.Activity}</li>
-</ul>
-
-<p class="note"><strong>Note:</strong> In order to make these tutorials as simple as possible,
-some code may not conform to best practices for coding Android applications. In particular,
-hard-coded strings are used in places, when the better practice is to reference strings from a
-<code>res/values/strings.xml</code> resource file.</p>
-
-<p class="note"><strong>Tip:</strong> After you have pasted sample code into an Eclipse project,
-press <strong>Ctrl (or Cmd) + Shift + O</strong> to import the required packages.</p>
-
-<h2>Layouts</h2>
-
-<div class="view">
-<a href="hello-linearlayout.html">Linear Layout</a><br/>
-<a href="hello-linearlayout.html"><img src="images/hello-linearlayout.png" height="285" width="200"
-/></a>
-</div>
-
-<div class="view">
-<a href="hello-relativelayout.html">Relative Layout</a><br/>
-<a href="hello-relativelayout.html"><img src="images/hello-relativelayout.png" height="285"
-width="200" /></a>
-</div>
-
-<div class="view">
-<a href="hello-tablelayout.html">Table Layout</a><br/>
-<a href="hello-tablelayout.html"><img src="images/hello-tablelayout.png" height="285" width="200"
-/></a>
-</div>
-
-<div class="view">
-<a href="hello-gridview.html">Grid View</a><br/>
-<a href="hello-gridview.html"><img src="images/hello-gridview.png" height="285" width="200" /></a>
-</div>
-
-<div class="view">
-<a href="hello-tabwidget.html">Tab Layout</a><br/>
-<a href="hello-tabwidget.html"><img src="images/hello-tabwidget.png" height="285" width="200" /></a>
-</div>
-
-<div class="view">
-<a href="hello-listview.html">List View</a><br/>
-<a href="hello-listview.html"><img src="images/hello-listview.png" height="285" width="200" /></a>
-</div>
-
-<p style="clear:left">&nbsp;</p>
-
-<h2>Widgets &amp; Other Views</h2>
-
-<div class="view">
-<a href="hello-datepicker.html">Date Picker</a><br/>
-<a href="hello-datepicker.html"><img src="images/hello-datepicker.png" height="285" width="200"
-/></a>
-</div>
-
-<div class="view">
-<a href="hello-timepicker.html">Time Picker</a><br/>
-<a href="hello-timepicker.html"><img src="images/hello-timepicker.png" height="285" width="200"
-/></a>
-</div>
-
-<div class="view">
-<a href="hello-formstuff.html">Form Stuff</a><br/>
-<a href="hello-formstuff.html"><img src="images/hello-formstuff.png" height="285" width="200" /></a>
-</div>
-
-<div class="view">
-<a href="hello-spinner.html">Spinner</a><br/>
-<a href="hello-spinner.html"><img src="images/hello-spinner.png" height="285" width="200" /></a>
-</div>
-
-<div class="view">
-<a href="hello-autocomplete.html">Auto Complete</a><br/>
-<a href="hello-autocomplete.html"><img src="images/hello-autocomplete.png" height="285" width="200"
-/></a>
-</div>
-
-<div class="view">
-<a href="hello-gallery.html">Gallery</a><br/>
-<a href="hello-gallery.html"><img src="images/hello-gallery.png" height="285" width="200" /></a>
-</div>
-
-<div class="view">
-<a href="hello-mapview.html">Google Map View</a><br/>
-<a href="hello-mapview.html"><img src="images/hello-mapview.png" height="285" width="200" /></a>
-</div>
-
-<div class="view">
-<a href="hello-webview.html">Web View</a><br/>
-<a href="hello-webview.html"><img src="images/hello-webview.png" height="285" width="200" /></a>
-</div>
-
-
-<p class="note" style="clear:left">
-There are plenty more layouts and widgets available. See the {@link android.view.View} class
-for more on View layouts, and the {@link android.widget widget package}
-for more useful widgets. And for more raw code samples, visit the
-<a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/index.html">Api
-Demos</a>.</p>
-
diff --git a/docs/html/sdk/OLD_RELEASENOTES.jd b/docs/html/sdk/OLD_RELEASENOTES.jd
index 77516818c047..6865db235c0b 100644
--- a/docs/html/sdk/OLD_RELEASENOTES.jd
+++ b/docs/html/sdk/OLD_RELEASENOTES.jd
@@ -173,9 +173,9 @@ specify which port the emulator should bind to for the console. &lt;port&gt; mus
<p>The SDK includes several new development tools, such as</p>
<ul>
- <li><a href="{@docRoot}guide/developing/tools/hierarchy-viewer.html">HierarchyViewer</a> is a visual tool for inspecting and debugging your user interfaces and layout. </li>
- <li><a href="{@docRoot}guide/developing/tools/draw9patch.html">Draw 9-patch</a> allows you to easily create a NinePatch graphic using a WYSIWYG editor. </li>
- <li>The <a href="{@docRoot}guide/developing/tools/monkey.html">UI/Application Exerciser Monkey</a> generates pseudo-random system and user events, for testing your application. </li>
+ <li><a href="{@docRoot}tools/help/hierarchy-viewer.html">HierarchyViewer</a> is a visual tool for inspecting and debugging your user interfaces and layout. </li>
+ <li><a href="{@docRoot}tools/help/draw9patch.html">Draw 9-patch</a> allows you to easily create a NinePatch graphic using a WYSIWYG editor. </li>
+ <li>The <a href="{@docRoot}tools/help/monkey.html">UI/Application Exerciser Monkey</a> generates pseudo-random system and user events, for testing your application. </li>
</ul>
<p>
<b>Application Signing</b>
@@ -326,7 +326,7 @@ specify which port the emulator should bind to for the console. &lt;port&gt; mus
<h4>traceview</h4>
<ul>
- <li>The <a href="{@docRoot}guide/developing/tools/traceview.html">traceview</a> tool is now included in the SDK.</li>
+ <li>The <a href="{@docRoot}tools/help/traceview.html">traceview</a> tool is now included in the SDK.</li>
</ul>
<h3>Resolved Issues</h3>
@@ -387,13 +387,13 @@ specify which port the emulator should bind to for the console. &lt;port&gt; mus
<ul>
<li>Now provides support for emulating inbound SMS messages. The ADT plugin and DDMS provide integrated access to
this capability. For more information about how to emulate inbound SMS from the console,
-see <a href="{@docRoot}guide/developing/tools/emulator.html#sms">SMS Emulation</a>. </li>
+see <a href="{@docRoot}tools/help/emulator.html#sms">SMS Emulation</a>. </li>
</ul>
<h4>Emulator</h4>
<ul><li>The default emulator skin has been changed to HVGA-P from QVGA-L. For information
about emulator skins and how to load a specific skin when starting the emulator, see
-<a href="{@docRoot}guide/developing/tools/emulator.html#skins">Using Emulator Skins</a>.</li>
+<a href="{@docRoot}tools/help/emulator.html#skins">Using Emulator Skins</a>.</li>
</ul>
<h3>Resolved Issues</h3>
diff --git a/docs/html/sdk/RELEASENOTES.jd b/docs/html/sdk/RELEASENOTES.jd
index 91eb57f48582..c7ece4230b1b 100644
--- a/docs/html/sdk/RELEASENOTES.jd
+++ b/docs/html/sdk/RELEASENOTES.jd
@@ -37,15 +37,15 @@ now available from the "SDK" tab, under "Downloadable SDK Components."</p>
<ul>
<li>Notes for the Android 2.0.1 platform are in the <a
-href="{@docRoot}sdk/android-2.0.1.html">Android 2.0.1, Release 1</a> document. </li>
+href="{@docRoot}about/versions/android-2.0.1.html">Android 2.0.1, Release 1</a> document. </li>
<li>You can find information about tools changes in the <a
-href="{@docRoot}sdk/tools-notes.html#notes">SDK Tools</a> and <a
-href="{@docRoot}sdk/eclipse-adt.html#notes">ADT Plugin for Eclipse</a>.</li>
+href="{@docRoot}tools/sdk/tools-notes.html#notes">SDK Tools</a> and <a
+href="{@docRoot}tools/sdk/eclipse-adt.html#notes">ADT Plugin for Eclipse</a>.</li>
</ul>
<p>To get started with the SDK, review the Quick Start summary on the <a
href="{@docRoot}sdk/index.html">Android SDK download page</a> or read <a
-href="{@docRoot}sdk/installing.html">Installing the SDK</a> for detailed
+href="{@docRoot}sdk/installing/index.html">Installing the SDK</a> for detailed
installation instructions. </p>
@@ -64,7 +64,7 @@ changes include: </p>
skins. </li>
<li>Android SDK and AVD Manager, a graphical UI to let you manage your
SDK and AVD environments more easily. The tool lets you create and manage
-your <a href="{@docRoot}guide/developing/devices/managing-avds.html">Android Virtual
+your <a href="{@docRoot}tools/devices/managing-avds.html">Android Virtual
Devices</a> and download new SDK packages (such as platform versions and
add-ons) into your environment.</li>
<li>Improved support for test packages in New Project Wizard</li>
@@ -72,7 +72,7 @@ add-ons) into your environment.</li>
capability that lets you display only the parts of the API that are actually
available to your application, based on the <code>android:minSdkVersion</code>
value the application declares in its manifest. For more information, see
-<a href="{@docRoot}guide/appendix/api-levels.html">Android API Levels</a></li>
+<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">Android API Levels</a></li>
</ul>
<p>For details about the Android platforms included in the SDK &mdash; including
@@ -109,7 +109,7 @@ Plugin (0.9.3 or higher). </p>
<p>The new version of ADT is downloadable from the usual remote update site or
is separately downloadable as a .zip archive. For instructions on how to
download the plugin, please see <a
-href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a>. </p>
+href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin for Eclipse</a>. </p>
<h3>Android SDK and AVD Manager</h3>
@@ -222,7 +222,7 @@ skins, including: </p>
density for each skin, to create any combination of resolution/density (WVGA
with medium density, for instance). To do so, use the <code>android</code> tool
command line to create a new AVD that uses a custom hardware configuration. See
-<a href="{@docRoot}guide/developing/devices/managing-avds.html#createavd">Creating an
+<a href="{@docRoot}tools/devices/managing-avds.html#createavd">Creating an
AVD</a> for more information.</p>
<h3>Other Notes and Resolved Issues</h3>
@@ -330,7 +330,7 @@ changes include: </p>
Android 1.5). The tools are updated to let you deploy your application
on any platform in the SDK, which helps you ensure forward-compatibility and,
if applicable, backward-compatibility.</li>
- <li>Introduces <a href="{@docRoot}guide/developing/devices/managing-avds.html">Android
+ <li>Introduces <a href="{@docRoot}tools/devices/managing-avds.html">Android
Virtual Devices</a> &mdash; (AVD) configurations of options that you
run in the emulator to better model actual devices. Each AVD gets its
own dedicated storage area, making it much easier to work with multiple emulators
@@ -352,7 +352,7 @@ Android project.</li>
<p>For details about the Android platforms included in the SDK &mdash; including
bug fixes, features, and API changes &mdash; please read the <a
-href="{@docRoot}sdk/android-1.5.html">Android 1.5 version notes</a>.</p>
+href="{@docRoot}about/versions/android-1.5.html">Android 1.5 version notes</a>.</p>
<h3>Installation and Upgrade Notes</h3>
@@ -407,7 +407,7 @@ that can run in the emulator.
available to use.</p>
<p>For more information about AVDs, see <a
-href="{@docRoot}guide/developing/devices/index.html">Creating and Managing Virtual Devices</a>
+href="{@docRoot}tools/devices/index.html">Creating and Managing Virtual Devices</a>
<h3>Other Notes</h3>
@@ -491,7 +491,7 @@ as well as a few minor API changes from the 1.0 version. </p>
<p>For details about the Android 1.1 system image included in the SDK &mdash;
including bug fixes, features, and API changes &mdash; please read the <a
-href="{@docRoot}sdk/android-1.1.html">Android 1.1 version notes</a>.</p>
+href="{@docRoot}about/versions/android-1.1.html">Android 1.1 version notes</a>.</p>
<h3>App Versioning for Android 1.1</h3>
@@ -545,7 +545,7 @@ testing.</p>
Plugin for Eclipse is <strong>0.8.0</strong>. If you are using a
previous version of ADT, you should update to the latest version for use
with this SDK. For information about how to update your ADT plugin, see
-<a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a>.</p>
+<a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin for Eclipse</a>.</p>
<h3>Installation and Upgrade Notes</h3>
@@ -585,7 +585,7 @@ these USB drivers that you can install, to let you develop on the device:</p>
<p>The USB driver files are located in the
<code>&lt;SDK&gt;/usb_driver</code> directory. For details and
installation instructions, see <a
-href="{@docRoot}guide/developing/device.html#setting-up">Connecting Hardware Devices</a>.</p>
+href="{@docRoot}tools/device.html#setting-up">Connecting Hardware Devices</a>.</p>
</p>
<h3>Resolved Issues, Changes</h3>
@@ -650,7 +650,7 @@ added.</p>
Development Tools (ADT) Plugin for Eclipse is <strong>0.8.0</strong>. If you are
using a previous version of ADT, you should update to the latest version for use
with this SDK. For information about how to update your ADT plugin, see <a
-href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a>.</p>
+href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin for Eclipse</a>.</p>
<h3>Other Notes</h3>
diff --git a/docs/html/sdk/adding-components.jd b/docs/html/sdk/adding-components.jd
deleted file mode 100644
index 599b2a831f62..000000000000
--- a/docs/html/sdk/adding-components.jd
+++ /dev/null
@@ -1,209 +0,0 @@
-page.title=Adding SDK Packages
-@jd:body
-
-
-<div id="qv-wrapper">
-<div id="qv">
-<h2>Quickview</h2>
-<ul>
- <li>Use the Android SDK Manager to
- set up your SDK and keep it up-to-date.</li>
-</ul>
-
-<h2>In this document</h2>
-<ol>
- <li><a href="#launching">Launching the Android SDK Manager</a>
- <li><a href="#InstallingComponents">Installing SDK Packages</a>
- <li><a href="#UpdatingComponents">Updating SDK Packages</a>
- <li><a href="#dependencies">Package Dependencies</a></li>
- <li><a href="#AddingSites">Adding New Sites</a></li>
- <li><a href="#troubleshooting">Troubleshooting</a></li>
-</ol>
-</div>
-</div>
-
-<p>Adding and updating packages in your Android SDK is fast and easy. To add or
-update the individual SDK packages that you need, use the <em>Android SDK
-Manager</em> (included in the SDK Tools).</p>
-
-<p>It only takes a couple of clicks to install individual versions of the
-Android platform, new development tools, new documentation, and SDK add-ons. The
-new SDK packages are automatically installed into your existing SDK directory,
-so you don't need to update your development environment to specify a new SDK
-location.</p>
-
-<p>If you're setting up your Android SDK for the first time,
-see <a href="{@docRoot}sdk/installing.html#components">Installing the SDK</a> for information about
-what packages to install.</p>
-
-<p class="note"><strong>Note:</strong> If you develop in Eclipse, you might also need
-to update your ADT plugin when you update your development tools. See the revisions listed in the
-<a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a> document.</p>
-
-<img src="{@docRoot}images/sdk_manager_packages.png" alt="" />
-<p class="img-caption"><strong>Figure 1.</strong> The Android SDK Manager's
-<strong>Available Packages</strong> panel, which shows the SDK packages that are
-available for you to download into your environment. </p>
-</div>
-
-<h2 id="launching">Launching the Android SDK Manager</h2>
-
-<p>The Android SDK Manager is the tool that you use to install and
-upgrade SDK packages in your development environment. </p>
-
-<p>You can launch the Android SDK Manager in one of the following ways.</p>
-
-<h4>Launching from Eclipse/ADT</h4>
-
-<p>If you are developing in Eclipse and have already installed the ADT Plugin,
-follow these steps to access the Android SDK Manager tool:</p>
-
-<ol>
-<li>Open Eclipse</li>
-<li>Select <strong>Window</strong> &gt; <strong>Android SDK
-Manager</strong>.</li>
-</ol>
-
-<h4>Launching from the SDK Manager script (Windows only)</h4>
-
-<p>For Windows only, the SDK includes a script that invokes the Android SDK Manager. To launch the
-tool using the script, double-click {@code SDK
-Manager.exe} at the root of the the SDK directory.</p>
-
-<h4>Launching from a command line</h4>
-
-<p>In all development environments, follow these steps to access the Android SDK Manager tool from
-the command line: </p>
-
-<ol>
-<li>Navigate to the <code>&lt;<em>sdk</em>&gt;/tools/</code> directory.</li>
-<li>Execute the {@code android} tool command with no options.
- <pre style="width:400px">$ android</pre></li>
-</ol>
-
-
-<h2 id="InstallingComponents">Installing SDK Packages</h2>
-
-<p class="caution"><strong>Caution:</strong> Before you install SDK packages,
-we recommend that you disable any antivirus software that may be running on
-your computer. There are cases in which antivirus software on Windows is known to interfere with the
-installation process, so we suggest you disable your antivirus until installation is
-complete.</p>
-
-<p>Follow these steps to install new SDK packages in your environment:</p>
-
-<ol>
- <li>Launch the Android SDK Manager as described in the section above.</li>
- <li>Select <strong>Available Packages</strong> in the left panel.
- This will reveal all of the packages that are currently available for download
- from the SDK repository.</li>
- <li>Select the package(s) you'd like to install and click <strong>Install
- Selected</strong>. (If you aren't sure which packages to select, read <a
- href="installing.html#which">Recommended Packages</a>.)</li>
- <li>Verify and accept the packages you want (ensure each one is selected with a green
-checkmark) and click <strong>Install</strong>. The packages will now be installed into
-your existing Android SDK directories.</li>
-</ol>
-
-<p>New platforms are automatically saved into the
-<code>&lt;sdk&gt;/platforms/</code> directory of your SDK;
-new add-ons are saved in the <code>&lt;sdk&gt;/add-ons/</code>
-directory; samples are saved in the
-<code>&lt;sdk&gt;/samples/android-&lt;level&gt;/</code>;
-and new documentation is saved in the existing
-<code>&lt;sdk&gt;/docs/</code> directory (old docs are replaced).</p>
-
-
-<h2 id="UpdatingComponents">Updating SDK Packages</h2>
-
-<p>From time to time, new revisions of existing SDK packages are released and
-made available to you through the SDK repository. In most cases, if you have those
-packages installed in your environment, you will want
-to download the new revisions as soon as possible. </p>
-
-<p>You can learn about the release of new revisions in two ways: </p>
-
-<ul>
-<li>You can watch for updates listed in the "SDK" tab of the Android Developers
-site, in the "Downloadable SDK Packages" section. </li>
-<li>You can watch for updates listed in the <strong>Available Packages</strong>
-panel of the Android SDK Manager. </li>
-</ul>
-
-<p>When you see that a new revision is available, you can use the Android SDK Manager to quickly
-download it to your environment. Follow the same
-procedure as given in <a href="#InstallingComponents">Installing SDK Packages</a>, above. The new
-package is installed in place of the old, but without impacting your
-applications. </p>
-
-<p class="note"><strong>Tip:</strong>
-Use the "Display updates only" checkbox to show only the packages
-you do not have.</p>
-
-
-<h2 id="dependencies">SDK Package Dependencies</h2>
-
-<p>In some cases, an SDK package may require a specific minimum revision of
-another package or SDK tool. Where such dependencies exist, they are
-documented in the revision notes for each package, available from the links in
-the "Downloadable SDK packages" section at left.</p>
-
-<p>For example, there may be a dependency between the ADT Plugin for Eclipse and
-the SDK Tools package. When you install the SDK Tools
-package, you should also upgrade to the required version of ADT (if you
-are developing in Eclipse). In this case, the major version number for your ADT plugin should
-always match the revision number of your SDK Tools (for example, ADT 8.x requires SDK Tools r8).
-</p>
-
-<p>Also make sure that, each time you install a new version of the Android platform, you have
-the latest version of the SDK Platform-tools package. The SDK Platform-tools contain
-tools that are backward compatible with all versions of the Android platform and are
-often updated to support new features in the latest version of the Android platform.</p>
-
-<p>The development tools will notify you with debug warnings if there is dependency that you need to
-address. The Android SDK Manager also enforces dependencies by requiring that you download any
-packages that are needed by those you have selected.</p>
-
-
-<h2 id="AddingSites">Adding New Sites</h2>
-
-<p>By default, <strong>Available Packages</strong> displays packages available from the
-<em>Android Repository</em> and <em>Third party Add-ons</em>. You can add other sites that host
-their own Android SDK add-ons, then download the SDK add-ons
-from those sites.</p>
-
-<p>For example, a mobile carrier or device manufacturer might offer additional
-API libraries that are supported by their own Android-powered devices. In order
-to develop using their libraries, you must install their Android SDK add-on, if it's not already
-available under <em>Third party Add-ons</em>. </p>
-
-<p>If a carrier or device manufacturer has hosted an SDK add-on repository file
-on their web site, follow these steps to add their site to the Android SDK
-Manager:</p>
-
-<ol>
- <li>Select <strong>Available Packages</strong> in the left panel.</li>
- <li>Click <strong>Add Add-on Site</strong> and enter the URL of the
-{@code repository.xml} file. Click <strong>OK</strong>.</li>
-</ol>
-<p>Any SDK packages available from the site will now be listed under a new item named
-<strong>User Add-ons</strong>.</p>
-
-
-<h2 id="troubleshooting">Troubleshooting</h2>
-
-<p><strong>Problems connecting to the SDK repository</strong></p>
-
-<p>If you are using the Android SDK Manager to download packages and are encountering
-connection problems, try connecting over http, rather than https. To switch the
-protocol used by the Android SDK Manager, follow these steps: </p>
-
-<ol>
- <li>With the Android SDK Manager window open, select "Settings" in the
- left pane. </li>
- <li>On the right, in the "Misc" section, check the checkbox labeled "Force
- https://... sources to be fetched using http://..." </li>
- <li>Click <strong>Save &amp; Apply</strong>.</li>
-</ol>
-
-
diff --git a/docs/html/sdk/android-2.3.4.jd b/docs/html/sdk/android-2.3.4.jd
deleted file mode 100644
index 4bfdabdb6a4a..000000000000
--- a/docs/html/sdk/android-2.3.4.jd
+++ /dev/null
@@ -1,381 +0,0 @@
-page.title=Android 2.3.4 Platform
-sdk.platform.version=2.3.4
-sdk.platform.apiLevel=10
-
-
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-
-<h2>In this document</h2>
-<ol>
- <li><a href="#relnotes">Revisions</a></li>
- <li><a href="#api">API Overview</a></li>
- <li><a href="#openaccessory">Open Accessory Library</a></li>
- <li><a href="#api-level">API Level</a></li>
- <li><a href="#apps">Built-in Applications</a></li>
- <li><a href="#locs">Locales</a></li>
- <li><a href="#skins">Emulator Skins</a></li>
-</ol>
-
-<h2>Reference</h2>
-<ol>
-<li><a
-href="{@docRoot}sdk/api_diff/{@sdkPlatformApiLevel}/changes.html">API
-Differences Report &raquo;</a> </li>
-</ol>
-
-<h2>See Also</h2>
-<ol>
- <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
-</ol>
-
-</div>
-</div>
-
-<p>
-<em>API Level:</em>&nbsp;<strong>{@sdkPlatformApiLevel}</strong></p>
-
-<p>Android 2.3.4 is a maintenance release that adds several bug fixes and patches
-to the Android 2.3 platform, without any API changes from Android 2.3.3. Additionally,
-Android 2.3.4 brings support for the Open Accessory API to mobile devices,
-through the optional <a href="#usb">Open Accessory Library</a>. </p>
-
-<p>For developers, the Android {@sdkPlatformVersion} platform and the Open
-Accessory Library are available together in the latest version of the Google
-APIs Add-On, a downloadable component for the Android SDK.</p>
-
-<p>To get started developing or testing against Android {@sdkPlatformVersion},
-use the Android SDK Manager to download the latest version of the Google APIs
-Add-On into your SDK. For more information, see <a
-href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>. If you
-are new to Android, <a href="{@docRoot}sdk/index.html">download the SDK Starter
-Package</a> first.</p>
-
-<p>For a high-level introduction to Android 2.3, see the <a
-href="{@docRoot}sdk/android-2.3-highlights.html">Platform Highlights</a>.</p>
-
-
-<h2 id="relnotes">Revisions</h2>
-
-<p>The sections below provide notes about successive releases of
-the Android {@sdkPlatformVersion} platform component for the Android SDK, as denoted by
-revision number. To determine what revision(s) of the Android
-{@sdkPlatformVersion} platforms are installed in your SDK environment, refer to
-the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
-
-<script type="text/javascript">
-function toggleDiv(link) {
- var toggleable = $(link).parent();
- if (toggleable.hasClass("closed")) {
- //$(".toggleme", toggleable).slideDown("fast");
- toggleable.removeClass("closed");
- toggleable.addClass("open");
- $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/triangle-opened.png"));
- } else {
- //$(".toggleme", toggleable).slideUp("fast");
- toggleable.removeClass("open");
- toggleable.addClass("closed");
- $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/triangle-closed.png"));
- }
- return false;
-}
-</script>
-<style>
-.toggleable {
- padding: .25em 1em 0em 1em;
- margin-bottom: 0;
-}
-.toggleme {
- padding: 1em 1em 0 2em;
- line-height:1em;
-}
-.toggleable a {
- text-decoration:none;
-}
-.toggleme a {
- text-decoration:underline;
-}
-.toggleable.closed .toggleme {
- display:none;
-}
-#jd-content .toggle-img {
- margin:0;
-}
-</style>
-
-<div class="toggleable opened">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
- Android {@sdkPlatformVersion}, Revision 1</a> <em>(May 2011)</em></a>
- <div class="toggleme">
-<dl>
-<dt>Dependencies:</dt>
-<dd>
-<p>Requires SDK Tools r11 or higher.</p>
-</dd>
-
-</dl>
- </div>
-</div>
-
-
-<h2 id="api">API Overview</h2>
-
-<p>Android 2.3.4 provides the same framework API to applications as Android 2.3.3
-(API level 10). For a summary of the API, see the
-<a href="{@docRoot}sdk/android-2.3.3.html">Android 2.3.3 version notes</a>.</p>
-
-
-<h2 id="openaccessory">Open Accessory Library</h2>
-
-<p><em>Open Accessory</em> is a new capability for integrating
-connected peripherals with applications running on the platform. The capability
-is based on a USB (Universal Serial Bus) stack built into the platform and an
-API exposed to applications. Peripherals that attach to Android-powered devices
-as accessories connect as USB hosts. </p>
-
-<p>Open Accessory is introduced in <a
-href="{@docRoot}sdk/android-3.1.html#usb">Android 3.1</a> (API level 12), but is
-made available to devices running Android 2.3.4 by means of an optional external
-library, the Open Accessory Library. The library exposes a framework API that
-lets applications discover, communicate with, and manage a variety of device
-types connected over USB. It also provides the implementation of the API against
-parts of the Android platform that are not directly exposed to applications in
-Android 2.3.4.</p>
-
-<p>The Open Accessory Library is optional on any given device. Device
-manufacturers may choose whether to include the Open Accessory Library in their
-products or exclude it. The library is forward-compatible with Android 3.1, so
-applications developed against Android 2.3.4 will run properly on devices
-running Android 3.1, if those devices support USB accessories. </p>
-
-<p>The API provided by the Open Accessory Library is based on the Open Accessory
-API provided in Android 3.1. In most areas, you can use the same techniques and
-APIs. However, developing for the Open Accessory Library on Android 2.3.4 differs
-from the standard USB API in these ways:
-
-<ul>
-<li>Obtaining a {@link android.hardware.usb.UsbManager} object &mdash; To obtain
-a {@link android.hardware.usb.UsbManager} object when using the add-on library,
-use the helper method <code>getInstance()</code> rather than {@link
-android.content.Context#getSystemService(java.lang.String) getSystemService()}
-For example:
-
-<pre>UsbManager manager = UsbManager.getInstance(this);</pre></li>
-
-<li>Obtaining a {@link android.hardware.usb.UsbAccessory} from a filtered intent
-&mdash; When you filter for a connected device or accessory with an intent
-filter, the {@link android.hardware.usb.UsbAccessory} object is contained
-inside the intent that is passed to your application. If you are using the
-add-on library, you can get the {@link android.hardware.usb.UsbAccessory} object
-in the following manner:
-
-<pre>UsbAccessory accessory = UsbManager.getAccessory(intent)</pre></li>
-
-<li>No USB host support &mdash; Android 2.3.4 and the Open Accessory Library do
-not support USB host mode (for example, through {@link
-android.hardware.usb.UsbDevice}), although USB host mode is supported in Android
-3.1. An Android-powered device running Android 2.3.4 can not function as a USB
-host. The library enables the Android-powered device to function as
-a peripheral only, with the connected accessory functioning as USB host
-(through {@link android.hardware.usb.UsbAccessory}).</li>
-</ul>
-
-<p>To develop apps using the Open Accessory Library, you need:</p>
-
-<ul>
-<li>The latest version of the Android SDK tools</li>
-<li>The latest version of the Google APIs add-on, which includes the library
-itself (for linking)</li>
-<li>An actual hardware device running Android 2.3.4 (or Android 3.1) with USB
-accessories support, for runtime testing against connected devices</li>
-</ul>
-
-<p>For a full discussion of how to develop applications that interact with USB
-accessories, please see the related <a
-href="{@docRoot}guide/topics/usb/index.html">developer documentation</a>.</p>
-
-<p>Additionally, developers can request filtering on Google Play, such that
-their applications are not available to users whose devices do not provide the
-appropriate accessory support. To request filtering, add the element below
-to the application manifest:</p>
-
-<pre>&lt;uses-feature
- android:name="android.hardware.usb.accessory"
- android:required="true"&gt;</pre>
-
-
-<h2 id="api-level">API Level</h2>
-
-<p>The Android 2.3.4 platform does <em>not</em> increment the API level &mdash;
-it uses the same API level as Android 2.3.3, API level 10.
-
-<p>To use APIs introduced in API level 10 in your application,
-you need compile the application against the Android library that is provided in
-the latest version of the Google APIs Add-On, which also includes the Open
-Accessory Library.</p>
-
-<p>Depending on your needs, you might
-also need to add an <code>android:minSdkVersion="{@sdkPlatformApiLevel}"</code>
-attribute to the <code>&lt;uses-sdk&gt;</code> element in the application's
-manifest. If your application is designed to run only on Android 2.3.3 and higher,
-declaring the attribute prevents the application from being installed on earlier
-versions of the platform.</p>
-
-<p>For more information about how to use API Level, see the <a
-href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
-
-<h2 id="apps">Built-in Applications</h2>
-
-<p>The system image included in the downloadable platform provides these
-built-in applications:</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>Browser</li>
-<li>Calculator</li>
-<li>Camera</li>
-<li>Clock</li>
-<li>Contacts</li>
-<li>Custom Locale</li>
-<li>Dev Tools</li>
-<li>Downloads</li>
-<li>Email</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<ul>
-<li>Gallery</li>
-<li>IMEs for Japanese, Chinese, and Latin text input</li>
-<li>Messaging</li>
-<li>Music</li>
-<li>Phone</li>
-<li>Search</li>
-<li>Settings</li>
-<li>Spare Parts (developer app)</li>
-<li>Speech Recorder</li>
-</ul>
-</td>
-</tr>
-</table>
-
-
-<h2 id="locs" style="margin-top:.75em;">Locales</h2>
-
-<p>The system image included in the downloadable SDK platform provides a variety of
-built-in locales. In some cases, region-specific strings are available for the
-locales. In other cases, a default version of the language is used. The
-languages that are available in the Android {@sdkPlatformVersion} system
-image are listed below (with <em>language</em>_<em>country/region</em> locale
-descriptor).</p>
-
-<table style="border:0;padding-bottom:0;margin-bottom:0;">
-<tr>
-<td style="border:0;padding-bottom:0;margin-bottom:0;">
-<ul>
-<li>Arabic, Egypt (ar_EG)</li>
-<li>Arabic, Israel (ar_IL)</li>
-<li>Bulgarian, Bulgaria (bg_BG)</li>
-<li>Catalan, Spain (ca_ES)</li>
-<li>Czech, Czech Republic (cs_CZ)</li>
-<li>Danish, Denmark(da_DK)</li>
-<li>German, Austria (de_AT)</li>
-<li>German, Switzerland (de_CH)</li>
-<li>German, Germany (de_DE)</li>
-<li>German, Liechtenstein (de_LI)</li>
-<li>Greek, Greece (el_GR)</li>
-<li>English, Australia (en_AU)</li>
-<li>English, Canada (en_CA)</li>
-<li>English, Britain (en_GB)</li>
-<li>English, Ireland (en_IE)</li>
-<li>English, India (en_IN)</li>
-<li>English, New Zealand (en_NZ)</li>
-<li>English, Singapore(en_SG)</li>
-<li>English, US (en_US)</li>
-<li>English, South Africa (en_ZA)</li>
-<li>Spanish (es_ES)</li>
-<li>Spanish, US (es_US)</li>
-<li>Finnish, Finland (fi_FI)</li>
-<li>French, Belgium (fr_BE)</li>
-<li>French, Canada (fr_CA)</li>
-<li>French, Switzerland (fr_CH)</li>
-<li>French, France (fr_FR)</li>
-<li>Hebrew, Israel (he_IL)</li>
-<li>Hindi, India (hi_IN)</li>
-</ul>
-</td>
-<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
-<ul>
-<li>Croatian, Croatia (hr_HR)</li>
-<li>Hungarian, Hungary (hu_HU)</li>
-<li>Indonesian, Indonesia (id_ID)</li>
-<li>Italian, Switzerland (it_CH)</li>
-<li>Italian, Italy (it_IT)</li>
-<li>Japanese (ja_JP)</li>
-<li>Korean (ko_KR)</li>
-<li>Lithuanian, Lithuania (lt_LT)</li>
-<li>Latvian, Latvia (lv_LV)</li>
-<li>Norwegian-Bokmol, Norway(nb_NO)</li>
-<li>Dutch, Belgium (nl_BE)</li>
-<li>Dutch, Netherlands (nl_NL)</li>
-<li>Polish (pl_PL)</li>
-<li>Portuguese, Brazil (pt_BR)</li>
-<li>Portuguese, Portugal (pt_PT)</li>
-<li>Romanian, Romania (ro_RO)</li>
-<li>Russian (ru_RU)</li></li>
-<li>Slovak, Slovakia (sk_SK)</li>
-<li>Slovenian, Slovenia (sl_SI)</li>
-<li>Serbian (sr_RS)</li>
-<li>Swedish, Sweden (sv_SE)</li>
-<li>Thai, Thailand (th_TH)</li>
-<li>Tagalog, Philippines (tl_PH)</li>
-<li>Turkish, Turkey (tr_TR)</li>
-<li>Ukrainian, Ukraine (uk_UA)</li>
-<li>Vietnamese, Vietnam (vi_VN)</li>
-<li>Chinese, PRC (zh_CN)</li>
-<li>Chinese, Taiwan (zh_TW)</li>
-</ul>
-</td>
-</tr>
-</table>
-
-<p class="note"><strong>Note:</strong> The Android platform may support more
-locales than are included in the SDK system image. All of the supported locales
-are available in the <a href="http://source.android.com/">Android Open Source
-Project</a>.</p>
-
-<h2 id="skins">Emulator Skins</h2>
-
-<p>The downloadable platform includes a set of emulator skins that you can use
-for modeling your application in different screen sizes and resolutions. The
-emulator skins are:</p>
-
-<ul>
- <li>
- QVGA (240x320, low density, small screen)
- </li>
- <li>
- WQVGA400 (240x400, low density, normal screen)
- </li>
- <li>
- WQVGA432 (240x432, low density, normal screen)
- </li>
- <li>
- HVGA (320x480, medium density, normal screen)
- </li>
- <li>
- WVGA800 (480x800, high density, normal screen)
- </li>
- <li>
- WVGA854 (480x854 high density, normal screen)
- </li>
-</ul>
-
-<p>For more information about how to develop an application that displays
-and functions properly on all Android-powered devices, see <a
-href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
-Screens</a>.</p>
diff --git a/docs/html/sdk/api_diff/10/changes/changes-summary.html b/docs/html/sdk/api_diff/10/changes/changes-summary.html
index dbb28813cf7a..ff0e47982522 100644
--- a/docs/html/sdk/api_diff/10/changes/changes-summary.html
+++ b/docs/html/sdk/api_diff/10/changes/changes-summary.html
@@ -73,7 +73,7 @@ body{overflow:auto;}
<div id="docTitleContainer">
<h1>Android&nbsp;API&nbsp;Differences&nbsp;Report</h1>
<p>This report details the changes in the core Android framework API between two <a
-href="http://developer.android.com/guide/appendix/api-levels.html" target="_top">API Level</a>
+href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels" target="_top">API Level</a>
specifications. It shows additions, modifications, and removals for packages, classes, methods, and fields.
The report also includes general statistics that characterize the extent and type of the differences.</p>
<p>This report is based a comparison of the Android API specifications
diff --git a/docs/html/sdk/api_diff/11/changes/changes-summary.html b/docs/html/sdk/api_diff/11/changes/changes-summary.html
index b6af9ae7a321..18e9f5d30590 100644
--- a/docs/html/sdk/api_diff/11/changes/changes-summary.html
+++ b/docs/html/sdk/api_diff/11/changes/changes-summary.html
@@ -73,7 +73,7 @@ body{overflow:auto;}
<div id="docTitleContainer">
<h1>Android&nbsp;API&nbsp;Differences&nbsp;Report</h1>
<p>This report details the changes in the core Android framework API between two <a
-href="http://developer.android.com/guide/appendix/api-levels.html" target="_top">API Level</a>
+href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels" target="_top">API Level</a>
specifications. It shows additions, modifications, and removals for packages, classes, methods, and fields.
The report also includes general statistics that characterize the extent and type of the differences.</p>
<p>This report is based a comparison of the Android API specifications
diff --git a/docs/html/sdk/api_diff/12/changes/changes-summary.html b/docs/html/sdk/api_diff/12/changes/changes-summary.html
index 2a630c25d5d0..e069d3d15776 100644
--- a/docs/html/sdk/api_diff/12/changes/changes-summary.html
+++ b/docs/html/sdk/api_diff/12/changes/changes-summary.html
@@ -73,7 +73,7 @@ body{overflow:auto;}
<div id="docTitleContainer">
<h1>Android&nbsp;API&nbsp;Differences&nbsp;Report</h1>
<p>This report details the changes in the core Android framework API between two <a
-href="http://developer.android.com/guide/appendix/api-levels.html" target="_top">API Level</a>
+href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels" target="_top">API Level</a>
specifications. It shows additions, modifications, and removals for packages, classes, methods, and fields.
The report also includes general statistics that characterize the extent and type of the differences.</p>
<p>This report is based a comparison of the Android API specifications
diff --git a/docs/html/sdk/api_diff/13/changes/changes-summary.html b/docs/html/sdk/api_diff/13/changes/changes-summary.html
index 082fcfb64abc..3b1c55ad96ee 100644
--- a/docs/html/sdk/api_diff/13/changes/changes-summary.html
+++ b/docs/html/sdk/api_diff/13/changes/changes-summary.html
@@ -73,7 +73,7 @@ body{overflow:auto;}
<div id="docTitleContainer">
<h1>Android&nbsp;API&nbsp;Differences&nbsp;Report</h1>
<p>This report details the changes in the core Android framework API between two <a
-href="http://developer.android.com/guide/appendix/api-levels.html" target="_top">API Level</a>
+href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels" target="_top">API Level</a>
specifications. It shows additions, modifications, and removals for packages, classes, methods, and fields.
The report also includes general statistics that characterize the extent and type of the differences.</p>
<p>This report is based a comparison of the Android API specifications
diff --git a/docs/html/sdk/api_diff/14/changes/changes-summary.html b/docs/html/sdk/api_diff/14/changes/changes-summary.html
index ccb5d26f5e1e..0cec8777bc5d 100644
--- a/docs/html/sdk/api_diff/14/changes/changes-summary.html
+++ b/docs/html/sdk/api_diff/14/changes/changes-summary.html
@@ -73,7 +73,7 @@ body{overflow:auto;}
<div id="docTitleContainer">
<h1>Android&nbsp;API&nbsp;Differences&nbsp;Report</h1>
<p>This report details the changes in the core Android framework API between two <a
-href="http://developer.android.com/guide/appendix/api-levels.html" target="_top">API Level</a>
+href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels" target="_top">API Level</a>
specifications. It shows additions, modifications, and removals for packages, classes, methods, and fields.
The report also includes general statistics that characterize the extent and type of the differences.</p>
<p>This report is based a comparison of the Android API specifications
diff --git a/docs/html/sdk/api_diff/15/changes/changes-summary.html b/docs/html/sdk/api_diff/15/changes/changes-summary.html
index 0acb973bcc67..7f00168c1fbb 100644
--- a/docs/html/sdk/api_diff/15/changes/changes-summary.html
+++ b/docs/html/sdk/api_diff/15/changes/changes-summary.html
@@ -73,7 +73,7 @@ body{overflow:auto;}
<div id="docTitleContainer">
<h1>Android&nbsp;API&nbsp;Differences&nbsp;Report</h1>
<p>This report details the changes in the core Android framework API between two <a
-href="http://developer.android.com/guide/appendix/api-levels.html" target="_top">API Level</a>
+href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels" target="_top">API Level</a>
specifications. It shows additions, modifications, and removals for packages, classes, methods, and fields.
The report also includes general statistics that characterize the extent and type of the differences.</p>
<p>This report is based a comparison of the Android API specifications
diff --git a/docs/html/sdk/api_diff/3/changes/changes-summary.html b/docs/html/sdk/api_diff/3/changes/changes-summary.html
index 65a37f8d3b31..4c0012a5ffe0 100644
--- a/docs/html/sdk/api_diff/3/changes/changes-summary.html
+++ b/docs/html/sdk/api_diff/3/changes/changes-summary.html
@@ -73,7 +73,7 @@ body{overflow:auto;}
<div id="docTitleContainer">
<h1>Android&nbsp;API&nbsp;Differences&nbsp;Report</h1>
<p>This report details the changes in the core Android framework API between two <a
-href="http://developer.android.com/guide/appendix/api-levels.html" target="_top">API Level</a>
+href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels" target="_top">API Level</a>
specifications. It shows additions, modifications, and removals for packages, classes, methods, and fields.
The report also includes general statistics that characterize the extent and type of the differences.</p>
<p>This report is based a comparison of the Android API specifications
diff --git a/docs/html/sdk/api_diff/4/changes/changes-summary.html b/docs/html/sdk/api_diff/4/changes/changes-summary.html
index 88b8be6820fd..bbed016d3936 100644
--- a/docs/html/sdk/api_diff/4/changes/changes-summary.html
+++ b/docs/html/sdk/api_diff/4/changes/changes-summary.html
@@ -73,7 +73,7 @@ body{overflow:auto;}
<div id="docTitleContainer">
<h1>Android&nbsp;API&nbsp;Differences&nbsp;Report</h1>
<p>This report details the changes in the core Android framework API between two <a
-href="http://developer.android.com/guide/appendix/api-levels.html" target="_top">API Level</a>
+href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels" target="_top">API Level</a>
specifications. It shows additions, modifications, and removals for packages, classes, methods, and fields.
The report also includes general statistics that characterize the extent and type of the differences.</p>
<p>This report is based a comparison of the Android API specifications
diff --git a/docs/html/sdk/api_diff/5/changes/changes-summary.html b/docs/html/sdk/api_diff/5/changes/changes-summary.html
index 3a06d9871cab..1f10f255d0d6 100644
--- a/docs/html/sdk/api_diff/5/changes/changes-summary.html
+++ b/docs/html/sdk/api_diff/5/changes/changes-summary.html
@@ -73,7 +73,7 @@ body{overflow:auto;}
<div id="docTitleContainer">
<h1>Android&nbsp;API&nbsp;Differences&nbsp;Report</h1>
<p>This report details the changes in the core Android framework API between two <a
-href="http://developer.android.com/guide/appendix/api-levels.html" target="_top">API Level</a>
+href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels" target="_top">API Level</a>
specifications. It shows additions, modifications, and removals for packages, classes, methods, and fields.
The report also includes general statistics that characterize the extent and type of the differences.</p>
<p>This report is based a comparison of the Android API specifications
diff --git a/docs/html/sdk/api_diff/6/changes/changes-summary.html b/docs/html/sdk/api_diff/6/changes/changes-summary.html
index 77ceb255c35c..a1c39853509c 100644
--- a/docs/html/sdk/api_diff/6/changes/changes-summary.html
+++ b/docs/html/sdk/api_diff/6/changes/changes-summary.html
@@ -73,7 +73,7 @@ body{overflow:auto;}
<div id="docTitleContainer">
<h1>Android&nbsp;API&nbsp;Differences&nbsp;Report</h1>
<p>This report details the changes in the core Android framework API between two <a
-href="http://developer.android.com/guide/appendix/api-levels.html" target="_top">API Level</a>
+href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels" target="_top">API Level</a>
specifications. It shows additions, modifications, and removals for packages, classes, methods, and fields.
The report also includes general statistics that characterize the extent and type of the differences.</p>
<p>This report is based a comparison of the Android API specifications
diff --git a/docs/html/sdk/api_diff/7/changes/changes-summary.html b/docs/html/sdk/api_diff/7/changes/changes-summary.html
index 330f7270e788..34d4d2543d60 100644
--- a/docs/html/sdk/api_diff/7/changes/changes-summary.html
+++ b/docs/html/sdk/api_diff/7/changes/changes-summary.html
@@ -73,7 +73,7 @@ body{overflow:auto;}
<div id="docTitleContainer">
<h1>Android&nbsp;API&nbsp;Differences&nbsp;Report</h1>
<p>This report details the changes in the core Android framework API between two <a
-href="http://developer.android.com/guide/appendix/api-levels.html" target="_top">API Level</a>
+href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels" target="_top">API Level</a>
specifications. It shows additions, modifications, and removals for packages, classes, methods, and fields.
The report also includes general statistics that characterize the extent and type of the differences.</p>
<p>This report is based a comparison of the Android API specifications
diff --git a/docs/html/sdk/api_diff/8/changes/changes-summary.html b/docs/html/sdk/api_diff/8/changes/changes-summary.html
index f5fa7e64a112..504118258ac1 100644
--- a/docs/html/sdk/api_diff/8/changes/changes-summary.html
+++ b/docs/html/sdk/api_diff/8/changes/changes-summary.html
@@ -73,7 +73,7 @@ body{overflow:auto;}
<div id="docTitleContainer">
<h1>Android&nbsp;API&nbsp;Differences&nbsp;Report</h1>
<p>This report details the changes in the core Android framework API between two <a
-href="http://developer.android.com/guide/appendix/api-levels.html" target="_top">API Level</a>
+href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels" target="_top">API Level</a>
specifications. It shows additions, modifications, and removals for packages, classes, methods, and fields.
The report also includes general statistics that characterize the extent and type of the differences.</p>
<p>This report is based a comparison of the Android API specifications
diff --git a/docs/html/sdk/api_diff/9/changes/changes-summary.html b/docs/html/sdk/api_diff/9/changes/changes-summary.html
index f81cea152f9b..4bccfe5e3975 100644
--- a/docs/html/sdk/api_diff/9/changes/changes-summary.html
+++ b/docs/html/sdk/api_diff/9/changes/changes-summary.html
@@ -73,7 +73,7 @@ body{overflow:auto;}
<div id="docTitleContainer">
<h1>Android&nbsp;API&nbsp;Differences&nbsp;Report</h1>
<p>This report details the changes in the core Android framework API between two <a
-href="http://developer.android.com/guide/appendix/api-levels.html" target="_top">API Level</a>
+href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels" target="_top">API Level</a>
specifications. It shows additions, modifications, and removals for packages, classes, methods, and fields.
The report also includes general statistics that characterize the extent and type of the differences.</p>
<p>This report is based a comparison of the Android API specifications
diff --git a/docs/html/sdk/exploring.jd b/docs/html/sdk/exploring.jd
new file mode 100644
index 000000000000..8272b061a0c9
--- /dev/null
+++ b/docs/html/sdk/exploring.jd
@@ -0,0 +1,166 @@
+page.title=Exploring the SDK
+walkthru=1
+
+@jd:body
+
+
+<p>The Android SDK is composed of modular packages that you can download separately using
+the Android SDK Manager. For example, when the SDK Tools are updated or a new version of
+the Android platform is released, you can use the SDK Manager to quickly download them to
+your environment. Simply follow the procedures described in <a
+href="{@docRoot}sdk/installing/adding-packages.html">Adding Platforms and Packages</a>.</p>
+
+<p>There are several different packages available for the Android SDK. The table below describes
+most of the available packages and where they're located once you download them.</p>
+
+
+<h2 id="Packages">Available Packages</h2>
+
+
+<table>
+ <tr><th>Package</th><th>Description</th><th>File Location</th></tr>
+ <tr>
+ <td><a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools</a></td>
+ <td>Contains tools for debugging and testing, plus other
+utilities that are required to develop an app. If you've just installed the SDK starter package,
+then you already have the latest version of this package. Make sure you keep this up to date.</td>
+ <td>{@code &lt;sdk>/tools/}</td></tr>
+ <tr><td>SDK Platform-tools</td>
+ <td>Contains platform-dependent tools for developing and debugging
+your application. These tools support the latest features of the Android platform and are typically
+updated only when a new platform becomes available. These tools are always backward compatible with
+older platforms, but you must be sure that you have the latest version of these tools when you
+install a new SDK platform.</td>
+ <td>{@code &lt;sdk>/platform-tools/}</td>
+ </tr>
+
+ <tr>
+ <td>Documentation</td>
+ <td>An offline copy of the latest documentation for the Android
+platform APIs.</td>
+ <td>{@code &lt;sdk>/docs/}</td>
+ </tr>
+ <tr><td>SDK Platform</td>
+ <td>There's one SDK Platform available for each version of Android. It includes an {@code
+android.jar} file with a fully compliant Android library. In order to build an Android app, you must
+specify an SDK platform as your build target.</td>
+ <td>{@code &lt;sdk>/platforms/&lt;android-version>/}</td>
+ </tr>
+ <tr>
+ <td>System Images</td>
+ <td>Each platform version offers one or more different system images (such as for ARM
+and x86). The Android emulator requires a system image to operate. You should always test your
+app on the latest version of Android and using the emulator with the latest system image is a
+good way to do so.</td>
+ <td>{@code &lt;sdk>/platforms/&lt;android-version>/}</td>
+ </tr>
+ <tr>
+ <td>Sources for Android SDK</td>
+ <td>A copy of the Android platform source code that's useful for
+stepping through the code while debugging your app.</td>
+ <td>{@code &lt;sdk>/sources/}</td>
+ </tr>
+ <tr>
+ <td><a href="{@docRoot}tools/samples/index.html">Samples for SDK</a></td>
+ <td>A collection of sample apps that demonstrate a variety of the
+platform APIs. These are a great resource to browse Android app code. The API Demos app in
+particular provides a huge number of small demos you should explore.</td>
+ <td>{@code &lt;sdk>/platforms/&lt;android-version>/samples/}</td>
+ </tr>
+ <tr>
+ <td><a href="http://developers.google.com/android">Google APIs</a></td>
+ <td>An SDK add-on that provides both a platform you can use to develop an app
+using special Google APIs and a system image for the emulator so you can test your app using the
+Google APIs.</td>
+ <td>{@code &lt;sdk>/add-ons/}</td>
+ </tr>
+
+ <tr>
+ <td><a href="{@docRoot}tools/extras/support-library.html">Android Support</a></td>
+ <td>A static library you can include in your app sources in order to use powerful
+APIs that aren't available in the standard platform. For example, the support library
+contains versions of the {@link android.support.v4.app.Fragment} class that's compatible with
+Android 1.6 and higher (the class was originally introduced in Android 3.0) and the {@link
+android.support.v4.view.ViewPager} APIs that allow you to easily build a side-swipeable UI.</td>
+ <td>{@code &lt;sdk>/extras/android/support/}</td>
+ </tr>
+ <tr>
+ <td><a href="{@docRoot}guide/google/play/billing/index.html">Google Play Billing</a></td>
+ <td>Provides the static libraries and samples that allow you to
+integrate billing services in your app with Google Play.</td>
+ <td>{@code &lt;sdk>/extras/google/}</td>
+ </tr>
+ <tr>
+ <td><a href="{@docRoot}guide/google/play/licensing/index.html">Google Play Licensing</a></td>
+ <td>Provides the static libraries and samples that allow you to perform license verification for
+your app when distributing with Google Play.</td>
+ <td>{@code &lt;sdk>/extras/google/}</td>
+ </tr>
+</table>
+
+<p>The above table is not comprehensive and you can <a
+href="#AddingSites">add new sites</a> to download additional packages from third-parties.</p>
+
+<p>In some cases, an SDK package may require a specific minimum revision of
+another package or SDK tool. For example, there may be a dependency between the ADT Plugin for
+Eclipse and
+the SDK Tools package. When you install the SDK Tools
+package, you should also upgrade to the required version of ADT (if you
+are developing in Eclipse). In this case, the major version number for your ADT plugin should
+always match the revision number of your SDK Tools (for example, ADT 8.x requires SDK Tools r8).
+</p>
+
+<p>The development tools will notify you with debug warnings if there is dependency that you need to
+address. The Android SDK Manager also enforces dependencies by requiring that you download any
+packages that are needed by those you have selected.</p>
+
+
+
+
+
+<h2 id="AddingSites">Adding New Sites</h2>
+
+<p>By default, <strong>Available Packages</strong> displays packages available from the
+<em>Android Repository</em> and <em>Third party Add-ons</em>. You can add other sites that host
+their own Android SDK add-ons, then download the SDK add-ons
+from those sites.</p>
+
+<p>For example, a mobile carrier or device manufacturer might offer additional
+API libraries that are supported by their own Android-powered devices. In order
+to develop using their libraries, you must install their Android SDK add-on, if it's not already
+available under <em>Third party Add-ons</em>. </p>
+
+<p>If a carrier or device manufacturer has hosted an SDK add-on repository file
+on their web site, follow these steps to add their site to the Android SDK
+Manager:</p>
+
+<ol>
+ <li>Select <strong>Available Packages</strong> in the left panel.</li>
+ <li>Click <strong>Add Add-on Site</strong> and enter the URL of the
+<code>repository.xml</code> file. Click <strong>OK</strong>.</li>
+</ol>
+<p>Any SDK packages available from the site will now be listed under a new item named
+<strong>User Add-ons</strong>.</p>
+
+
+
+
+<h2 id="troubleshooting">Troubleshooting</h2>
+
+<p><strong>Problems connecting to the SDK repository</strong></p>
+
+<p>If you are using the Android SDK Manager to download packages and are encountering
+connection problems, try connecting over http, rather than https. To switch the
+protocol used by the Android SDK Manager, follow these steps: </p>
+
+<ol>
+ <li>With the Android SDK Manager window open, select "Settings" in the
+ left pane. </li>
+ <li>On the right, in the "Misc" section, check the checkbox labeled "Force
+ https://... sources to be fetched using http://..." </li>
+ <li>Click <strong>Save &amp; Apply</strong>.</li>
+</ol>
+
+
+
+
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index b56ccdbd83f0..e788ffeb9673 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -1,6 +1,6 @@
page.title=Android SDK
+header.hide=1
page.metaDescription=Download the official Android SDK to develop apps for Android-powered devices.
-sdk.redirect=0
sdk.win_installer=installer_r18-windows.exe
sdk.win_installer_bytes=37456234
@@ -20,28 +20,119 @@ sdk.linux_checksum=6cd716d0e04624b865ffed3c25b3485c
@jd:body
-<div class="non-preview">
-<p>Here's an overview of the steps you must follow to set up the Android SDK:</p>
+<style type="text/css">
+ .offline { display:none; }
+</style>
-<ol>
- <li>Prepare your development computer and ensure it meets the system requirements.</li>
- <li>Install the SDK starter package from the table above. (If you're on Windows, download the
-installer for help with the initial setup.)</li>
- <li>Install the ADT Plugin for Eclipse (if you'll be developing in Eclipse).</li>
- <li>Add Android platforms and other packages to your SDK.</li>
- <li>Explore the contents of the Android SDK (optional).</li>
-</ol>
+<div class="wrap">
-<p class="online-message">To get started, download the appropriate package from the table above,
-then read the guide to <a href="installing.html">Installing the SDK</a>.</p>
+<div class="col-13">&nbsp;</div><!-- provides top margin for content -->
+
+<div class="col-7" style="margin-left:0">
+ <img src="{@docRoot}images/sdk-cube.png" alt="" />
+</div>
+
+
+<div class="col-6" style="margin-right:0;">
+
+<div id="intro" style="position:absolute;width:inherit">
+<h1 style="margin-top:0">Get the Android SDK</h1>
+
+
+<p>The Android SDK provides you the API libraries and developer tools necessary to build, test,
+ and debug apps for Android.</p>
+
+<!-- this appears when viewing the offline docs -->
+<p class="offline">
+To get the latest Android SDK, please visit the web site at <a
+href="http://developer.android.com/sdk/index.html">developer.android.com/sdk/</a>
+</p>
+
+<!-- this appears when viewing the online docs -->
+<div class="online">
+<a class="big button disabled" id="download-button" href="" >Sorry, the SDK does not support
+your OS</a>
+
+<p style="margin-top:20px;font-size:12px"><a href='' onclick="
+ if ($('.pax').is(':visible')) {
+ $('.pax').slideUp();
+ } else {
+ $('.reqs').slideUp();
+ $('.pax').slideDown();
+ }return false;">Other platforms</a> |
+ <a href='' onclick="
+ if ($('.reqs').is(':visible')) {
+ $('.reqs').slideUp();
+ } else {
+ $('.pax').slideUp();
+ $('.reqs').slideDown();
+ }return false;">System requirements</a></p>
+</div><!-- end online -->
+
+</div><!-- end intro -->
-<!-- non-inline style and based on only one selector so that
- it can be overriden by the sdkpage.cs template -->
-<style type="text/css">
- .offline-message { display:none; }
-</style>
-<p class="offline-message">For more information about how to set up your
-development environment, read the guide to <a href="installing.html">Installing the SDK</a>.</p>
+<div id="next-steps" class="online" style="display:none;position:absolute;width:inherit">
+ <h1 style="margin-top:0">Get ready to code!</h1>
+ <p><em><span id="filename"></span></em> is now downloading...</p>
+ <p>You'll soon be developing apps for Android! Once the download completes,
+ you need to follow a few steps to set up your environment.</p>
+ <p>To continue, follow the guide to <a href="{@docRoot}sdk/installing/index.html">Installing
+the SDK</a>.</p>
+
+</div><!-- end next-steps -->
+
+</div><!-- end col-6 -->
+
+
+<div class="col-13">&nbsp;</div><!-- provides padding -->
+
+
+<div class="col-6 reqs" style="margin-left:0;display:none;font-size:12px">
+<h3>Operating Systems</h3>
+<ul>
+ <li>Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)</li>
+ <li>Mac OS X 10.5.8 or later (x86 only)</li>
+ <li>Linux (tested on Ubuntu Linux, Lucid Lynx)
+ <ul>
+ <li>GNU C Library (glibc) 2.7 or later is required.</li>
+ <li>On Ubuntu Linux, version 8.04 or later is required.</li>
+ <li>64-bit distributions must be capable of running 32-bit applications.</li>
+ </ul>
+ </li>
+</ul>
+</div>
+
+<div class="col-7 reqs" style="margin-right:0;display:none;font-size:12px">
+<h3>Eclipse IDE</h3>
+ <ul>
+ <li>Eclipse 3.6.2 (Helios) or greater
+<p class="note"><strong>Note:</strong> Eclipse 3.5 (Galileo) is no longer
+supported with the latest version of ADT.</p></li>
+ <li>Eclipse <a href="http://www.eclipse.org/jdt">JDT</a> plugin (included
+in most Eclipse IDE packages) </li>
+ <li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK 6</a>
+ (JRE alone is not sufficient)</li>
+ <li><a href="{@docRoot}tools/sdk/eclipse-adt.html">Android Development Tools plugin</a>
+(recommended)</li>
+ <li><strong>Not</strong> compatible with Gnu Compiler for Java (gcj)</li>
+ </ul>
+
+
+<h3>Other development environments</h3>
+ <ul>
+ <li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK 6</a>
+ (JRE alone is not sufficient)</li>
+ <li><a href="http://ant.apache.org/">Apache Ant</a> 1.8 or later</li>
+ <li><strong>Not</strong> compatible with Gnu Compiler for Java (gcj)</li>
+ </ul>
+ </li>
+</ul>
+
+<p class="note"><strong>Note:</strong> Some Linux distributions may include JDK 1.4 or Gnu Compiler
+for Java, both of which are <em>not</em> supported for Android development. </p>
</div>
+
+</div>
+
diff --git a/docs/html/sdk/installing/adding-packages.jd b/docs/html/sdk/installing/adding-packages.jd
new file mode 100644
index 000000000000..7765343b2e50
--- /dev/null
+++ b/docs/html/sdk/installing/adding-packages.jd
@@ -0,0 +1,78 @@
+page.title=Adding Platforms and Packages
+walkthru=1
+
+@jd:body
+
+
+<p>The Android SDK separates different parts of the SDK into separately downloadable packages. The
+SDK starter package that you've installed includes only the SDK Tools. To develop an Android app,
+you also need to download at least one Android platform and the latest SDK Platform-tools.</p>
+
+<p>You can update and install SDK packages at any time using the Android SDK Manager.</p>
+
+<p>If you've used the Windows installer to install the SDK tools, you should already have the
+Android SDK Manager open. Otherwise, you can launch the Android SDK Manager in one of the following
+ways:</p>
+<ul>
+ <li>On Windows, double-click the <code>SDK Manager.exe</code> file at the root of the Android
+SDK directory.</li>
+ <li>On Mac or Linux, open a terminal and navigate to the <code>tools/</code> directory in the
+Android SDK, then execute <code>android sdk</code>.</li>
+</ul>
+
+<p>When you open the Android SDK Manager, it automatically selects a set of recommended packages.
+Simply click <strong>Install</strong> to install the recommended packages. The Android SDK Manager
+installs the selected packages into
+your Android SDK environment. The following sections describe some of the available SDK
+packages and more about which ones we recommend you install.</p>
+
+<p>Once you have installed your packages, continue to the next page.</p>
+
+<img src="/images/sdk_manager_packages.png" alt="" />
+<p class="img-caption"><strong>Figure 1.</strong> The Android SDK Manager shows the
+SDK packages that are available, already installed, or for which an update is available.</p>
+
+
+
+
+<h2 id="Recommended">Recommended Packages</h2>
+
+<p>Here's an outlines of the packages required and those we recommend you use:
+</p>
+
+<dl>
+ <dt>SDK Tools</dt>
+ <dd><strong>Required.</strong> Your new SDK installation already has the latest version. Make sure
+you keep this up to date.</dd>
+ <dt>SDK Platform-tools</dt>
+ <dd><strong>Required.</strong> You must install this package when you install the SDK for
+the first time.</dd>
+ <dt>SDK Platform</dt>
+ <dd><strong>Required.</strong>You need to download <strong
+style="color:red">at least one platform</strong> into your environment so you're
+able to compile your application. In order to provide the best user experience on the latest
+devices, we recommend that you use the latest platform version as your build target. You'll
+still be able to run your app on older versions, but you must build against the latest version
+in order to use new features when running on devices with the latest version of Android.</dd>
+ <dt>System Image</dt>
+ <dd>Recommended. Although you might have one or more Android-powered devices on which to test
+ your app, it's unlikely you have a device for every version of Android your app supports. It's
+a good practice to download a system image for each version of Android you support and use them
+to test your app on the Android emulator.</dd>
+ <dt>SDK Samples</dt>
+ <dd>Recommended. The samples give you source code that you can use to learn about
+Android, load as a project and run, or reuse in your own app. Note that multiple
+samples packages are available &mdash; one for each Android platform version. When
+you are choosing a samples package to download, select the one whose API Level
+matches the API Level of the Android platform that you plan to use.</dd>
+ <dt>Android Support</dt>
+ <dd>Recommended. The APIs available in this static library allow you to use a variety of new
+framework features (including some not available in even the latest version) on devices running
+a platform version as old as Android 1.6. For more information, read <a
+href="{@docRoot}tools/extras/support-library.html">Support Library</a>.</dd>
+</dl>
+
+
+<p class="note"><strong>Tip:</strong> For easy access to the SDK tools from a command line, add the
+location of the SDK's <code>tools/</code> and
+<code>platform-tools</code> to your <code>PATH</code> environment variable.</p>
diff --git a/docs/html/sdk/installing/index.jd b/docs/html/sdk/installing/index.jd
new file mode 100644
index 000000000000..2ae6bedeb151
--- /dev/null
+++ b/docs/html/sdk/installing/index.jd
@@ -0,0 +1,133 @@
+page.title=Installing the SDK
+walkthru=1
+
+@jd:body
+
+
+<p>You should have already downloaded the <a href="{@docRoot}sdk/index.html">Android SDK</a>. Now
+you need to set up your development environment.</p>
+
+<p>The SDK you've downloaded is not the complete SDK environment. It includes only the core SDK tools, which you can
+use to download the rest of the SDK packages (such as the latest system image).</p>
+
+
+<div id="win" class="docs" style="display:none">
+
+<h3>Getting started on Windows</h3>
+<p>Your download package is an executable file that starts an installer. The installer checks your machine
+ for required tools, such as the proper Java SE Development Kit (JDK) and installs it if necessary.
+ The installer then saves the Android SDK Tools into a default location (or you can specify the location).</p>
+
+<p>Make a note of the name and location of the SDK directory on your system&mdash;you will need to
+refer to the SDK directory later, when setting up the ADT plugin and when using
+the SDK tools from the command line.</p>
+
+<p>Once the tools are installed, the installer offers to start the Android SDK Manager. Start it and
+continue with the installation guide by clicking the
+<strong>Next</strong> link on the right.</p>
+
+</div>
+
+
+
+<div id="mac" class="docs" style="display:none">
+
+<h3>Getting started on Mac</h3>
+
+<p>Your download package is {@code .zip}.
+ Unpack it to a safe location on your machine. By default, the SDK files are unpacked
+into a directory named <code>android-sdk-mac_x86</code>.</p>
+
+<p>Make a note of the name and location of the SDK directory on your system&mdash;you will need to
+refer to the SDK directory later, when setting up the ADT plugin and when using
+the SDK tools from the command line.</p>
+
+<p>Now continue with the installation guide by clicking the
+<strong>Next</strong> link on the right.</p>
+
+</div>
+
+
+
+
+<div id="linux" class="docs" style="display:none">
+
+<h3>Getting started on Linux</h3>
+
+<p>Your download package is a {@code .tgz}.
+ Unpack it to a safe location on your machine. By default, the SDK files are unpacked
+into a directory named <code>android-sdk-linux_x86</code>.</p>
+
+<p>Make a note of the name and location of the SDK directory on your system&mdash;you will need to
+refer to the SDK directory later, when setting up the ADT plugin and when using
+the SDK tools from the command line.</p>
+
+<p>Now continue with the installation guide by clicking the
+<strong>Next</strong> link on the right.</p>
+
+
+<h4 id="Troubleshooting">Troubleshooting Ubuntu</h4>
+
+<ul>
+ <li>If you need help installing and configuring Java on your
+ development machine, you might find these resources helpful:
+ <ul>
+ <li><a href="https://help.ubuntu.com/community/Java">https://help.ubuntu.com/community/Java </a></li>
+ <li><a href="https://help.ubuntu.com/community/Java">https://help.ubuntu.com/community/JavaInstallation</a></li>
+ </ul>
+ </li>
+ <li>Here are the steps to install Java and Eclipse, prior to installing
+ the Android SDK and ADT Plugin.
+ <ol>
+ <li>If you are running a 64-bit distribution on your development
+ machine, you need to install the <code>ia32-libs</code> package using
+ <code>apt-get:</code>:
+ <pre>apt-get install ia32-libs</pre>
+ </li>
+ <li>Next, install Java: <pre>apt-get install sun-java6-jdk</pre></li>
+ <li>The Ubuntu package manager does not currently offer an Eclipse 3.3
+ version for download, so we recommend that you download Eclipse from
+ eclipse.org (<a
+ href="http://www.eclipse.org/downloads/">http://www.eclipse.org/
+ downloads/</a>). A Java or RCP version of Eclipse is recommended.</li>
+ <li>Follow the steps given in previous sections to install the SDK
+ and the ADT plugin. </li>
+ </ol>
+ </li>
+</ul>
+
+</div>
+
+<p><a href='' onclick='showAll();return false;'>Other platforms</a></p>
+
+<script>
+ var $osDocs;
+ if (navigator.appVersion.indexOf("Win")!=-1) {
+ $osDocs = $('#win');
+ } else if (navigator.appVersion.indexOf("Mac")!=-1) {
+ $osDocs = $('#mac');
+ } else if (navigator.appVersion.indexOf("Linux")!=-1) {
+ $osDocs = $('#linux');
+ }
+
+ if ($osDocs.length) {
+ // reveal only the docs for this OS
+ $osDocs.show();
+ } else {
+ // not running a compatible OS, so just show all the docs
+ $('.docs').show();
+ }
+
+ function showAll() {
+ $('.docs').each(function() {
+ if (!$(this).is(':visible')) {
+ console.log('show')
+ $(this).show();
+ } else {
+ console.log('hide')
+ $(this).hide();
+ $osDocs.show();
+ }
+ });
+ }
+</script>
diff --git a/docs/html/sdk/installing/installing-adt.jd b/docs/html/sdk/installing/installing-adt.jd
new file mode 100644
index 000000000000..29252728d72d
--- /dev/null
+++ b/docs/html/sdk/installing/installing-adt.jd
@@ -0,0 +1,206 @@
+page.title=Installing the Eclipse Plugin
+walkthru=1
+adt.zip.version=18.0.0
+adt.zip.download=ADT-18.0.0.zip
+adt.zip.bytes=12834793
+adt.zip.checksum=b446fa157ed97af79d1e21629201efbb
+
+@jd:body
+
+
+
+<p>Android offers a custom plugin for the Eclipse IDE, called Android
+Development Tools (ADT). This plugin is designed to give you a powerful, integrated
+environment in which to develop Android apps. It extends the capabilites
+of Eclipse to let you quickly set up new Android projects, build an app
+UI, debug your app, and export signed (or unsigned) app packages (APKs) for distribution.
+</p>
+
+<p>If you will be developing in Eclipse with the ADT Plugin, first make sure that you have a
+suitable version of Eclipse
+installed on your computer as described by the
+<a href="{@docRoot}tools/sdk/index.html#Requirements">system requirements</a>.</p>
+
+<p>If you need to install Eclipse, you can download it from <a href=
+"http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a>.
+We recommend the "Eclipse Classic" version. Otherwise, you should use a Java or
+RCP version of Eclipse.</p>
+
+
+<p class="note"><strong>Note:</strong> If you prefer to work in a different IDE, you do not need to
+install Eclipse or ADT. Instead, you can directly use the SDK tools to build and
+debug your application. So if you're not using Eclipse, continue to the next page by clicking
+the <strong>Next</strong> link on the right.</p>
+
+
+
+<h2 id="Download">Download the ADT Plugin</h2>
+
+
+<ol>
+ <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Install New
+Software...</strong>.</li>
+ <li>Click <strong>Add</strong>, in the top-right corner.</li>
+ <li>In the Add Repository dialog that appears, enter "ADT Plugin" for the <em>Name</em> and the
+following URL for the <em>Location</em>:
+ <pre>https://dl-ssl.google.com/android/eclipse/</pre>
+ </li>
+ <li>Click <strong>OK</strong>
+ <p>Note: If you have trouble acquiring the plugin, try using "http" in the Location URL,
+instead of "https" (https is preferred for security reasons).</p></li>
+ <li>In the Available Software dialog, select the checkbox next to Developer Tools and click
+<strong>Next</strong>.</li>
+ <li>In the next window, you'll see a list of the tools to be downloaded. Click
+<strong>Next</strong>. </li>
+ <li>Read and accept the license agreements, then click <strong>Finish</strong>.
+ <p>Note: If you get a security warning saying that the authenticity or validity of
+the software can't be established, click <strong>OK</strong>.</p></li>
+ <li>When the installation completes, restart Eclipse. </li>
+</ol>
+
+
+
+
+<h2 id="Configure">Configure the ADT Plugin</h2>
+
+<p>After you've installed ADT and restarted Eclipse, you
+ must specify the location of your Android SDK directory:</p>
+
+<ol>
+ <li>Select <strong>Window</strong> &gt; <strong>Preferences...</strong> to open the Preferences
+ panel (on Mac OS X, select <strong>Eclipse</strong> &gt; <strong>Preferences</strong>).</li>
+ <li>Select <strong>Android</strong> from the left panel.</li>
+ <p>You may see a dialog asking whether you want to send usage statistics to Google. If so,
+make your choice and click <strong>Proceed</strong>.</p>
+ <li>For the <em>SDK Location</em> in the main panel, click <strong>Browse...</strong> and
+ locate your downloaded Android SDK directory (such as <code>android-sdk-windows</code>).</li>
+ <li>Click <strong>Apply</strong>, then <strong>OK</strong>.</li>
+</ol>
+
+
+<p>If you haven't encountered any errors, you're done setting up ADT
+ and can continue to the next step of the SDK installation.</p>
+
+
+
+
+<h2 id="Updating">Updating the ADT Plugin</h2>
+
+<p>From time to time, a new revision of the ADT Plugin becomes available, with
+new features and bug fixes. Generally, when a new revision of ADT is available,
+you should update to it as soon as convenient. </p>
+
+<p>In some cases, a new revision of ADT will have a dependency on a specific
+revision of the Android SDK Tools. If such dependencies exist, you will need to
+update the SDK Tools package of the SDK after installing the new revision of
+ADT. To update the SDK Tools package, use the Android SDK Manager, as
+described in <a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a>.</p>
+
+<p>To learn about new features of each ADT revision and also any dependencies on
+the SDK Tools, see the listings in the <a href="#notes">Revisions</a>
+section. To determine the version currently installed, open the
+Eclipse Installed Software window using <strong>Help</strong>
+&gt; <strong>Software Updates</strong> and refer to the version listed for
+"Android Development Tools".</p>
+
+<p>Follow the steps below to check whether an update is available and, if so,
+to install it. </p>
+
+<ol>
+ <li>Select <strong>Help</strong> &gt; <strong>Check for Updates</strong>.
+ <p>If there are no updates available, a dialog will say so and you're done.</p></li>
+ <li>If there are updates available, select Android DDMS, Android Development Tools,
+ and Android Hierarchy Viewer, then click <strong>Next</strong>.</li>
+ <li>In the Update Details dialog, click <strong>Next</strong>.</li>
+ <li>Read and accept the license agreement and then click <strong>Finish</strong>.
+ This will download and install the latest version of Android DDMS and
+ Android Development Tools.</li>
+ <li>Restart Eclipse.</li>
+</ol>
+
+
+<p>If you encounter problems during the update, remove the existing ADT plugin from Eclipse, then
+perform a fresh installation, using the instructions for <a href="#installing">Installing the ADT
+Plugin</a>.</p>
+
+
+
+<h2 id="Troubleshooting">Troubleshooting</h2>
+
+<p> If you are having trouble downloading the ADT plugin after following the
+steps above, here are some suggestions: </p>
+
+<ul>
+ <li>If Eclipse can not find the remote update site containing the ADT plugin,
+try changing the remote site URL to use http, rather than https. That is, set
+the Location for the remote site to:
+<pre>http://dl-ssl.google.com/android/eclipse/</pre></li>
+<li>If you are behind a firewall (such as a corporate firewall), make sure that
+you have properly configured your proxy settings in Eclipse. In Eclipse,
+you can configure proxy information from the main Eclipse menu in
+<strong>Window</strong> (on Mac OS X, <strong>Eclipse</strong>) &gt;
+<strong>Preferences</strong> &gt; <strong>General</strong> &gt; <strong>Network
+Connections</strong>.</li>
+</ul>
+
+<p> If you are still unable to use Eclipse to download the ADT plugin as a
+remote update site, you can download the ADT zip file to your local machine and
+manually install it:</p>
+
+<ol>
+ <li>Download the current ADT Plugin zip file from the table below (do not unpack it).
+
+ <table class="download">
+ <tr>
+ <th>Name</th>
+ <th>Package</th>
+ <th>Size</th>
+ <th>MD5 Checksum</th>
+ </tr>
+ <tr>
+ <td>ADT {@adtZipVersion}</td>
+ <td>
+ <a href="http://dl.google.com/android/{@adtZipDownload}">{@adtZipDownload}</a>
+ </td>
+ <td>{@adtZipBytes} bytes</td>
+ <td>{@adtZipChecksum}</td>
+ </tr>
+</table>
+</li>
+
+</li>
+ <li>Follow steps 1 and 2 in the <a href="#installing">default install
+ instructions</a> (above).</li>
+ <li>In the Add Site dialog, click <strong>Archive</strong>.</li>
+ <li>Browse and select the downloaded zip file.</li>
+ <li>Enter a name for the local update site (e.g.,
+ "Android Plugin") in the "Name" field.</li>
+ <li>Click <strong>OK</strong>.
+ <li>Follow the remaining procedures as listed for
+ <a href="#installing">default installation</a> above,
+ starting from step 4.</li>
+</ol>
+
+<p>To update your plugin once you've installed using the zip file, you will have
+to follow these steps again instead of the default update instructions.</p>
+
+<h4>Other install errors</h4>
+
+<p>Note that there are features of ADT that require some optional
+Eclipse packages (for example, WST). If you encounter an error when
+installing ADT, your Eclipse installion might not include these packages.
+For information about how to quickly add the necessary packages to your
+Eclipse installation, see the troubleshooting topic
+<a href="{@docRoot}resources/faq/troubleshooting.html#installeclipsecomponents">ADT
+Installation Error: "requires plug-in org.eclipse.wst.sse.ui"</a>.</p>
+
+<h4>For Linux users</h4>
+<p>If you encounter this error when installing the ADT Plugin for Eclipse:
+<pre>
+An error occurred during provisioning.
+Cannot connect to keystore.
+JKS</pre>
+<p>
+...then your development machine lacks a suitable Java VM. Installing Sun
+Java 6 will resolve this issue and you can then reinstall the ADT
+Plugin.</p>
diff --git a/docs/html/sdk/installing/next.jd b/docs/html/sdk/installing/next.jd
new file mode 100644
index 000000000000..b1da7c69dc24
--- /dev/null
+++ b/docs/html/sdk/installing/next.jd
@@ -0,0 +1,52 @@
+page.title=Next Steps
+walkthru=1
+
+@jd:body
+
+
+<p>Now that you've installed the Android SDK, here are are a few ways to learn Android
+and start developing: </p>
+
+<h3>Start coding</h3>
+<ul>
+ <li>Follow the training class for <a
+href="{@docRoot}training/basics/firstapp/index.html">Building Your First App</a>.
+ <p>This class is an essential first step for new Android developers.</p>
+ <p>It gives you step by step instructions for building a simple app. You’ll learn how to
+create an Android project and run a debuggable version of the app. You'll also learn some
+fundamentals of Android app design, including how to build a simple user interface and handle user
+input.</p>
+</li>
+</ul>
+
+
+<h3>Learn how to design your app</h3>
+<ul>
+ <li>Learn the best practices for Android design and user experience by reading the Android <a
+href="{@docRoot}design/index.html">Design</a> guidelines.</li>
+</ul>
+
+
+<h3>Read up on the API framework</h3>
+<ul>
+ <li>Start reading about fundamental framework topics in the collection of <a
+href="{@docRoot}guide/components/index.html">API Guides</a>.</li>
+ <li>Browse the API specifications in the <a
+ href="{@docRoot}reference/packages.html">Reference</a>.</li>
+</ul>
+
+
+<h3>Explore the development tools</h3>
+<ul>
+ <li>Learn about developing an app with the Android Developer Tools plugin for Eclipse
+ and other tools from the <a
+ href="{@docRoot}tools/workflow/index.html">Workflow</a>.</li>
+</ul>
+
+
+<h3>Explore some code</h3>
+
+<ul>
+ <li>Browse the sample apps available from the Android SDK Manager. You'll find them in
+<code><em>&lt;sdk&gt;</em>/samples/<em>&lt;platform-version&gt;/</em></code>. </li>
+</ul>
diff --git a/docs/html/sdk/older_releases.jd b/docs/html/sdk/older_releases.jd
index 870ff04df37d..bb274b67aa7a 100644
--- a/docs/html/sdk/older_releases.jd
+++ b/docs/html/sdk/older_releases.jd
@@ -15,7 +15,7 @@ development and testing.</p>
<p>If you already have an Android SDK for platform version 1.6 or newer, then
you do not need to install a new SDK&mdash;especially not one from this page.
You should install older platforms as components of your existing SDK.
-See <a href="adding-components.html">Adding SDK Components</a>.</p>
+See <a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a>.</p>
</div>
diff --git a/docs/html/sdk/preview/features.jd b/docs/html/sdk/preview/features.jd
deleted file mode 100644
index d7ecc47ce8f4..000000000000
--- a/docs/html/sdk/preview/features.jd
+++ /dev/null
@@ -1,8 +0,0 @@
-@jd:body
-
-<script type="text/javascript">
- document.location=toRoot+"sdk/android-3.0.html"
-</script>
-
-<p>You should have already been redirected by your browser. Please go to the
-<a href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a>.</p> \ No newline at end of file
diff --git a/docs/html/sdk/preview/installing.jd b/docs/html/sdk/preview/installing.jd
deleted file mode 100644
index 94c6f2f9ab95..000000000000
--- a/docs/html/sdk/preview/installing.jd
+++ /dev/null
@@ -1,8 +0,0 @@
-@jd:body
-
-<script type="text/javascript">
- document.location=toRoot+"sdk/installing.html"
-</script>
-
-<p>You should have already been redirected by your browser. Please go to
-<a href="{@docRoot}sdk/installing.html">Installing the SDK</a>.</p> \ No newline at end of file
diff --git a/docs/html/sdk/requirements.jd b/docs/html/sdk/requirements.jd
deleted file mode 100644
index c76e8c8b82a3..000000000000
--- a/docs/html/sdk/requirements.jd
+++ /dev/null
@@ -1,114 +0,0 @@
-page.title=System Requirements
-@jd:body
-
-<p>The sections below describe the system and software requirements for developing
-Android applications using the Android SDK. </p>
-
-<h3>Supported Operating Systems</h3>
-<ul>
- <li>Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)</li>
- <li>Mac OS X 10.5.8 or later (x86 only)</li>
- <li>Linux (tested on Ubuntu Linux, Lucid Lynx)
- <ul>
- <li>GNU C Library (glibc) 2.7 or later is required.</li>
- <li>On Ubuntu Linux, version 8.04 or later is required.</li>
- <li>64-bit distributions must be capable of running 32-bit applications.
- For information about how to add support for 32-bit applications, see
- the <a href="installing.html#troubleshooting">Ubuntu Linux
- installation notes</a>.</li>
- </ul>
- </li>
-</ul>
-
-<h3>Supported Development Environments</h3>
-
-<h4 style="margin-top:.25em"><em>Eclipse IDE</em></h4>
- <ul>
- <li>Eclipse 3.6.2 (Helios) or greater
-<p class="note"><strong>Note:</strong> Eclipse 3.5 (Galileo) is no longer
-supported with the latest version of ADT.</p></li>
- <li>Eclipse <a href="http://www.eclipse.org/jdt">JDT</a> plugin (included
-in most Eclipse IDE packages) </li>
- <li>If you need to install or update Eclipse, you can download it from <a
-href="http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a>.
-
- <p>Several types of Eclipse packages are available for each platform. For
-developing Android applications, we recommend that you install one of these
-packages: </p>
- <ul>
- <li>Eclipse IDE for Java Developers</li>
- <li>Eclipse Classic</li>
- <li>Eclipse IDE for Java EE Developers</li>
- </ul>
- </li>
- <li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK 6</a>
- (JRE alone is not sufficient)</li>
- <li><a href="eclipse-adt.html">Android Development Tools plugin</a>
-(recommended)</li>
- <li><strong>Not</strong> compatible with Gnu Compiler for Java (gcj)</li>
- </ul>
-
-
-<h4><em>Other development environments or IDEs</em></h4>
- <ul>
- <li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK 6</a>
- (JRE alone is not sufficient)</li>
- <li><a href="http://ant.apache.org/">Apache Ant</a> 1.8 or later</li>
- <li><strong>Not</strong> compatible with Gnu Compiler for Java (gcj)</li>
- </ul>
- </li>
-</ul>
-
-<p class="note"><strong>Note:</strong> If JDK is already installed on your development computer, please take a moment to make sure that it meets the version requirements listed above. In
-particular, note that some Linux distributions may include JDK 1.4 or Gnu Compiler for Java, both of which are not supported for Android development. </p>
-
-<h3>Hardware requirements</h3>
-
-<p>The Android SDK requires disk storage for all of the components that you choose to install. The table below provides a rough idea of the disk-space requirements to expect, based on the components that you plan to use. </p>
-
-<table>
-<tr>
-<th>Component type</th>
-<th>Approximate size</th>
-<th>Comments</th>
-</tr>
-<tr>
-<td>SDK Tools</td>
-<td>35 MB</td>
-<td>Required.</td>
-</tr>
-<tr>
-<td>SDK Platform-tools</td>
-<td>6 MB</td>
-<td>Required.</td>
-</tr>
-<tr>
-<td>Android platform (each)</td>
-<td>150 MB</td>
-<td>At least one platform is required.</td>
-</tr>
-<tr>
-<td>SDK Add-on (each)</td>
-<td>100 MB</td>
-<td>Optional.</td>
-</tr>
-<tr>
-<td>USB Driver for Windows</td>
-<td>10 MB</td>
-<td>Optional. For Windows only.</td>
-</tr>
-<tr>
-<td>Samples (per platform)</td>
-<td>10M</td>
-<td>Optional.</td>
-</tr>
-<tr>
-<td>Offline documentation</td>
-<td>250 MB</td>
-<td>Optional.</td>
-</tr>
-</table>
-
-<p>Note that the disk-space requirements above are <em>in addition to</em> those of the Eclipse IDE, JDK, or other prerequisite tools that you may need to install on your development computer.</p>
-
-
diff --git a/docs/html/sdk/sdk_toc.cs b/docs/html/sdk/sdk_toc.cs
deleted file mode 100644
index e994d9516448..000000000000
--- a/docs/html/sdk/sdk_toc.cs
+++ /dev/null
@@ -1,228 +0,0 @@
-<?cs if:!sdk.redirect ?>
-<ul>
- <li>
- <span class="heading">
- <span class="en">Android SDK Starter Package</span>
- <span style="display:none" class="de">Aktuelle SDK-Version</span>
- <span style="display:none" class="es">Versión actual del SDK</span>
- <span style="display:none" class="fr">Version actuelle du SDK</span>
- <span style="display:none" class="it">Release SDK attuale</span>
- <span style="display:none" class="ja">現在リリースされている SDK</span>
- <span style="display:none" class="zh-CN">当前的 SDK 版本</span>
- <span style="display:none" class="zh-TW">目前 SDK 發行版本</span>
- </span>
- <ul><?cs
- if:android.whichdoc == "online" ?>
- <li><a href="<?cs var:toroot ?>sdk/index.html">
- <span class="en">Download</span>
- <span style="display:none" class="de">Herunterladen</span>
- <span style="display:none" class="es">Descargar</span>
- <span style="display:none" class="fr">Téléchargement</span>
- <span style="display:none" class="it">Download</span>
- <span style="display:none" class="ja">ダウンロード</span>
- <span style="display:none" class="zh-CN">下载</span>
- <span style="display:none" class="zh-TW">下載</span>
- </a></li><?cs
- /if ?>
- <li><a href="<?cs var:toroot ?>sdk/installing.html">
- <span class="en">Installing the SDK</span>
- <span style="display:none" class="de">Installieren</span>
- <span style="display:none" class="es">Instalación</span>
- <span style="display:none" class="fr">Installation</span>
- <span style="display:none" class="it">Installazione</span>
- <span style="display:none" class="ja">インストール</span>
- <span style="display:none" class="zh-CN">安装</span>
- <span style="display:none" class="zh-TW">安裝</span>
- </a></li>
- </ul>
- </li><?cs
- if:sdk.preview ?>
- <li>
- <span class="heading">Android 3.0 Preview SDK</span>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/preview/start.html">Getting Started</a></li>
- </ul>
- </li><?cs
- /if ?>
- <?cs
- if:sdk.preview ?>
- <li>
- <span class="heading">Android x.x Preview</span>
- <ul>
- </ul>
- </li><?cs
- /if ?>
- <li>
- <span class="heading">
- <span class="en">Downloadable SDK Packages</span>
- <span style="display:none" class="de"></span>
- <span style="display:none" class="es"></span>
- <span style="display:none" class="fr"></span>
- <span style="display:none" class="it"></span>
- <span style="display:none" class="ja"></span>
- <span style="display:none" class="zh-CN"></span>
- <span style="display:none" class="zh-TW"></span>
- </span>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/adding-components.html">
- <span class="en">Adding SDK Packages</span>
- <span style="display:none" class="de"></span>
- <span style="display:none" class="es"></span>
- <span style="display:none" class="fr"></span>
- <span style="display:none" class="it"></span>
- <span style="display:none" class="ja"></span>
- <span style="display:none" class="zh-CN"></span>
- <span style="display:none" class="zh-TW"></span></a>
- </li>
- </ul>
- <ul>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>sdk/android-4.0-highlights.html">
- <span class="en">Android 4.0.x Platform</span></a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/android-4.0.3.html">Android 4.0.3 Platform</a></li>
- <li><a href="<?cs var:toroot ?>sdk/android-4.0.html">Android 4.0 Platform</a> </li>
- </ul>
- </li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>sdk/android-3.2.html">
- <span class="en">Android 3.2 Platform</span></a></div>
- <ul>
- <!-- <li><a href="<?cs var:toroot ?>sdk/android-3.2-highlights.html">Platform Highlights</a></li> -->
- <li><a href="<?cs var:toroot ?>sdk/api_diff/13/changes.html">API Differences Report &raquo;</a></li>
- </ul>
- </li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>sdk/android-3.1.html">
- <span class="en">Android 3.1 Platform</span></a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/android-3.1-highlights.html">Platform Highlights</a></li>
- <li><a href="<?cs var:toroot ?>sdk/api_diff/12/changes.html">API Differences Report &raquo;</a></li>
- </ul>
- </li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>sdk/android-3.0.html">
- <span class="en">Android 3.0 Platform</span></a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/android-3.0-highlights.html">Platform Highlights</a></li>
- <li><a href="<?cs var:toroot ?>sdk/api_diff/11/changes.html">API Differences Report &raquo;</a></li>
- </ul>
- </li>
- <li><a href="<?cs var:toroot ?>sdk/android-2.3.4.html">Android 2.3.4 Platform</span></a></li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>sdk/android-2.3.3.html">
- <span class="en">Android 2.3.3 Platform</span></a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/api_diff/10/changes.html">API Differences Report &raquo;</a></li>
- </ul>
- </li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>sdk/android-2.2.html">
- <span class="en">Android 2.2 Platform</span></a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/android-2.2-highlights.html">Platform Highlights</a></li>
- <li><a href="<?cs var:toroot ?>sdk/api_diff/8/changes.html">API Differences Report &raquo;</a></li>
- </ul>
- </li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>sdk/android-2.1.html">
- <span class="en">Android 2.1 Platform</span></a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/api_diff/7/changes.html">API Differences Report &raquo;</a></li>
- </ul>
- </li>
- <li class="toggle-list">
- <div><a href="#" onclick="toggle(this.parentNode.parentNode,true); return false;">Other Platforms</a></div>
- <ul>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>sdk/android-2.3.html">
- <span class="en">Android 2.3 Platform</span></a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/android-2.3-highlights.html">Platform Highlights</a></li>
- <li><a href="<?cs var:toroot ?>sdk/api_diff/9/changes.html">API Differences Report &raquo;</a></li>
- </ul>
- </li>
- <li><a href="<?cs var:toroot ?>sdk/android-2.0.1.html">Android 2.0.1 Platform</a></li>
- <li><a href="<?cs var:toroot ?>sdk/android-2.0.html">Android 2.0 Platform</a></li>
- <li><a href="<?cs var:toroot ?>sdk/android-1.6.html">Android 1.6 Platform</a></li>
- <li><a href="<?cs var:toroot ?>sdk/android-1.5.html">Android 1.5 Platform</a></li>
- <li><a href="<?cs var:toroot ?>sdk/android-1.1.html">Android 1.1 Platform</a></li>
- </ul>
- </li>
- </ul>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/tools-notes.html">SDK Tools, r19</a></li>
- <li><a href="<?cs var:toroot ?>sdk/win-usb.html">Google USB Driver, r4</a></li>
- <li><a href="<?cs var:toroot ?>sdk/compatibility-library.html">Support Package, r7</a></li>
- </ul>
- </li>
- <li>
- <span class="heading">
- <span class="en">ADT Plugin for Eclipse</span>
- <span style="display:none" class="de"></span>
- <span style="display:none" class="es"></span>
- <span style="display:none" class="fr"></span>
- <span style="display:none" class="it"></span>
- <span style="display:none" class="ja"></span>
- <span style="display:none" class="zh-CN"></span>
- <span style="display:none" class="zh-TW"></span>
- </span>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/eclipse-adt.html">ADT 18.0.0
- <span style="display:none" class="de"></span>
- <span style="display:none" class="es"></span>
- <span style="display:none" class="fr"></span>
- <span style="display:none" class="it"></span>
- <span style="display:none" class="ja"></span>
- <span style="display:none" class="zh-CN"></span>
- <span style="display:none" class="zh-TW"></span></a>
- </li>
- </ul>
- </li>
- <li>
- <span class="heading">
- <span class="en">Native Development Tools</span>
- <span style="display:none" class="de"></span>
- <span style="display:none" class="es"></span>
- <span style="display:none" class="fr"></span>
- <span style="display:none" class="it"></span>
- <span style="display:none" class="ja"></span>
- <span style="display:none" class="zh-CN"></span>
- <span style="display:none" class="zh-TW"></span>
- </span>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/ndk/index.html">Android NDK, r7c</a></li>
- <li><a href="<?cs var:toroot ?>sdk/ndk/overview.html">What is the NDK?</a></li>
- </ul>
- </li>
-
- <li>
- <span class="heading">
- <span class="en">More Information</span>
- <span style="display:none" class="de"></span>
- <span style="display:none" class="es"></span>
- <span style="display:none" class="fr"></span>
- <span style="display:none" class="it"></span>
- <span style="display:none" class="ja"></span>
- <span style="display:none" class="zh-CN"></span>
- <span style="display:none" class="zh-TW"></span>
- </span>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/oem-usb.html">
- <span class="en">OEM USB Drivers</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>sdk/requirements.html">SDK System Requirements</a></li>
- <li><a href="<?cs var:toroot ?>sdk/older_releases.html">SDK Archives</a></li>
-
- </ul>
- </li>
-
-</ul>
-
-<script type="text/javascript">
-<!--
- buildToggleLists();
- changeNavLang(getLangPref());
-//-->
-</script>
-<?cs /if ?>
diff --git a/docs/html/sdk/terms.jd b/docs/html/sdk/terms.jd
deleted file mode 100644
index 614a438ef17c..000000000000
--- a/docs/html/sdk/terms.jd
+++ /dev/null
@@ -1,207 +0,0 @@
-page.title=Terms and Conditions
-hide_license_footer=true
-@jd:body
-
-<p>This is the Android Software Development Kit License Agreement.</p>
-
-<h2>
- 1. Introduction
-</h2>
-<p>
- 1.1 The Android Software Development Kit (referred to in this License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK.
-
-</p>
-<p>
- 1.2 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
-</p>
-<h2>
- 2. Accepting this License Agreement
-</h2>
-<p>
- 2.1 In order to use the SDK, you must first agree to this License Agreement. You may not use the SDK if you do not accept this License Agreement.
-</p>
-<p>
- 2.2 You can accept this License Agreement by:
-</p>
-<p>
- (A) clicking to accept or agree to this License Agreement, where this option is made available to you; or
-</p>
-<p>
- (B) by actually using the SDK. In this case, you agree that use of the SDK constitutes acceptance of the Licensing Agreement from that point onwards.
-</p>
-<p>
- 2.3 You may not use the SDK and may not accept the Licensing Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries including the country in which you are resident or from which you use the SDK.
-</p>
-<p>
- 2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the Licensing Agreement or use the SDK on behalf of your employer or other entity.
-</p>
-<h2>
- 3. SDK License from Google
-</h2>
-<p>
- 3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, non- assignable and non-exclusive license to use the SDK solely to develop applications to run on the Android platform.
-</p>
-<p>
- 3.2 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
-
-</p>
-<p>
- 3.3 Except to the extent required by applicable third party licenses, you may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK. Except to the extent required by applicable third party licenses, you may not load any part of the SDK onto a mobile handset or any other hardware device except a personal computer, combine any part of the SDK with other software, or distribute any software or device incorporating a part of the SDK.
-</p>
-<p>
- 3.4 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement.
-</p>
-<p>
- 3.5 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you.
-</p>
-<p>
- 3.6 Nothing in this License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
-</p>
-<p>
- 3.7 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.
-</p>
-<h2>
- 4. Use of the SDK by You
-</h2>
-<p>
- 4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications.
-</p>
-<p>
- 4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) this License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
-</p>
-<p>
- 4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, your must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so.
-</p>
-<p>
- 4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier.
-</p>
-<p>
- 4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through the Android platform and/or applications for the Android platform, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
-</p>
-<p>
- 4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
-</p>
-<h2>
- 5. Your Developer Credentials
-</h2>
-<p>
- 5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
-</p>
-<h2>
- 6. Privacy and Information
-</h2>
-<p>
- 6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected.
-</p>
-<p>
- 6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy.
-</p>
-<h2>
- 7. Third Party Applications for the Android Platform
-</h2>
-<p>
- 7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
-</p>
-<p>
- 7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
-</p>
-<p>
- 7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, this License Agreement does not affect your legal relationship with these third parties.
-</p>
-<h2>
- 8. Using Android APIs
-</h2>
-<p>
- 8.1 Google Data APIs
-</p>
-<p>
- 8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
-</p>
-<p>
- 8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
-
-</p>
-<h2>
- 9. Terminating this License Agreement
-</h2>
-<p>
- 9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below.
-</p>
-<p>
- 9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials.
-</p>
-<p>
- 9.3 Google may at any time, terminate this License Agreement with you if:
-</p>
-<p>
- (A) you have breached any provision of this License Agreement; or
-</p>
-<p>
- (B) Google is required to do so by law; or
-</p>
-<p>
- (C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or
-</p>
-<p>
- (D) Google decides to no longer providing the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
-</p>
-<p>
- 9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
-</p>
-<h2>
- 10. DISCLAIMER OF WARRANTIES
-</h2>
-<p>
- 10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-</p>
-<p>
- 10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
-</p>
-<p>
- 10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-</p>
-<h2>
- 11. LIMITATION OF LIABILITY
-</h2>
-<p>
- 11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
-</p>
-<h2>
- 12. Indemnification
-</h2>
-<p>
- 12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this License Agreement.
-</p>
-<h2>
- 13. Changes to the License Agreement
-</h2>
-<p>
- 13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.
-</p>
-<h2>
- 14. General Legal Terms
-</h2>
-<p>
- 14.1 This License Agreement constitute the whole legal agreement between you and Google and govern your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replace any prior agreements between you and Google in relation to the SDK.
-</p>
-<p>
- 14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
-</p>
-<p>
- 14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable.
-</p>
-<p>
- 14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to this License Agreement.
-</p>
-<p>
- 14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-</p>
-<p>
- 14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party.
-</p>
-<p>
- 14.7 This License Agreement, and your relationship with Google under this License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from this License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
-</p>
-<p>
- <em>April 10, 2009</em>
-</p>
diff --git a/docs/html/sdk/terms_body.html b/docs/html/sdk/terms_body.html
deleted file mode 100644
index 8c55b37bc61d..000000000000
--- a/docs/html/sdk/terms_body.html
+++ /dev/null
@@ -1,336 +0,0 @@
-
-
-<p>This is the Android Software Development Kit License Agreement.</p>
-
-<h2>
- 1. Introduction
-</h2>
-<p>
- 1.1 The Android Software Development Kit (referred to in this License Agreement as the "SDK"
-and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is
-licensed to you subject to the terms of this License Agreement. This License Agreement forms a
-legally binding contract between you and Google in relation to your use of the SDK.
-
-</p>
-<p>
- 1.2 "Google" means Google Inc., a Delaware corporation with principal place of business at
-1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
-</p>
-<h2>
- 2. Accepting this License Agreement
-</h2>
-<p>
- 2.1 In order to use the SDK, you must first agree to this License Agreement. You may not use
-the SDK if you do not accept this License Agreement.
-</p>
-<p>
- 2.2 You can accept this License Agreement by:
-</p>
-<p>
- (A) clicking to accept or agree to this License Agreement, where this option is made
-available to you; or
-</p>
-<p>
- (B) by actually using the SDK. In this case, you agree that use of the SDK constitutes
-acceptance of the Licensing Agreement from that point onwards.
-</p>
-<p>
- 2.3 You may not use the SDK and may not accept the Licensing Agreement if you are a person
-barred from receiving the SDK under the laws of the United States or other countries including the
-country in which you are resident or from which you use the SDK.
-</p>
-<p>
- 2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or
-other entity, you represent and warrant that you have full legal authority to bind your employer or
-such entity to this License Agreement. If you do not have the requisite authority, you may not
-accept the Licensing Agreement or use the SDK on behalf of your employer or other entity.
-</p>
-<h2>
- 3. SDK License from Google
-</h2>
-<p>
- 3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide,
-royalty-free, non- assignable and non-exclusive license to use the SDK solely to develop
-applications to run on the Android platform.
-</p>
-<p>
- 3.2 You agree that Google or third parties own all legal right, title and interest in and to
-the SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property
-Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law,
-and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
-
-</p>
-<p>
- 3.3 Except to the extent required by applicable third party licenses, you may not copy
-(except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble,
-or create derivative works of the SDK or any part of the SDK. Except to the extent required by
-applicable third party licenses, you may not load any part of the SDK onto a mobile handset or any
-other hardware device except a personal computer, combine any part of the SDK with other software,
-or distribute any software or device incorporating a part of the SDK.
-</p>
-<p>
- 3.4 Use, reproduction and distribution of components of the SDK licensed under an open
-source software license are governed solely by the terms of that open source software license and
-not this License Agreement.
-</p>
-<p>
- 3.5 You agree that the form and nature of the SDK that Google provides may change without
-prior notice to you and that future versions of the SDK may be incompatible with applications
-developed on previous versions of the SDK. You agree that Google may stop (permanently or
-temporarily) providing the SDK (or any features within the SDK) to you or to users generally at
-Google's sole discretion, without prior notice to you.
-</p>
-<p>
- 3.6 Nothing in this License Agreement gives you a right to use any of Google's trade names,
-trademarks, service marks, logos, domain names, or other distinctive brand features.
-</p>
-<p>
- 3.7 You agree that you will not remove, obscure, or alter any proprietary rights notices
-(including copyright and trademark notices) that may be affixed to or contained within the SDK.
-</p>
-<h2>
- 4. Use of the SDK by You
-</h2>
-<p>
- 4.1 Google agrees that it obtains no right, title or interest from you (or your licensors)
-under this License Agreement in or to any software applications that you develop using the SDK,
-including any intellectual property rights that subsist in those applications.
-</p>
-<p>
- 4.2 You agree to use the SDK and write applications only for purposes that are permitted by
-(a) this License Agreement and (b) any applicable law, regulation or generally accepted practices or
-guidelines in the relevant jurisdictions (including any laws regarding the export of data or
-software to and from the United States or other relevant countries).
-</p>
-<p>
- 4.3 You agree that if you use the SDK to develop applications for general public users, you
-will protect the privacy and legal rights of those users. If the users provide you with user names,
-passwords, or other login information or personal information, your must make the users aware that
-the information will be available to your application, and you must provide legally adequate privacy
-notice and protection for those users. If your application stores personal or sensitive information
-provided by users, it must do so securely. If the user provides your application with Google Account
-information, your application may only use that information to access the user's Google Account
-when, and for the limited purposes for which, the user has given you permission to do so.
-</p>
-<p>
- 4.4 You agree that you will not engage in any activity with the SDK, including the
-development or distribution of an application, that interferes with, disrupts, damages, or accesses
-in an unauthorized manner the servers, networks, or other properties or services of any third party
-including, but not limited to, Google or any mobile communications carrier.
-</p>
-<p>
- 4.5 You agree that you are solely responsible for (and that Google has no responsibility to
-you or to any third party for) any data, content, or resources that you create, transmit or display
-through the Android platform and/or applications for the Android platform, and for the consequences
-of your actions (including any loss or damage which Google may suffer) by doing so.
-</p>
-<p>
- 4.6 You agree that you are solely responsible for (and that Google has no responsibility to
-you or to any third party for) any breach of your obligations under this License Agreement, any
-applicable third party contract or Terms of Service, or any applicable law or regulation, and for
-the consequences (including any loss or damage which Google or any third party may suffer) of any
-such breach.
-</p>
-<h2>
- 5. Your Developer Credentials
-</h2>
-<p>
- 5.1 You agree that you are responsible for maintaining the confidentiality of any developer
-credentials that may be issued to you by Google or which you may choose yourself and that you will
-be solely responsible for all applications that are developed under your developer credentials.
-</p>
-<h2>
- 6. Privacy and Information
-</h2>
-<p>
- 6.1 In order to continually innovate and improve the SDK, Google may collect certain usage
-statistics from the software including but not limited to a unique identifier, associated IP
-address, version number of the software, and information on which tools and/or services in the SDK
-are being used and how they are being used. Before any of this information is collected, the SDK
-will notify you and seek your consent. If you withhold consent, the information will not be
-collected.
-</p>
-<p>
- 6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in
-accordance with Google's Privacy Policy.
-</p>
-<h2>
- 7. Third Party Applications for the Android Platform
-</h2>
-<p>
- 7.1 If you use the SDK to run applications developed by a third party or that access data,
-content or resources provided by a third party, you agree that Google is not responsible for those
-applications, data, content, or resources. You understand that all data, content or resources which
-you may access through such third party applications are the sole responsibility of the person from
-which they originated and that Google is not liable for any loss or damage that you may experience
-as a result of the use or access of any of those third party applications, data, content, or
-resources.
-</p>
-<p>
- 7.2 You should be aware the data, content, and resources presented to you through such a
-third party application may be protected by intellectual property rights which are owned by the
-providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan,
-sell, distribute or create derivative works based on these data, content, or resources (either in
-whole or in part) unless you have been specifically given permission to do so by the relevant
-owners.
-</p>
-<p>
- 7.3 You acknowledge that your use of such third party applications, data, content, or
-resources may be subject to separate terms between you and the relevant third party. In that case,
-this License Agreement does not affect your legal relationship with these third parties.
-</p>
-<h2>
- 8. Using Android APIs
-</h2>
-<p>
- 8.1 Google Data APIs
-</p>
-<p>
- 8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be
-protected by intellectual property rights which are owned by Google or those parties that provide
-the data (or by other persons or companies on their behalf). Your use of any such API may be subject
-to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create
-derivative works based on this data (either in whole or in part) unless allowed by the relevant
-Terms of Service.
-</p>
-<p>
- 8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree
-that you shall retrieve data only with the user's explicit consent and only when, and for the
-limited purposes for which, the user has given you permission to do so.
-
-</p>
-<h2>
- 9. Terminating this License Agreement
-</h2>
-<p>
- 9.1 This License Agreement will continue to apply until terminated by either you or Google
-as set out below.
-</p>
-<p>
- 9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of
-the SDK and any relevant developer credentials.
-</p>
-<p>
- 9.3 Google may at any time, terminate this License Agreement with you if:
-</p>
-<p>
- (A) you have breached any provision of this License Agreement; or
-</p>
-<p>
- (B) Google is required to do so by law; or
-</p>
-<p>
- (C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has
-terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or
-</p>
-<p>
- (D) Google decides to no longer providing the SDK or certain parts of the SDK to users in
-the country in which you are resident or from which you use the service, or the provision of the SDK
-or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially
-viable.
-</p>
-<p>
- 9.4 When this License Agreement comes to an end, all of the legal rights, obligations and
-liabilities that you and Google have benefited from, been subject to (or which have accrued over
-time whilst this License Agreement has been in force) or which are expressed to continue
-indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall
-continue to apply to such rights, obligations and liabilities indefinitely.
-</p>
-<h2>
- 10. DISCLAIMER OF WARRANTIES
-</h2>
-<p>
- 10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND
-THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-</p>
-<p>
- 10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE
-OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR
-COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
-</p>
-<p>
- 10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER
-EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-</p>
-<h2>
- 11. LIMITATION OF LIABILITY
-</h2>
-<p>
- 11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND
-ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY
-LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN
-AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
-</p>
-<h2>
- 12. Indemnification
-</h2>
-<p>
- 12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold
-harmless Google, its affiliates and their respective directors, officers, employees and agents from
-and against any and all claims, actions, suits or proceedings, as well as any and all losses,
-liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or
-accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any
-copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any
-person or defames any person or violates their rights of publicity or privacy, and (c) any
-non-compliance by you with this License Agreement.
-</p>
-<h2>
- 13. Changes to the License Agreement
-</h2>
-<p>
- 13.1 Google may make changes to the License Agreement as it distributes new versions of the
-SDK. When these changes are made, Google will make a new version of the License Agreement available
-on the website where the SDK is made available.
-</p>
-<h2>
- 14. General Legal Terms
-</h2>
-<p>
- 14.1 This License Agreement constitute the whole legal agreement between you and Google and
-govern your use of the SDK (excluding any services which Google may provide to you under a separate
-written agreement), and completely replace any prior agreements between you and Google in relation
-to the SDK.
-</p>
-<p>
- 14.2 You agree that if Google does not exercise or enforce any legal right or remedy which
-is contained in this License Agreement (or which Google has the benefit of under any applicable
-law), this will not be taken to be a formal waiver of Google's rights and that those rights or
-remedies will still be available to Google.
-</p>
-<p>
- 14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any
-provision of this License Agreement is invalid, then that provision will be removed from this
-License Agreement without affecting the rest of this License Agreement. The remaining provisions of
-this License Agreement will continue to be valid and enforceable.
-</p>
-<p>
- 14.4 You acknowledge and agree that each member of the group of companies of which Google is
-the parent shall be third party beneficiaries to this License Agreement and that such other
-companies shall be entitled to directly enforce, and rely upon, any provision of this License
-Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person
-or company shall be third party beneficiaries to this License Agreement.
-</p>
-<p>
- 14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS.
-YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE
-SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-</p>
-<p>
- 14.6 The rights granted in this License Agreement may not be assigned or transferred by
-either you or Google without the prior written approval of the other party. Neither you nor Google
-shall be permitted to delegate their responsibilities or obligations under this License Agreement
-without the prior written approval of the other party.
-</p>
-<p>
- 14.7 This License Agreement, and your relationship with Google under this License Agreement,
-shall be governed by the laws of the State of California without regard to its conflict of laws
-provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located
-within the county of Santa Clara, California to resolve any legal matter arising from this License
-Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for
-injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
-</p>
-<p>
- <em>April 10, 2009</em>
-</p> \ No newline at end of file
diff --git a/docs/html/sdk/win-usb.jd b/docs/html/sdk/win-usb.jd
index 3be0faf99bfc..802615e3849d 100644
--- a/docs/html/sdk/win-usb.jd
+++ b/docs/html/sdk/win-usb.jd
@@ -10,7 +10,7 @@ page.title=Google USB Driver
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}sdk/oem-usb.html#InstallingDriver">Installing a USB Driver</a></li>
+ <li><a href="{@docRoot}tools/extras/oem-usb.html#InstallingDriver">Installing a USB Driver</a></li>
<li><a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a></li>
<li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a></li>
</ol>
@@ -30,7 +30,7 @@ following devices:</p>
<p>* <em>Or similar hardware on other carriers</em></p>
<p>All other devices require Windows drivers provided by the hardware manufacturer, as listed in
-the <a href="{@docRoot}sdk/oem-usb.html">OEM USB Drivers</a> document. The Galaxy Nexus
+the <a href="{@docRoot}tools/extras/oem-usb.html">OEM USB Drivers</a> document. The Galaxy Nexus
driver is also distributed by <a
href="http://www.samsung.com/us/support/downloads/verizon-wireless/SCH-I515MSAVZW">Samsung</a>
(listed as model SCH-I515).</p>
@@ -169,4 +169,4 @@ included with the <a href="{@docRoot}sdk/index.html">Android SDK</a>:</p>
downloaded into the <code>&lt;sdk&gt;\extras\google\usb_driver\</code> directory.</li>
</ol>
-<p>For installation information, read <a href="{@docRoot}sdk/oem-usb.html#InstallingDriver">Installing a USB Driver</a>.</p>
+<p>For installation information, read <a href="{@docRoot}tools/extras/oem-usb.html#InstallingDriver">Installing a USB Driver</a>.</p>
diff --git a/docs/html/search.jd b/docs/html/search.jd
deleted file mode 100644
index 407bc86b570b..000000000000
--- a/docs/html/search.jd
+++ /dev/null
@@ -1,148 +0,0 @@
-page.title=Search Results
-@jd:body
-
-<script src="http://www.google.com/jsapi" type="text/javascript"></script>
-<script src="{@docRoot}assets/jquery-history.js" type="text/javascript"></script>
-<script type="text/javascript">
- var tabIndex = 0;
-
- google.load('search', '1');
-
- function OnLoad() {
- document.getElementById("search_autocomplete").style.color = "#000";
-
- // create search control
- searchControl = new google.search.SearchControl();
-
- // use our existing search form and use tabs when multiple searchers are used
- drawOptions = new google.search.DrawOptions();
- drawOptions.setDrawMode(google.search.SearchControl.DRAW_MODE_TABBED);
- drawOptions.setInput(document.getElementById("search_autocomplete"));
-
- // configure search result options
- searchOptions = new google.search.SearcherOptions();
- searchOptions.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
-
- // configure each of the searchers, for each tab
- devSiteSearcher = new google.search.WebSearch();
- devSiteSearcher.setUserDefinedLabel("All");
- devSiteSearcher.setSiteRestriction("001482626316274216503:zu90b7s047u");
-
- devGuideSearcher = new google.search.WebSearch();
- devGuideSearcher.setUserDefinedLabel("Dev Guide");
- devGuideSearcher.setSiteRestriction("http://developer.android.com/guide/");
-
- referenceSearcher = new google.search.WebSearch();
- referenceSearcher.setUserDefinedLabel("Reference");
- referenceSearcher.setSiteRestriction("http://developer.android.com/reference/");
-
- blogSearcher = new google.search.WebSearch();
- blogSearcher.setUserDefinedLabel("Blog");
- blogSearcher.setSiteRestriction("http://android-developers.blogspot.com");
-
- groupsSearcher = new google.search.WebSearch();
- groupsSearcher.setUserDefinedLabel("Developer Groups");
- groupsSearcher.setSiteRestriction("001283715400630100512:ggqrtvkztwm");
-
- sourceSiteSearcher = new google.search.WebSearch();
- sourceSiteSearcher.setUserDefinedLabel("Android Source");
- sourceSiteSearcher.setSiteRestriction("http://source.android.com");
-
- // add each searcher to the search control
- searchControl.addSearcher(devSiteSearcher, searchOptions);
- searchControl.addSearcher(devGuideSearcher, searchOptions);
- searchControl.addSearcher(referenceSearcher, searchOptions);
- searchControl.addSearcher(groupsSearcher, searchOptions);
- searchControl.addSearcher(sourceSiteSearcher, searchOptions);
- searchControl.addSearcher(blogSearcher, searchOptions);
-
- // configure result options
- searchControl.setResultSetSize(google.search.Search.LARGE_RESULTSET);
- searchControl.setLinkTarget(google.search.Search.LINK_TARGET_SELF);
- searchControl.setTimeoutInterval(google.search.SearchControl.TIMEOUT_LONG);
- searchControl.setNoResultsString(google.search.SearchControl.NO_RESULTS_DEFAULT_STRING);
-
- // upon ajax search, refresh the url and search title
- searchControl.setSearchStartingCallback(this, function(control, searcher, query) {
- $("#searchTitle").html("search results for <em>" + escapeHTML(query) + "</em>");
-
- // save the tab index from the hash
- tabIndex = location.hash.split("&t=")[1];
- $.history.add('q=' + query + '&t=' + tabIndex);
- });
-
- searchControl.setSearchCompleteCallback(this, function(control, searcher) {
- openTab();
- });
-
- // draw the search results box
- searchControl.draw(document.getElementById("leftSearchControl"), drawOptions);
-
- // get query and execute the search
- if (location.hash.indexOf("&t=") != -1) {
- searchControl.execute(decodeURI(getQuery(location.hash)));
- }
-
- document.getElementById("search_autocomplete").focus();
- addTabListeners();
- }
- // End of OnLoad
-
-
- google.setOnLoadCallback(OnLoad, true);
-
- // when an event on the browser history occurs (back, forward, load) perform a search
- $(window).history(function(e, hash) {
- var query = decodeURI(getQuery(hash));
- searchControl.execute(query);
-
- $("#searchTitle").html("search results for <em>" + escapeHTML(query) + "</em>");
- });
-
- // forcefully regain key-up event control (previously jacked by search api)
- $("#search_autocomplete").keyup(function(event) {
- return search_changed(event, false, '/');
- });
-
- // open a tab, specified by its array position
- function openTab() {
- tabIndex = location.hash.split("&t=")[1];
-
- // show the appropriate tab
- var tabHeaders = $(".gsc-tabHeader");
- $(tabHeaders[tabIndex]).click();
- }
-
- // add event listeners to each tab so we can track the browser history
- function addTabListeners() {
- var tabHeaders = $(".gsc-tabHeader");
- for (var i = 0; i < tabHeaders.length; i++) {
- $(tabHeaders[i]).attr("id",i).click(function() {
- var tabHeaders = $(".gsc-tabHeader");
- var tabIndex = $(this).attr("id");
- $.history.add('q=' + getQuery(location.hash) + '&t=' + tabIndex); // update the hash with the new tab
- });
- }
- }
-
- function getQuery(hash) {
- var hashParts = hash.split('&t=');
- var queryParts = hashParts[0].split('=');
- return queryParts[1];
- }
-
- /* returns the given string with all HTML brackets converted to entities
- TODO: move this to the site's JS library */
- function escapeHTML(string) {
- return string.replace(/</g,"&lt;")
- .replace(/>/g,"&gt;");
- }
-
-</script>
-
- <div id="mainBodyFixed" style="width:auto; margin:20px">
- <h2 id="searchTitle">search results</h2>
- <img src="{@docRoot}assets/images/hr_gray_main.jpg" />
- <div><br /></div>
- <div id="leftSearchControl" class="search-control">Loading...</div>
- </div>
diff --git a/docs/html/shareables/training/CustomView.zip b/docs/html/shareables/training/CustomView.zip
new file mode 100644
index 000000000000..f8c1c7aa7c1c
--- /dev/null
+++ b/docs/html/shareables/training/CustomView.zip
Binary files differ
diff --git a/docs/html/shareables/training/FragmentBasics.zip b/docs/html/shareables/training/FragmentBasics.zip
index ff5b7f120ca1..b5b19d03ba5a 100644
--- a/docs/html/shareables/training/FragmentBasics.zip
+++ b/docs/html/shareables/training/FragmentBasics.zip
Binary files differ
diff --git a/docs/html/shareables/training/NetworkUsage.zip b/docs/html/shareables/training/NetworkUsage.zip
new file mode 100644
index 000000000000..8c7fbef9fb49
--- /dev/null
+++ b/docs/html/shareables/training/NetworkUsage.zip
Binary files differ
diff --git a/docs/html/shareables/training/OpenGLES.zip b/docs/html/shareables/training/OpenGLES.zip
new file mode 100644
index 000000000000..862ae1f87984
--- /dev/null
+++ b/docs/html/shareables/training/OpenGLES.zip
Binary files differ
diff --git a/docs/html/sitemap-intl.txt b/docs/html/sitemap-intl.txt
index ded0554b3c41..9041581db6e8 100644
--- a/docs/html/sitemap-intl.txt
+++ b/docs/html/sitemap-intl.txt
@@ -1,11 +1,11 @@
http://developer.android.com/ja/sdk/1.5_r3/installing.html
http://developer.android.com/ja/community/index.html
http://developer.android.com/ja/index.html
-http://developer.android.com/ja/guide/publishing/versioning.html
-http://developer.android.com/ja/guide/publishing/app-signing.html
-http://developer.android.com/ja/guide/publishing/preparing.html
+http://developer.android.com/ja/tools/publishing/versioning.html
+http://developer.android.com/ja/tools/publishing/app-signing.html
+http://developer.android.com/ja/tools/publishing/preparing.html
http://developer.android.com/ja/guide/tutorials/hello-world.html
-http://developer.android.com/ja/guide/topics/fundamentals.html
+http://developer.android.com/ja/guide/components/fundamentals.html
http://developer.android.com/ja/guide/index.html
http://developer.android.com/ja/guide/basics/what-is-android.html
http://developer.android.com/ja/guide/developing/other-ide.html
diff --git a/docs/html/sitemap.txt b/docs/html/sitemap.txt
index 3f26dd063625..ee85bd436fa6 100644
--- a/docs/html/sitemap.txt
+++ b/docs/html/sitemap.txt
@@ -5,32 +5,32 @@ http://developer.android.com/guide/index.html
http://developer.android.com/reference/packages.html
http://developer.android.com/resources/index.html
http://developer.android.com/videos/index.html
-http://developer.android.com/resources/dashboard/platform-versions.html
+http://developer.android.com/about/dashboards/index.html
http://developer.android.com/license.html
-http://developer.android.com/sdk/installing.html
-http://developer.android.com/sdk/android-3.0-highlights.html
+http://developer.android.com/sdk/installing/index.html
+http://developer.android.com/about/versions/android-3.0-highlights.html
http://developer.android.com/sdk/preview/index.html
-http://developer.android.com/sdk/adding-components.html
-http://developer.android.com/sdk/android-2.3.html
-http://developer.android.com/sdk/android-2.3-highlights.html
+http://developer.android.com/sdk/exploring.html
+http://developer.android.com/about/versions/android-2.3.html
+http://developer.android.com/about/versions/android-2.3-highlights.html
http://developer.android.com/sdk/api_diff/9/changes.html
-http://developer.android.com/sdk/android-2.2.html
-http://developer.android.com/sdk/android-2.1.html
-http://developer.android.com/sdk/android-1.6.html
-http://developer.android.com/sdk/android-1.5.html
-http://developer.android.com/sdk/android-2.0.1.html
-http://developer.android.com/sdk/android-2.0.html
-http://developer.android.com/sdk/android-1.1.html
-http://developer.android.com/sdk/tools-notes.html
+http://developer.android.com/about/versions/android-2.2.html
+http://developer.android.com/about/versions/android-2.1.html
+http://developer.android.com/about/versions/android-1.6.html
+http://developer.android.com/about/versions/android-1.5.html
+http://developer.android.com/about/versions/android-2.0.1.html
+http://developer.android.com/about/versions/android-2.0.html
+http://developer.android.com/about/versions/android-1.1.html
+http://developer.android.com/tools/sdk/tools-notes.html
http://developer.android.com/sdk/win-usb.html
http://developer.android.com/sdk/eclipse-adt.html
http://developer.android.com/sdk/ndk/index.html
http://developer.android.com/sdk/ndk/overview.html
-http://developer.android.com/sdk/oem-usb.html
+http://developer.android.com/tools/extras/oem-usb.html
http://developer.android.com/sdk/requirements.html
http://developer.android.com/sdk/older_releases.html
http://developer.android.com/guide/basics/what-is-android.html
-http://developer.android.com/guide/topics/fundamentals.html
+http://developer.android.com/guide/components/fundamentals.html
http://developer.android.com/guide/topics/ui/index.html
http://developer.android.com/guide/topics/ui/declaring-layout.html
http://developer.android.com/guide/topics/ui/menus.html
@@ -58,7 +58,7 @@ http://developer.android.com/guide/topics/resources/menu-resource.html
http://developer.android.com/guide/topics/resources/string-resource.html
http://developer.android.com/guide/topics/resources/style-resource.html
http://developer.android.com/guide/topics/resources/more-resources.html
-http://developer.android.com/guide/topics/intents/intents-filters.html
+http://developer.android.com/guide/components/intents-filters.html
http://developer.android.com/guide/topics/data/data-storage.html
http://developer.android.com/guide/topics/data/backup.html
http://developer.android.com/guide/topics/providers/content-providers.html
@@ -93,62 +93,62 @@ http://developer.android.com/guide/topics/graphics/2d-graphics.html
http://developer.android.com/guide/topics/graphics/opengl.html
http://developer.android.com/guide/topics/media/index.html
http://developer.android.com/guide/topics/location/index.html
-http://developer.android.com/guide/topics/location/obtaining-user-location.html
+http://developer.android.com/guide/topics/location/strategies.html
http://developer.android.com/guide/topics/appwidgets/index.html
-http://developer.android.com/guide/topics/wireless/bluetooth.html
+http://developer.android.com/guide/topics/connectivity/bluetooth.html
http://developer.android.com/guide/topics/search/index.html
http://developer.android.com/guide/topics/search/search-dialog.html
http://developer.android.com/guide/topics/search/adding-recent-query-suggestions.html
http://developer.android.com/guide/topics/search/adding-custom-suggestions.html
http://developer.android.com/guide/topics/search/searchable-config.html
http://developer.android.com/guide/topics/admin/device-admin.html
-http://developer.android.com/guide/topics/testing/index.html
-http://developer.android.com/guide/topics/testing/testing_android.html
-http://developer.android.com/guide/topics/testing/activity_testing.html
-http://developer.android.com/guide/topics/testing/contentprovider_testing.html
-http://developer.android.com/guide/topics/testing/service_testing.html
-http://developer.android.com/guide/topics/testing/what_to_test.html
-http://developer.android.com/guide/market/licensing/index.html
-http://developer.android.com/guide/market/billing/index.html
-http://developer.android.com/guide/market/billing/billing_about.html
-http://developer.android.com/guide/market/billing/billing_overview.html
-http://developer.android.com/guide/market/billing/billing_integrate.html
-http://developer.android.com/guide/market/billing/billing_best_practices.html
-http://developer.android.com/guide/market/billing/billing_testing.html
-http://developer.android.com/guide/market/billing/billing_admin.html
-http://developer.android.com/guide/market/billing/billing_reference.html
-http://developer.android.com/guide/appendix/market-filters.html
+http://developer.android.com/tools/testing/index.html
+http://developer.android.com/tools/testing/testing_android.html
+http://developer.android.com/tools/testing/activity_testing.html
+http://developer.android.com/tools/testing/contentprovider_testing.html
+http://developer.android.com/tools/testing/service_testing.html
+http://developer.android.com/tools/testing/what_to_test.html
+http://developer.android.com/guide/google/play/licensing/index.html
+http://developer.android.com/guide/google/play/billing/index.html
+http://developer.android.com/guide/google/play/billing/billing_about.html
+http://developer.android.com/guide/google/play/billing/billing_overview.html
+http://developer.android.com/guide/google/play/billing/billing_integrate.html
+http://developer.android.com/guide/google/play/billing/billing_best_practices.html
+http://developer.android.com/guide/google/play/billing/billing_testing.html
+http://developer.android.com/guide/google/play/billing/billing_admin.html
+http://developer.android.com/guide/google/play/billing/billing_reference.html
+http://developer.android.com/guide/google/play/filters.html
http://developer.android.com/guide/developing/eclipse-adt.html
http://developer.android.com/guide/developing/other-ide.html
-http://developer.android.com/guide/developing/device.html
+http://developer.android.com/tools/device.html
http://developer.android.com/guide/developing/debug-tasks.html
-http://developer.android.com/guide/developing/testing/index.html
-http://developer.android.com/guide/developing/testing/testing_eclipse.html
-http://developer.android.com/guide/developing/testing/testing_otheride.html
-http://developer.android.com/guide/developing/tools/index.html
-http://developer.android.com/guide/developing/tools/aapt.html
-http://developer.android.com/guide/developing/tools/adb.html
-http://developer.android.com/guide/developing/tools/othertools.html
-http://developer.android.com/guide/developing/tools/aidl.html
-http://developer.android.com/guide/developing/tools/avd.html
-http://developer.android.com/guide/developing/tools/bmgr.html
-http://developer.android.com/guide/developing/tools/ddms.html
-http://developer.android.com/guide/developing/tools/draw9patch.html
-http://developer.android.com/guide/developing/tools/emulator.html
-http://developer.android.com/guide/developing/tools/hierarchy-viewer.html
-http://developer.android.com/guide/developing/tools/layoutopt.html
-http://developer.android.com/guide/developing/tools/monkey.html
-http://developer.android.com/guide/developing/tools/monkeyrunner_concepts.html
-http://developer.android.com/guide/developing/tools/MonkeyDevice.html
-http://developer.android.com/guide/developing/tools/MonkeyImage.html
-http://developer.android.com/guide/developing/tools/MonkeyRunner.html
-http://developer.android.com/guide/developing/tools/proguard.html
-http://developer.android.com/guide/developing/tools/traceview.html
-http://developer.android.com/guide/developing/tools/zipalign.html
-http://developer.android.com/guide/publishing/app-signing.html
-http://developer.android.com/guide/publishing/versioning.html
-http://developer.android.com/guide/publishing/preparing.html
-http://developer.android.com/guide/publishing/publishing.html
+http://developer.android.com/tools/testing/index.html
+http://developer.android.com/tools/testing/testing_eclipse.html
+http://developer.android.com/tools/testing/testing_otheride.html
+http://developer.android.com/tools/index.html
+http://developer.android.com/tools/aapt.html
+http://developer.android.com/tools/help/adb.html
+http://developer.android.com/tools/othertools.html
+http://developer.android.com/tools/aidl.html
+http://developer.android.com/tools/avd.html
+http://developer.android.com/tools/bmgr.html
+http://developer.android.com/tools/ddms.html
+http://developer.android.com/tools/draw9patch.html
+http://developer.android.com/tools/help/emulator.html
+http://developer.android.com/tools/hierarchy-viewer.html
+http://developer.android.com/tools/help/layoutopt.html
+http://developer.android.com/tools/monkey.html
+http://developer.android.com/tools/monkeyrunner_concepts.html
+http://developer.android.com/tools/MonkeyDevice.html
+http://developer.android.com/tools/MonkeyImage.html
+http://developer.android.com/tools/MonkeyRunner.html
+http://developer.android.com/tools/proguard.html
+http://developer.android.com/tools/traceview.html
+http://developer.android.com/tools/zipalign.html
+http://developer.android.com/tools/publishing/app-signing.html
+http://developer.android.com/tools/publishing/versioning.html
+http://developer.android.com/tools/publishing/preparing.html
+http://developer.android.com/tools/publishing/publishing.html
http://developer.android.com/guide/practices/compatibility.html
http://developer.android.com/guide/practices/screens_support.html
http://developer.android.com/guide/practices/ui_guidelines/index.html
@@ -160,15 +160,15 @@ http://developer.android.com/guide/practices/ui_guidelines/icon_design_tab.html
http://developer.android.com/guide/practices/ui_guidelines/icon_design_dialog.html
http://developer.android.com/guide/practices/ui_guidelines/icon_design_list.html
http://developer.android.com/guide/practices/ui_guidelines/widget_design.html
-http://developer.android.com/guide/practices/design/performance.html
-http://developer.android.com/guide/practices/design/responsiveness.html
-http://developer.android.com/guide/practices/design/seamlessness.html
+http://developer.android.com/guide/practices/performance.html
+http://developer.android.com/guide/practices/responsiveness.html
+http://developer.android.com/guide/practices/seamlessness.html
http://developer.android.com/guide/webapps/index.html
http://developer.android.com/guide/webapps/targeting.html
http://developer.android.com/guide/webapps/webview.html
http://developer.android.com/guide/webapps/debugging.html
http://developer.android.com/guide/webapps/best-practices.html
-http://developer.android.com/guide/appendix/api-levels.html
+http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels
http://developer.android.com/guide/appendix/install-location.html
http://developer.android.com/guide/appendix/media-formats.html
http://developer.android.com/guide/appendix/g-app-intents.html
@@ -209,12 +209,12 @@ http://developer.android.com/resources/articles/wikinotes-linkify.html
http://developer.android.com/resources/articles/wikinotes-intents.html
http://developer.android.com/resources/articles/window-bg-speed.html
http://developer.android.com/resources/articles/zipalign.html
-http://developer.android.com/resources/tutorials/hello-world.html
+http://developer.android.com/training/basics/firstapp/index.html
http://developer.android.com/resources/tutorials/views/index.html
http://developer.android.com/resources/tutorials/localization/index.html
http://developer.android.com/resources/tutorials/testing/helloandroid_test.html
http://developer.android.com/resources/tutorials/notepad/index.html
-http://developer.android.com/resources/tutorials/testing/activity_test.html
+http://developer.android.com/tools/testing/activity_test.html
http://developer.android.com/resources/samples/get.html
http://developer.android.com/resources/samples/index.html
http://developer.android.com/resources/samples/AccelerometerPlay/index.html
@@ -404,7 +404,7 @@ http://developer.android.com/reference/android/app/NativeActivity.html
http://developer.android.com/reference/android/opengl/GLSurfaceView.html
http://developer.android.com/reference/android/graphics/Bitmap.html
http://developer.android.com/sdk/api_diff/3/changes.html
-http://developer.android.com/sdk/android-1.5-highlights.html
+http://developer.android.com/about/versions/android-1.5-highlights.html
http://developer.android.com/reference/android/widget/SlidingDrawer.html
http://developer.android.com/reference/android/widget/HorizontalScrollView.html
http://developer.android.com/reference/android/provider/LiveFolders.html
@@ -412,7 +412,7 @@ http://developer.android.com/reference/android/inputmethodservice/InputMethodSer
http://developer.android.com/reference/android/speech/RecognizerIntent.html
http://developer.android.com/reference/android/hardware/SensorManager.html
http://developer.android.com/sdk/api_diff/6/changes.html
-http://developer.android.com/sdk/android-2.0-highlights.html
+http://developer.android.com/about/versions/android-2.0-highlights.html
http://developer.android.com/reference/android/widget/QuickContactBadge.html
http://developer.android.com/reference/android/content/Intent.html
http://developer.android.com/reference/android/content/Context.html
@@ -503,7 +503,7 @@ http://developer.android.com/reference/java/lang/String.html
http://developer.android.com/reference/java/text/Normalizer.html
http://developer.android.com/reference/java/text/Normalizer.Form.html
http://developer.android.com/sdk/api_diff/8/changes.html
-http://developer.android.com/sdk/android-2.2-highlights.html
+http://developer.android.com/about/versions/android-2.2-highlights.html
http://developer.android.com/reference/android/opengl/ETC1.html
http://developer.android.com/reference/android/opengl/ETC1Util.html
http://developer.android.com/reference/android/opengl/ETC1Util.ETC1Texture.html
@@ -540,7 +540,7 @@ http://developer.android.com/reference/android/os/Process.html
http://developer.android.com/reference/android/widget/TextView.html
http://developer.android.com/reference/android/Manifest.permission.html
http://developer.android.com/sdk/api_diff/4/changes.html
-http://developer.android.com/sdk/android-1.6-highlights.html
+http://developer.android.com/about/versions/android-1.6-highlights.html
http://developer.android.com/reference/android/view/View.OnClickListener.html
http://developer.android.com/reference/android/app/SearchManager.html
http://developer.android.com/reference/android/telephony/SmsManager.html
@@ -942,7 +942,7 @@ http://developer.android.com/reference/android/net/http/SslError.html
http://developer.android.com/reference/org/apache/http/impl/client/DefaultHttpClient.html
http://developer.android.com/reference/org/apache/http/HttpRequestInterceptor.html
http://developer.android.com/reference/android/content/pm/PackageItemInfo.html
-http://developer.android.com/guide/developing/tools/adt.html
+http://developer.android.com/tools/adt.html
http://developer.android.com/reference/android/graphics/NinePatch.html
http://developer.android.com/reference/android/preference/Preference.OnPreferenceChangeListener.html
http://developer.android.com/reference/android/preference/Preference.OnPreferenceClickListener.html
@@ -5020,7 +5020,7 @@ http://developer.android.com/sdk/api_diff/4/changes/fields_index_changes.html
http://developer.android.com/resources/samples/MultiResolution/res/drawable-ldpi-v6/ic_launcher.html
http://developer.android.com/reference/android/app/package-descr.html
http://developer.android.com/resources/samples/TicTacToeLib/res/layout/lib_game.html
-http://developer.android.com/guide/market/billing/billing-intents
+http://developer.android.com/guide/google/play/billing/billing-intents
http://developer.android.com/resources/samples/TicTacToeLib/res/values/strings.html
http://developer.android.com/resources/samples/ApiDemos/res/values-normal-notlong/strings.html
http://developer.android.com/resources/samples/TicTacToeMain/src/com/example/android/index.html
diff --git a/docs/html/support.jd b/docs/html/support.jd
new file mode 100644
index 000000000000..89acd5db45c0
--- /dev/null
+++ b/docs/html/support.jd
@@ -0,0 +1,74 @@
+page.title=Developer Support
+fullpage=1
+@jd:body
+
+<div class="wrap" style="width:940px;">
+
+ <h1>Developer Support Resources</h1>
+<!--
+<p>A variety of support resources are available to help you report and resolve issues while you are developing apps for Android. </p>
+-->
+ <div style="margin: 20px 0 0;">
+
+ <div class="col-8" style="margin-left:0">
+ <h3 style="font-size: 14px;line-height: 21px;color: #555;text-transform: uppercase;border-bottom: 1px solid #CCC;margin: 0 0 20px;">Code-Level Support</h3>
+
+<h5>Community and Office Hours</h5>
+<p style="color:#888">
+
+<a href="http://groups.google.com/group/android-developers">android-developers</a> support forum<br />
+<a href="http://groups.google.com/group/android-ndk">android-ndk</a> support forum<br />
+<a href="http://groups.google.com/group/android-security-discuss">android-security-discuss</a> support forum<br />
+
+ <a href="http://webchat.freenode.net/?channels=android">#android</a>, <a href="http://webchat.freenode.net/?channels=android-dev">#android-dev</a> <span style="color:#888">(IRC via irc.freenode.net)</span><br />
+ <a href="https://plus.google.com/108967384991768947849/posts">+Android Developers Office Hours</a> <span style="color:#888">(Wednesdays 2 PM PST (UTC-7))</span><br />
+</p>
+
+
+<h5>Send Feedback</h5>
+<p>
+ <a href="http://code.google.com/p/android/issues/entry?template=Developer%20Documentation">Report documentation bug</a><br />
+ <a href="https://code.google.com/p/android/issues/entry?template=User%20bug%20report">Report device bug</a><br />
+ <a href="https://code.google.com/p/android/issues/entry?template=Developer%20bug%20report">Report platform bug</a><br />
+
+ </div>
+
+
+
+ <div class="col-8" style="margin-right:0">
+ <h3 style="font-size: 14px;line-height: 21px;color: #555;text-transform:
+uppercase;border-bottom: 1px solid #CCC;margin: 0 0 20px;">Google Play Support</h3>
+<h5>Help center</h5>
+<p style="color:#888">
+ <a href="http://support.google.com/googleplay/android-developer/">Help&nbsp;Center&nbsp;Home</a><br />
+ <a href="http://support.google.com/googleplay/android-developer/bin/static.py?hl=en&page=known_issues.cs">Known Issues</a><br />
+</p>
+
+<h5 id="contact">Direct support contacts for developers</h5>
+<p style="color:#888">
+ <a href="http://support.google.com/googleplay/android-developer/bin/request.py?contact_type=dev_registration">Registration, account issues</a><br />
+ <a href="http://support.google.com/googleplay/android-developer/bin/request.py?contact_type=publishing">Publishing, app distribution issues</a><br />
+ <a href="http://support.google.com/googleplay/android-developer/bin/request.py?contact_type=bugs">Developer Console issues</a><br />
+ <a href="http://support.google.com/googleplay/android-developer/bin/request.py?contact_type=takedown">Inappropriate apps</a><br />
+ <a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=1085703&topic=15868&ctx=topic">Report a Google Play policy violation</a>
+</p>
+
+<h5>End-user support</h5>
+<p style="color:#888">
+ <a href="http://support.google.com/googleplay/bin/request.py?contact_type=contact_policy&policy=apps">Click-to-call and email support for Google Play end users</a><br />
+</p>
+
+
+
+ <h5>Payment and Merchant Issues</h5>
+
+<p style="color:#888;margin-bottom:1.5em;">
+ <a href="http://support.google.com/checkout/sell/">Merchant&nbsp;Help&nbsp;Center&nbsp;Home<br />
+ <a href="http://support.google.com/checkout/sell/bin/static.py?hl=en&page=ts.cs&ts=2472700">Issue reporting tool<br />
+ <a href="https://productforums.google.com/forum/#!forum/checkout-merchant">checkout-merchant</a> support forum<br />
+ <a href="http://support.google.com/googleplay/android-developer/bin/request.py?contact_type=survey">Feedback survey</a>
+</p>
+
+
+</div>
+</div> \ No newline at end of file
diff --git a/docs/html/guide/developing/tools/aidl.jd b/docs/html/tools/aidl.jd
index 731aef7e7751..805b7ec216d2 100644
--- a/docs/html/guide/developing/tools/aidl.jd
+++ b/docs/html/tools/aidl.jd
@@ -19,7 +19,7 @@ page.title=Android Interface Definition Language (AIDL)
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/topics/fundamentals/bound-services.html">Bound Services</a></li>
+ <li><a href="{@docRoot}guide/components/bound-services.html">Bound Services</a></li>
</ol>
</div>
@@ -38,12 +38,12 @@ do that marshalling is tedious to write, so Android handles it for you with AIDL
different applications to access your service for IPC and want to handle multithreading in your
service. If you do not need to perform concurrent IPC across
different applications, you should create your interface by <a
-href="{@docRoot}guide/topics/fundamentals/bound-services.html#Binder">implementing a
+href="{@docRoot}guide/components/bound-services.html#Binder">implementing a
Binder</a> or, if you want to perform IPC, but do <em>not</em> need to handle multithreading,
implement your interface <a
-href="{@docRoot}guide/topics/fundamentals/bound-services.html#Messenger">using a Messenger</a>.
+href="{@docRoot}guide/components/bound-services.html#Messenger">using a Messenger</a>.
Regardless, be sure that you understand <a
-href="{@docRoot}guide/topics/fundamentals/bound-services.html">Bound Services</a> before
+href="{@docRoot}guide/components/bound-services.html">Bound Services</a> before
implementing an AIDL.</p>
<p>Before you begin designing your AIDL interface, be aware that calls to an AIDL interface are
@@ -57,7 +57,7 @@ this is your main UI thread, that thread continues to execute in the AIDL interf
another thread, that is the one that executes your code in the service. Thus, if only local
threads are accessing the service, you can completely control which threads are executing in it (but
if that is the case, then you shouldn't be using AIDL at all, but should instead create the
-interface by <a href="{@docRoot}guide/topics/fundamentals/bound-services.html#Binder">implementing a
+interface by <a href="{@docRoot}guide/components/bound-services.html#Binder">implementing a
Binder</a>).</li>
<li>Calls from a remote process are dispatched from a thread pool the platform maintains inside of
@@ -456,7 +456,7 @@ android.content.Context#unbindService(android.content.ServiceConnection)
</ul>
<p>For more information about binding to a service, read the <a
-href="{@docRoot}guide/topics/fundamentals/bound-services.html#Binding">Bound Services</a>
+href="{@docRoot}guide/components/bound-services.html#Binding">Bound Services</a>
document.</p>
<p>Here is some sample code demonstrating calling an AIDL-created service, taken
diff --git a/docs/html/guide/developing/tools/avd.html b/docs/html/tools/avd.html
index c8455db1bcb3..1d314a10c714 100644
--- a/docs/html/guide/developing/tools/avd.html
+++ b/docs/html/tools/avd.html
@@ -1,10 +1,10 @@
<html>
<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/guide/developing/devices/index.html">
+<meta http-equiv="refresh" content="0;url=http://developer.android.com/tools/devices/index.html">
<title>Redirecting...</title>
</head>
<body>
<p>You should be redirected. Please <a
-href="http://developer.android.com/guide/developing/devices/index.html">click here</a>.</p>
+href="http://developer.android.com/tools/devices/index.html">click here</a>.</p>
</body>
</html> \ No newline at end of file
diff --git a/docs/html/guide/developing/building/building-cmdline.jd b/docs/html/tools/building/building-cmdline.jd
index fd90b1a5a7f1..6154d96e6353 100644
--- a/docs/html/guide/developing/building/building-cmdline.jd
+++ b/docs/html/tools/building/building-cmdline.jd
@@ -22,11 +22,11 @@ parent.link=index.html
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/developing/devices/managing-avds-cmdline.html">Managing AVDs from
+ <li><a href="{@docRoot}tools/devices/managing-avds-cmdline.html">Managing AVDs from
the Command Line</a></li>
- <li><a href="{@docRoot}guide/developing/devices/emulator.html">Using the Android
+ <li><a href="{@docRoot}tools/devices/emulator.html">Using the Android
Emulator</a></li>
- <li><a href="{@docRoot}guide/publishing/app-signing.html">Signing Your Applications</a></li>
+ <li><a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a></li>
</ol>
</div>
</div>
@@ -46,7 +46,7 @@ Emulator</a></li>
must manually sign it with your own private key, using Keytool and Jarsigner.</p>
<p>It's important that you read and understand <a href=
- "{@docRoot}guide/publishing/app-signing.html">Signing Your Applications</a>, particularly once
+ "{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a>, particularly once
you're ready to release your application and share it with end-users. That document describes the
procedure for generating a private key and then using it to sign your .apk file. If you're just
getting started, however, you can quickly run your applications on an emulator or your own
@@ -84,7 +84,7 @@ ant debug
<p>This creates your debug <code>.apk</code> file inside the project <code>bin/</code> directory, named
<code>&lt;your_project_name&gt;-debug.apk</code>. The file is already signed with
the debug key and has been aligned with
- <a href="{@docRoot}guide/developing/tools/zipalign.html"><code>zipalign</code></a>.
+ <a href="{@docRoot}tools/help/zipalign.html"><code>zipalign</code></a>.
</p>
</li>
</ol>
@@ -132,7 +132,7 @@ ant release
<p>Once you have created the unsigned .apk, your next step is to sign the .apk with your private
key and then align it with {@code zipalign}. To complete this procedure, read <a href=
- "{@docRoot}guide/publishing/app-signing.html">Signing Your Applications</a>.</p>
+ "{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a>.</p>
<p>When your <code>.apk</code> has been signed and aligned, it's ready to be distributed to end-users.
You should test the final build on different devices or AVDs to ensure that it
@@ -151,7 +151,7 @@ ant release
your keystore and alias password being visible on screen, then you may prefer to perform the
application signing manually, via Jarsigner (or a similar tool). To instead perform the signing
procedure manually, <a href="#ManualReleaseMode">build unsigned</a> and then continue with
- <a href="{@docRoot}guide/publishing/app-signing.html">Signing Your Applications</a>.</p>
+ <a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a>.</p>
<p>To specify your keystore and alias, open the project {@code ant.properties} file (found in
the root of the project directory) and add entries for {@code key.store} and {@code key.alias}.
@@ -196,7 +196,7 @@ ant release
<h2 id="RunningOnEmulator">Running on the Emulator</h2>
<p>Before you can run your application on the Android Emulator, you must <a href=
- "{@docRoot}guide/developing/devices/managing-avds.html">create an AVD</a>.</p>
+ "{@docRoot}tools/devices/managing-avds.html">create an AVD</a>.</p>
<p>To run your application:</p>
@@ -267,7 +267,7 @@ adb -s emulator-5554 install <em>path/to/your/app</em>.apk
<li>Ensure that your development computer can detect your device when connected via USB</li>
</ul>
- <p>Read <a href="{@docRoot}guide/developing/device.html#setting-up">Setting up a Device for
+ <p>Read <a href="{@docRoot}tools/device.html#setting-up">Setting up a Device for
Development</a> for more information.</p>
<p>Once your device is set up and connected via USB, navigate to your SDK's <code>platform-tools/</code>
@@ -282,11 +282,11 @@ adb -d install <em>path/to/your/app</em>.apk
<p>For more information on the tools used above, please see the following documents:</p>
<ul>
- <li><a href="{@docRoot}guide/developing/tools/android.html">android Tool</a></li>
+ <li><a href="{@docRoot}tools/help/android.html">android Tool</a></li>
- <li><a href="{@docRoot}guide/developing/devices/emulator.html">Android Emulator</a></li>
+ <li><a href="{@docRoot}tools/devices/emulator.html">Android Emulator</a></li>
- <li><a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a> (ADB)</li>
+ <li><a href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a> (ADB)</li>
</ul>
<h2 id="Signing">Application Signing</h2>
@@ -309,7 +309,7 @@ adb -d install <em>path/to/your/app</em>.apk
you intend to publish your application, you <strong>must</strong> sign the application with your
own private key, rather than the debug key generated by the SDK tools.</p>
- <p>Please read <a href="{@docRoot}guide/publishing/app-signing.html">Signing Your
+ <p>Please read <a href="{@docRoot}tools/publishing/app-signing.html">Signing Your
Applications</a>, which provides a thorough guide to application signing on Android and what it
means to you as an Android application developer. The document also includes a guide to exporting
and signing your application with the ADT's Export Wizard.</p>
diff --git a/docs/html/guide/developing/building/building-eclipse.jd b/docs/html/tools/building/building-eclipse.jd
index 6ebc49ef57e3..c73fe974410d 100644
--- a/docs/html/guide/developing/building/building-eclipse.jd
+++ b/docs/html/tools/building/building-eclipse.jd
@@ -34,12 +34,12 @@ parent.link=index.html
<p>This document shows you how to run your application on an emulator or a real device
from Eclipse&mdash;all of which is done using the debug version of your application.
For more information about how to sign your application with a private key for release, see <a href=
- "{@docRoot}guide/publishing/app-signing.html#ExportWizard">Signing Your Applications</a></p>
+ "{@docRoot}tools/publishing/app-signing.html#ExportWizard">Signing Your Applications</a></p>
<h2 id="RunningOnEmulatorEclipse">Running on the emulator</h2>
<p>Before you can run your application on the Android Emulator, you must <a href=
- "{@docRoot}guide/developing/devices/managing-avds.html">create an AVD</a>.</p>
+ "{@docRoot}tools/devices/managing-avds.html">create an AVD</a>.</p>
<p>To run (or debug) your application, select <strong>Run</strong> &gt; <strong>Run</strong> (or
<strong>Run</strong> &gt; <strong>Debug</strong>) from the Eclipse menu bar. The ADT plugin will
@@ -90,7 +90,7 @@ parent.link=index.html
<li>Ensure that your development computer can detect your device when connected via USB</li>
</ul>
- <p>Read <a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a>
+ <p>Read <a href="{@docRoot}tools/device.html">Using Hardware Devices</a>
for more information.</p>
<p>Once set up and your device is connected via USB, install your application on the device by
@@ -127,7 +127,7 @@ parent.link=index.html
<p>You can specify any emulator options to the Additional Emulator Command Line Options
field. For example, you could add <code>-scale 96dpi</code> to scale the AVD's screen to an
accurate size, based on the dpi of your computer monitor. For a full list of emulator
- options, see the <a href="{@docRoot}guide/developing/tools/emulator.html">Android
+ options, see the <a href="{@docRoot}tools/help/emulator.html">Android
Emulator</a> document.</p>
</li>
</ul>
diff --git a/docs/html/guide/developing/building/index.jd b/docs/html/tools/building/index.jd
index 569cd28387b8..c64942ff7d25 100644
--- a/docs/html/guide/developing/building/index.jd
+++ b/docs/html/tools/building/index.jd
@@ -33,7 +33,7 @@ page.title=Building and Running
<p>Fortunately, Eclipse or your Ant build script signs the application for you in debug mode
when you build your application. You can also easily setup Eclipse or your Ant build to sign your
application in release mode as well. For more information on signing applications, see <a href=
- "{@docRoot}guide/publishing/app-signing.html">Signing Your Applications</a>.</p>
+ "{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a>.</p>
<p>The following diagram depicts the components involved in building and running an application:</p>
diff --git a/docs/html/guide/developing/debug-tasks.html b/docs/html/tools/debug-tasks.html
index 4e738041a315..2a5bc511242e 100644
--- a/docs/html/guide/developing/debug-tasks.html
+++ b/docs/html/tools/debug-tasks.html
@@ -1,10 +1,10 @@
<html>
<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/guide/developing/debugging/index.html">
+<meta http-equiv="refresh" content="0;url=http://developer.android.com/tools/debugging/index.html">
<title>Redirecting...</title>
</head>
<body>
<p>You should be redirected. Please <a
-href="http://developer.android.com/guide/developing/debugging/index.html">click here</a>.</p>
+href="http://developer.android.com/tools/debugging/index.html">click here</a>.</p>
</body>
</html> \ No newline at end of file
diff --git a/docs/html/guide/developing/debugging/ddms.jd b/docs/html/tools/debugging/ddms.jd
index 9892e49f1eec..3d6324b7a7e9 100644
--- a/docs/html/guide/developing/debugging/ddms.jd
+++ b/docs/html/tools/debugging/ddms.jd
@@ -51,7 +51,7 @@ parent.link=index.html
<p>On Android, every application runs in its own process, each of which runs in its own virtual machine
(VM). Each VM exposes a unique port that a debugger can attach to.</p>
- <p>When DDMS starts, it connects to <a href="{@docRoot}guide/developing/tools/adb.html">adb</a>.
+ <p>When DDMS starts, it connects to <a href="{@docRoot}tools/help/adb.html">adb</a>.
When a device is connected, a VM monitoring service is created between
<code>adb</code> and DDMS, which notifies DDMS when a VM on the device is started or terminated. Once a VM
is running, DDMS retrieves the the VM's process ID (pid), via <code>adb</code>, and opens a connection to the
@@ -82,7 +82,7 @@ parent.link=index.html
Screenshot of DDMS</p>
<p>If you are not using Eclipse and ADT, read <a href=
- "{@docRoot}guide/developing/debugging/debugging-projects-cmdline.html#debuggingPort">Configuring
+ "{@docRoot}tools/debugging/debugging-projects-cmdline.html#debuggingPort">Configuring
your IDE to attach to the debugging port</a>, for more information on attaching your
debugger.</p>
@@ -208,7 +208,7 @@ parent.link=index.html
<li>Interact with your application to start the methods that you want to profile.</li>
<li>Click the <strong>Stop Method Profiling</strong> button. DDMS stops profiling your
- application and opens <a href="{@docRoot}guide/developing/debugging/debugging-ui.html">Traceview</a>
+ application and opens <a href="{@docRoot}tools/debugging/debugging-ui.html">Traceview</a>
with the method profiling information that was collected
between the time you clicked on <strong>Start Method Profiling</strong> and <strong>Stop Method
Profiling</strong>.</li>
@@ -279,7 +279,7 @@ displayed on devices running Android 4.0.3 or higher.</p>
<p>LogCat is integrated into DDMS, and outputs the messages that you print out using the {@link android.util.Log}
class along with other system messages such as stack traces when exceptions are thrown. View the
- <a href="{@docRoot}guide/developing/debugging/debugging-log.html">Reading and
+ <a href="{@docRoot}tools/debugging/debugging-log.html">Reading and
Writing Log Messages.</a> topic for more information on how to log messages to the LogCat.</p>
<p>When you have set up your logging, you can use the LogCat feature of DDMS to filter certain
@@ -353,5 +353,5 @@ displayed on devices running Android 4.0.3 or higher.</p>
</ul>
For more information about providing mock location data, see
- <a href="{@docRoot}guide/topics/location/obtaining-user-location.html#MockData">Obtaining User Location</a>.
+ <a href="{@docRoot}guide/topics/location/strategies.html#MockData">Location Strategies</a>.
diff --git a/docs/html/guide/developing/debugging/debugging-devtools.jd b/docs/html/tools/debugging/debugging-devtools.jd
index 157d62e6c2d9..3a051200422b 100644
--- a/docs/html/guide/developing/debugging/debugging-devtools.jd
+++ b/docs/html/tools/debugging/debugging-devtools.jd
@@ -7,18 +7,10 @@ parent.link=index.html
so you can use it with the Android Emulator. With the Dev Tools application, you can enable a
number of settings on your device that will make it easier to test and debug your applications.</p>
- <p> If you'd like to install the Dev Tools application
- on a real development device, you can copy the application from your emulator and then install it
- on your device using ADB. To copy the application from a running emulator, execute:</p>
- <pre>
-adb -e pull /system/app/Development.apk ./Development.apk
-</pre>
-
- <p>This copies the .apk file into the current directory. Then install it on your connected device
- with:</p>
- <pre>
-adb -d install Development.apk
-</pre>
+ <p> The Dev Tools application relies on a number of permissions that are not available for
+ third party applications. If you'd like to install the Dev Tools application
+ on a real development device, you'd have to build a system image for that device and sign
+ the Dev Tools application with the same key as used for the system image.</p>
<p>To get started, launch the Dev Tools application and select <strong>Development Settings</strong>. This will
open the Development Settings page with the following options (among others):</p>
@@ -62,7 +54,7 @@ adb -d install Development.apk
android.app.Activity#onCreate(android.os.Bundle)} code path, which would otherwise be difficult
to force. Choosing this option will probably reveal a number of problems in your application
due to not saving state. For more information about saving an activity's state, see the
- <a href="{@docRoot}guide/topics/fundamentals/activities.html#SavingActivityState">Activities</a>
+ <a href="{@docRoot}guide/components/activities.html#SavingActivityState">Activities</a>
document.</dd>
<dt><strong>Show CPU usage</strong></dt>
diff --git a/docs/html/guide/developing/debugging/debugging-log.jd b/docs/html/tools/debugging/debugging-log.jd
index b5b626e9bf3a..d2baaf26ce84 100644
--- a/docs/html/guide/developing/debugging/debugging-log.jd
+++ b/docs/html/tools/debugging/debugging-log.jd
@@ -59,7 +59,7 @@ I/MyActivity( 1557): MyClass.getView() &mdash; get item number 1
<h2 id="startingLogcat">Using LogCat</h2>
<p>You can use LogCat from within DDMS or call it on an ADB shell. For more information on how to
- use LogCat within DDMS, see <a href="{@docRoot}guide/developing/debugging/ddms.html#logcat">Using
+ use LogCat within DDMS, see <a href="{@docRoot}tools/debugging/ddms.html#logcat">Using
DDMS</a>. To run LogCat, through the ADB shell, the general usage is:</p>
<pre>
[adb] logcat [&lt;option&gt;] ... [&lt;filter-spec&gt;] ...
diff --git a/docs/html/guide/developing/debugging/debugging-projects-cmdline.jd b/docs/html/tools/debugging/debugging-projects-cmdline.jd
index 3b5ceabaf3ba..0b79575903a3 100644
--- a/docs/html/guide/developing/debugging/debugging-projects-cmdline.jd
+++ b/docs/html/tools/debugging/debugging-projects-cmdline.jd
@@ -22,9 +22,9 @@ parent.link=index.html
the Android SDK provides for debugging. A basic debugging environment consists of:</p>
<ul>
- <li><a href="{@docRoot}guide/developing/tools/adb.html">ADB</a></li>
+ <li><a href="{@docRoot}tools/help/adb.html">ADB</a></li>
- <li><a href="{@docRoot}guide/developing/debugging/ddms.html">DDMS</a></li>
+ <li><a href="{@docRoot}tools/debugging/ddms.html">DDMS</a></li>
<li>Java Debugger</li>
</ul>
diff --git a/docs/html/guide/developing/debugging/debugging-projects.jd b/docs/html/tools/debugging/debugging-projects.jd
index 2283f8be9f6d..2283f8be9f6d 100644
--- a/docs/html/guide/developing/debugging/debugging-projects.jd
+++ b/docs/html/tools/debugging/debugging-projects.jd
diff --git a/docs/html/guide/developing/debugging/debugging-tracing.jd b/docs/html/tools/debugging/debugging-tracing.jd
index 72f64982d9a8..f0d0c0b52d6e 100644
--- a/docs/html/guide/developing/debugging/debugging-tracing.jd
+++ b/docs/html/tools/debugging/debugging-tracing.jd
@@ -295,7 +295,7 @@ traceview /tmp/calc
<p class="note"><strong>Note:</strong> If you are trying to view the trace logs of an application
that is built with ProGuard enabled (release mode build), some method and member names might be obfuscated.
You can use the Proguard <code>mapping.txt</code> file to figure out the original unobfuscated names. For more information
- on this file, see the <a href="{@docRoot}guide/developing/tools/proguard.html">Proguard</a> documentation.</p>
+ on this file, see the <a href="{@docRoot}tools/help/proguard.html">Proguard</a> documentation.</p>
<h2 id="dmtracedump">Using dmtracdedump</h2>
diff --git a/docs/html/guide/developing/debugging/debugging-ui.jd b/docs/html/tools/debugging/debugging-ui.jd
index 22748be93cdd..c1976b8de2ea 100644
--- a/docs/html/guide/developing/debugging/debugging-ui.jd
+++ b/docs/html/tools/debugging/debugging-ui.jd
@@ -1,4 +1,4 @@
-page.title=Debugging and Profiling User Interfaces
+page.title=Optimizing Your UI
parent.title=Debugging
parent.link=index.html
@jd:body
@@ -10,7 +10,7 @@ parent.link=index.html
<ol>
<li>
<a href="#HierarchyViewer">
- Debugging and Optimizing User Interfaces with Hierarchy Viewer
+ Using Hierarchy Viewer
</a>
<ol>
<li><a href="#runhv">Running Hierarchy Viewer and choosing a window</a></li>
@@ -22,27 +22,27 @@ parent.link=index.html
</li>
<li>
<a href="#pixelperfect">
- Examining and Designing User Interfaces with Pixel Perfect
+ Using Pixel Perfect
</a>
<ol>
<li><a href="#aboutpixelperfect">About the Pixel Perfect window</a></li>
<li><a href="#overlays">Working with Pixel Perfect overlays</a></li>
</ol>
</li>
- <li><a href="#layoutopt">Optimizing Layouts with <code>layoutopt</code></a></li>
+ <li><a href="#layoutopt">Using layoutopt</a></li>
</ol>
<h2>Related videos</h2>
<ol>
<li>
<iframe title="Hierarchyviewer"
- width="272" height="234"
+ width="210" height="160"
src="http://www.youtube.com/embed/PAgE7saQUUY?rel=0&amp;hd=1"
frameborder="0" allowfullscreen>
</iframe>
</li>
<li>
<iframe title="Pixel Perfect"
- width="272" height="234"
+ width="210" height="160"
src="http://www.youtube.com/embed/C45bMZGdN7Y?rel=0&amp;hd=1"
frameborder="0"
allowfullscreen>
@@ -67,7 +67,7 @@ Sometimes your application's layout can slow down your application.
directories to quickly check for inefficiencies or other types of problems that could be
affecting the performance of your application.</p>
-<h2 id="HierarchyViewer">Debugging and Optimizing User Interfaces with Hierarchy Viewer</h2>
+<h2 id="HierarchyViewer">Using Hierarchy Viewer</h2>
<h3 id="runhv">Running Hierarchy Viewer and choosing a window</h3>
<p>
@@ -339,7 +339,7 @@ Sometimes your application's layout can slow down your application.
slowest to measure, layout, and draw. From that, you can quickly identify the problems you
should look at first.
</p>
-<h2 id="pixelperfect">Examining and Designing User Interfaces with Pixel Perfect</h2>
+<h2 id="pixelperfect">Using Pixel Perfect</h2>
<p>
Pixel Perfect is a tool for examining pixel properties and laying out UIs from a design drawing.
</p>
@@ -491,7 +491,7 @@ Sometimes your application's layout can slow down your application.
alt=""
height="600"/>
<p class="img-caption"><strong>Figure 4.</strong> The Pixel Perfect window</p>
-<h2 id="layoutopt">Optimizing layouts with layoutopt</h2>
+<h2 id="layoutopt">Using layoutopt</h2>
<p>
The <code>layoutopt</code> tool lets you analyze the XML files that define your
application's UI to find inefficiencies in the view hierarchy.</p>
diff --git a/docs/html/guide/developing/debugging/index.jd b/docs/html/tools/debugging/index.jd
index 0ad1a088a6cb..45fbc9e0a6fd 100644
--- a/docs/html/guide/developing/debugging/index.jd
+++ b/docs/html/tools/debugging/index.jd
@@ -25,22 +25,22 @@ page.title=Debugging
comprise a typical Android debugging environment are:</p>
<dl>
- <dt><a href="{@docRoot}guide/developing/tools/adb.html"><strong>adb</strong></a></dt>
+ <dt><a href="{@docRoot}tools/help/adb.html"><strong>adb</strong></a></dt>
<dd><code>adb</code> acts as a middleman between a device and your development system. It provides various
device management capabilities, including moving and syncing files to the emulator, running a
UNIX shell on the device or emulator, and providing a general means to communicate with
connected emulators and devices.</dd>
- <dt><a href="{@docRoot}guide/developing/debugging/ddms.html"><strong>Dalvik Debug Monitor
+ <dt><a href="{@docRoot}tools/debugging/ddms.html"><strong>Dalvik Debug Monitor
Server</strong></a></dt>
<dd>DDMS is a graphical program that communicates with your devices through <code>adb</code>. DDMS can
capture screenshots, gather thread and stack information, spoof incoming calls and SMS
messages, and has many other features.</dd>
- <dt><strong><a href="{@docRoot}guide/developing/device.html">Device</a> or
- <a href="{@docRoot}guide/developing/devices/index.html">Android Virtual Device</a></strong></dt>
+ <dt><strong><a href="{@docRoot}tools/device.html">Device</a> or
+ <a href="{@docRoot}tools/devices/index.html">Android Virtual Device</a></strong></dt>
<dd>Your application must run in a device or in an AVD so that it can be debugged. An <code>adb</code> device
daemon runs on the device or emulator and provides a means for the <code>adb</code> host daemon to
@@ -91,18 +91,18 @@ page.title=Debugging
debug and profile your applications:</p>
<dl>
- <dt><strong><a href="{@docRoot}guide/developing/debugging/debugging-ui.html">Heirarchy Viewer
+ <dt><strong><a href="{@docRoot}tools/debugging/debugging-ui.html">Heirarchy Viewer
and layoutopt</a></strong></dt>
<dd>Graphical programs that let you debug and profile user interfaces.</dd>
<dt><strong><a href=
- "{@docRoot}guide/developing/debugging/debugging-tracing.html">Traceview</a></strong></dt>
+ "{@docRoot}tools/debugging/debugging-tracing.html">Traceview</a></strong></dt>
<dd>A graphical viewer that displays trace file data for method calls and times saved by your
application, which can help you profile the performance of your application.</dd>
- <dt><strong><a href="{@docRoot}guide/developing/debugging/debugging-devtools.html">Dev Tools
+ <dt><strong><a href="{@docRoot}tools/debugging/debugging-devtools.html">Dev Tools
Android application</a></strong></dt>
<dd>The Dev Tools application included in the emulator system image exposes several settings
@@ -126,13 +126,13 @@ want, and then <code>kill -3</code>. The stack trace appears in the log file.
<dt><strong>Display useful info on the emulator screen</strong></dt>
<dd>The device can display useful information such as CPU usage or highlights
around redrawn areas. Turn these features on and off in the developer settings
-window as described in <a href="{@docRoot}guide/developing/debugging/debugging-devtools.html">
+window as described in <a href="{@docRoot}tools/debugging/debugging-devtools.html">
Debugging with the Dev Tools App</a>.
</dd>
<dt><strong>Get application and system state information from the emulator</strong></dt>
<dd>You can access dumpstate information from the <code>adb shell</code> commands. See
-<a href="{@docRoot}guide/developing/tools/adb.html#dumpsys">dumpsys and
+<a href="{@docRoot}tools/help/adb.html#dumpsys">dumpsys and
dumpstate</a> on the adb topic page.</dd>
@@ -145,7 +145,7 @@ radio state</strong>.</dd>
<dt><strong>Log trace data</strong></dt>
<dd>You can log method calls and other tracing data in an activity by calling
{@link android.os.Debug#startMethodTracing(String) startMethodTracing()}. See <a
-href="{@docRoot}guide/developing/debugging/debugging-tracing.html">Profiling with Traceview and
+href="{@docRoot}tools/debugging/debugging-tracing.html">Profiling with Traceview and
dmtracedump</a> for details. </dd>
<dt><strong>Log radio data</strong></dt>
@@ -177,8 +177,6 @@ garbage collected even after the thread terminates.
</dl>
-<p>See the <a href="{@docRoot}resources/faq/troubleshooting.html">Troubleshooting</a> document
-for answers to some common developing and debugging issues.</p>
diff --git a/docs/html/guide/developing/device.jd b/docs/html/tools/device.jd
index d91551a8e92d..d5fd58122e4d 100644
--- a/docs/html/guide/developing/device.jd
+++ b/docs/html/tools/device.jd
@@ -14,7 +14,7 @@ page.title=Using Hardware Devices
<h2>See also</h2>
<ol>
<li><a href="{@docRoot}sdk/win-usb.html">Google USB Driver</a></li>
- <li><a href="{@docRoot}sdk/oem-usb.html">OEM USB Drivers</a></li>
+ <li><a href="{@docRoot}tools/extras/oem-usb.html">OEM USB Drivers</a></li>
</ol>
</div>
</div>
@@ -36,7 +36,7 @@ href="http://www.google.com/phone/detail/nexus-s">google.com/phone</a>.</p>
<p class="note"><strong>Note:</strong> When developing on a device, keep in mind that you should
still use the <a
-href="{@docRoot}guide/developing/devices/emulator.html">Android emulator</a> to test your
+href="{@docRoot}tools/devices/emulator.html">Android emulator</a> to test your
application
on configurations that are not equivalent to those of your real device. Although the emulator
does not allow you to test every device feature (such as the accelerometer), it does
@@ -67,7 +67,7 @@ located in <strong>Settings > Developer options</strong>).</p>
<li>Set up your system to detect your device.
<ul>
<li>If you're developing on Windows, you need to install a USB driver for adb. For an
-installation guide and links to OEM drivers, see the <a href="{@docRoot}sdk/oem-usb.html">OEM USB
+installation guide and links to OEM drivers, see the <a href="{@docRoot}tools/extras/oem-usb.html">OEM USB
Drivers</a> document.</li>
<li>If you're developing on Mac OS X, it just works. Skip this step.</li>
<li>If you're developing on Ubuntu Linux, you need to add a
@@ -114,7 +114,7 @@ presented with a <b>Device Chooser</b> dialog that lists the available
emulator(s) and connected device(s). Select the device upon which you want to
install and run the application.</p>
-<p>If using the <a href="{@docRoot}guide/developing/tools/adb.html">Android
+<p>If using the <a href="{@docRoot}tools/help/adb.html">Android
Debug Bridge</a> (adb), you can issue commands with the <code>-d</code> flag to
target your connected device.</p>
diff --git a/docs/html/guide/developing/devices/emulator.jd b/docs/html/tools/devices/emulator.jd
index 5edd1f5ed0f0..cee6473d4453 100644
--- a/docs/html/guide/developing/devices/emulator.jd
+++ b/docs/html/tools/devices/emulator.jd
@@ -65,14 +65,12 @@ parent.link=index.html
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/developing/tools/emulator.html">Android Emulator</a></li>
- <li><a href="{@docRoot}guide/developing/devices/managing-avds.html">Managing AVDs with AVD Manager</a></li>
+ <li><a href="{@docRoot}tools/help/emulator.html">Android Emulator</a></li>
+ <li><a href="{@docRoot}tools/devices/managing-avds.html">Managing AVDs with AVD Manager</a></li>
</ol>
</div>
</div>
-<img src="{@docRoot}images/emulator-wvga800l.png" alt="Image of the Android Emulator"
-width="367" height="349" style="margin-left:2em;float:right;"/>
<p>The Android SDK includes a virtual mobile device emulator
that runs on your computer. The emulator lets you prototype, develop and test
Android applications without using a physical device. </p>
@@ -84,6 +82,8 @@ using your mouse or keyboard to generate events for your application. It also
provides a screen in which your application is displayed, together with any other
active Android applications. </p>
+<img src="{@docRoot}images/emulator-wvga800l.png" width="367" height="349" />
+
<p>To let you model and test your application more easily, the emulator utilizes
Android Virtual Device (AVD) configurations. AVDs let you define certain hardware
aspects of your emulated phone and allow you to create many configurations to test
@@ -153,7 +153,7 @@ the emulator stores the user data, SD card data, and cache in the AVD directory.
<p>To create and manage AVDs you use the AVD Manager UI or the <code>android</code> tool
that is included in the SDK.
For complete information about how to set up AVDs, see <a
-href="{@docRoot}guide/developing/devices/index.html">Managing Virtual Devices</a>.</p>
+href="{@docRoot}tools/devices/index.html">Managing Virtual Devices</a>.</p>
<h2 id="starting">Starting and Stopping the Emulator</h2>
@@ -182,7 +182,7 @@ like this: </p>
<p>This initializes the emulator, loads an AVD configuration and displays the emulator
window. For more information about command line options for the emulator, see the
-<a href="{@docRoot}guide/developing/tools/emulator.html">Android Emulator</a> tool reference.</p>
+<a href="{@docRoot}tools/help/emulator.html">Android Emulator</a> tool reference.</p>
<p class="note"><strong>Note:</strong> You can run multiple
instances of the emulator concurrently, each with its own AVD configuration and
@@ -200,16 +200,16 @@ on the Emulator</a> for information about how to install your application.</p>
<p>To stop an emulator instance, just close the emulator's window.</p>
<p>For a reference of the emulator's startup commands and keyboard mapping, see
-the <a href="{@docRoot}guide/developing/tools/emulator.html">Android Emulator</a> tool
+the <a href="{@docRoot}tools/help/emulator.html">Android Emulator</a> tool
reference.</p>
<h2 id="apps">Installing Applications on the Emulator</h2>
<p>If you don't have access to Eclipse or the ADT Plugin, you can install your application on the
-emulator using the <a href="{@docRoot}guide/developing/tools/adb.html#move">adb</a> utility. Before
+emulator using the <a href="{@docRoot}tools/help/adb.html#move">adb</a> utility. Before
installing the application, you need to build and package it into an <code>.apk</code> as described
-in <a href="{@docRoot}guide/developing/building/index.html">Building and
+in <a href="{@docRoot}tools/building/index.html">Building and
Running Apps</a>. Once the application is installed, you can start the emulator from the command
line as described previously, using any startup options necessary.
When the emulator is running, you can also connect to the emulator instance's
@@ -247,7 +247,7 @@ tools installed:</p>
<li>Android SDK Platform API 15, Revision 3 or higher</li>
</ul>
-<p>Use the <a href="{@docRoot}sdk/installing.html#AddingComponents">Android SDK
+<p>Use the <a href="{@docRoot}sdk/installing/index.html#AddingComponents">Android SDK
Manager</a> to install these components:</p>
<p class="note"><strong>Note:</strong> Not all applications are compatible with graphics hardware
@@ -348,7 +348,7 @@ same level as an actual device.</li>
</ul>
<p>To use virtual machine acceleration with the emulator, you need the following version of Android
-development tools. Use the <a href="{@docRoot}sdk/installing.html#AddingComponents">Android SDK
+development tools. Use the <a href="{@docRoot}sdk/installing/index.html#AddingComponents">Android SDK
Manager</a> to install these components:</p>
<ul>
@@ -565,7 +565,7 @@ You can also use the {@code android} command line tool when creating an AVD. Jus
<p>The <code>-c</code> option can also be used to to specify a path to an SD card
image for the new AVD. For more information, see <a
-href="{@docRoot}guide/developing/devices/managing-avds-cmdline.html">Managing Virtual Devices
+href="{@docRoot}tools/devices/managing-avds-cmdline.html">Managing Virtual Devices
from the Command Line</a>.
</p>
@@ -580,7 +580,7 @@ the tools/ directory of the SDK and create a disk image like this: </p>
<pre>mksdcard 1024M sdcard1.iso</pre>
<p>For more information, see <a
-href="{@docRoot}guide/developing/tools/mksdcard.html"><code>mksdcard</code></a>.</p>
+href="{@docRoot}tools/help/mksdcard.html"><code>mksdcard</code></a>.</p>
<h3 id="sdcard-files">Copying files to an SD card image</h3>
@@ -593,7 +593,7 @@ Mac, and Windows.</p>
<p>Alternatively, you can use the {@code adb push} command to move files onto an SD card image
while it is loaded in an emulator. For more information see the <a
-href="{@docRoot}guide/developing/tools/adb.html#copyfiles">{@code adb push}</a> documentation.</p>
+href="{@docRoot}tools/help/adb.html#copyfiles">{@code adb push}</a> documentation.</p>
<h3 id="sdcard-loading">Loading an SD card image</h3>
@@ -768,7 +768,7 @@ emulated SD card and load it in the emulator, see <a href="#sdcard">SD Card Emul
<p>You can also use the android tool to automatically create an SD Card image
for you, when creating an AVD. For more information, see <a
-href="{@docRoot}guide/developing/devices/managing-avds.html">Managing Virtual Devices with AVD
+href="{@docRoot}tools/devices/managing-avds.html">Managing Virtual Devices with AVD
Manager</a>.
@@ -948,7 +948,7 @@ case, <code>redir</code> generates an error message to that effect. </p>
<p>The Android Debug Bridge (ADB) tool provides port forwarding, an alternate
way for you to set up network redirection. For more information, see <a
-href="{@docRoot}guide/developing/tools/adb.html#forwardports">Forwarding Ports</a> in the ADB
+href="{@docRoot}tools/help/adb.html#forwardports">Forwarding Ports</a> in the ADB
documentation.</p>
<p>Note that ADB does not currently offer any way to remove a redirection,
@@ -1081,7 +1081,7 @@ port 5555. Subsequent instances use port numbers increasing by two &mdash; for e
<p><code>Android Emulator (5554)</code></p>
-<p>Alternatively, you can use the <code>adb devices</code> command, which prints a list of running emulator instances and their console port numbers. For more information, see <a href="{@docRoot}guide/developing/tools/adb.html#devicestatus">Querying for Emulator/Device Instances</a> in the adb documentation.</p>
+<p>Alternatively, you can use the <code>adb devices</code> command, which prints a list of running emulator instances and their console port numbers. For more information, see <a href="{@docRoot}tools/help/adb.html#devicestatus">Querying for Emulator/Device Instances</a> in the adb documentation.</p>
<p class="note">Note: The emulator listens for connections on ports 5554-5587 and accepts connections only from localhost.</p>
@@ -1560,7 +1560,7 @@ might have to use the {@code -d} flag with some common {@code adb} commands, suc
<code>install</code>. The {@code -d} flag lets you specify which of several connected devices to use
as the target of a command. If you don't specify {@code -d}, the emulator targets the first
device in its list. For more information about {@code adb}, see <a
-href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a>.</p>
+href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a>.</p>
<p>For emulators running on Mac OS X, if you see an error {@code Warning: No DNS servers found}
when starting the emulator, check to see whether you have an <code>/etc/resolv.conf</code> file. If
diff --git a/docs/html/guide/developing/devices/index.jd b/docs/html/tools/devices/index.jd
index 64651a1ec907..bec226810323 100644
--- a/docs/html/guide/developing/devices/index.jd
+++ b/docs/html/tools/devices/index.jd
@@ -6,14 +6,14 @@ page.title=Managing Virtual Devices
device by defining hardware and software options to be emulated by the Android Emulator.</p>
<p>The easiest way to create an AVD is to use the graphical <a href=
- "{@docRoot}guide/developing/devices/managing-avds.html">AVD Manager</a>, which you launch
+ "{@docRoot}tools/devices/managing-avds.html">AVD Manager</a>, which you launch
from Eclipse by clicking <strong>Window &gt; AVD Manager</strong>. You can also start the AVD
Manager from the command line by calling the <code>android</code> tool with the <code>avd</code>
options, from the <strong>&lt;sdk>/tools/</strong> directory.</p>
<p>You can also create AVDs on the command line by passing the <code>android</code> tool options.
For more information on how to create AVDs in this manner, see <a href=
- "{@docRoot}guide/developing/devices/managing-avds-cmdline.html">Managing Virtual
+ "{@docRoot}tools/devices/managing-avds-cmdline.html">Managing Virtual
Devices from the Command Line</a>.</p>
<p>An AVD consists of:</p>
@@ -49,7 +49,7 @@ options, from the <strong>&lt;sdk>/tools/</strong> directory.</p>
<code>minSdkVersion</code></a> attribute of the application's manifest file. For more
information about the relationship between system API Level and application
<code>minSdkVersion</code>, see <a href=
- "{@docRoot}guide/publishing/versioning.html">Specifying Minimum System API Version</a>.</li>
+ "{@docRoot}tools/publishing/versioning.html">Specifying Minimum System API Version</a>.</li>
<li>You should create at least one AVD that uses a target whose API Level is greater than that required
by your application, because it allows you to test the
@@ -66,9 +66,9 @@ options, from the <strong>&lt;sdk>/tools/</strong> directory.</p>
</ul>
<p>To learn how to manage AVDs using a graphical tool, read <a href=
- "{@docRoot}guide/developing/devices/managing-avds.html">Managing AVDs with AVD Manager</a>. To
+ "{@docRoot}tools/devices/managing-avds.html">Managing AVDs with AVD Manager</a>. To
learn how to manage AVDs on the command line, read
- <a href="{@docRoot}guide/developing/devices/managing-avds-cmdline.html">Managing AVDs
+ <a href="{@docRoot}tools/devices/managing-avds-cmdline.html">Managing AVDs
from the Command Line</a>.</p>
diff --git a/docs/html/guide/developing/devices/managing-avds-cmdline.jd b/docs/html/tools/devices/managing-avds-cmdline.jd
index 867433452a7b..ba353c1538da 100644
--- a/docs/html/guide/developing/devices/managing-avds-cmdline.jd
+++ b/docs/html/tools/devices/managing-avds-cmdline.jd
@@ -21,9 +21,9 @@ parent.link=index.html
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/developing/building/building-cmdline.html">Building and Running
+ <li><a href="{@docRoot}tools/building/building-cmdline.html">Building and Running
from the Command Line</a></li>
- <li><a href="{@docRoot}guide/developing/devices/emulator.html">Using the Android
+ <li><a href="{@docRoot}tools/devices/emulator.html">Using the Android
Emulator</a></li>
</ol>
</div>
@@ -32,7 +32,7 @@ Emulator</a></li>
<p>The <code>android</code> tool lets you manage AVDs on the command line. For a complete reference
of the command line options that you can use, see the reference for the
-<a href="{@docRoot}guide/developing/tools/android.html"><code>android</code></a> tool.</p>
+<a href="{@docRoot}tools/help/android.html"><code>android</code></a> tool.</p>
@@ -85,7 +85,7 @@ id: 5 or "android-9"
<h2 id="AVDCmdLine">Creating AVDs</h2>
<p>In addition to creating AVDs with the
-<a href="{@docRoot}guide/developing/devices/managing-avds-cmdline.html">AVD Manager user interface</a>,
+<a href="{@docRoot}tools/devices/managing-avds-cmdline.html">AVD Manager user interface</a>,
you can also create them by passing in command line arguments to the <code>android</code> tool.
</p>
@@ -109,7 +109,7 @@ general characteristics offered by the AVD. The target ID is an integer assigned
version, or API Level, or other attribute, so you need to run the <code>android list targets</code>
command to list the target ID of each system image. You should do this <em>before</em> you run
the <code>android create avd</code> command. See the <a
-href="{@docRoot}guide/developing/tools/android.html">android</a>
+href="{@docRoot}tools/help/android.html">android</a>
tool documentation for more information on the command line options.</p>
@@ -171,7 +171,7 @@ WVGA screen.</p>
<p>As an alternative to adjusting the emulator skin configuration, you can use
the emulator skin's default density and add the <code>-dpi-device</code> option
-to the <a href="{@docRoot}guide/developing/tools/emulator.html">emulator</a> command line when
+to the <a href="{@docRoot}tools/help/emulator.html">emulator</a> command line when
starting the AVD. For example:</p>
<pre>emulator -avd WVGA800 -scale 96dpi -dpi-device 160</pre>
diff --git a/docs/html/guide/developing/devices/managing-avds.jd b/docs/html/tools/devices/managing-avds.jd
index 412bd913d613..412bd913d613 100644
--- a/docs/html/guide/developing/devices/managing-avds.jd
+++ b/docs/html/tools/devices/managing-avds.jd
diff --git a/docs/html/tools/eclipse-adt.html b/docs/html/tools/eclipse-adt.html
new file mode 100644
index 000000000000..0d59d4989735
--- /dev/null
+++ b/docs/html/tools/eclipse-adt.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+<meta http-equiv="refresh" content="0;url=http://developer.android.com/tools/projects/projects-eclipse.html">
+<title>Redirecting...</title>
+</head>
+<body>
+<p>You should be redirected. Please <a
+href="http://developer.android.com/tools/projects/projects-eclipse.html">click here</a>.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/docs/html/tools/extras/index.jd b/docs/html/tools/extras/index.jd
new file mode 100644
index 000000000000..8da26dcdab12
--- /dev/null
+++ b/docs/html/tools/extras/index.jd
@@ -0,0 +1,5 @@
+page.title=Extras
+page.noplus=1
+@jd:body
+
+<p>SDK extras add functionality to your development environment. You can download all of the SDK extras into your development environment using the SDK Manager. </p>
diff --git a/docs/html/sdk/oem-usb.jd b/docs/html/tools/extras/oem-usb.jd
index 88d66dd3a4f8..f7aa192db548 100644
--- a/docs/html/sdk/oem-usb.jd
+++ b/docs/html/tools/extras/oem-usb.jd
@@ -17,7 +17,7 @@ page.title=OEM USB Drivers
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a></li>
+ <li><a href="{@docRoot}tools/device.html">Using Hardware Devices</a></li>
<li><a href="{@docRoot}sdk/win-usb.html">Google USB Driver</a></li>
</ol>
</div>
@@ -31,7 +31,7 @@ not exhaustive for all available Android-powered devices.</p>
<p>If you're developing on Mac OS X or Linux, then you probably don't need to install a USB driver.
To start developing with your device, read <a
-href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a>.</p>
+href="{@docRoot}tools/device.html">Using Hardware Devices</a>.</p>
<p class="note"><strong>Note:</strong> If your device is one of the Android Developer Phones
(ADP), a Nexus One, or a Nexus S, then you need
@@ -52,7 +52,7 @@ or upgrading an existing driver.</p>
<p class="note"><strong>Tip:</strong> When you finish the USB driver installation,
see <a
-href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a> for
+href="{@docRoot}tools/device.html">Using Hardware Devices</a> for
other important information about using an Android-powered device for
development.</p>
@@ -277,6 +277,10 @@ support tab to select your products/device. Different regions will have differe
href="http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index">http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index</a></td>
</tr>
+<tr><td>Intel</td> <td><a
+href="http://www.intel.com/software/android">http://www.intel.com/software/android</a></td>
+</tr>
+
<tr><td>KT Tech</td> <td><a
href="http://www.kttech.co.kr/cscenter/download05.asp">http://www.kttech.co.kr/cscenter/download05.asp</a> for EV-S100 (Take)</td>
</tr>
diff --git a/docs/html/sdk/compatibility-library.jd b/docs/html/tools/extras/support-library.jd
index f81e8aea2bfa..7258c773cfe9 100644
--- a/docs/html/sdk/compatibility-library.jd
+++ b/docs/html/tools/extras/support-library.jd
@@ -1,4 +1,4 @@
-page.title=Support Package
+page.title=Support Library
@jd:body
@@ -50,6 +50,29 @@ the Support Package, as denoted by revision number.</p>
<p><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img" />
+ Support Package, revision 8 (April 2012)
+ </a></p>
+
+ <div class="toggle-content-toggleme" style="padding-left:2em">
+ <dl>
+ <dt>Changes for v4 support library:</dt>
+ <dd>
+ <ul>
+ <li>Fixed intent flags for {@link android.app.PendingIntent} objects generated
+ by {@link android.support.v4.app.TaskStackBuilder}.</li>
+ <li>Removed unused attributes from the gridlayout library projects to make sure
+ the library can be built with API Level 7 and higher.</li>
+ <li>Added {@code .classpath} and {@code .project} files for the gridlayout
+ library project.</li>
+ </ul>
+ </dd>
+ </dl>
+</div>
+
+<div class="toggle-content closed">
+
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" />
Support Package, revision 7 (March 2012)
</a></p>
diff --git a/docs/html/guide/developing/tools/MonkeyDevice.jd b/docs/html/tools/help/MonkeyDevice.jd
index abcf8fdbb10f..e7612e664093 100644
--- a/docs/html/guide/developing/tools/MonkeyDevice.jd
+++ b/docs/html/tools/help/MonkeyDevice.jd
@@ -7,7 +7,7 @@ parent.link=index.html
</style>
<p>
A monkeyrunner class that represents a device or emulator accessible by the workstation running
-<code><a href="{@docRoot}guide/developing/tools/monkeyrunner_concepts.html">monkeyrunner</a></code>.
+<code><a href="{@docRoot}tools/help/monkeyrunner_concepts.html">monkeyrunner</a></code>.
</p>
<p>
This class is used to control an Android device or emulator. The methods send UI events,
@@ -16,7 +16,7 @@ parent.link=index.html
<p>
You normally do not have to create an instance of <code>MonkeyDevice</code>. Instead, you
use
-<code><a href="{@docRoot}guide/developing/tools/MonkeyRunner.html#waitForConnection">
+<code><a href="{@docRoot}tools/help/MonkeyRunner.html#waitForConnection">
MonkeyRunner.waitForConnection()</a></code> to create a new object from a connection to a device or
emulator. For example, instead of
using:</p>
@@ -299,7 +299,7 @@ newdevice = MonkeyRunner.waitForConnection()
<td class="jd-typecol">
<nobr>
<code>
- <a href="{@docRoot}guide/developing/tools/MonkeyImage.html">
+ <a href="{@docRoot}tools/help/MonkeyImage.html">
MonkeyImage
</a>
</code>
@@ -314,7 +314,7 @@ newdevice = MonkeyRunner.waitForConnection()
<div class="jd-descrdiv">
Captures the entire screen buffer of this device, yielding a
<code>
- <a href="{@docRoot}guide/developing/tools/MonkeyImage.html">
+ <a href="{@docRoot}tools/help/MonkeyImage.html">
MonkeyImage
</a>
</code> object containing a screen capture of the current display.
@@ -733,7 +733,7 @@ newdevice = MonkeyRunner.waitForConnection()
</p>
<p>
Use this method to start a test case that uses one of Android's test case classes.
- See <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing
+ See <a href="{@docRoot}tools/testing/testing_android.html">Testing
Fundamentals</a> to learn more about unit testing with the Android testing
framework.
</p>
@@ -776,7 +776,7 @@ newdevice = MonkeyRunner.waitForConnection()
the single key "stream". The value of "stream" is a <em>string</em> containing
the test output, as if <code>InstrumentationTestRunner</code> was run from the
command line. The format of this output is described in
- <a href="{@docRoot}guide/developing/testing/testing_otheride.html">
+ <a href="{@docRoot}tools/testing/testing_otheride.html">
Testing in Other IDEs</a>.
</p>
</li>
@@ -912,7 +912,7 @@ newdevice = MonkeyRunner.waitForConnection()
<th>cmd</th>
<td>
The command to execute in the <code>adb</code> shell. The form of these commands is
- described in the topic <a href="{@docRoot}guide/developing/tools/adb.html">Android
+ described in the topic <a href="{@docRoot}tools/help/adb.html">Android
Debug Bridge</a>.
</td>
</tr>
@@ -1033,7 +1033,7 @@ newdevice = MonkeyRunner.waitForConnection()
<h4 class="jd-details-title">
<span class="normal">
<code>
- <a href="{@docRoot}guide/developing/tools/MonkeyImage.html">
+ <a href="{@docRoot}tools/help/MonkeyImage.html">
MonkeyImage
</a>
</code>
@@ -1054,7 +1054,7 @@ newdevice = MonkeyRunner.waitForConnection()
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist">
<li>
- A <a href="{@docRoot}guide/developing/tools/MonkeyImage.html">
+ A <a href="{@docRoot}tools/help/MonkeyImage.html">
MonkeyImage</a> object containing the image of the current display.
</li>
</ul>
diff --git a/docs/html/guide/developing/tools/MonkeyImage.jd b/docs/html/tools/help/MonkeyImage.jd
index 2efc37368729..79f49489640e 100644
--- a/docs/html/guide/developing/tools/MonkeyImage.jd
+++ b/docs/html/tools/help/MonkeyImage.jd
@@ -14,7 +14,7 @@ parent.link=index.html
</p>
<p>
You do not need to create new instances of <code>MonkeyImage</code>. Instead, use
-<code><a href="{@docRoot}guide/developing/tools/MonkeyDevice.html#takeSnapshot">
+<code><a href="{@docRoot}tools/help/MonkeyDevice.html#takeSnapshot">
MonkeyDevice.takeSnapshot()</a></code> to create a new instance from a screenshot. For example, use:
</p>
<pre>
@@ -88,7 +88,7 @@ newimage = MonkeyDevice.takeSnapshot()
<td class="jd-typecol">
<nobr>
<code>
- <a href="{@docRoot}guide/developing/tools/MonkeyImage.html">MonkeyImage</a>
+ <a href="{@docRoot}tools/help/MonkeyImage.html">MonkeyImage</a>
</code>
</nobr>
</td>
@@ -116,7 +116,7 @@ newimage = MonkeyDevice.takeSnapshot()
<span class="sympad">
<a href="#sameAs">sameAs</a>
</span>
- (<code><a href="{@docRoot}guide/developing/tools/MonkeyImage.html">MonkeyImage</a></code>
+ (<code><a href="{@docRoot}tools/help/MonkeyImage.html">MonkeyImage</a></code>
other,
<em>float</em> percent)
</nobr>
@@ -291,7 +291,7 @@ newimage = MonkeyDevice.takeSnapshot()
<h4 class="jd-details-title">
<span class="normal">
<code>
- <a href="{@docRoot}guide/developing/tools/MonkeyImage.html">MonkeyImage</a>
+ <a href="{@docRoot}tools/help/MonkeyImage.html">MonkeyImage</a>
</code>
</span>
<span class="sympad">getSubImage</span>
@@ -344,7 +344,7 @@ newimage = MonkeyDevice.takeSnapshot()
<span class="normal">
(
<code>
- <a href="{@docRoot}guide/developing/tools/MonkeyImage.html">MonkeyImage</a>
+ <a href="{@docRoot}tools/help/MonkeyImage.html">MonkeyImage</a>
</code> otherImage,
<em>float</em> percent
)
diff --git a/docs/html/guide/developing/tools/MonkeyRunner.jd b/docs/html/tools/help/MonkeyRunner.jd
index ea8d69ef7db2..a924d2dcaf71 100644
--- a/docs/html/guide/developing/tools/MonkeyRunner.jd
+++ b/docs/html/tools/help/MonkeyRunner.jd
@@ -118,7 +118,7 @@ parent.link=index.html
<td class="jd-typecol">
<nobr>
<code>
- <a href="{@docRoot}guide/developing/tools/MonkeyDevice.html">MonkeyDevice</a>
+ <a href="{@docRoot}tools/help/MonkeyDevice.html">MonkeyDevice</a>
</code>
</nobr>
</td>
@@ -395,7 +395,7 @@ parent.link=index.html
<h4 class="jd-details-title">
<span class="normal">
<code>
- <a href="{@docRoot}guide/developing/tools/MonkeyDevice.html">MonkeyDevice</a>
+ <a href="{@docRoot}tools/help/MonkeyDevice.html">MonkeyDevice</a>
</code>
</span>
<span class="sympad">waitForConnection</span>
@@ -428,7 +428,7 @@ parent.link=index.html
<td>
A regular expression that specifies the serial number of the device or emulator. See
the topic
- <a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a>
+ <a href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a>
for a description of device and emulator serial numbers.
</td>
</tr>
@@ -438,7 +438,7 @@ parent.link=index.html
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist">
<li>
- A <code><a href="{@docRoot}guide/developing/tools/MonkeyDevice.html">MonkeyDevice</a></code>
+ A <code><a href="{@docRoot}tools/help/MonkeyDevice.html">MonkeyDevice</a></code>
instance for the device or emulator. Use this object to control and communicate with the
device or emulator.
</li>
diff --git a/docs/html/tools/help/aapt.html b/docs/html/tools/help/aapt.html
new file mode 100644
index 000000000000..ebd375d312f0
--- /dev/null
+++ b/docs/html/tools/help/aapt.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+<meta http-equiv="refresh" content="0;url=http://developer.android.com/tools/building/index.html#detailed-build">
+<title>Redirecting...</title>
+</head>
+<body>
+<p>You should be redirected. Please <a
+href="http://developer.android.com/tools/building/index.html#detailed-build">click here</a>.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/docs/html/guide/developing/tools/adb.jd b/docs/html/tools/help/adb.jd
index 50c72365d03d..ddebed605b89 100644
--- a/docs/html/guide/developing/tools/adb.jd
+++ b/docs/html/tools/help/adb.jd
@@ -138,7 +138,7 @@ emulator-5558&nbsp;&nbsp;device</pre>
<pre>adb install &lt;path_to_apk&gt;</pre>
<p>For more information about how to create an .apk file that you can install on an emulator/device
-instance, see <a href="{@docRoot}guide/developing/building/index.html">Building and Running</a></p>
+instance, see <a href="{@docRoot}tools/building/index.html">Building and Running</a></p>
<p>Note that, if you are using the Eclipse IDE and have the ADT plugin installed, you do not need to use adb (or aapt) directly to install your application on the emulator/device. Instead, the ADT plugin handles the packaging and installation of the application for you. </p>
@@ -409,7 +409,7 @@ application and send 500 pseudo-random events to it.</p>
<pre>$ adb shell monkey -v -p your.package.name 500</pre>
<p>For more information about command options for Monkey, see the complete
-<a href="{@docRoot}guide/developing/tools/monkey.html" title="monkey">UI/Application Exerciser Monkey</a> documentation page.</p>
+<a href="{@docRoot}tools/help/monkey.html" title="monkey">UI/Application Exerciser Monkey</a> documentation page.</p>
<a name="othershellcommands"></a>
@@ -432,7 +432,7 @@ application and send 500 pseudo-random events to it.</p>
<tr>
<td><code>dumpsys</code></td>
<td>Dumps system data to the screen.</td>
-<td rowspan=4">The <a href="{@docRoot}guide/developing/debugging/ddms.html">Dalvik Debug Monitor Server</a>
+<td rowspan=4">The <a href="{@docRoot}tools/debugging/ddms.html">Dalvik Debug Monitor Server</a>
(DDMS) tool offers integrated debug environment that you may find easier to use.</td>
</tr>
diff --git a/docs/html/guide/developing/tools/adt.jd b/docs/html/tools/help/adt.jd
index d473e8589953..cd5bc67e6a3b 100644
--- a/docs/html/guide/developing/tools/adt.jd
+++ b/docs/html/tools/help/adt.jd
@@ -97,35 +97,35 @@ Project site.</p>
They include:</p>
<ul>
- <li><a href="{@docRoot}guide/developing/debugging/debugging-tracing.html">Traceview</a>:
+ <li><a href="{@docRoot}tools/debugging/debugging-tracing.html">Traceview</a>:
Allows you to profile your program's execution
(<strong>Window &gt; Open Perspective &gt; Traceview</strong>). </li>
- <li><a href="{@docRoot}guide/developing/tools/android.html">android</a>: Provides access to
+ <li><a href="{@docRoot}tools/help/android.html">android</a>: Provides access to
the Android SDK Manager and AVD Manager. Other <code>android</code> features such as creating or
updating projects (application and library) are integrated throughout the Eclipse IDE. </li>
- <li><a href="{@docRoot}guide/developing/debugging/debugging-ui.html#HierarchyViewer">Hierarchy
+ <li><a href="{@docRoot}tools/debugging/debugging-ui.html#HierarchyViewer">Hierarchy
Viewer</a>: Allows you to visualize your application's view hierarchy to find inefficiencies
(<strong>Window &gt; Open Perspective &gt; Hierarchy Viewer</strong>).</li>
- <li><a href="{@docRoot}guide/developing/debugging/debugging-ui.html#pixelperfect">Pixel
+ <li><a href="{@docRoot}tools/debugging/debugging-ui.html#pixelperfect">Pixel
Perfect</a>: Allows you to closely examine your UI to help with designing and building.
(<strong>Window &gt; Open Perspective &gt; Pixel Perfect</strong>).</li>
- <li><a href="{@docRoot}guide/developing/debugging/ddms.html">DDMS</a>: Provides
+ <li><a href="{@docRoot}tools/debugging/ddms.html">DDMS</a>: Provides
debugging features including: screen capturing, thread and heap information, and logcat
(<strong>Window &gt; Open Perspective &gt; DDMS</strong>).</li>
- <li><a href="{@docRoot}guide/developing/tools/adb.html">adb</a>: Provides access to
+ <li><a href="{@docRoot}tools/help/adb.html">adb</a>: Provides access to
a device from your development system. Some features of
<code>adb</code> are integrated into ADT such as project installation (Eclipse run menu),
file transfer, device enumeration, and logcat (DDMS). You must access the more advanced
features of <code>adb</code>, such as shell commands, from the command line.</li>
- <li><a href="{@docRoot}guide/developing/tools/proguard.html">ProGuard</a>: Allows code obfuscation,
+ <li><a href="{@docRoot}tools/help/proguard.html">ProGuard</a>: Allows code obfuscation,
shrinking, and optimization. ADT integrates ProGuard as part of the build, if you <a href=
- "{@docRoot}guide/developing/tools/proguard.html#enabling">enable it</a>.</li>
+ "{@docRoot}tools/help/proguard.html#enabling">enable it</a>.</li>
</ul>
<h2 id="editors">Code Editors</h2>
diff --git a/docs/html/guide/developing/tools/android.jd b/docs/html/tools/help/android.jd
index 295a720b36f3..282c791c10d4 100644
--- a/docs/html/guide/developing/tools/android.jd
+++ b/docs/html/tools/help/android.jd
@@ -7,15 +7,15 @@ parent.link=index.html
<ul>
<li>Create, delete, and view Android Virtual Devices (AVDs). See <a href=
- "{@docRoot}guide/developing/devices/managing-avds-cmdline.html">Managing AVDs from the Command
+ "{@docRoot}tools/devices/managing-avds-cmdline.html">Managing AVDs from the Command
Line</a>.</li>
<li>Create and update Android projects. See <a href=
- "{@docRoot}guide/developing/projects/projects-cmdline.html">Managing Projects from
+ "{@docRoot}tools/projects/projects-cmdline.html">Managing Projects from
the Command Line</a>.</li>
<li>Update your Android SDK with new platforms, add-ons, and documentation. See <a href=
- "{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>.</li>
+ "{@docRoot}sdk/exploring.html">Exploring the SDK</a>.</li>
</ul>If you are using Eclipse, the <code>android</code> tool's features are integrated
into ADT, so you should not need to use this tool directly.
@@ -59,7 +59,7 @@ and may be out of date. For the most current list of options, execute <code>andr
</tr>
<tr>
- <td rowspan="6"><code>avd</code></td>
+ <td><code>avd</code></td>
<td>None</td>
@@ -69,7 +69,7 @@ and may be out of date. For the most current list of options, execute <code>andr
</tr>
<tr>
- <td rowspan="6"><code>sdk</code></td>
+ <td><code>sdk</code></td>
<td>None</td>
diff --git a/docs/html/guide/developing/tools/bmgr.jd b/docs/html/tools/help/bmgr.jd
index d63dcf291b4f..2248fa6712e3 100644
--- a/docs/html/guide/developing/tools/bmgr.jd
+++ b/docs/html/tools/help/bmgr.jd
@@ -31,7 +31,7 @@ parent.link=index.html
on Android devices supporting API Level 8 or greater. It provides commands to induce backup
and restore operations so that you don't need to repeatedly wipe data or take similar
intrusive steps in order to test your application's backup agent. These commands are
-accessed via the <a href="{@docRoot}guide/developing/tools/adb.html">adb</a> shell.
+accessed via the <a href="{@docRoot}tools/help/adb.html">adb</a> shell.
<p>For information about adding support for backup in your application, read <a
href="{@docRoot}guide/topics/data/backup.html">Data Backup</a>, which includes a guide to testing
diff --git a/docs/html/guide/developing/tools/ddms.html b/docs/html/tools/help/ddms.html
index 052ccc958593..d885d561dd00 100644
--- a/docs/html/guide/developing/tools/ddms.html
+++ b/docs/html/tools/help/ddms.html
@@ -1,10 +1,10 @@
<html>
<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/guide/developing/debugging/ddms.html">
+<meta http-equiv="refresh" content="0;url=http://developer.android.com/tools/debugging/ddms.html">
<title>Redirecting...</title>
</head>
<body>
<p>You should be redirected. Please <a
-href="http://developer.android.com/guide/developing/debugging/ddms.html">click here</a>.</p>
+href="http://developer.android.com/tools/debugging/ddms.html">click here</a>.</p>
</body>
</html> \ No newline at end of file
diff --git a/docs/html/guide/developing/tools/dmtracedump.jd b/docs/html/tools/help/dmtracedump.jd
index cb9ad262a671..bdc820d87ffd 100644
--- a/docs/html/guide/developing/tools/dmtracedump.jd
+++ b/docs/html/tools/help/dmtracedump.jd
@@ -8,7 +8,7 @@ parent.link=index.html
graphical call-stack diagrams from trace log files (instead of using Traceview).</p>
<p>This document is a reference to the available command line options. For more information on generating trace
- logs, see <a href="{@docRoot}guide/developing/debugging/debugging-tracing.html">Profiling with
+ logs, see <a href="{@docRoot}tools/debugging/debugging-tracing.html">Profiling with
Traceview and dmtracedump</a>.</p>
<p>The usage for <code>dmtracedump</code> is:</p>
diff --git a/docs/html/guide/developing/tools/draw9patch.jd b/docs/html/tools/help/draw9patch.jd
index 7cf0e4b1d861..7cf0e4b1d861 100644
--- a/docs/html/guide/developing/tools/draw9patch.jd
+++ b/docs/html/tools/help/draw9patch.jd
diff --git a/docs/html/guide/developing/tools/emulator.jd b/docs/html/tools/help/emulator.jd
index 21d4263a9e12..fa101e19638e 100644
--- a/docs/html/guide/developing/tools/emulator.jd
+++ b/docs/html/tools/help/emulator.jd
@@ -14,8 +14,8 @@ parent.link=index.html
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/developing/devices/emulator.html">Using the Android Emulator</a></li>
- <li><a href="{@docRoot}guide/developing/devices/index.html">Managing Virtual Devices</a></li>
+ <li><a href="{@docRoot}tools/devices/emulator.html">Using the Android Emulator</a></li>
+ <li><a href="{@docRoot}tools/devices/index.html">Managing Virtual Devices</a></li>
</ol>
</div>
@@ -29,7 +29,7 @@ Android applications without using a physical device.</p>
<p>This document is a reference to the available command line options and the keyboard mapping to
device keys.
For a complete guide to using the Android Emulator, see
-<a href="{@docRoot}guide/developing/devices/emulator.html">Using the Android Emulator</a>.
+<a href="{@docRoot}tools/devices/emulator.html">Using the Android Emulator</a>.
<h2 id="KeyMapping">Keyboard Commands</h2>
@@ -154,7 +154,7 @@ Here's the command-line syntax of the options available to the {@code emulator}
<td><strong>Required</strong>. Specifies the AVD to load for this emulator
instance.</td>
<td>You must create an AVD configuration before launching the emulator. For
- information, see <a href="{@docRoot}guide/developing/devices/managing-avds.html">Managing
+ information, see <a href="{@docRoot}tools/devices/managing-avds.html">Managing
AVDs with AVD Manager</a>.</td>
<tr>
<td rowspan="7">Disk Images</td>
@@ -360,7 +360,7 @@ ANDROID_VERBOSE. Define the options you want to use in a comma-delimited list, s
<td><code>-netdelay &lt;delay&gt;</code></td>
<td>Set network latency emulation to &lt;delay&gt;.</td>
<td>Default value is <code>none</code>. See the table in
- <a href="{@docRoot}guide/developing/devices/emulator.html#netdelay">Network Delay Emulation</a>
+ <a href="{@docRoot}tools/devices/emulator.html#netdelay">Network Delay Emulation</a>
for supported <code>&lt;delay&gt;</code> values. </td>
</tr>
<tr>
@@ -371,7 +371,7 @@ ANDROID_VERBOSE. Define the options you want to use in a comma-delimited list, s
<td><code>-netspeed &lt;speed&gt;</code></td>
<td>Set network speed emulation to &lt;speed&gt;.</td>
<td>Default value is <code>full</code>. See the table in
- <a href="{@docRoot}guide/developing/devices/emulator.html#netspeed">Network Speed Emulation</a> for
+ <a href="{@docRoot}tools/devices/emulator.html#netspeed">Network Speed Emulation</a> for
supported <code>&lt;speed&gt;</code> values. </td>
</tr>
<tr>
@@ -425,7 +425,7 @@ scale in direct relationship with &lt;delay&gt; values.</p>
<td><code>-qemu -enable-kvm</code></td>
<td>Enable KVM acceleration of the emulator virtual machine.</td>
<td>This option is only effective when your system is set up to use
- <a href="{@docRoot}guide/developing/devices/emulator.html#vm-linux">KVM-based VM acceleration</a>.
+ <a href="{@docRoot}tools/devices/emulator.html#vm-linux">KVM-based VM acceleration</a>.
You can optionally specify a memory size ({@code -m &lt;size&gt;}) for the VM, which should match
your emulator's memory size:</p>
{@code -qemu -m 512 -enable-kvm}<br>
@@ -440,7 +440,7 @@ scale in direct relationship with &lt;delay&gt; values.</p>
<td>Turn on graphics acceleration for the emulator.</td>
<td>This option is only available for emulators using a system image with API Level 15, revision 3
and higher. For more information, see
- <a href="{@docRoot}guide/developing/devices/emulator.html#accel-graphics">Using the Android
+ <a href="{@docRoot}tools/devices/emulator.html#accel-graphics">Using the Android
Emulator</a>.</td></tr>
<tr>
<td><code>-radio &lt;device&gt;</code></td>
@@ -524,7 +524,7 @@ option. Using this option may yield unexpected and in some cases misleading
results, since the density with which to render the skin may not be defined.
AVDs let you associate each skin with a default density and override the default
as needed. For more information, see <a
-href="{@docRoot}guide/developing/devices/managing-avds.html">Managing Virtual Devices
+href="{@docRoot}tools/devices/managing-avds.html">Managing Virtual Devices
with AVD Manager</a>.
</td>
</tr>
diff --git a/docs/html/guide/developing/tools/etc1tool.jd b/docs/html/tools/help/etc1tool.jd
index a7f76f5cadb6..a7f76f5cadb6 100644
--- a/docs/html/guide/developing/tools/etc1tool.jd
+++ b/docs/html/tools/help/etc1tool.jd
diff --git a/docs/html/guide/developing/tools/hierarchy-viewer.jd b/docs/html/tools/help/hierarchy-viewer.jd
index 3d3191b76d7a..4a346e00fc01 100644
--- a/docs/html/guide/developing/tools/hierarchy-viewer.jd
+++ b/docs/html/tools/help/hierarchy-viewer.jd
@@ -13,6 +13,6 @@ interface. It provides a visual representation of the layout's View hierarchy
</ol>
<p>For more information on how to use Hierarchy Viewer, see
-<a href="{@docRoot}guide/developing/debugging/debugging-ui.html">Debugging and Profiling UIs</a>
+<a href="{@docRoot}tools/debugging/debugging-ui.html">Debugging and Profiling UIs</a>
</p>
diff --git a/docs/html/guide/developing/tools/hprof-conv.jd b/docs/html/tools/help/hprof-conv.jd
index f96def205fb1..f96def205fb1 100644
--- a/docs/html/guide/developing/tools/hprof-conv.jd
+++ b/docs/html/tools/help/hprof-conv.jd
diff --git a/docs/html/guide/developing/tools/index.jd b/docs/html/tools/help/index.jd
index 5e9f68624146..aa95de2992c2 100644
--- a/docs/html/guide/developing/tools/index.jd
+++ b/docs/html/tools/help/index.jd
@@ -1,7 +1,6 @@
page.title=Tools
@jd:body
-<img src="{@docRoot}assets/images/android_wrench.png" alt="" align="right">
<p>The Android SDK includes a variety of tools that help you develop mobile
applications for the Android platform. The tools are classified into two groups: SDK tools
@@ -19,14 +18,14 @@ avd</code>) the emulator (<code>emulator</code>), and the Dalvik Debug Monitor S
<dl>
<dt><a href="android.html">android</a></dt>
<dd>Lets you manage AVDs, projects, and the installed components of the SDK.</dd>
- <dt><a href="{@docRoot}guide/developing/debugging/ddms.html">Dalvik Debug Monitor
+ <dt><a href="{@docRoot}tools/debugging/ddms.html">Dalvik Debug Monitor
Server (ddms)</a></dt>
<dd>Lets you debug Android applications.</dd>
<dt><a href="dmtracedump.html">dmtracedump</a></dt>
<dd>Generates graphical call-stack diagrams from trace log files. The tool uses the
Graphviz Dot utility to create the graphical output, so you need to install Graphviz before
running <code>dmtracedump</code>. For more information on using <code>dmtracedump</code>, see <a
-href="{@docRoot}guide/developing/debugging/debugging-tracing.html#dmtracedump">Profiling
+href="{@docRoot}tools/debugging/debugging-tracing.html#dmtracedump">Profiling
with Traceview and dmtracedump</a></dd>
<dt><a href="draw9patch.html">Draw 9-patch</a></dt>
<dd>Allows you to easily create a {@link android.graphics.NinePatch} graphic using a
@@ -75,7 +74,7 @@ Android Debug Bridge is a versatile tool that lets you manage the state of an em
Android-powered device. You can also use it to install an Android application (.apk) file on a
device.</p>
-<p>The other platform tools, such as <a href="{@docRoot}guide/developing/tools/aidl.html">aidl</a>,
+<p>The other platform tools, such as <a href="{@docRoot}tools/aidl.html">aidl</a>,
<code>aapt</code>, <code>dexdump</code>, and <code>dx</code>, are typically called by the Android
build tools or Android Development Tools (ADT), so you rarely need to invoke these tools directly.
As a general rule, you should rely on the build tools or the ADT plugin to call them as needed.</p>
diff --git a/docs/html/guide/developing/tools/layoutopt.jd b/docs/html/tools/help/layoutopt.jd
index cb0b50595278..1308b1e71a72 100644
--- a/docs/html/guide/developing/tools/layoutopt.jd
+++ b/docs/html/tools/help/layoutopt.jd
@@ -8,7 +8,7 @@ layouts and layout hierarchies of your applications.<p>
<p>This document is a reference to the available command line options. For more information and sample
output of the tool, see <a
-href="{@docRoot}guide/developing/debugging/debugging-ui.html#layoutopt">Optimizing layouts with
+href="{@docRoot}tools/debugging/debugging-ui.html#layoutopt">Optimizing layouts with
layoutopt</a>.</p>
<h3>Usage</h3>
diff --git a/docs/html/guide/developing/tools/logcat.jd b/docs/html/tools/help/logcat.jd
index 546e3eacd2ae..d504b22c7fde 100644
--- a/docs/html/guide/developing/tools/logcat.jd
+++ b/docs/html/tools/help/logcat.jd
@@ -9,10 +9,10 @@ parent.link=index.html
<code>logcat</code> from an ADB shell to view the log messages.</p>
<p>This document is a reference to the available command line options. For more information on <code>logcat</code>, see
- <a href="{@docRoot}guide/developing/debugging/debugging-log.html">Reading and Writing Logs</a>.
+ <a href="{@docRoot}tools/debugging/debugging-log.html">Reading and Writing Logs</a>.
For more
information on accessing <code>logcat</code> from DDMS, instead of the command line, see the documentation for the
- <a href="{@docRoot}guide/developing/debugging/ddms.html">Dalvik Debug Monitor Server</a>.
+ <a href="{@docRoot}tools/debugging/ddms.html">Dalvik Debug Monitor Server</a>.
</p>
<h3>Syntax</h3>
diff --git a/docs/html/guide/developing/tools/mksdcard.jd b/docs/html/tools/help/mksdcard.jd
index 0a8045487829..38c435666735 100644
--- a/docs/html/guide/developing/tools/mksdcard.jd
+++ b/docs/html/tools/help/mksdcard.jd
@@ -46,7 +46,7 @@ mksdcard -l &lt;label&gt; &lt;size&gt; &lt;file&gt;
<p>Once you have created the disk image file, you can load it in the emulator at startup using
the emulator's <code>-sdcard</code> option. For more information, see <a href=
- "{@docRoot}guide/developing/tools/emulator.html">Android Emulator</a>.</p>
+ "{@docRoot}tools/help/emulator.html">Android Emulator</a>.</p>
<p>The usage for the <code>-sdcard</code> option is as follows:</p>
<pre>emulator -sdcard &lt;file&gt;</pre>
diff --git a/docs/html/guide/developing/tools/monkey.jd b/docs/html/tools/help/monkey.jd
index a7e539c15655..b6300a70bab4 100644
--- a/docs/html/guide/developing/tools/monkey.jd
+++ b/docs/html/tools/help/monkey.jd
@@ -4,7 +4,7 @@ parent.link=index.html
@jd:body
<p>The Monkey is a program that runs on your
-<a href="{@docRoot}guide/developing/tools/emulator.html">emulator</a> or device and generates pseudo-random
+<a href="{@docRoot}tools/help/emulator.html">emulator</a> or device and generates pseudo-random
streams of user events such as clicks, touches, or gestures, as well as a number of system-level
events. You can use the Monkey to stress-test applications that you are developing, in a random
yet repeatable manner.</p>
@@ -187,7 +187,7 @@ transitions invoked by your application.</td>
<td>If set, this option will generate profiling reports immediately before and after
the Monkey event sequence.
This will generate large (~5Mb) files in data/misc, so use with care. See
-<a href="{@docRoot}guide/developing/debugging/debugging-tracing.html" title="traceview">Traceview</a> for more information
+<a href="{@docRoot}tools/debugging/debugging-tracing.html" title="traceview">Traceview</a> for more information
on trace files.</td>
</tr>
diff --git a/docs/html/guide/developing/tools/monkeyrunner_concepts.jd b/docs/html/tools/help/monkeyrunner_concepts.jd
index 346a0c648cd5..c37e64d64525 100644
--- a/docs/html/guide/developing/tools/monkeyrunner_concepts.jd
+++ b/docs/html/tools/help/monkeyrunner_concepts.jd
@@ -26,7 +26,7 @@ parent.link=index.html
<h2>See Also</h2>
<ol>
<li>
- <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Fundamentals</a>
+ <a href="{@docRoot}tools/testing/testing_android.html">Testing Fundamentals</a>
</li>
</ol>
</div>
@@ -42,9 +42,9 @@ parent.link=index.html
</p>
<p>
The monkeyrunner tool is not related to the
- <a href="{@docRoot}guide/developing/tools/monkey.html">UI/Application Exerciser Monkey</a>,
+ <a href="{@docRoot}tools/help/monkey.html">UI/Application Exerciser Monkey</a>,
also known as the <code>monkey</code> tool. The <code>monkey</code> tool runs in an
- <code><a href="{@docRoot}guide/developing/tools/adb.html">adb</a></code> shell directly on the
+ <code><a href="{@docRoot}tools/help/adb.html">adb</a></code> shell directly on the
device or emulator and generates pseudo-random streams of user and system events. In comparison,
the monkeyrunner tool controls devices and emulators from a workstation by sending specific
commands and events from an API.
@@ -76,7 +76,7 @@ parent.link=index.html
<code><a href="http://docs.python.org/library/os.html">os</a></code> and
<code><a href="http://docs.python.org/library/subprocess.html">subprocess</a></code>
modules to call Android tools such as
- <a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a>.
+ <a href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a>.
<p>
You can also add your own classes to the monkeyrunner API. This is described
in more detail in the section
@@ -94,11 +94,11 @@ parent.link=index.html
<h2 id="SampleProgram">A Simple monkeyrunner Program</h2>
<p>
Here is a simple monkeyrunner program that connects to a device, creating a
- <code><a href="{@docRoot}guide/developing/tools/MonkeyDevice.html">MonkeyDevice</a></code>
+ <code><a href="{@docRoot}tools/help/MonkeyDevice.html">MonkeyDevice</a></code>
object. Using the <code>MonkeyDevice</code> object, the program installs an Android application
package, runs one of its activities, and sends key events to the activity.
The program then takes a screenshot of the result, creating a
- <code><a href="{@docRoot}guide/developing/tools/MonkeyImage.html">MonkeyImage</a></code> object.
+ <code><a href="{@docRoot}tools/help/MonkeyImage.html">MonkeyImage</a></code> object.
From this object, the program writes out a <code>.png</code> file containing the screenshot.
</p>
<pre>
@@ -141,19 +141,19 @@ result.writeToFile('myproject/shot1.png','png')
</p>
<ul>
<li>
- <code><a href="{@docRoot}guide/developing/tools/MonkeyRunner.html">MonkeyRunner</a></code>:
+ <code><a href="{@docRoot}tools/help/MonkeyRunner.html">MonkeyRunner</a></code>:
A class of utility methods for monkeyrunner programs. This class provides a method for
connecting monkeyrunner to a device or emulator. It also provides methods for
creating UIs for a monkeyrunner program and for displaying the built-in help.
</li>
<li>
- <code><a href="{@docRoot}guide/developing/tools/MonkeyDevice.html">MonkeyDevice</a></code>:
+ <code><a href="{@docRoot}tools/help/MonkeyDevice.html">MonkeyDevice</a></code>:
Represents a device or emulator. This class provides methods for installing and
uninstalling packages, starting an Activity, and sending keyboard or touch events to an
application. You also use this class to run test packages.
</li>
<li>
- <code><a href="{@docRoot}guide/developing/tools/MonkeyImage.html">MonkeyImage</a></code>:
+ <code><a href="{@docRoot}tools/help/MonkeyImage.html">MonkeyImage</a></code>:
Represents a screen capture image. This class provides methods for capturing screens,
converting bitmap images to various formats, comparing two MonkeyImage objects, and
writing an image to a file.
diff --git a/docs/html/guide/developing/tools/proguard.jd b/docs/html/tools/help/proguard.jd
index ea8a1eabafda..1da94ba60a95 100644
--- a/docs/html/guide/developing/tools/proguard.jd
+++ b/docs/html/tools/help/proguard.jd
@@ -39,7 +39,7 @@ parent.link=index.html
sized <code>.apk</code> file that is more difficult to reverse engineer. Because ProGuard makes your
application harder to reverse engineer, it is important that you use it
when your application utilizes features that are sensitive to security like when you are
- <a href="{@docRoot}guide/market/licensing/index.html">Licensing Your Applications</a>.</p>
+ <a href="{@docRoot}guide/google/play/licensing/index.html">Licensing Your Applications</a>.</p>
<p>ProGuard is integrated into the Android build system, so you do not have to invoke it
manually. ProGuard runs only when you build your application in release mode, so you do not
diff --git a/docs/html/guide/developing/tools/sqlite3.jd b/docs/html/tools/help/sqlite3.jd
index 9cc7e9831a5b..9cc7e9831a5b 100644
--- a/docs/html/guide/developing/tools/sqlite3.jd
+++ b/docs/html/tools/help/sqlite3.jd
diff --git a/docs/html/guide/developing/tools/traceview.jd b/docs/html/tools/help/traceview.jd
index aa3748182765..6555ac08cc83 100644
--- a/docs/html/guide/developing/tools/traceview.jd
+++ b/docs/html/tools/help/traceview.jd
@@ -11,6 +11,6 @@ Traceview can help you debug your application and profile its performance.</p>
</ol>
<p>For more information on how to use Traceview, see
-<a href="{@docRoot}guide/developing/debugging/debugging-tracing.html">Profiling with Traceview and dmtracedump</a>
+<a href="{@docRoot}tools/debugging/debugging-tracing.html">Profiling with Traceview and dmtracedump</a>
</p>
diff --git a/docs/html/guide/developing/tools/zipalign.jd b/docs/html/tools/help/zipalign.jd
index 321608058937..184cdcb6ad22 100644
--- a/docs/html/guide/developing/tools/zipalign.jd
+++ b/docs/html/tools/help/zipalign.jd
@@ -37,7 +37,7 @@ the "extra" field in the zip Local File Header sections. Existing data
in the "extra" fields may be altered by this process.</p>
<p>For more information about how to use zipalign when building your
-application, please read <a href="{@docRoot}guide/publishing/app-signing.html">Signing
+application, please read <a href="{@docRoot}tools/publishing/app-signing.html">Signing
Your Application</a>.</p>
diff --git a/docs/html/tools/index.jd b/docs/html/tools/index.jd
new file mode 100644
index 000000000000..929f849c9392
--- /dev/null
+++ b/docs/html/tools/index.jd
@@ -0,0 +1,96 @@
+page.title=Developer Tools
+@jd:body
+
+
+<img src="{@docRoot}images/tools-home.png" style="float:right;" height="415" width="763" />
+
+<div style="position:relative;height:0">
+<div style="position:absolute;width:420px">
+ <p>The Android Developer Tools (ADT) plugin for Eclipse provides
+ a professional-grade development environment for building
+ Android apps. It's a full Java IDE with advanced features to help you build, test, debug,
+ and package your Android apps. </p>
+ <p>Free, open-source, and runs on most major OS platforms.<br>To get started,
+ <a href="{@docRoot}sdk/index.html">download the Android SDK.</a></p>
+</div>
+</div>
+
+<div style="margin-top:20px;"></div>
+
+<div class="col-6">
+<h3>Full Java IDE</h3>
+
+ <ul>
+ <li>Android-specific refactoring, quick fixes, integrated navigation between Java and Android XML resources.</li>
+ <li>Enhanced XML editors for Android XML resources</li>
+ <li>Static analysis tools to catch performance, usability, and correctness problems</li>
+ <li>Build support for complex projects, command-line support for CI through Ant. Includes ProGuard and app-signing. </li>
+ </ul>
+</div>
+
+<div class="col-6">
+<h3>Graphical UI Builders</h3>
+
+ <ul>
+ <li>Build rich Android UI with drag and drop.
+ <li>Vsualize your UI on tablets, phones, and other devices. Switch themes, locales, even plaform versions instantly, without building.</li>
+ <li>Visual refactoring lets you extracts layout for inclusion, convert layouts, extract styles</li>
+ <li>Editor support for working with custom UI components</li>
+ </ul>
+</div>
+
+<div class="col-6" style="clear:both">
+<h3>Develop on Hardware Devices</h3>
+
+ <ul>
+ <li>Use any commercial Android hardware device or multiple devices.</li>
+ <li>Deploy your app to connected devices directy from the IDE</li>
+ <li>Live, on-device debugging, testing, and profiling</li>
+ </ul>
+</div>
+
+<div class="col-6">
+<h3>Develop on Virtual Devices</h3>
+ <ul>
+ <li>Emulate any device. Use custom screen sizes, keyboards, and other hardware components. </li>
+ <li>Advanced hardware emulation, including camera, sensors, multitouch, telephony.</li>
+ <li>Develop and test for broadest compatibility at lowest cost.</li>
+ </ul>
+
+</div>
+
+<div style="margin-top:20px;"></div>
+
+<div class="col-5">
+<h3>Powerful Debugging</h3>
+
+ <ul>
+ <li>Full Java debugger with on-device debugging and Android-specidic tools</li>
+ <li>Built-in memory analysis, performance/CPU profiling.</li>
+ <li>Graphical tools for debugging and optimizing UI, runtime inspecton of UI structure and performance.</li>
+ <li>Runtime graphical analysis of your app's network bandwidth usage.</li>
+ </ul>
+</div>
+
+<div style="float:right;width:360px;padding-top:1em;">
+ <img src="{@docRoot}images/debugging-tall.png" align="left">
+</div>
+
+
+<div class="col-6">
+<h3>Testing</h3>
+
+ <ul>
+ <li>Fully instrumentated, scriptable test environment.</li>
+ <li>Integrated reports using standard test UI.</li>
+ <li>Create and run unit tests on hardware devices or emulator.</li>
+ </ul>
+
+<h3>Native Development</h3>
+
+ <ul>
+ <li>Support for compiling and packaging existing code written in C or C++.</li>
+ <li>Support for packaging multiple architectures in a single binary, for broad compatibility.</li>
+ </ul>
+</div>
+
diff --git a/docs/html/tools/other-ide.html b/docs/html/tools/other-ide.html
new file mode 100644
index 000000000000..2bfe876570a2
--- /dev/null
+++ b/docs/html/tools/other-ide.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+<meta http-equiv="refresh" content="0;url=http://developer.android.com/tools/projects/projects-cmdline.html">
+<title>Redirecting...</title>
+</head>
+<body>
+<p>You should be redirected. Please <a
+href="http://developer.android.com/tools/projects/projects-cmdline.html">click here</a>.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/docs/html/guide/developing/tools/othertools.html b/docs/html/tools/othertools.html
index a074f3350fda..ed45ccdf8103 100644
--- a/docs/html/guide/developing/tools/othertools.html
+++ b/docs/html/tools/othertools.html
@@ -1,10 +1,10 @@
<html>
<head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/guide/developing/tools/index.html">
+<meta http-equiv="refresh" content="0;url=http://developer.android.com/tools/index.html">
<title>Redirecting...</title>
</head>
<body>
<p>You should be redirected. Please <a
-href="http://developer.android.com/guide/developing/tools/index.html">click here</a>.</p>
+href="http://developer.android.com/tools/index.html">click here</a>.</p>
</body>
</html> \ No newline at end of file
diff --git a/docs/html/guide/developing/projects/index.jd b/docs/html/tools/projects/index.jd
index b16e466e4a1f..6a49ac915d22 100644
--- a/docs/html/guide/developing/projects/index.jd
+++ b/docs/html/tools/projects/index.jd
@@ -76,7 +76,7 @@ page.title=Managing Projects
<dt><code>jni</code></dt>
<dd>Contains native code sources developed using the Android NDK. For more information, see the
- <a href="{@docRoot}sdk/ndk/index.html">Android NDK documentation</a>.</dd>
+ <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK documentation</a>.</dd>
<dt><code>gen/</code></dt>
@@ -228,7 +228,7 @@ used.</dd>
project feature that generates each library project into its own JAR file.
You can download the tools and platforms using the
<em>Android SDK Manager</em>, as described in
- <a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>.</p>
+ <a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a>.</p>
<p>If you have source code and resources that are common to multiple Android projects, you
can move them to a library project so that it is easier to maintain across applications and
@@ -333,7 +333,7 @@ be added in a future
<p>A library is compiled as part of the dependent application project, so the API used in the
library project must be compatible with the version of the Android library used to compile the
application project. In general, the library project should use an <a href=
- "{@docRoot}guide/appendix/api-levels.html">API level</a> that is the same as &mdash; or lower
+ "{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level</a> that is the same as &mdash; or lower
than &mdash; that used by the application. If the library project uses an API level that is
higher than that of the application, the application project will not compile. It is
perfectly acceptable to have a library that uses the Android 1.5 API (API level 3) and that is
@@ -363,7 +363,7 @@ be added in a future
<h2 id="TestProjects">Test Projects</h2>
<p>Test projects contain Android applications that you write using the
- <a href="{@docRoot}guide/topics/testing/index.html">Testing and
+ <a href="{@docRoot}tools/testing/index.html">Testing and
Instrumentation framework</a>. The framework is an extension of the JUnit test framework and adds
access to Android system objects. The file structure of a test project is the same as an
Android project.</p>
@@ -427,7 +427,7 @@ and select <strong>Properties</strong>.</dd>
</dl>
<p>For more information, see the <a href=
- "{@docRoot}guide/developing/testing/index.html">Testing</a> section.</p>
+ "{@docRoot}tools/testing/index.html">Testing</a> section.</p>
<h2 id="testing">Testing a Library Project</h2>
@@ -436,11 +436,11 @@ and select <strong>Properties</strong>.</dd>
project:</p>
<ul>
- <li>You can set up a <a href="{@docRoot}guide/developing/testing/testing_otheride.html">test
+ <li>You can set up a <a href="{@docRoot}tools/testing/testing_otheride.html">test
project</a> that instruments an application project that depends on the library project. You
can then add tests to the project for library-specific features.</li>
- <li>You can set up a set up a standard application project that depends on the library and put
+ <li>You can set up a standard application project that depends on the library and put
the instrumentation in that project. This lets you create a self-contained project that
contains both the tests/instrumentations and the code to test.</li>
- </ul> \ No newline at end of file
+ </ul>
diff --git a/docs/html/guide/developing/projects/projects-cmdline.jd b/docs/html/tools/projects/projects-cmdline.jd
index b8db5f333a1a..29d0e57acac9 100644
--- a/docs/html/guide/developing/projects/projects-cmdline.jd
+++ b/docs/html/tools/projects/projects-cmdline.jd
@@ -29,7 +29,7 @@ file</a></li>
<ol>
<li><a href=
- "{@docRoot}guide/developing/testing/testing_otheride.html#CreateTestProjectCommand">Testing
+ "{@docRoot}tools/testing/testing_otheride.html#CreateTestProjectCommand">Testing
from Other IDEs</a></li>
</ol>
</div>
@@ -50,7 +50,7 @@ file</a></li>
<li>Test projects extend JUnit test functionality to include Android specific functionality. For
more information on creating a test project, see <a href=
- "{@docRoot}guide/developing/testing/testing_otheride.html">Testing from other IDEs</a>.</li>
+ "{@docRoot}tools/testing/testing_otheride.html">Testing from other IDEs</a>.</li>
</ul>
@@ -104,7 +104,7 @@ android create project \
<p>Once you've created your project, you're ready to begin development. You can move your project
folder wherever you want for development, but keep in mind that you must use the <a href=
- "{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a> (adb) &mdash; located in the
+ "{@docRoot}tools/help/adb.html">Android Debug Bridge</a> (adb) &mdash; located in the
SDK <code>platform-tools/</code> directory &mdash; to send your application to the emulator (discussed
later). So you need access between your project solution and the <code>platform-tools/</code> folder.</p>
@@ -289,7 +289,7 @@ android.library.reference.1=path/to/library_projectC
<p>To build an application project that depends on one or more library projects, you can use the
standard Ant build commands and compile modes, as described in <a href=
- "{@docRoot}guide/developing/building/index.html">Building and Running</a>. The tools
+ "{@docRoot}tools/building/index.html">Building and Running</a>. The tools
compile and merge all libraries referenced by the application as part of
compiling the dependent application project. No additional commands or steps are necessary.</p>
diff --git a/docs/html/guide/developing/projects/projects-eclipse.jd b/docs/html/tools/projects/projects-eclipse.jd
index 90f7820631ae..f1972bc19bc3 100644
--- a/docs/html/guide/developing/projects/projects-eclipse.jd
+++ b/docs/html/tools/projects/projects-eclipse.jd
@@ -19,7 +19,7 @@ parent.link=index.html
<ol>
<li><a href=
- "{@docRoot}guide/developing/testing/testing_eclipse.html#CreateTestProjectEclipse">Testing
+ "{@docRoot}tools/testing/testing_eclipse.html#CreateTestProjectEclipse">Testing
from Eclipse with ADT</a></li>
</ol>
</div>
@@ -39,7 +39,7 @@ parent.link=index.html
<li>Test projects extend JUnit test functionality to include Android specific functionality. For
more information on creating a test project, see <a href=
- "{@docRoot}guide/developing/testing/testing_eclipse.html">Testing from Eclipse with ADT</a>.</li>
+ "{@docRoot}tools/testing/testing_eclipse.html">Testing from Eclipse with ADT</a>.</li>
</ul>
<h2 id="CreatingAProject">Creating an Android Project</h2>
@@ -91,7 +91,7 @@ parent.link=index.html
the <code>minSdkVersion</code> attribute in the <a href=
"{@docRoot}guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk&gt;</a> of your
Android Manifest file. If you're unsure of the appropriate <a href=
- "{@docRoot}guide/appendix/api-levels.html">API Level</a> to use, copy the API Level
+ "{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Level</a> to use, copy the API Level
listed for the Build Target you selected in the Target tab.</li>
</ul>
</li>
diff --git a/docs/html/guide/publishing/app-signing.jd b/docs/html/tools/publishing/app-signing.jd
index 5bd9be559497..ac45242516b5 100644
--- a/docs/html/guide/publishing/app-signing.jd
+++ b/docs/html/tools/publishing/app-signing.jd
@@ -36,8 +36,8 @@ page.title=Signing Your Applications
<h2>See also</h2>
<ol>
-<li><a href="{@docRoot}guide/publishing/versioning.html">Versioning Your Applications</a></li>
-<li><a href="{@docRoot}guide/publishing/preparing.html">Preparing to Publish</a></li>
+<li><a href="{@docRoot}tools/publishing/versioning.html">Versioning Your Applications</a></li>
+<li><a href="{@docRoot}tools/publishing/preparing.html">Preparing to Publish</a></li>
</ol>
</div>
@@ -229,7 +229,7 @@ is enabled by using the <code>debug</code> option with the <code>ant</code> comm
compile your app, the build script generates a keystore/key and signs the APK for you.
The script then also aligns the APK with the <code>zipalign</code> tool.
No other action on your part is needed. Read
-<a href="{@docRoot}guide/developing/building/building-cmdline.html#DebugMode">Building and Running Apps
+<a href="{@docRoot}tools/building/building-cmdline.html#DebugMode">Building and Running Apps
on the Command Line</a> for more information.</p>
@@ -430,7 +430,7 @@ file in {@code bin/} will instead be
<code><em>&lt;your_project_name></em>-release.apk</code>. With these steps
automated for you, you're able to skip the manual procedures below (steps 3 and 4).
To learn how to specify your keystore and alias in the {@code ant.properties} file,
-see <a href="{@docRoot}guide/developing/building/building-cmdline.html#ReleaseMode">
+see <a href="{@docRoot}tools/building/building-cmdline.html#ReleaseMode">
Building and Running Apps on the Command Line</a>.</p>
@@ -550,7 +550,7 @@ private key <strong>before</strong> you optimize the package with {@code zipalig
If you sign it after using {@code zipalign}, it will undo the alignment.</p>
<p>For more information, read about the
-<a href="{@docRoot}guide/developing/tools/zipalign.html">zipalign</a> tool.
+<a href="{@docRoot}tools/help/zipalign.html">zipalign</a> tool.
<h3 id="ExportWizard">Compile and sign with Eclipse ADT</h3>
diff --git a/docs/html/tools/publishing/preparing.jd b/docs/html/tools/publishing/preparing.jd
new file mode 100644
index 000000000000..3ebf3f788389
--- /dev/null
+++ b/docs/html/tools/publishing/preparing.jd
@@ -0,0 +1,359 @@
+page.title=Preparing for Release
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>Quickview</h2>
+ <ul>
+ <li>Learn which resources you'll need to release your app.</li>
+ <li>Find out how to configure and build your app for release.</li>
+ <li>Learn best practices for releasing your app.</li>
+ </ul>
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#publishing-intro">Introduction</a></li>
+ <li><a href="#publishing-gather">Gathering Materials and Resources</a></li>
+ <li><a href="#publishing-configure">Configuring Your Application</a></li>
+ <li><a href="#publishing-build">Building Your Application</a></li>
+ <li><a href="#publishing-resources">Preparing External Servers and Resources</a></li>
+ <li><a href="#publishing-test">Testing Your Application for Release</a></li>
+ </ol>
+ <h2>See also</h2>
+ <ol>
+ <li><a href="{@docRoot}tools/publishing/publishing_overview.html">Publishing Overview</a></li>
+ <li><a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a></li>
+ <li><a href="{@docRoot}distribute/googleplay/publish/preparing.html">Publishing Checklist for Google Play</a></li>
+ </ol>
+ </div>
+</div>
+
+<p>Before you distribute your Android application to users you need to prepare it for release. The
+preparation process is a required <a href="{@docRoot}tools/workflow/index.html">development
+task</a> for all Android applications and is the first step in the publishing process (see figure
+1).</p>
+
+<p>When you prepare your application for release, you configure, build, and test a release
+version of your application. The configuration tasks are straightforward, involving basic code
+cleanup and code modification tasks that help optimize your application. The build process is
+similar to the debug build process and can be done using JDK and Android SDK tools. The testing
+tasks serve as a final check, ensuring that your application performs as expected under real-world
+conditions. When you are finished preparing your application for release you have a signed
+<code>.apk</code> file, which you can distribute directly to users or distribute through an
+application marketplace such as Google Play.</p>
+
+<p>This document summarizes the main tasks you need to perform to prepare your application for
+release. The tasks that are described in this document apply to all Android applications regardless
+how they are released or distributed to users. If you are releasing your application through Google
+Play, you should also read <a href="{@docRoot}distribute/googleplay/publish/preparing.html">Publishing
+Checklist for Google Play</a> to be sure your release-ready application satisfies all Google Play
+requirements.</p>
+
+<p class="note"><strong>Note:</strong> As a best practice, your application should meet all of your
+release criteria for functionality, performance, and stability before you perform the tasks outlined
+in this document.</p>
+
+<img src="{@docRoot}images/publishing/publishing_overview_prep.png"
+ alt="Shows how the preparation process fits into the development process"
+ height="190"
+ id="figure1" />
+<p class="img-caption">
+ <strong>Figure 1.</strong> Preparing for release is a required <a
+href="{@docRoot}tools/workflow/index.html">development
+task</a> and is the first step in the publishing process.
+</p>
+
+<h2 id="publishing-intro">Introduction</h2>
+
+<p>To release your application to users you need to create a release-ready package that users can
+install and run on their Android-powered devices. The release-ready package contains the same
+components as the debug <code>.apk</code> file &mdash; compiled source code, resources, manifest
+file, and so on &mdash; and it is built using the same build tools. However, unlike the debug
+<code>.apk</code> file, the release-ready <code>.apk</code> file is signed with your own certificate
+and it is optimized with the zipalign tool.</p>
+
+<div class="figure" style="width:331px">
+ <img src="{@docRoot}images/publishing/publishing_preparing.png"
+ alt="Shows the five tasks you perform to prepare your app for release"
+ height="450" />
+ <p class="img-caption">
+ <strong>Figure 2.</strong> You perform five main tasks to prepare your application for
+ release.
+ </p>
+</div>
+
+<p>The signing and optimization tasks are usually seamless if you are building your application with
+Eclipse and the ADT plugin or with the Ant build script (included with the Android SDK). For
+example, you can use the Eclipse Export Wizard to compile, sign, and optimize your application all
+at once. You can also configure the Ant build script to do the same when you build from the command
+line.</p>
+
+<p>To prepare your application for release you typically perform five main tasks (see figure 2).
+Each main task may include one or more smaller tasks depending on how you are releasing your
+application. For example, if you are releasing your application through Google Play you may want
+to add special filtering rules to your manifest while you are configuring your application for
+release. Similarly, to meet Google Play publishing guidelines you may have to prepare screenshots
+and create promotional text while you are gathering materials for release.</p>
+
+<p>You usually perform the tasks listed in figure 2 after you have throroughly debugged and tested
+your application. The Android SDK contains several tools to help you test and debug your Android
+applications. For more information, see the <a
+href="{@docRoot}tools/debugging/index.html">Debugging</a> and <a
+href="{@docRoot}tools/testing/index.html">Testing</a> sections in the Dev Guide.</p>
+
+<h2 id="publishing-gather">Gathering Materials and Resources</h2>
+
+<p>To begin preparing your application for release you need to gather several supporting items. At a
+minimum this includes cryptographic keys for signing your application and an application icon. You
+might also want to include an end-user license agreement.</p>
+
+<h4 id="publishing-keys">Cryptographic keys</h4>
+
+<p>The Android system requires that each installed application be digitally signed with a
+certificate that is owned by the application's developer (that is, a certificate for which the
+developer holds the private key). The Android system uses the certificate as a means of identifying
+the author of an application and establishing trust relationships between applications. The
+certificate that you use for signing does not need to be signed by a certificate authority; the
+Android system allows you to sign your applications with a self-signed certificate. To learn about
+certificate requirements, see <a href="{@docRoot}tools/publishing/app-signing.html#cert">Obtain a
+suitable private key</a>.</p>
+
+<p class="caution"><strong>Important:</strong> Your application must be signed with a cryptographic
+key whose validity period ends after 22 October 2033.</p>
+
+<p>You may also have to obtain other release keys if your application accesses a service or uses a
+third-party library that requires you to use a key that is based on your private key. For example,
+if your application uses the <a
+href="http://code.google.com/android/add-ons/google-apis/reference/com/google/android/maps/MapView.html">MapView</a>
+class, which is part of the <a
+href="http://code.google.com/android/add-ons/google-apis/maps-overview.html">Google Maps external
+library</a>, you will need to register your application with the Google Maps service and obtain
+a Maps API key. For information about getting a Maps API key, see <a
+href="http://code.google.com/android/add-ons/google-apis/mapkey.html"> Obtaining a Maps API
+key</a>.</p>
+
+<h4>Application Icon</h4>
+
+<p>Be sure you have an application icon and that it meets the recommended <a
+href="{@docRoot}guide/practices/ui_guidelines/icon_design_launcher.html">icon guidelines</a>. Your
+application's icon helps users identify your application on a device's Home
+screen and in the Launcher window. It also appears in Manage Applications, My Downloads, and
+elsewhere. In addition, publishing services such as Google Play display your icon to users.</p>
+
+<p class="note"><strong>Note:</strong> If you are releasing your application on Google Play, you
+need to create a high resolution
+ version of your icon. See <a
+href="https://www.google.com/support/androidmarket/developer/bin/answer.py?answer=1078870">Graphic
+Assets for your Application</a> for more information.</p>
+
+<h4>End-user License Agreement</h4>
+
+<p>Consider preparing an End User License Agreement (EULA) for your application. A EULA can help
+protect your person, organization, and intellectual property, and we recommend that you provide one
+with your application.</p>
+
+<h4>Miscellaneous Materials</h4>
+
+<p>You might also have to prepare promotional and marketing materials to publicize your application.
+For example, if you are releasing your application on Google Play you will need to prepare some
+promotional text and you will need to create screenshots of your application. For more
+information, see
+<a href="https://www.google.com/support/androidmarket/developer/bin/answer.py?answer=1078870">
+Graphic Assets for your Application</a></p>
+
+<h2 id="publishing-configure">Configuring Your Application for Release</h2>
+
+<p>After you gather all of your supporting materials you can start configuring your application
+for release. This section provides a summary of the configuration changes we recommend that you make
+to your source code, resource files, and application manifest prior to releasing your application.
+Although most of the configuration changes listed in this section are optional, they are
+considered good coding practices and we encourage you to implement them. In some cases,
+you may have already made these configuration changes as part of your development process.</p>
+
+<h4>Choose a good package name</h4>
+
+<p>Make sure you choose a package name that is suitable over the life of your application. You
+cannot change the package name after you distribute your application to users. You can set the
+package name in application's manifest file. For more information, see the <a
+href="{@docRoot}guide/topics/manifest/manifest-element.html#package">package</a> attribute
+documentation.</p>
+
+<h4>Turn off logging and debugging</h4>
+
+<p>Make sure you deactivate logging and disable the debugging option before you build your
+application for release. You can deactivate logging by removing calls to
+{@link android.util.Log} methods in your source files. You can disable debugging by removing the
+<code>android:debuggable</code> attribute from the <code>&lt;application&gt;</code> tag in your
+manifest file, or by setting the <code>android:debuggable</code> attribute to
+<code>false</code> in your manifest file. Also, remove any log files or static test files that
+were created in your project.</p>
+
+<p>Also, you should remove all {@link android.os.Debug} tracing calls that you
+added to your code, such as {@link android.os.Debug#startMethodTracing()} and
+{@link android.os.Debug#stopMethodTracing()} method calls.</p>
+
+<h4>Clean up your project directories</h4>
+
+<p>Clean up your project and make sure it conforms to the directory structure described in <a
+href="{@docRoot}tools/projects/index.html#ApplicationProjects">Android Projects</a>.
+Leaving stray or orphaned files in your project can prevent your application from compiling and
+cause your application to behave unpredictably. At a minimum you should do the following cleanup
+tasks:</p>
+
+<ul>
+ <li>Review the contents of your <code>jni/</code>, <code>lib/</code>, and <code>src/</code>
+ directories. The <code>jni/</code> directory should contain only source files associated with the
+ <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a>, such as
+ <code>.c</code>, <code>.cpp</code>, <code>.h</code>, and <code>.mk</code> files. The
+ <code>lib/</code> directory should contain only third-party library files or private library
+ files, including prebuilt shared and static libraries (for example, <code>.so</code> files). The
+ <code>src/</code> directory should contain only the source files for your application
+ (<code>.java</code> and <code>.aidl</code> files). The <code>src/</code> directory should not
+ contain any <code>.jar</code> files.</li>
+ <li>Check your project for private or proprietary data files that your application does not use
+ and remove them. For example, look in your project's <code>res/</code> directory for old
+ drawable files, layout files, and values files that you are no longer using and delete them.</li>
+ <li>Check your <code>lib/</code> directory for test libraries and remove them if they are no
+ longer being used by your application.</li>
+ <li>Review the contents of your <code>assets/</code> directory and your <code>res/raw/</code>
+ directory for raw asset files and static files that you need to update or remove prior to
+ release.</li>
+</ul>
+
+<h4>Review and update your manifest settings</h4>
+
+<p>Verify that the following manifest items are set correctly:</p>
+
+<ul>
+ <li><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">
+ &lt;uses-permission&gt;</a> element
+ <p>You should specify only those permissions that are relevant and required for your application.</p>
+ </li>
+ <li><code>android:icon</code> and <code>android:label</code> attributes
+ <p>You must specify values for these attributes, which are located in the
+ <a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a>
+ element.</p>
+ </li>
+ <li><code>android:versionCode</code> and <code>android:versionName</code> attributes.
+ <p>We recommend that you specify values for these attributes, which are located in the
+ <a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a>
+ element. For more information see
+ <a href="{@docRoot}tools/publishing/versioning.html">Versioning your Application</a>.</p>
+ </li>
+</ul>
+
+<p>There are several additional manifest elements that you can set if you are releasing your
+application on Google Play. For example, the <code>android:minSdkVersion</code> and
+<code>android:targetSdkVersion</code> attributes, which are located in the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"> &lt;uses-sdk&gt;</a> element. For more
+information about these and other Google Play settings, see <a
+href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a>.</p>
+
+<h4>Address compatibility issues</h4>
+
+<p>Android provides several tools and techniques to make your application compatible with a wide
+range of devices. To make your application available to the largest number of users, consider
+doing the following:</p>
+
+<ul>
+ <li><strong>Add support for multiple screen configurations</strong>
+ <p>Make sure you meet the
+ <a href="{@docRoot}guide/practices/screens_support.html#screen-independence">
+ best practices for supporting multiple screens</a>. By supporting multiple screen configurations
+ you can create an application that functions properly and looks good on any of the screen sizes
+ supported by Android.</p>
+ </li>
+ <li><strong>Optimize your application for Android tablet devices.</strong>
+ <p>If your application is designed for devices older than Android 3.0, make it compatible
+ with Android 3.0 devices by following the guidelines and best practices described in
+ <a href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing Apps for Android 3.0
+ </a>.</p>
+ </li>
+ <li><strong>Consider using the Support Library</strong>
+ <p>If your application is designed for devices running Android 3.x, make your application
+ compatible with older versions of Android by adding the
+ <a href="{@docRoot}tools/extras/support-library.html">Support Library</a> to your
+ application project. The Support Library provides static support libraries that you can add to
+ your Android application, which enables you to use APIs that are either not available on
+ older platform versions or use utility APIs that are not part of the framework APIs.</p>
+ </li>
+</ul>
+
+<h4>Update URLs for servers and services</h4>
+
+<p>If your application accesses remote servers or services, make sure you are using the production
+URL or path for the server or service and not a test URL or path.</p>
+
+<h4>Implement Licensing (if you are releasing on Google Play)</h4>
+
+<p>If you are releasing a paid application through Google Play, consider adding support for
+Google Play Licensing. Licensing lets you control access to your application based on whether the
+current user has purchased it. Using Google Play Licensing is optional even if you are
+releasing your app through Google Play.</p>
+
+<p>For more information about Google Play Licensing Service and how to use it in your
+application, see <a href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a>.</p>
+
+<h2 id="publishing-build">Building Your Application for Release</h2>
+
+<p>After you finish configuring your application you can build it into a release-ready
+<code>.apk</code> fle that is signed and optimized. The JDK includes the tools for signing the
+<code>.apk</code> file (Keytool and Jarsigner); the Android SDK includes the tools for compiling and
+optimizing the <code>.apk</code> file. If you are using Eclipse with the ADT plugin or you are using
+the Ant build script from the command line, you can automate the entire build process.</p>
+
+<h3>Building with Eclipse</h3>
+
+<p>You can use the Eclipse Export Wizard to build a release-ready <code>.apk</code> file that is
+signed with your private key and optimized. To learn how to run the Export Wizard, see
+<a href="{@docRoot}tools/publishing/app-signing.html#ExportWizard">Compile and sign with Eclipse
+ADT</a>. The Export Wizard compiles your application for release, signs your application with your
+private key, and optimizes your application with the zipalign tool. The Export Wizard should run
+successfully if you have run or debugged your application from Eclipse and you have no errors in
+your application (see <a href="{@docRoot}tools/building/building-eclipse.html">Building
+and Running from Eclipse with ADT</a> for more information.</p>
+
+<p>The Export Wizard assumes that you have a <a href="#billing-keys">certificate and private key</a>
+suitable for signing your application. If you do not have a suitable certificate and private key,
+the Export Wizard will help you generate one (see
+<a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a> for more
+information about the signing process and signing guidelines.</p>
+
+<h3>Building with Ant</h3>
+
+<p>You can use the Ant build script (included in the Android SDK) to build a release-ready
+<code>.apk</code> file that is signed with your private key and optimized. To learn how to do this,
+see <a href="{@docRoot}tools/building/building-cmdline.html#ReleaseMode">Building in
+Release Mode</a>. This build method assumes you have a <a href="#billing-keys">certificate and
+private key</a> suitable for signing your application. If you do not have a suitable certificate and
+private key, the Export Wizard will help you generate one (see
+<a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a> for more
+information about the signing process and signing guidelines.</p>
+
+<h2 id="publishing-resources">Preparing External Servers and Resources</h2>
+
+<p>If your application relies on a remote server, make sure the server is secure and that it is
+configured for production use. This is particularly important if you are implementing <a
+href="{@docRoot}guide/google/play/billing/index.html">in-app billing</a> in your application and you are
+performing the signature verification step on a remote server.</p>
+
+<p>Also, if your application fetches content from a remote server or a real-time service (such as a
+content feed), be sure the content you are providing is up to date and production-ready.</p>
+
+<h2 id="publishing-test">Testing Your Application for Release</h2>
+
+<p>Testing the release version of your application helps ensure that your application runs properly
+under realistic device and network conditions. Ideally, you should test your application on at least
+one handset-sized device and one tablet-sized device to verify that your user interface elements are
+sized correctly and that your application's performance and battery efficiency are acceptable.</p>
+
+<p>As a starting point for testing, see
+<a href="{@docRoot}tools/testing/what_to_test.html">What to Test</a>. This article provides
+a summary of common Android situations that you should consider when you are testing. When you are
+done testing and you are satisfied that the release version of your application
+behaves correctly, you can release your application to users. For more information, see
+<a href="{@docRoot}tools/publishing/publishing_overview.html#publishing-release">Releasing Your
+Application to Users</a>. If you are publishing your application on Google Play, see
+<a href="{@docRoot}distribute/googleplay/publish/preparing.html">Publishing Checklist
+for Google Play</a>.</p>
+
+
diff --git a/docs/html/tools/publishing/publishing_overview.jd b/docs/html/tools/publishing/publishing_overview.jd
new file mode 100755
index 000000000000..572766c9d05a
--- /dev/null
+++ b/docs/html/tools/publishing/publishing_overview.jd
@@ -0,0 +1,238 @@
+page.title=Publishing Overview
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+ <h2>Quickview</h2>
+ <ul>
+ <li>Learn how to publish Android apps.</li>
+ <li>Find out how to prepare apps for release.</li>
+ <li>Learn how to release apps to users.</li>
+ </ul>
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#publishing-prepare">Preparing Your Application for Release</a></li>
+ <li><a href="#publishing-release">Releasing Your Application to Users</a>
+ </ol>
+ <h2>See also</h2>
+ <ol>
+ <li><a href="{@docRoot}distribute/googleplay/publish/preparing.html">Publishing on Google Play</a></li>
+ </ol>
+</div>
+</div>
+
+<p>Publishing is the general process that makes your Android applications available to users. When you
+publish an Android application you perform two main tasks:</p>
+
+<ul>
+ <li>You prepare the application for release.
+ <p>During the preparation step you build a release version of your application, which users can
+ download and install on their Android-powered devices.</p>
+ </li>
+ <li>You release the application to users.
+ <p>During the release step you publicize, sell, and distribute the release version of your
+ application to users.</p>
+ </li>
+</ul>
+
+<p>Usually, you release your application through an application marketplace, such as <a href="{@docRoot}distribute/index.html">Google Play</a>.
+However, you can also release applications by sending them directly to users or by letting users
+download them from your own website.</p>
+
+<p>Figure 1 shows how the publishing process fits into the overall Android <a
+href="{@docRoot}tools/workflow/index.html">application development process</a>.
+The publishing process is typically performed after you finish testing your application in a debug
+environment. Also, as a best practice, your application should meet all of your release criteria for
+functionality, performance, and stability before you begin the publishing process.</p>
+
+<img src="{@docRoot}images/publishing/publishing_overview.png" alt="Shows where the publishing
+ process fits into the overall development process" height="86" id="figure1" />
+<p class="img-caption">
+ <strong>Figure 1.</strong> Publishing is the last phase of the Android <a
+href="{@docRoot}tools/workflow/index.html">application development process</a>.
+</p>
+
+<h2 id="publishing-prepare">Preparing Your Application for Release</h2>
+
+<p>Preparing your application for release is a multi-step process that involves the following
+tasks:</p>
+
+<ul>
+ <li>Configuring your application for release.
+ <p>At a minimum you need to remove {@link android.util.Log} calls and remove the
+ <a href="{@docRoot}guide/topics/manifest/application-element.html#debug">android:debuggable</a>
+ attribute from your manifest file. You should also provide values for the
+ <code>android:versionCode</code> and <code>android:versionName</code> attributes, which are
+ located in the
+ <a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a>
+ element. You may also have to configure several other settings to meet Google Play
+ requirements or accomodate whatever method you're using to release your application.</p>
+ </li>
+ <li>Building and signing a release version of your application.
+ <p>The Android Development Tools (ADT) plugin and the Ant build script that are provided
+ with the Android SDK tools provide everything you need to build and sign a release version of
+ your application.</p>
+ </li>
+ <li>Testing the release version of your application.
+ <p>Before you distribute your application, you should thoroughly test the release version on at
+ least one target handset device and one target tablet device.</p>
+ </li>
+ <li>Updating application resources for release.
+ <p>You need to be sure that all application resources such as multimedia files and graphics
+ are updated and included with your application or staged on the proper production servers.</p>
+ </li>
+ <li>Preparing remote servers and services that your application depends on.
+ <p>If your application depends on external servers or services, you need to be sure they
+ are secure and production ready.</p>
+ </li>
+</ul>
+
+<p>You may have to perform several other tasks as part of the preparation process. For example, you
+will need to get a private key for signing your application, and you may need to get a Maps API
+release key if you are using the <a
+href="http://code.google.com/android/add-ons/google-apis/maps-overview.html">Google Maps external
+library</a>. You will also need to create an icon for your application, and you may want to prepare
+an End User License Agreement (EULA) to protect your person, organization, and intellectual
+property.</p>
+
+<p>When you are finished preparing your application for release you will have a signed
+<code>.apk</code> file that you can distribute to users.</p>
+
+<p>To learn how to prepare your application for release, see <a
+href="{@docRoot}tools/publishing/preparing.html">Preparing for Release</a> in the Dev Guide. This
+topic provides step-by-step instructions for configuring and building a release version of your
+application.</p>
+
+<h2 id="publishing-release">Releasing Your Application to Users</h2>
+
+<p>You can release your Android applications several ways. Usually, you release applications
+through an application marketplace such as Google Play, but you can also release applications
+on your own website or by sending an application directly to a user.
+
+<h3 id="publishing-marketplace">Releasing through an App Marketplace</h3>
+
+<p>If you want to distribute your apps to the broadest possible audience, releasing through
+an app marketplace such as Google Play is ideal. </p>
+
+<p>Google Play is the premier marketplace for Android apps and is particularly
+useful if you want to distribute your applications to a large global audience.
+However, you can distribute your apps through any app marketplace you want or
+you can use multiple marketplaces.</p>
+
+
+<h4 id="publishing-market">Releasing Your Applications on Google Play</h4>
+
+<p>Google Play is a robust publishing platform that helps you publicize, sell, and distribute
+your Android applications to users around the world. When you release your applications through
+Google Play you have access to a suite of developer tools that let you analyze your sales,
+identify market trends, and control who your applications are being distributed to. You also have
+access to several revenue-enhancing features such as <a
+href="{@docRoot}guide/google/play/billing/index.html">in-app billing</a> and <a
+href="{@docRoot}guide/google/play/licensing/index.html">application licensing</a>. The rich array of tools
+and features, coupled with numerous end-user community features, makes Google Play the premier
+marketplace for selling and buying Android applications.</p>
+
+<p>Releasing your application on Google Play is a simple process that involves three basic
+ steps:</p>
+
+<ul>
+ <li>Preparing promotional materials.
+ <p>To fully leverage the marketing and publicity capabilities of Google Play, you need to
+ create promotional materials for your application, such as screenshots, videos, graphics, and
+ promotional text.</p>
+ </li>
+ <li>Configuring options and uploading assets.
+ <p>Google Play lets you target your application to a worldwide pool of users and devices.
+ By configuring various Google Play settings, you can choose the countries you want to
+ reach, the listing languages you want to use, and the price you want to charge in each
+ country. You can also configure listing details such as the application type, category, and
+ content rating. When you are done configuring options you can upload your promotional materials
+ and your application as a draft (unpublished) application.</p>
+ </li>
+ <li>Publishing the release version of your application.
+ <p>If you are satisfied that your publishing settings are correctly configured and your
+ uploaded application is ready to be released to the public, you can simply click
+ <strong>Publish</strong > in the developer console and within minutes your application will be
+ live and available for download around the world.</p>
+ </li>
+</ul>
+
+<p>For information complete information, see <a href="{@docRoot}distribute/index.html">Google Play</a>.</p>
+
+
+<h3 id="publishing-email">Releasing your application through email</h3>
+
+<div class="figure" style="width:246px">
+ <img src="{@docRoot}images/publishing/publishing_via_email.png"
+ alt="Screenshot showing the graphical user interface users see when you send them an app"
+ style="width:240px;" />
+ <p class="img-caption">
+ <strong>Figure 1.</strong> Users can simply click <strong>Install</strong> when you send them
+ an application via email.
+ </p>
+</div>
+
+<p>The easiest and quickest way to release your application is to send it to a user through
+email. To do this, you prepare your application for release and then attach it to an email
+and send it to a user. When the user opens your email message on their Android-powered device
+the Android system will recognize the APK and display an <strong>Install Now</strong>
+button in the email message (see figure 1). Users can install your application by touching the
+button.</p>
+
+<p class="note"><strong>Note:</strong> The <strong>Install Now</strong> button
+shown in Figure 1 appears only if a user has configured their device to allow
+installation from <a href="#unknown-sources">unknown sources</a> and has opened your
+email with the native Gmail application.</p>
+
+<p>Distributing applications through email is convenient if you are sending your application to
+only a few trusted users, but it provides few protections from piracy and unauthorized
+distribution; that is, anyone you send your application to can simply forward it to someone else.</p>
+
+<h2 id="publishing-website">Releasing through a web site</h2>
+
+<p>If you do not want to release your app on a marketplace like Google Play, you
+can make the app available for download on your own website or server, including
+on a private or enterprise server. To do this, you must first prepare your
+application for release in the normal way. Then all you need to do is host the
+release-ready APK file on your website and provide a download link to users.
+</p>
+
+<p>When users browse to the download link from their Android-powered devices,
+the file is downloaded and Android system automatically starts installing it on
+the device. However, the installation process will start automatically only if
+the user has configured their Settings to allow the installation of apps from
+<a href="#unknown-sources">unknown sources</a>.</p>
+
+<p>Although it is relatively easy to release your application on your own
+website, it can be inefficient. For example, if you want to monetize your
+application you will have to process and track all financial transactions
+yourself and you will not be able to use Google Play's <a
+href="{@docRoot}guide/google/play/billing/index.html">In-app Billing service</a>
+to sell in-app products. In addition, you will not be able to use the <a
+href="{@docRoot}guide/google/play/licensing/index.html">Licensing service</a> to
+help prevent unauthorized installation and use of your application.</p>
+
+
+<h2 id="unknown-sources">User Opt-In for Apps from Unknown Sources</h2>
+
+<div class="figure" style="width:246px;margin-top:0;">
+ <img src="{@docRoot}images/publishing/publishing_unknown_sources_sm.png"
+ alt="Screenshot showing the setting for accepting download and install of
+ apps from unknown sources." style="width:240px;" />
+ <p class="img-caption">
+ <strong>Figure 2.</strong> Users must enable the <strong>Unknown sources</strong>
+ setting before they can install apps not downloaded from Google Play.
+ </p>
+</div>
+
+<p>Android protects users from inadvertent download and install of apps from
+locations other than Google Play (which is trusted). It blocks such installs
+until the user opts-in <strong>Unknown sources</strong> in
+Settings&nbsp;<strong>&gt;</strong>&nbsp;Security, shown in Figure 2. To allow
+the installation of applications from other sources, users need to enable the
+Unknown sources setting on their devices, and they need to make this
+configuration change <em>before</em> they download your application to their
+devices.</p>
+
+<p class="note">Note that some network providers do not allow users to install
+applications from unknown sources.</p>
diff --git a/docs/html/tools/publishing/versioning.jd b/docs/html/tools/publishing/versioning.jd
new file mode 100644
index 000000000000..8f602b4d5a2c
--- /dev/null
+++ b/docs/html/tools/publishing/versioning.jd
@@ -0,0 +1,174 @@
+page.title=Versioning Your Applications
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>Quickview</h2>
+
+<ul>
+<li>Your application <em>must</em> be versioned</a></li>
+<li>You set the version in the application's manifest file</li>
+<li>How you version your applications affects how users upgrade </li>
+<li>Determine your versioning strategy early in the development process, including considerations for future releases.</li>
+</ul>
+
+<h2>In this document</h2>
+
+<ol>
+<li><a href="#appversioning">Setting Application Version</a></li>
+<li><a href="#minsdkversion">Specifying Your Application's System API Requirements</a>
+</ol>
+
+
+<h2>See also</h2>
+
+<ol>
+<li><a href="{@docRoot}tools/publishing/preparing.html">Preparing to Publish Your Application</a></li>
+<li><a href="{@docRoot}distribute/googleplay/publish/preparing.html">Publishing Checklist for Google Play</a></li>
+<li><a href="{@docRoot}guide/topics/manifest/manifest-intro.html">The AndroidManifest.xml File</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>Versioning is a critical component of your application upgrade and maintenance
+strategy. Versioning is important because:</p>
+
+<ul>
+<li>Users need to have specific information about the application version that
+is installed on their devices and the upgrade versions available for
+installation. </li>
+<li>Other applications &mdash; including other applications that you publish as
+a suite &mdash; need to query the system for your application's version, to
+determine compatibility and identify dependencies.</li>
+<li>Services through which you will publish your application(s) may also need to
+query your application for its version, so that they can display the version to
+users. A publishing service may also need to check the application version to
+determine compatibility and establish upgrade/downgrade relationships.</li>
+</ul>
+
+<p>The Android system does not use app version information to enforce
+restrictions on upgrades, downgrades, or compatibility of third-party apps. Instead, you (the
+developer) are responsible for enforcing version restrictions within your application or by
+informing users of the version restrictions and limitations. The Android system does, however,
+enforce system version compatibility as expressed by the <code>minSdkVersion</code> attribute in the
+manifest. This attribute allows an application to specify the minimum system API with which it is
+compatible. For more information see <a href="#minsdkversion">Specifying Minimum System API
+Version</a>.</p>
+
+<h2 id="appversioning">Setting Application Version</h2>
+<p>To define the version information for your application, you set attributes in
+the application's manifest file. Two attributes are available, and you should
+always define values for both of them: </p>
+
+<ul>
+<li><code>android:versionCode</code> &mdash; An integer value that represents
+the version of the application code, relative to other versions.
+
+<p>The value is an integer so that other applications can programmatically
+evaluate it, for example to check an upgrade or downgrade relationship. You can
+set the value to any integer you want, however you should make sure that each
+successive release of your application uses a greater value. The system does not
+enforce this behavior, but increasing the value with successive releases is
+normative. </p>
+
+<p>Typically, you would release the first version of your application with
+versionCode set to 1, then monotonically increase the value with each release,
+regardless whether the release constitutes a major or minor release. This means
+that the <code>android:versionCode</code> value does not necessarily have a
+strong resemblance to the application release version that is visible to the
+user (see <code>android:versionName</code>, below). Applications and publishing
+services should not display this version value to users.</p>
+</li>
+<li><code>android:versionName</code> &mdash; A string value that represents the
+release version of the application code, as it should be shown to users.
+<p>The value is a string so that you can describe the application version as a
+&lt;major&gt;.&lt;minor&gt;.&lt;point&gt; string, or as any other type of
+absolute or relative version identifier. </p>
+
+<p>As with <code>android:versionCode</code>, the system does not use this value
+for any internal purpose, other than to enable applications to display it to
+users. Publishing services may also extract the <code>android:versionName</code>
+value for display to users.</p>
+</li>
+</ul>
+
+<p>You define both of these version attributes in the
+<code>&lt;manifest&gt;</code> element of the manifest file. </p>
+
+<p>Here's an example manifest that shows the <code>android:versionCode</code>
+and <code>android:versionName</code> attributes in the
+<code>&lt;manifest&gt;</code> element. </p>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.example.package.name"
+ android:versionCode="2"
+ android:versionName="1.1"&gt;
+ &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
+ ...
+ &lt;/application&gt;
+&lt;/manifest&gt;
+</pre>
+
+<p>In this example, note that <code>android:versionCode</code> value indicates
+that the current .apk contains the second release of the application code, which
+corresponds to a minor follow-on release, as shown by the
+<code>android:versionName</code> string. </p>
+
+<p>The Android framework provides an API to let applications query the system
+for version information about your application. To obtain version information,
+applications use the
+{@link android.content.pm.PackageManager#getPackageInfo(java.lang.String, int)}
+method of {@link android.content.pm.PackageManager PackageManager}. </p>
+
+<h2 id="minsdkversion">Specifying Your Application's System API Requirements</h2>
+
+<p>If your application requires a specific minimum version of the Android
+platform, or is designed only to support a certain range of Android platform
+versions, you can specify those version requirements as API Level identifiers
+in the application's manifest file. Doing so ensures that your
+application can only be installed on devices that
+are running a compatible version of the Android system. </p>
+
+<p>To specify API Level requirements, add a <code>&lt;uses-sdk&gt;</code>
+element in the application's manifest, with one or more of these attributes: </p>
+
+<ul>
+<li><code>android:minSdkVersion</code> &mdash; The minimum version
+of the Android platform on which the application will run, specified
+by the platform's API Level identifier. </li>
+<li><code>android:targetSdkVersion</code> &mdash; Specifies the API Level
+on which the application is designed to run. In some cases, this allows the
+application to use manifest elements or behaviors defined in the target
+API Level, rather than being restricted to using only those defined
+for the minimum API Level.</li>
+<li><code>android:maxSdkVersion</code> &mdash; The maximum version
+of the Android platform on which the application is designed to run,
+specified by the platform's API Level identifier. <strong>Important:</strong> Please read the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
+documentation before using this attribute. </li>
+</ul>
+
+<p>When preparing to install your application, the system checks the value of this
+attribute and compares it to the system version. If the
+<code>android:minSdkVersion</code> value is greater than the system version, the
+system aborts the installation of the application. Similarly, the system
+installs your application only if its <code>android:maxSdkVersion</code>
+is compatible with the platform version.</p>
+
+<p>If you do not specify these attributes in your manifest, the system assumes
+that your application is compatible with all platform versions, with no
+maximum API Level. </p>
+
+<p>To specify a minimum platform version for your application, add a
+<code>&lt;uses-sdk&gt;</code> element as a child of
+<code>&lt;manifest&gt;</code>, then define the
+<code>android:minSdkVersion</code> as an attribute. </p>
+
+<p>For more information, see the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
+manifest element documentation and the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a> document.</p>
diff --git a/docs/html/tools/revisions/index.jd b/docs/html/tools/revisions/index.jd
new file mode 100644
index 000000000000..0e7ceef21b6f
--- /dev/null
+++ b/docs/html/tools/revisions/index.jd
@@ -0,0 +1,9 @@
+page.title=Revisions
+page.noplus=1
+@jd:body
+
+<p>The Android SDK is composed of individual packages that may undergo
+an update at their own schedule, so some have their own set of release notes. You can
+find information about some of the packages in this section, including the core <a
+href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools</a> and the latest <a
+href="{@docRoot}tools/revisions/platforms.html">Platforms</a>.</p> \ No newline at end of file
diff --git a/docs/html/tools/revisions/platforms.jd b/docs/html/tools/revisions/platforms.jd
new file mode 100644
index 000000000000..e57c2210e7ed
--- /dev/null
+++ b/docs/html/tools/revisions/platforms.jd
@@ -0,0 +1,831 @@
+page.title=Platforms
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+
+<h2>See Also</h2>
+<ol>
+ <li><a href="{@docRoot}about/versions/android-4.0-highlights.html">Ice Cream Sandwich
+Highlights and APIs</a></li>
+ <li><a href="{@docRoot}about/versions/android-3.0-highlights.html">Honeycomb
+Highlights and APIs</a></li>
+ <li><a href="{@docRoot}about/versions/android-2.3-highlights.html">Gingerbread
+Highlights and APIs</a></li>
+</ol>
+
+</div>
+</div>
+
+
+
+<p>To develop an Android app, you must install at least one Android platform from the SDK Manager
+against which you can compile your app. Often, any given version of the Android will be revised
+with bug fixes or other changes, as denoted by the "revision" number. Below, you'll find the
+release notes for each version of the platform and the subsequent revisions to the platform
+version.</p>
+
+<p>To determine what revision of an Android platform you
+have installed, refer to the "Installed Packages" listing in the Android SDK Manager.</p>
+
+
+
+
+
+
+
+
+<h2 id="4.0.3">Android 4.0.3</h2>
+
+
+<p class="caution"><strong>Important:</strong> To download the new Android
+4.0.x system components from the Android SDK Manager, you must first update the
+SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not,
+the Android 4.0.x system components will not be available for download.</p>
+
+<div class="toggle-content opened">
+
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-opened.png"
+class="toggle-content-img" alt="" />
+ Revision 3</a> <em>(March 2012)</em>
+ </a></p>
+
+ <div class="toggle-content-toggleme" style="padding-left:2em;">
+
+ <p>Maintenance update. The system version is 4.0.4.</p>
+ <p class="note"><strong>Note:</strong> This system image includes support for emulator
+hardware graphics acceleration when used with SDK Tools r17 or higher.
+(<a href="{@docRoot}tools/devices/emulator.html#accel-graphics">more info</a>)</p>
+ <dl>
+ <dt>Dependencies:</dt>
+ <dd>SDK Tools r17 or higher is required.</dd>
+ </dl>
+
+ </div>
+</div>
+
+<div class="toggle-content closed" >
+
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />
+ Revision 2</a> <em>(January 2012)</em>
+ </a></p>
+
+ <div class="toggle-content-toggleme" style="padding-left:2em;">
+
+ <p>Maintenance update. The system version is 4.0.3.</p>
+ <dl>
+ <dt>Dependencies:</dt>
+ <dd>SDK Tools r14 or higher is required.</dd>
+ </dl>
+
+ </div>
+</div>
+
+<div class="toggle-content closed" >
+
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />
+ Revision 1</a> <em>(December 2011)</em>
+ </a></p>
+
+ <div class="toggle-content-toggleme" style="padding-left:2em;">
+
+ <p>Initial release. The system version is 4.0.3.</p>
+ <dl>
+ <dt>Dependencies:</dt>
+ <dd>SDK Tools r14 or higher is required.</dd>
+ </dl>
+
+ </div>
+</div>
+
+<h3>Emulator Skins</h3>
+
+<p>The downloadable platform includes the following emulator skins:</p>
+
+<ul>
+ <li>
+ QVGA (240x320, low density, small screen)
+ </li>
+ <li>
+ WQVGA400 (240x400, low density, normal screen)
+ </li>
+ <li>
+ WQVGA432 (240x432, low density, normal screen)
+ </li>
+ <li>
+ HVGA (320x480, medium density, normal screen)
+ </li>
+ <li>
+ WVGA800 (480x800, high density, normal screen)
+ </li>
+ <li>
+ WVGA854 (480x854 high density, normal screen)
+ </li>
+ <li>
+ WXGA720 (1280x720, extra-high density, normal screen)
+ </li>
+ <li>
+ WSVGA (1024x600, medium density, large screen)
+ </li>
+ <li>
+ WXGA (1280x800, medium density, xlarge screen)
+ </li>
+</ul>
+
+<p>To test your application on an emulator that represents the latest Android device, you can create
+an AVD with the new WXGA720 skin (it's an xhdpi, normal screen device). Note that the emulator
+currently doesn't support the new on-screen navigation bar for devices without hardware navigation
+buttons, so when using this skin, you must use keyboard keys <em>Home</em> for the Home button,
+<em>ESC</em> for the Back button, and <em>F2</em> or <em>Page-up</em> for the Menu button.</p>
+
+<p>However, due to performance issues in the emulator when running high-resolution screens such as
+the one for the WXGA720 skin, we recommend that you primarily use the traditional WVGA800 skin
+(hdpi, normal screen) to test your application.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h2 id="4.0">Android 4.0</h2>
+
+
+<div class="toggle-content closed">
+
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />
+ Android 4.0, Revision 2</a> <em>(December 2011)</em>
+ </a></p>
+
+ <div class="toggle-content-toggleme" style="padding-left:2em;">
+ <p>Maintenance update. The system version is 4.0.2.</p>
+ <dl>
+ <dt>Dependencies:</dt>
+ <dd>SDK Tools r14 or higher is required.</dd>
+ </dl>
+ </div>
+</div>
+
+<div class="toggle-content closed">
+
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />
+ Android 4.0, Revision 1</a> <em>(October 2011)</em>
+ </a></p>
+
+ <div class="toggle-content-toggleme" style="padding-left:2em;">
+ <p>Initial release. The system version is 4.0.1.</p>
+ <dl>
+ <dt>Dependencies:</dt>
+ <dd>SDK Tools r14 or higher is required.</dd>
+ </dl>
+ </div>
+</div>
+
+
+<h3>Emulator Skins</h3>
+
+<p>The downloadable platform includes the following emulator skins:</p>
+
+<ul>
+ <li>
+ QVGA (240x320, low density, small screen)
+ </li>
+ <li>
+ WQVGA400 (240x400, low density, normal screen)
+ </li>
+ <li>
+ WQVGA432 (240x432, low density, normal screen)
+ </li>
+ <li>
+ HVGA (320x480, medium density, normal screen)
+ </li>
+ <li>
+ WVGA800 (480x800, high density, normal screen)
+ </li>
+ <li>
+ WVGA854 (480x854 high density, normal screen)
+ </li>
+ <li>
+ WXGA720 (1280x720, extra-high density, normal screen) <span class="new">new</span>
+ </li>
+ <li>
+ WSVGA (1024x600, medium density, large screen) <span class="new">new</span>
+ </li>
+ <li>
+ WXGA (1280x800, medium density, xlarge screen)
+ </li>
+</ul>
+
+<p>To test your application on an emulator that represents the latest Android device, you can create
+an AVD with the new WXGA720 skin (it's an xhdpi, normal screen device). Note that the emulator
+currently doesn't support the new on-screen navigation bar for devices without hardware navigation
+buttons, so when using this skin, you must use keyboard keys <em>Home</em> for the Home button,
+<em>ESC</em> for the Back button, and <em>F2</em> or <em>Page-up</em> for the Menu button.</p>
+
+<p>However, due to performance issues in the emulator when running high-resolution screens such as
+the one for the WXGA720 skin, we recommend that you primarily use the traditional WVGA800 skin
+(hdpi, normal screen) to test your application.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h2 id="3.2">Android 3.2</h2>
+
+
+
+<div class="toggle-content closed">
+
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />
+ Android 3.2, Revision 1</a> <em>(July 2011)</em>
+ </a></p>
+
+ <div class="toggle-content-toggleme" style="padding-left:2em;">
+
+<dl>
+<dt>Initial release. SDK Tools r12 or higher is recommended.</dt>
+</dl>
+
+ </div>
+</div>
+
+
+
+
+<h3>Emulator Skins</h3>
+
+<p>The downloadable platform includes the following emulator skin:</p>
+
+<ul>
+ <li>
+ WXGA (1280x800, medium density, xlarge screen)
+ </li>
+</ul>
+
+<p>For more information about how to develop an application that displays
+and functions properly on all Android-powered devices, see <a
+href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
+Screens</a>.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h2 id="3.1">Android 3.1</h2>
+
+
+<div class="toggle-content closed">
+
+<p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />
+ Android 3.1, Revision 3</a> <em>(July 2011)</em>
+</a></p>
+
+<div class="toggle-content-toggleme" style="padding-left:2em;">
+
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r12</a> or
+higher.</p>
+</dd>
+<dt>Notes:</dt>
+<dd>
+<p>Improvements to the platform's rendering library to support the visual layout editor in the ADT
+Eclipse plugin. This revision allows for more drawing features in ADT and fixes several
+bugs in the previous rendering library. It also unlocks several editor features that were added in
+ADT 12.</p>
+</dd>
+</dl>
+
+</div>
+</div>
+
+
+<div class="toggle-content closed" >
+
+<p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />
+ Android 3.1, Revision 2</a> <em>(May 2011)</em>
+</a></p>
+
+<div class="toggle-content-toggleme" style="padding-left:2em;">
+
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r11</a> or
+higher.</p>
+</dd>
+<dt>Notes:</dt>
+<dd>
+<p>Fixes an issue with the visual layout editor rendering library that prevented Android 3.1 from
+running in ADT.</p>
+</dd>
+</dl>
+
+</div>
+</div>
+
+
+<div class="toggle-content closed">
+
+<p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />
+ Android 3.1, Revision 1</a> <em>(May 2011)</em>
+</a></p>
+
+<div class="toggle-content-toggleme" style="padding-left:2em;">
+
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r11</a> or
+higher.</p>
+</dd>
+</dl>
+
+</div>
+</div>
+
+
+<h3>Emulator Skins</h3>
+
+<p>The downloadable platform includes the following emulator skin:</p>
+
+<ul>
+ <li>
+ WXGA (1280x800, medium density, xlarge screen)
+ </li>
+</ul>
+
+<p>For more information about how to develop an application that displays
+and functions properly on all Android-powered devices, see <a
+href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
+Screens</a>.</p>
+
+
+
+
+
+
+
+
+
+
+
+<h2 id="3.0">Android 3.0</h2>
+
+
+<div class="toggle-content closed" >
+
+<p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />
+ Android 3.0, Revision 2</a> <em>(July 2011)</em>
+</a></p>
+
+<div class="toggle-content-toggleme" style="padding-left:2em;">
+
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r12</a> or
+higher.</p>
+</dd>
+<dt>Notes:</dt>
+<dd>
+<p>Improvements to the platform's rendering library to support the visual layout editor in the ADT
+Eclipse plugin. This revision allows for more drawing features in ADT and fixes several
+bugs in the previous rendering library. It also unlocks several editor features that were added in
+ADT 12.</p>
+</dd>
+</dl>
+
+</div>
+</div>
+
+<div class="toggle-content closed">
+
+<p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" />
+ Android 3.0, Revision 1</a> <em>(February 2011)</em>
+</a></p>
+
+<div class="toggle-content-toggleme" style="padding-left:2em;">
+
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r10</a> or higher.</p>
+</dd>
+</dl>
+
+</div>
+</div>
+
+
+
+<h3>Emulator Skins</h3>
+
+<p>The downloadable platform includes the following emulator skin:</p>
+
+<ul>
+ <li>
+ WXGA (1280x800, medium density, xlarge screen)
+ </li>
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h2 id="2.3.4">Android 2.3.4</h2>
+
+
+
+<p>The sections below provide notes about successive releases of
+the Android 2.3.4 platform component for the Android SDK, as denoted by
+revision number. To determine what revision(s) of the Android
+2.3.4 platforms are installed in your SDK environment, refer to
+the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
+
+<div class="toggle-content closed" >
+
+<p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" />
+ Android 2.3.4, Revision 1</a> <em>(May 2011)</em>
+</a></p>
+
+ <div class="toggle-content-toggleme" style="padding-left:2em;">
+ <dl>
+ <dt>Dependencies:</dt>
+ <dd>
+ <p>Requires SDK Tools r11 or higher.</p>
+ </dd>
+ </dl>
+ </div>
+</div>
+
+
+<h3>Emulator Skins</h3>
+
+<p>The downloadable platform includes a set of emulator skins that you can use
+for modeling your application in different screen sizes and resolutions. The
+emulator skins are:</p>
+
+<ul>
+ <li>
+ QVGA (240x320, low density, small screen)
+ </li>
+ <li>
+ WQVGA400 (240x400, low density, normal screen)
+ </li>
+ <li>
+ WQVGA432 (240x432, low density, normal screen)
+ </li>
+ <li>
+ HVGA (320x480, medium density, normal screen)
+ </li>
+ <li>
+ WVGA800 (480x800, high density, normal screen)
+ </li>
+ <li>
+ WVGA854 (480x854 high density, normal screen)
+ </li>
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h2 id="2.3.3">Android 2.3.3</h2>
+
+
+<div class="toggle-content closed" >
+
+<p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />
+ Android 2.3.3, Revision 2</a> <em>(July 2011)</em>
+</a></p>
+
+<div class="toggle-content-toggleme" style="padding-left:2em;">
+
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r12</a> or
+higher.</p>
+</dd>
+<dt>Notes:</dt>
+<dd>
+<p>Improvements to the platform's rendering library to support the visual layout editor in the ADT
+Eclipse plugin. This revision allows for more drawing features in ADT and fixes several
+bugs in the previous rendering library. It also unlocks several editor features that were added in
+ADT 12.</p>
+</dd>
+</dl>
+
+</div>
+</div>
+
+<div class="toggle-content closed" >
+
+<p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />
+ Android 2.3.3, Revision 1</a> <em>(February 2011)</em>
+</a></p>
+
+<div class="toggle-content-toggleme" style="padding-left:2em;">
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires SDK Tools r9 or higher.</p>
+</dd>
+</dl>
+
+</div>
+</div>
+
+
+<h3>Emulator Skins</h3>
+
+<p>The downloadable platform includes a set of emulator skins that you can use
+for modeling your application in different screen sizes and resolutions. The
+emulator skins are:</p>
+
+<ul>
+ <li>
+ QVGA (240x320, low density, small screen)
+ </li>
+ <li>
+ WQVGA400 (240x400, low density, normal screen)
+ </li>
+ <li>
+ WQVGA432 (240x432, low density, normal screen)
+ </li>
+ <li>
+ HVGA (320x480, medium density, normal screen)
+ </li>
+ <li>
+ WVGA800 (480x800, high density, normal screen)
+ </li>
+ <li>
+ WVGA854 (480x854 high density, normal screen)
+ </li>
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+<h2 id="2.3">Android 2.3</h2>
+
+
+
+<p>The sections below provide notes about successive releases of
+the Android 2.3 platform component for the Android SDK, as denoted by
+revision number. To determine what revision(s) of the Android
+2.3 platforms are installed in your SDK environment, refer to
+the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
+
+
+<div class="toggle-content closed" >
+
+<p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img" alt="" />
+ Android 2.3, Revision 1</a> <em>(December 2010)</em>
+</a></p>
+
+ <div class="toggle-content-toggleme" style="padding-left:2em;">
+ <dl>
+ <dt>Dependencies:</dt>
+ <dd>
+ <p>Requires SDK Tools r8 or higher.</p>
+ </dd>
+ </dl>
+ </div>
+</div>
+
+
+<h3>Emulator Skins</h3>
+
+<p>The downloadable platform includes a set of emulator skins that you can use
+for modeling your application in different screen sizes and resolutions. The
+emulator skins are:</p>
+
+<ul>
+ <li>
+ QVGA (240x320, low density, small screen)
+ </li>
+ <li>
+ WQVGA400 (240x400, low density, normal screen)
+ </li>
+ <li>
+ WQVGA432 (240x432, low density, normal screen)
+ </li>
+ <li>
+ HVGA (320x480, medium density, normal screen)
+ </li>
+ <li>
+ WVGA800 (480x800, high density, normal screen)
+ </li>
+ <li>
+ WVGA854 (480x854 high density, normal screen)
+ </li>
+</ul>
+
+
+
+
+
+
+
+
+
+<h2 id="2.2">Android 2.2</h2>
+
+
+<div class="toggle-content closed" >
+
+<p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />
+ Android {@sdkPlatformVersion}, Revision 3</a> <em>(July 2011)</em>
+</a></p>
+
+<div class="toggle-content-toggleme" style="padding-left:2em;">
+
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r12</a> or
+higher.</p>
+</dd>
+<dt>Notes:</dt>
+<dd>
+<p>Improvements to the platform's rendering library to support the visual layout editor in the ADT
+Eclipse plugin. This revision allows for more drawing features in ADT and fixes several
+bugs in the previous rendering library. It also unlocks several editor features that were added in
+ADT 12.</p>
+</dd>
+</dl>
+
+</div>
+</div>
+
+<div class="toggle-content closed" >
+
+<p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />
+ Android {@sdkPlatformVersion}, Revision 2</a> <em>(July 2010)</em>
+</a></p>
+
+<div class="toggle-content-toggleme" style="padding-left:2em;">
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires SDK Tools r6 or higher.</p>
+</dd>
+
+<dt>System Image:</dt>
+<dd>
+<ul>
+<li>Adds default Search Widget.</li>
+<li>Includes proper provisioning for the platform's Backup Manager. For more information about how
+to use the Backup Manager, see <a href="{@docRoot}guide/topics/data/backup.html">Data
+Backup</a>.</li>
+<li>Updates the Android 2.2 system image to FRF91.</li>
+</ul>
+</dd>
+
+</dl>
+ </div>
+</div>
+
+<div class="toggle-content closed">
+
+<p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />
+ Android {@sdkPlatformVersion}, Revision 1</a> <em>(May 2010)</em>
+</a></p>
+
+<div class="toggle-content-toggleme" style="padding-left:2em;">
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires SDK Tools r6 or higher.</p>
+</dd>
+
+<dt>Tools:</dt>
+<dd>
+<p>Adds support for building with Android library projects. See <a href="tools-notes.html">SDK
+Tools, r6</a> for information.</p>
+</dd>
+
+</dl>
+ </div>
+</div>
+
+
+<h3>Emulator Skins</h3>
+
+<p>The downloadable platform includes a set of emulator skins that you can use
+for modeling your application in different screen sizes and resolutions. The
+emulator skins are:</p>
+
+<ul>
+ <li>
+ QVGA (240x320, low density, small screen)
+ </li>
+ <li>
+ WQVGA (240x400, low density, normal screen)
+ </li>
+ <li>
+ FWQVGA (240x432, low density, normal screen)
+ </li>
+ <li>
+ HVGA (320x480, medium density, normal screen)
+ </li>
+ <li>
+ WVGA800 (480x800, high density, normal screen)
+ </li>
+ <li>
+ WVGA854 (480x854 high density, normal screen)
+ </li>
+</ul> \ No newline at end of file
diff --git a/docs/html/tools/samples/index.jd b/docs/html/tools/samples/index.jd
new file mode 100644
index 000000000000..5c0e8db777eb
--- /dev/null
+++ b/docs/html/tools/samples/index.jd
@@ -0,0 +1,31 @@
+page.title=Samples
+
+@jd:body
+
+<p>To help you understand some fundamental Android APIs and coding practices, a variety of sample
+code is available from the Android SDK Manager.</p>
+
+<p>To download the samples:</p>
+<ol>
+ <li>Launch the Android SDK Manager.
+ <ul>
+ <li>On Windows, double-click the SDK Manager.exe file at the root of the Android SDK
+directory.</li>
+ <li>On Mac or Linux, open a terminal to the {@code tools/} directory in the
+Android SDK, then execute {@code android sdk}.</ul>
+ </li>
+ <li>Expand the list of packages for the latest Android platform.</li>
+ <li>Select and download <em>Samples for SDK</em>.</li>
+</ol>
+
+<p>When the download is complete, you can find the samples sources at this location:</p>
+
+<p style="margin-left:2em">
+<code><em>&lt;sdk&gt;</em>/platforms/&lt;android-version>/samples/</code>
+</p>
+
+<p>You can easily create new Android projects with the downloaded samples, modify them
+if you'd like, and then run them on an emulator or device. </p>
+<!--
+<p>Below are summaries for several of the available samples.</p>
+--> \ No newline at end of file
diff --git a/docs/html/tools/sdk/OLD_RELEASENOTES.jd b/docs/html/tools/sdk/OLD_RELEASENOTES.jd
new file mode 100644
index 000000000000..6865db235c0b
--- /dev/null
+++ b/docs/html/tools/sdk/OLD_RELEASENOTES.jd
@@ -0,0 +1,527 @@
+page.title=Release Notes for Older SDK Versions
+@jd:body
+
+<div class="special">
+ <p><strong>Note:</strong> These are the release notes for the "early-look" SDK versions, released
+ before the full Android 1.0 release in September 2008.
+ Release notes for the Android 1.0 and later SDK versions are provided in the main
+ <a href="{@docRoot}sdk/RELEASENOTES.html">Release Notes</a> document.</p>
+</div>
+
+
+
+<a name="0.9_r1" id="0.9_r1"></a>
+<h2>Android 0.9 SDK Beta (r1)</h2>
+
+<p>This beta SDK release contains a large number of bug fixes and improvements from the early-look SDKs.&nbsp;
+The sections below describe the highlights of the release.
+
+<h3>New Features and Notable Changes</h3>
+
+<p><strong>Behavior and System Changes</strong></p>
+<ul>
+ <li>New Home screen and many user interface updates
+ </li>
+ <li>Minor changes to Activity lifecycle and task management
+ </li>
+ <li>New window option to request OpenGL acceleration for certain kinds of View structures
+ </li>
+</ul>
+<p>
+ <b>
+ Significant API Changes</b>
+</p>
+<ul>
+ <li>onFreeze(Bundle) renamed to onSaveInstanceState(Bundle), to better reflect the fact that it does not represent an actual change in application lifecycle
+ </li>
+ <li>IntentReceivers are now known as BroadcastReceivers (but still operate on Intents.)
+ </li>
+ <li>Various parts of the API cleaned up to use Intents instead of Bundles; Intent itself improved to reduce the need for separate payload Bundles.</li>
+ <li>ContentProvider Cursors have had significant changes to make them easier to create and remove certain data consistency bugs.
+ </li>
+ <li>Changes to menus to make them more flexible; also added context menus (similar to "right mouse button" menus)
+ </li>
+ <li>Changes to the Sensor API to make reading sensors more convenient and reduce the need to poll
+ </li>
+ <li>Improvements to the Camera API
+ </li>
+ <li>Significant changes to the Location API to make it easier to use and better self-documenting
+ </li>
+ <li>API cleanup on MapViews
+ </li>
+ <li>Performance-related changes to the MediaPlayer, as well as support for new types of ringtones
+ </li>
+ <li>Apache HTTPClient installation upgraded to 4.x of that API; 3.x version is removed
+ </li>
+ <li>HTTPClient 4.x removes multipart methods, include HttpMime which is an extension of Mime4j (http://james.apache.org/mime4j/index.html) in your project instead
+ </li>
+ <li>Improvements to WiFi and related networking
+ </li>
+ <li>New Preferences API to easily store small amounts of data
+ </li>
+ <li>Improvements to the Telephony API, including ability to obtain source number of incoming phone calls
+ </li>
+ <li>Variety of improvements to the View API
+ </li>
+ <li>Variety of improvements to component management, such as the ability to keep components private, better control over when processes are started, and ability to "alias" an Activity to more than one entry in AndroidManifest.xml
+ </li>
+ <li>Improvements to how the Browser and WebView, such as better control over content downloads
+ </li>
+ <li>A number of enhancements to XML layouts, such as the new &lt;merge&gt; tag
+ </li>
+ <li>Numerous improvements to the standard widgets
+ </li>
+ <li>Network access now requires that applications obtain a permission in their AndroidManifest.xml files.
+ </li>
+</ul>
+<p>
+ <b>
+ Maps &amp; Location</b>
+</p>
+<ul>
+ <li>The MapView will require an API key on final Android 1.0 devices. This key can be obtained at no cost from Google, and will allow access to the full MapView API. In this release, the API key must be provided but can be any dummy value.&nbsp; In the final 1.0-compatible SDKs, this will need to be a real key.
+ </li>
+ <li>The KML-based mock location provider supported in previous releases is no longer supported. In the current SDK, you can use the emulator console to send GPS fix updates to the emulator and applications running on it. Also, the DDMS tool provides an UI that you can use to easily upload GPX and KML files. DDMS handles playback of the KML or GPX tracks automatically. </li>
+</ul>
+<p>
+ <b>ADT Plugin for Eclipse</b></p>
+ <p>The ADT Plugin that accompanies this SDK includes a preview of the Graphical Layout Editor. Files located in &lt;project&gt;/res/layout[-qualifiers]/ will be opened with the new layout editor. This is very much a work in progress, and provided here for preview purpose. The editor feature is subject to change.
+</p>
+<ul>
+ <li>Dual page editor with a WYSIWYG page (the graphical editor) and an XML page with content assist.
+ </li>
+ <li>The interactivity in the editor itself is limited to selection at the moment. Actions on the layout elements can be done from the following standard Eclipse views: Outline (add/remove/up/down), and Properties (editing of all the element properties with a tooltip in the status bar).
+ </li>
+ <li>Top part of the editor allows you to display the layout in different configurations (language, orientation, size, etc...), and different themes.
+
+ <ul>
+ <li>All referenced resources (strings, bitmaps, etc...) are resolved based on the selected configuration/theme.
+ </li>
+ <li>A green check mark next to a resource qualifier indicates that the opened file matches the value of the qualifier. A warning sign indicates that the opened file does not specifies any value for this qualifier.
+ </li>
+ <li>If a different version of the opened layout matches the new configuration selection (in a different res/layout-qualifier folder) then the editor automatically switches to that new file.
+ </li>
+ </ul>
+ </li>
+ <li>Custom Views are supported, however if they do too much in their constructor/onDraw method, it may not work (the layout library used by the editor only includes a sub-part of the Android framework). Check the android console for errors/exceptions.
+ </li>
+</ul>
+
+<p>Known issues/limitations for Graphical Layout Editor include:</p>
+
+ <ul>
+ <li>Font display is very close but not equals to on-device rendering since the font engine in Java slightly differs from the font engine in Android. This should not have any impact on your layouts.
+ </li>
+ <li>Creating new views in a relative layout automatically puts each new elements below each other using the <i>layout_below</i> attribute. However, until the layout file is saved, they will appear stacked on top of each other.
+ </li>
+ <li>Some XML based drawables don't draw. Fading in the scroll/list view appears as a white rectangle. Generally do not expect every single fancy drawing feature of the android framework to be supported in the layout editor (but we're working on it).
+ </li>
+ <li>Themes defined in the project are not added to the theme drop-down.
+ </li>
+ <li>No animation support!
+ </li>
+ <li>No support for WebView, MapView and SurfaceView.
+ </li>
+ <li>No UI support for &lt;merge&gt;, &lt;include&gt;, &lt;ViewStub&gt; elements. You can add these elements to your manifest using the xml editor only.
+ </li>
+ <li>If a layout fails to render in a way that prevents the whole editor from opening, you can:
+
+ <ul>
+ <li>open that particular file in a different editor: right click the file in the package explorer and choose Open With... &gt; XML editor
+ </li>
+ <li>completely disable the layout editor, by setting a system wide environment variable called ANDROID_DISABLE_LAYOUT to any value.
+ </li>
+ </ul>
+ <li>If a layout fails to render, check the android console (in the standard Eclipse Console view). Errors/Exceptions will be displayed in there.
+ </li>
+ </ul>
+ </li>
+</ul>
+<p>Other ADT features/notes include:</p>
+<ul>
+ <li>There is a new launch option for activity. You can choose to launch the default activity (finds an activity configured to show up in the home screen), or a specific activity, or none.</li>
+ <li>Normal Java resources (non Java files placed in package folders) are now properly packaged in the final package, and can be accessed through normal java API such as ClassLoader.getResourceAsStream()</li>
+ <li>Launch configuration now has an option to wipe emulator data on launch. This always asks for confirmation.</li>
+ <li>Launch configuration now has an option to disable the boot animation. This will let the emulator start faster on older computers.</li>
+ <li>Installation of application is now more robust and will notify of installation failure. Also installation is blocking, removing issues where ADT tried to launch the activity before the app was installed.</li>
+
+</ul>
+
+<p><b>Ant Build Tools</b></p>
+
+<ul>
+ <li><span>External jar libraries are now directly supported by build.xml, just drop them in the libs directory.</li>
+</ul>
+
+<p><b>Emulator</b></p>
+
+<ul>
+ <li>The console port number of a given emulator instance is now displayed in its window's title bar.</li>
+ <li>You can define the console port number used by a given emulator instance.
+To do so, start the instance with the '-port &lt;port&gt;' option and
+specify which port the emulator should bind to for the console. &lt;port&gt; must be an *even* integer between 5554 and 5584 inclusive. The corresponding ADB port will be &lt;port&gt;+1.</li>
+ <li>The <code>-adb-port</code> command is deprecated. Please do not use it, as it will be removed soon and you cannot use both -port and -adb-port at the same time.</li>
+ <li>Voice/sms are automatically forwarded to other emulator instances running on the same machine, as long as you use their console port number as the destination phone number. For example, if you have two emulators running, the first one will typically use console port 5554, and the second one will use port 5556, dialing 5556 on the first emulator will generate an incoming call on the second emulator. You can also hold/unhold calls. This also works when sending SMS messages from one emulator to the other.</li>
+ <li>A new <code>-scale &lt;fraction&gt;</code> option allows you to scale the emulator window. </li>
+ <li>A new <code>-no-boot-anim</code> option tells the emulator to disable the boot animation. On slower systems, this can significantly reduce the time to boot the system in the emulator.</li>
+
+</ul>
+
+<p>
+ <b>Other Development Tools</b>
+</p>
+
+<p>The SDK includes several new development tools, such as</p>
+<ul>
+ <li><a href="{@docRoot}tools/help/hierarchy-viewer.html">HierarchyViewer</a> is a visual tool for inspecting and debugging your user interfaces and layout. </li>
+ <li><a href="{@docRoot}tools/help/draw9patch.html">Draw 9-patch</a> allows you to easily create a NinePatch graphic using a WYSIWYG editor. </li>
+ <li>The <a href="{@docRoot}tools/help/monkey.html">UI/Application Exerciser Monkey</a> generates pseudo-random system and user events, for testing your application. </li>
+</ul>
+<p>
+ <b>Application Signing</b>
+</p>
+<ul>
+ <li>Starting with this release, Android .apk files must be cryptographically signed, or the system will reject them upon installation.&nbsp; The purpose of this requirement is to securely and uniquely identify developers, so that the system can -- for example -- safely let multiple .apk files signed by the same developer share resources.&nbsp;
+ </li>
+ <li>There are no requirements on the key used to sign .apk files;&nbsp; locally-generated and self-signed keys are allowed.&nbsp; There is no PKI, and developers will not be required to purchase certificates, or similar. &nbsp; For developers who use the Eclipse/ADT plugin, application signing will be largely automatic.&nbsp; Developers who do not use Eclipse/ADT can use the standard Java jarsigner tool to sign .apk files.
+ </li>
+</ul>
+<p>
+ <b>Sample Code</b>
+</p>
+<ul>
+ <li>LunarLander has been converted to render into a SurfaceView via a background Thread, for better performance.
+ </li>
+ <li>New sample: the source code for the now-obsolete Home screen from M5 is included as an example of how to construct a Home screen replacement.
+ </li>
+</ul>
+<p>
+ <b>
+ Removed Functionality</b>
+</p>
+<ul>
+ <li>Due to significant API changes in the upstream open-source project and due to the timeline of getting certain Bluetooth profile implementations certified, a comprehensive Bluetooth API will not be possible or present in Android 1.0.
+ </li>
+ <li>Due to the security risks inherent in accepting arbitrary data from "outside" the device, the data messaging facility of the GTalkService will not be present in Android 1.0.&nbsp; The GTalkService will provide connectivity to Google's servers for Google Talk instant messaging, but the API has been removed from this release while we improve the service.&nbsp; Note that this will be a Google-specific service and is not part of the core of Android.
+ </li>
+ <li>We know that these changes will affect many developers who have worked with the prior early looks at the SDK, and we are very sorry for the resulting inconvenience.&nbsp; We look forward to the possibilty of restoring some or all of this functionality in a later version of the Android platform.
+ </li>
+</ul>
+<p>
+ <b>
+ Miscellaneous</b>
+</p>
+<ul>
+ <li>Many internal and non-public APIs have been removed from the documentation.&nbsp; Classes and methods that are not present in the documentation are non-public and should not be used, even though they may appear in tools such as IDEs.&nbsp; A future version of the SDK will ship with an android.jar file that contains only public classes, to help developers avoid accidentally using non-public APIs.
+ </li>
+ <li>A few extraneous APIs (such as unnecessary packages under java.awt) have been removed.
+ </li>
+ <li>Several additional tools are included, such as a utility for easily drawing 9-patch images.
+ </li>
+ <li>The DDMS utility has been refactored into library form. This is not of direct interest to application developers, but may be of interest to vendors interested in integrating the Android SDK into their products. Watch for more information about the ddmlib library soon.
+ </li>
+ <li>For performance and maintainability reasons, some APIs were moved into separate modules that must be explicitly included in the application via a directive in AndroidManifest.xml.&nbsp; Notable APIs that fall into this category are the MapView, and the java.awt.* classes, which each now reside in separate modules that must be imported.&nbsp; Developers who overlook this requirement will see ClassNotFoundExceptions that seem spurious.
+ </li>
+ <li>Developers who use 'adb push' to install applications must now use 'adb install', since the full package manager is now implemented. 'adb push' will no longer work to install .apk files.
+ </li>
+ <li>The emulator supports a variety of new options, and some existing options have been changed.&nbsp; Please consult the updated emulator documentation for details.
+ </li>
+</ul>
+
+<h3>
+ Resolved Issues
+</h3>
+<p>
+ The list below is not comprehensive, but instead highlights the most interesting fixes since the last SDK release.
+</p>
+<ul>
+ <li>More of the standard Android user applications are now included, such as the Music and Messaging applications.
+ </li>
+ <li>Many bug fixes to the Media Player
+ </li>
+ <li>Emulator performance is improved, especially for startup
+ </li>
+ <li>More internal APIs are removed from class documentation.&nbsp; (However, this work is not quite yet complete.)
+ </li>
+ <li>It's now much easier to add media content to the SD card and have the ContentProvider locate and expose it to other applications.
+ </li>
+</ul>
+
+<h3>
+ Known Issues
+</h3>
+<ul>
+ <li>The final set of Intent patterns honored by Android 1.0 has not yet been fully documented.&nbsp; Documentation will be provided in future releases.
+ </li>
+ <li>We regret to inform developers that Android 1.0 will not support 3.5" floppy disks.
+ </li>
+ <li>Unfortunately, the ability to play audio streams from memory (such as via an InputStream or Reader) will not be possible in Android 1.0.&nbsp; As a workaround, we recommend that developers save media content to SD card and use MediaPlayer to play from a file URI, or embed a small HTTP server and play from a URI on localhost (such as http://127.0.0.1:4242/something).
+ </li>
+ <li>Android now supports modules or libraries that can be optionally linked into applications; a good example is the MapView, which has been moved into such a library. However, Android 1.0 will not support the ability for third-party developers to create such libraries for sharing with other applications.
+ </li>
+ <li>We believe that we have eliminated the problem with very long emulator startups on Windows, but had some trouble reproducing the issue.&nbsp; We are interested in feedback from developers, if this issue persists.
+ </li>
+</ul>
+
+
+
+
+<a name="m5-rc15"></a>
+<h2>Version m5-rc15</h2>
+
+<h3>New Features</h3>
+<p>m5-rc15 does not introduce any new features.</p>
+
+<h3>Resolved Issues</h3>
+<ul>
+ <li>1012640: Incorrect handling of BMP images.</li>
+</ul>
+
+<h3>Known Issues</h3>
+<p>Unless otherwise noted, Known Issues from m5-rc14 also apply to m5-rc15.</p>
+
+
+
+
+<a name="m5-rc14"></a>
+<h2>Version m5-rc14</h2>
+
+<h3>New Features</h3>
+
+<p>In addition to changes in the Android APIs, m5-rc14 also introduces changes to the Android Developer Tools:</p>
+
+<h4>emulator</h4>
+<ul>
+ <li>The Android emulator now support SD card images up to 128 GB in size. The previous limit was 2 GB.</li>
+</ul>
+
+<h4>DDMS</h4>
+<ul>
+ <li>Support for managing multiple devices has been integrated into DDMS. This should make it easier to debug applications that are run on multiple device scenarios.</li>
+</ul>
+
+<h4>ADT</h4>
+<ul>
+ <li>ADT now attempts to connect a debugger to any application that shows up
+ in the wait-for-debugger state, even if this application was not launched
+ from Eclipse.
+ <br /><br />
+ The connection is actually established only if there exists a project
+ in the Eclipse workspace that contains an <code>AndroidManifest.xml</code>
+ declaring a package matching the name of the process.
+ To force this connection from your code, use <code>Debug.waitForDebugger()</code>. Activities declaring that they require their own process through the
+ "process" attribute with a value like ":someProcess" will be
+ recognized and a debugger will be connected accordingly.
+ This should make it easier to debug intent receivers, services,
+ providers, and other activities not launched from the standard app
+ launcher.<br /><br /></li>
+ <li>ADT has launch modes for device target selection. Automatic mode will: 1) launch an emulator if no device is present, 2) automatically target the device if only one is connected, and 3) prompt the user if 2 or more are connected. Manual mode will always prompt the user.<br /><br /></li>
+ <li>ADT also contains the same support for multiple devices that has been introduced into DDMS.</li>
+</ul>
+
+<h4>AIDL</h4>
+<ul>
+ <li>AIDL files that import and reuse types is now supported by activityCreator.py and ADT.</li>
+</ul>
+
+<h4>traceview</h4>
+<ul>
+ <li>The <a href="{@docRoot}tools/help/traceview.html">traceview</a> tool is now included in the SDK.</li>
+</ul>
+
+<h3>Resolved Issues</h3>
+
+<p>The following Known Issues from m3-rc20 have been resolved:</p>
+<ul>
+ <li>917572: The activityCreator created incorrect IntelliJ scripts</li>
+ <li>917465: Unanswered incoming calls placed from the emulator console will result in an unfinished call UI if you press the call back button</li>
+ <li>917247: dmtracedump and traceview tools are not available in the SDK</li>
+ <li>912168: Extremely rapid or prolonged scrolling in the Maps application or MapsView will result in application errors</li>
+ <li>905852: adb emits warnings about deprecated API use on Mac OS X 10.5</li>
+ <li>905242: The Run dialog sometimes failed to show the Android Launcher</li>
+ <li>901122: The focus ring in the browser is sometimes incorrect</li>
+ <li>896274: On Windows, the emulator sometimes starts off-screen</li>
+ <li>778432: Icons for newly installed applications do not display</li>
+</ul>
+
+<h3>Known Issues</h3>
+
+<p>The following are known issues in m5-rc14:</p>
+
+<ul>
+ <li>1017312: The emulator window size has been reduced slightly, to allow it to be fully visible on smaller screens. This causes a slight clipping of the HVGA emulator skin but does not affect its function.</li>
+ <li>1021777: Setting a power requirement in a <code>Criteria</code> object passed to <code>{@link android.location.LocationManager#getBestProvider getBestProvider()}</code> will result in a value not being returned.</li>
+ <li>1025850: Emulator failing to launch from the Eclipse plugin due to wrong custom command line parameters do not report the error anywhere and silently fails.</li>
+</ul>
+
+<p>Unless otherwise noted, Known Issues from m3-rc20a also apply to m5-rc14.</p>
+
+
+
+
+<a name="m3-rc37a"></a>
+<h2>Version m3-rc37a</h2>
+
+<p>Version m3-rc37a and ADT 0.3.3 were released on December 14, 2007.</p>
+
+<h3>New Features</h3>
+
+<h4>Android Debug Bridge (ADB)</h4>
+<ul>
+<li>Now supports multiple emulators on one host computer. Please note that you need to use the <code>-data</code> option when starting secondary emulators, to allow those instances to save their data across sessions. Also, DDMS does not yet support debugging on multiple emulators yet. </li>
+</ul>
+
+<h4>ADT Plugin for Eclipse</h4>
+<ul>
+<li>Adds editor capabilities for working with Android manifest files, such as syntax highlighting and autocompletion. The editor capabilities require the Web Tools WST plugin for Eclipse, which is included in <a href="http://www.eclipse.org/downloads/moreinfo/compare.php">most Eclipse packages</a>. Not having WST does not prevent the ADT plugin from working. If necessary, you can download and install WST from the Web Tools Project <a href="http://download.eclipse.org/webtools/downloads">downloads page</a>. To update directly from an Eclipse installation, you can add a remote update site with this URL: http://download.eclipse.org/webtools/updates . Note that installing WST on Eclipse 3.4 will require installing other packages, as detailed on the WTP downloads page</a>.
+</li>
+<li>Now retries to launch the app on the emulator if it fails due to timing issues when the emulator is booting.</li>
+<li>Adds support for loading custom skins from the &lt;SDK&gt;/lib/images/skins/ directory. The Skin dropdown in the Emulator tab is now built from the content of the skins/ directory in order to support developer-made skins.</li>
+<li>Adds an Emulator control panel. This is a UI on top of the emulator console that allows you to change the state of the network and gsm connection, and to initiate incoming voice call. (This is also present in standalone DDMS.)</li>
+<li>Adds support for referenced projects. Android projects will add to the apk package any code from referenced projects.</li>
+<li>Eclipse console now warns if an .apk that is pushed to the device declares the same package as another already installed package.</li>
+<li>Java classes generated by the Eclipse plugin are now marked as derived automatically, so that Team plugins do not consider them as regular source.</li>
+</ul>
+
+<h4>Emulator Console</h4>
+<ul>
+<li>Now provides support for emulating inbound SMS messages. The ADT plugin and DDMS provide integrated access to
+this capability. For more information about how to emulate inbound SMS from the console,
+see <a href="{@docRoot}tools/help/emulator.html#sms">SMS Emulation</a>. </li>
+</ul>
+
+<h4>Emulator</h4>
+<ul><li>The default emulator skin has been changed to HVGA-P from QVGA-L. For information
+about emulator skins and how to load a specific skin when starting the emulator, see
+<a href="{@docRoot}tools/help/emulator.html#skins">Using Emulator Skins</a>.</li>
+</ul>
+
+<h3>Resolved Issues</h3>
+
+<h4>907947</h4>
+<p><code>adb -version</code> now returns a version number.</p>
+
+<h4>917462</h4>
+<p>Audio on Windows is fixed and is no longer 'choppy'. </p>
+
+<h4>Removed Manifest File Locking on Mac OS X</h4>
+
+<p>ADT plugin now uses a custom java editor for R.java/Manifest.java, to make those files non-editable. This is to replace the current locking mechanism which causes issues on Mac OS (preventing projects from being deleted). Note that your project must recompile at least once for the lock to be removed from the files.</p>
+
+<h4>The following known issues noted in m3-rc20 are now fixed:</h4>
+<p>
+<ul>
+<li>890937: Emulator does not support non-qwerty keyboards.
+<li>894618: <code>adb shell</code> may fail to connect when used the first time.
+<li>896274: On Windows, the emulator window may start off-screen.
+<li>899949: The emulator may fail to start with <code>-useaudio</code> on some environments.
+<li>912619: Emulator console listens on non-local ports 5554-5584.
+<li>917399: On Windows, running multiple emulator consoles can result in unexpected behavior when simulating incoming telephone calls.
+</ul>
+</p>
+
+<h3>Known Issues</h3>
+
+<p>Unless otherwise noted, Known Issues from m3-rc22a also apply to m3-rc37a.</p>
+
+
+
+
+<a name="m3-rc22a"></a>
+<h2>Version m3-rc22a</h2>
+
+<p>Version m3-rc22a and ADT 0.3.1 were released on November 16, 2007.</p>
+
+<h3>Resolved Issues</h3>
+
+<h4>920067</h4>
+<p>The New Android Project wizard provided by ADT 0.3.1 now properly displays error messages when used with Eclipse 3.2 on Windows.</p>
+
+<h4>920045</h4>
+<p>The <code>AndroidManifest.xml</code> files generated by ADT 0.3.1 now include the XML element required for displaying the associated app in the "Applications" menu. If you have applications created with ADT 0.3.0, simply ensure that your <code>AndroidManifest.xml</code> file contains the following highlighted line:</p>
+<pre>
+...
+ &lt;intent-filter&gt;
+ &lt;action android:value=&quot;android.intent.action.MAIN&quot; /&gt;
+ <strong>&lt;category android:value=&quot;android.intent.category.LAUNCHER&quot; /&gt;</strong>
+ &lt;/intent-filter&gt;
+...
+</pre>
+
+<h4>920098</h4>
+<p>ADT 0.3.1 is now compatible with Eclipse 3.4.</p>
+
+<h4>920282</h4>
+<p>Fixes a NullPointerException that is thrown in certain situations with the DDMS perspective in Eclipse.</p>
+
+<h4>918637</h4>
+<p>Address a keyboard lock-up issue when using <code>adb</code> on Mac OS X 10.4 and 10.5.</p>
+
+<h3>Known Issues</h3>
+
+<p>Unless otherwise noted, known issues from m3-rc20a also apply to m3-rc22a.</p>
+
+<a name="m3-rc20a"></a>
+
+<h2>Version m3-rc20a</h2>
+<h3>Known Issues</h3>
+
+<p>The following are known issues in m3-rc20a:</p>
+
+<h4>778432 - <span style="font-weight: normal; font-size: 13px; font-style: italic">Resolved in <a href="#m5-rc14">m5</a></span></h4>
+<p>In certain circumstances, icons for newly installed applications do not display as expected.</p>
+
+<h4>890937 - <span style="font-weight: normal; font-size: 13px; font-style: italic">Resolved in <a href="#m3-rc37a">m3-rc37a</a></span></h4>
+<p>The emulator currently does not support non-QWERTY keyboards.</p>
+
+<h4>894618 - <span style="font-weight: normal; font-size: 13px; font-style: italic">Resolved in <a href="#m3-rc37a">m3-rc37a</a></span></h4>
+<p>The adb shell command may fail to connect when used for the first time.</p>
+
+<h4>896274 - <span style="font-weight: normal; font-size: 13px; font-style: italic">Resolved in <a href="#m5-rc14">m5</a></span></h4>
+<p>On Windows, the emulator screen will sometimes show up off-screen when it is started. The workaround for this is to right-click on the emulator taskbar entry, select Move, and move the window using keyboard arrow keys</p>
+
+<h4>899949 - <span style="font-weight: normal; font-size: 13px; font-style: italic">Resolved in <a href="#m3-rc37a">m3-rc37a</a></span></h4>
+<p>The emulator may fail to start when using the <code>-useaudio</code> in some environments</p>
+
+<h4>901122 - <span style="font-weight: normal; font-size: 13px; font-style: italic">Resolved in <a href="#m5-rc14">m5</a></span></h4>
+<p>The focus ring shown in the browser may sometimes not properly wrap links.</p>
+
+<h4>905242 - <span style="font-weight: normal; font-size: 13px; font-style: italic">Resolved in <a href="#m5-rc14">m5</a></span></h4>
+<p>On Mac OS X 10.5, the Eclipse plugin's Run Dialog may sometimes fail to show the option to select the Android Launcher.</p>
+
+<h4>905852 - <span style="font-weight: normal; font-size: 13px; font-style: italic">Resolved in <a href="#m5-rc14">m5</a></span></h4>
+<p>On Mac OS X 10.5, adb will emit warnings about deprecated API use when first used.</p>
+
+<h4>912168 - <span style="font-weight: normal; font-size: 13px; font-style: italic">Resolved in <a href="#m5-rc14">m5</a></span></h4>
+<p>extremely rapid or prolonged scrolling in the Maps application or in a MapView will result in application errors.</p>
+
+<h4>912619 - <span style="font-weight: normal; font-size: 13px; font-style: italic">Resolved in <a href="#m3-rc37a">m3-rc37a</a></span></h4>
+<p>The emulator console listens for connections on ports 5554-5587. Future versions will only accept connections from localhost. It is recommend that you use a firewall to block external connections to those ports on your development machine.</p>
+
+<h4>912849</h4>
+<p>On Mac OS X 10.4, the emulator may hang if started in the background (i.e. <code>./emulator &amp;</code>).</p>
+
+<h4>914692</h4>
+<p>On Mac OS X 10.5, the emulator will emit warnings about deprecated API use when started from the command line.</p>
+
+<h4>917247 - <span style="font-weight: normal; font-size: 13px; font-style: italic">Resolved in <a href="#m5-rc14">m5</a></span></h4>
+<p>The dmtracedump and traceview tools are not available in the SDK.</p>
+
+<h4>917399 - <span style="font-weight: normal; font-size: 13px; font-style: italic">Resolved in <a href="#m3-rc37a">m3-rc37a</a></span></h4>
+<p>On Windows, running multiple emulator consoles can result in unexpected behavior when simulating incoming telephone calls.</p>
+
+<h4>917465 - <span style="font-weight: normal; font-size: 13px; font-style: italic">Resolved in <a href="#m5-rc14">m5</a></span></h4>
+<p>Unanswered incoming calls placed from the emulator console, will result in an unfinished call UI if you press the call back button.</p>
+
+<h4>917572 - <span style="font-weight: normal; font-size: 13px; font-style: italic">Resolved in <a href="#m5-rc14">m5</a></span></h4>
+<p>Using activityCreator with the <code>--ide intellij</code> option creates IntelliJ scripts with incorrect documentation location specified. To correct, change value for the <code>&lt;JAVADOC&gt;</code> element in the generated .ipr file from <code>file://.../docs/framework</code> to <code>file://.../docs/reference</code>.</p>
+
+<h4>917579</h4>
+<p>On Ubuntu 7.10 (Gusty), the Eclipse package installed by the <code>apt-get install eclipse</code> command uses java-gcj by default. This configuration is not compatible with the Android Eclipse plugin (ADT) and will result in "Class not found" errors whenever you access an ADT feature.</p>
+ <p>The resolution for this issue is to install a Sun JDK</p>
+ <pre>sudo update-java-alternatives --jre java-1.5.0-sun</pre>
+ <p>and then configure Eclipse to use it by exporting the following environment variable:</p>
+ <pre>export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun</pre>
+ <p>or by adding following to your <code>.eclipse/eclipserc file</code>:</p>
+ <pre>JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun</pre>
+
diff --git a/docs/html/tools/sdk/RELEASENOTES.jd b/docs/html/tools/sdk/RELEASENOTES.jd
new file mode 100644
index 000000000000..c7ece4230b1b
--- /dev/null
+++ b/docs/html/tools/sdk/RELEASENOTES.jd
@@ -0,0 +1,803 @@
+page.title=SDK Release Notes
+@jd:body
+
+<p>This document provides version-specific information about Android SDK
+releases. <!--For the latest known issues, please ensure that you're viewing this
+page at <a
+href="http://developer.android.com/sdk/RELEASENOTES.html">http://developer.
+android.com/sdk/RELEASENOTES.html</a>.--></p>
+
+<h2 id="multiversion_r1">Android SDK</h2>
+
+<p>The Android SDK has changed! If you've worked with the Android SDK before,
+you will notice several important differences:</p>
+
+<ul>
+<li style="margin-top:.5em">The SDK downloadable package includes <em>only</em>
+the latest version of the Android SDK Tools.</li>
+<li>Once you've installed the SDK, you now use the Android SDK and AVD Manager
+to download all of the SDK components that you need, such as Android platforms,
+SDK add-ons, tools, and documentation. </li>
+<li>The new approach is modular &mdash; you can install only the components you
+need and update any or all components without affecting your development
+environment.</li>
+<li>In short, once you've installed the new SDK, you will not need to download
+an SDK package again. Instead, you will use the Android SDK and AVD Manager to
+keep your development environment up-to-date. </li>
+</ul>
+
+<p>Note that if you are currently using the Android 1.6 SDK, you do not
+necessarily need to install the new SDK, since your existing SDK already
+includes the Android SDK and AVD Manager tool. To develop against Android 2.0.1,
+for example, you could just download the Android 2.0.1 platform into your existing
+SDK. </p>
+
+<p>Release notes for Android platforms and other SDK components are
+now available from the "SDK" tab, under "Downloadable SDK Components."</p>
+
+<ul>
+<li>Notes for the Android 2.0.1 platform are in the <a
+href="{@docRoot}about/versions/android-2.0.1.html">Android 2.0.1, Release 1</a> document. </li>
+<li>You can find information about tools changes in the <a
+href="{@docRoot}tools/sdk/tools-notes.html#notes">SDK Tools</a> and <a
+href="{@docRoot}tools/sdk/eclipse-adt.html#notes">ADT Plugin for Eclipse</a>.</li>
+</ul>
+
+<p>To get started with the SDK, review the Quick Start summary on the <a
+href="{@docRoot}sdk/index.html">Android SDK download page</a> or read <a
+href="{@docRoot}sdk/installing/index.html">Installing the SDK</a> for detailed
+installation instructions. </p>
+
+
+<h2 id="1.6_r1">Android 1.6 SDK, Release 1</h2>
+
+<p>This SDK provides updates to the development tools and Android system that
+you use to create applications for compliant Android-powered devices. </p>
+
+<h3>Release Overview</h3>
+
+<p>This SDK release includes several new features for developers. Highlights of the
+changes include: </p>
+
+ <ul>
+ <li>Emulator support for multiple screen sizes/densities, including new
+skins. </li>
+ <li>Android SDK and AVD Manager, a graphical UI to let you manage your
+SDK and AVD environments more easily. The tool lets you create and manage
+your <a href="{@docRoot}tools/devices/managing-avds.html">Android Virtual
+Devices</a> and download new SDK packages (such as platform versions and
+add-ons) into your environment.</li>
+ <li>Improved support for test packages in New Project Wizard</li>
+ <li>The reference documentation now offers a "Filter by API Level"
+capability that lets you display only the parts of the API that are actually
+available to your application, based on the <code>android:minSdkVersion</code>
+value the application declares in its manifest. For more information, see
+<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">Android API Levels</a></li>
+ </ul>
+
+<p>For details about the Android platforms included in the SDK &mdash; including
+bug fixes, features, and API changes &mdash; please read the <a
+href="android-1.6.html">Android 1.6 version notes</a>.</p>
+
+<h3>Installation and Upgrade Notes</h3>
+
+<p>If you've been developing an application using an Android 1.1 SDK, you need
+to make a few changes to your development environment to migrate to the new SDK.
+Tools and documentation are provided to assist you. No changes to the source
+code of an existing application should be needed, provided that your application
+is not using Android internal structures or APIs.</p>
+
+<p>To ensure that your existing application will work properly on a device
+running the latest version of the Android platform, you are strongly encouraged
+to migrate the application to the new SDK, compile it using the platform
+matching the application's original API Level, and run it against the most
+current platform. </p>
+
+<h3>ADT Plugin for Eclipse</h3>
+
+<p>An updated version of the ADT Plugin for Eclipse is available with the
+Android 1.6 SDK. The new version, ADT 0.9.3, provides several new
+features, including integrated support for the Android SDK and AVD Manager
+and zipalign tool. In addition, the New Project Wizard now
+lets you create a test package containing tests for your application. These
+features are described in the sections below. </p>
+
+<p>If you are developing in Eclipse with ADT and want to get started with the
+Android 1.6 SDK, you should download and install a compatible version of the ADT
+Plugin (0.9.3 or higher). </p>
+
+<p>The new version of ADT is downloadable from the usual remote update site or
+is separately downloadable as a .zip archive. For instructions on how to
+download the plugin, please see <a
+href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin for Eclipse</a>. </p>
+
+<h3>Android SDK and AVD Manager</h3>
+
+<p>The SDK offers a new tool called Android SDK and AVD Manager that lets you
+manage your SDK and AVD environments more efficiently. </p>
+
+<p>Using the tool, you can quickly check what Android platforms, add-ons,
+extras, and documentation packages are available in your SDK environment, what
+their versions are, and whether updated versions are available. You can then
+download one or more items from remote repositories and install them directly in
+your SDK environment. For example, the tool lets you obtain updates to SDK tools
+incrementally, as they are made available, without having to wait for the next
+SDK release. You can also download Android platform versions into your
+environment that were not included in the SDK package.</p>
+
+<p>The tool also lets you quickly create new AVDs, manage
+their properties, and run a target AVD from a single window. </p>
+
+<p>If you are developing in Eclipse with ADT, you can access the Android SDK
+and AVD Manager from the <strong>Window</strong> menu. </p>
+
+<p>If you are developing in another IDE, you can access the Android SDK and
+AVD Manager through the <code>android</code> command-line tool, located in the
+&lt;sdk&gt;/tools directory. You can launch the tool with a graphical UI by
+using the <code>android</code> command without specifying any options. You can
+also simply double-click the android.bat (Windows) or android (OS X/Linux) file.
+You can still use <code>android</code> commands to create and manage AVDs,
+including AVDs with custom hardware configurations.</p>
+
+<h3>Integration with zipalign</h3>
+
+<p>The Android system offers a performance optimization for installed
+application packages whose contained uncompressed files are all aligned on
+4-byte boundaries. For these .apks, the system can read the files by mmap'ing
+the zip file, rather than by copying all the data out of them. This reduces
+the amount of memory used by the application at run time. The SDK includes
+a tool called <code>zipalign</code> that you can run against your .apks, to
+align them properly and enable them to benefit from this optimization.</p>
+
+<p>The ADT Plugin and the Ant build tools both provide integrated support for
+aligning your application packages. After you build an .apk, the SDK tools can
+sign and then run <code>zipalign</code> against it. The SDK includes the
+standalone version of the <code>zipalign</code> tool, so you can run also run it
+manually from the command line if you choose. </p>
+
+<ul>
+ <li>If you are developing in Eclipse with ADT, support for
+<code>zipalign</code> is integrated into the Export Wizard. When you use the
+Wizard to export a signed application package, ADT signs and then automatically
+runs <code>zipalign</code> against the exported package. If you use the Wizard
+to export an unsigned application package, then it will not zipalign the
+package because zipalign must be performed only after the APK has been signed.
+You must manually sign and zipalign the package after export. </li>
+ <li>If you are developing using Ant and are compiling in release mode, the
+build tools will automatically sign and then <code>zipalign</code> the
+application package, provided that you have specified the location of a valid
+keystore in the build properties file. If you are compiling in debug mode, the
+build tools will sign the package with the debug key and then <code>zipalign</code>
+it.</li>
+ <li>To use <code>zipalign</code> manually, change to the SDK tools directory
+and use the command syntax <code>$ zipalign 4 &lt;infile&gt;
+&lt;outfile&gt;</code></li>
+</ul>
+
+<p>In general, note that you must <code>zipalign</code> an application only
+<em>after</em> it has been signed, as signing will disrupt the package
+alignment.</p>
+
+<h3>Support for Test Packages in New Project Wizard</h3>
+
+<p>The New Project Wizard available in the ADT 0.9.3 now lets you add a test
+package containing Instrumentation or other classes of tests while you are
+creating or importing a new Android application project. </p>
+
+<h3>New USB Driver for Windows</h3>
+
+<p>If you are using Windows and want to develop or test your application on an
+Android-powered device (such as the T-Mobile G1), you need an appropriate USB
+driver.
+
+<p>The Windows version of the Android 1.6 SDK includes a new, WinUSB-based
+driver that you can install. The driver is compatible with both 32- and 64-bit
+versions of Windows XP and Vista. The driver represents an upgrade from the USB
+driver included in previous Android SDKs, although installing the new driver is
+not required. </p>
+
+<p>If you installed the USB driver from a previous SDK release and it is working
+properly, you do not need to upgrade to the new driver. However, we recommend
+upgrading if you have had any problems with the older driver or simply want
+to upgrade to the latest version.</p>
+
+<p>For driver installation or
+upgrade instructions, see <a
+href="{@docRoot}sdk/win-usb.html">USB Driver for Windows</a>.</p>
+</p>
+
+<h3>Emulator Skins, Android 1.6 Platform</h3>
+
+<p>The Android 1.6 platform included in the SDK provides a new set of emulator
+skins, including: </p>
+
+<ul>
+ <li>QVGA &mdash; 240 x 320, low density (120 dpi)</li>
+ <li>HVGA &mdash; 320 x 480, medium density (160 dpi)</li>
+ <li>WVGA800 &mdash; 480 x 800, high density (240 dpi)</li>
+ <li>WVGA854 &mdash; 480 x 854, high density (240 dpi)</li>
+</ul>
+
+<p>Besides these defaults, You can also create an AVD that overrides the default
+density for each skin, to create any combination of resolution/density (WVGA
+with medium density, for instance). To do so, use the <code>android</code> tool
+command line to create a new AVD that uses a custom hardware configuration. See
+<a href="{@docRoot}tools/devices/managing-avds.html#createavd">Creating an
+AVD</a> for more information.</p>
+
+<h3>Other Notes and Resolved Issues</h3>
+
+<ul>
+ <li>This SDK release adds support for Eclipse 3.5 (Galileo) and deprecates
+support for Eclipse 3.3 (Europa). </li>
+ <li>We regret to inform developers that Android 1.6 will not include support
+for <a href="http://www.ietf.org/rfc/rfc2549">RFC 2549</a></li>
+ <li>The issue preventing adb from recognizing Samsung Galaxy devices (linux SDK
+only) has been fixed.</li>
+</ul>
+
+
+<h2 id="1.5_r3">Android 1.5 SDK, Release 3</h2>
+
+<p>Provides an updated Android 1.5 system image that includes permissions
+fixes, as described below, and a new application &mdash; an IME for Japanese
+text input. Also provides the same set of developer tools included in the
+previous SDK, but with bug fixes and several new features.</p>
+
+<h3>Permissions Fixes</h3>
+
+<p>The latest version of the Android platform, deployable to
+Android-powered devices, includes fixes to the permissions-checking
+in certain areas of the framework. Specifically, the Android system
+now properly checks and enforces several existing permissions where it
+did not do so in the previous release. Because of these changes in
+enforcement, you are strongly encouraged to test your application
+against the new Android 1.5 system image included in this SDK, to ensure
+that it functions normally. </p>
+
+<p>In particular, if your application uses any of the system areas listed below,
+you should add the required permissions to the application's manifest and then
+test the areas of your code that depend on the permission-protected services.
+Even if you believe your application does not use the permissions-protected
+services, you should compile and test your application under the latest platform
+version to ensure that users will not encounter problems when using your
+application. </p>
+
+<p>The changes to permissions are as follows:</p>
+
+<ul>
+<li>When an application requests access to device camera (through
+android.hardware.camera), the <code>CAMERA</code> permission check is now
+properly enforced. </li>
+<li>When an application requests access to device audio capture (through
+android.media.MediaRecorder), the <code>RECORD_AUDIO</code> permission check is
+now properly enforced.</li>
+</ul>
+
+<p>For more information, see the issue described in the oCert advisory
+below:</p>
+
+<p style="margin-left: 2em;"><a href="http://www.ocert.org/advisories/ocert-2009-011.html">http://www.ocert.org/advisories/ocert-2009-011.html</a> </p>
+
+<h3>Resolved Issues, Changes</h3>
+
+<ul>
+<li>The SDK includes a new version of the Google APIs add-on. The add-on
+provides an updated com.google.android.maps external library that fixes compile
+errors related to certain classes such as GeoPoint. For information about the
+Google APIs add-on and the library it provides, see:
+
+<p style="margin-left:2em;"><a
+href="http://code.google.com/android/add-ons/google-apis">http://code.google.com/android/add-ons/google-apis</a> </p></li>
+
+<li>The SDK add-on architecture now lets device manufacturers specify a USB
+Vendor ID in their add-ons.
+<li>The <code>android</code> tool provides a new command that scans SDK add-ons
+for their USB Vendor IDs and makes them available to adb (OS X and Linux
+versions of the SDK only). The command is <code>android update adb</code>. On
+Windows versions of the SDK, a custom USB driver is included that supports the
+"Google" and "HTC" Vendor IDs, which allow adb to recognize G1 and HTC
+Magic devices. For other devices, contact the device manufacturer
+to obtain a USB driver, especially if you have an SDK add-on that defines
+a new USB Vendor ID.</li>
+<li>The telephony, sensor, and geo fix issues in the emulator are now
+fixed.</li>
+<li>When you use adb to uninstall an upgraded application, the Android system
+now properly restores any permissions that had already been granted to the
+previous (downgrade) version of the application</li>
+</ul>
+
+<h2 id="1.5_r2">Android 1.5 SDK, Release 2</h2>
+
+<p>This SDK release provides the same developer tools as the Android 1.5 SDK,
+Release 1, but provides an updated Android 1.5 system image that includes a
+security patch for the issue described in the oCert advisory below:</p>
+
+<p style="margin-left:2em;"><a href="http://www.ocert.org/advisories/ocert-2009-006.html">http://www.ocert.org/advisories/ocert-2009-006.html</a></p>
+
+<h2 id="1.5_r1">Android 1.5 SDK, Release 1</h2>
+
+<p>This SDK provides updates to the development tools and Android system that
+you use to create applications for compliant Android-powered devices. </p>
+
+<h3>Release Overview</h3>
+
+<p>This SDK release includes many new features for developers. Highlights of the
+changes include: </p>
+
+ <ul>
+ <li>Multiple versions of the Android platform are included (Android 1.1,
+Android 1.5). The tools are updated to let you deploy your application
+on any platform in the SDK, which helps you ensure forward-compatibility and,
+if applicable, backward-compatibility.</li>
+ <li>Introduces <a href="{@docRoot}tools/devices/managing-avds.html">Android
+Virtual Devices</a> &mdash; (AVD) configurations of options that you
+run in the emulator to better model actual devices. Each AVD gets its
+own dedicated storage area, making it much easier to work with multiple emulators
+that are running concurrently.</li>
+ <li>Support for SDK add-ons, which extend the
+Android SDK to give you access to one or more external Android libraries and/or
+a customized (but compliant) system image that can run in the emulator. </li>
+ <li>The new Eclipse ADT plugin (version 0.9.x) offers new Wizards to let you
+create projects targeted for specific Android configurations, generate XML
+resources (such as layouts, animations, and menus), generate alternate layouts,
+and export and sign your application for publishing.</li>
+ <li>Improved JUnit support in ADT</li>
+ <li>Easier profiling of performance</li>
+ <li>Easier management of localized applications. You can now include or
+exclude locale resources when building your APK from a single
+Android project.</li>
+ <li>A new tool called "android" replaces the activitycreator script.</li>
+ </ul>
+
+<p>For details about the Android platforms included in the SDK &mdash; including
+bug fixes, features, and API changes &mdash; please read the <a
+href="{@docRoot}about/versions/android-1.5.html">Android 1.5 version notes</a>.</p>
+
+<h3>Installation and Upgrade Notes</h3>
+
+<p>If you've been developing an application using an Android 1.1 SDK, you need
+to make a few changes to your development environment to migrate to the new SDK.
+Tools and documentation are provided to assist you. No changes to the source
+code of an existing application should be needed, provided that your application
+is not using Android internal structures or APIs.</p>
+
+<p>To ensure that your existing application will work properly on a device
+running the latest version of the Android platform, you are strongly encouraged
+to migrate the application to the new SDK, compile it using the platform
+matching the application's original API Level, and run it against the most
+current platform. </p>
+
+<h3>SDK Add-Ons</h3>
+
+<p>This version of the SDK introduces support for SDK add-ons, which extend the
+Android SDK to give you access to one or more external Android libraries and/or
+a customized (but compliant) system image that can run in the emulator. The
+purpose of an SDK add-on is to give you a way to develop applications for a
+specific actual device (or family of devices) that extends the APIs available to
+Android applications through external libraries or system customizations. </p>
+
+<p>From the perspective of your Android development environment, an SDK add-on
+is similar to any of the Android platform targets included in the SDK &mdash; it
+includes an external library, a system image, as well as custom emulator skins
+and system properties. The add-on differs in that the Android platform it
+provides may include customized UI, resources, or behaviors, a different set of
+preinstalled applications, or other similar modifications.
+
+<p>The SDK includes a single SDK add-on &mdash; the Google APIs add-on. The
+Google APIs add-on gives your application access to the com.google.android.maps
+external library that is included on many (if not most) Android-powered devices.
+The Google APIs add-on also includes a {@link android.location.Geocoder Geocoder}
+backend service implementation. For more information, see the "Maps External
+Library" section below. </p>
+
+<h3>Android Virtual Devices (AVDs)</h3>
+
+<p>The SDK now gives you the capability to compile an application against any
+one of several system targets, then run it in the emulator on top of any
+compatible system image. There are two types of targets:</p>
+<ul>
+<li>Targets that represent core Android platform versions. </li>
+<li>Targets that are SDK add-ons, which typically provide application access to
+one or more external libraries and/or a customized (but compliant) system image
+that can run in the emulator.
+</ul>
+
+<p>A new tool called "android" lets you discover what targets and AVDs are
+available to use.</p>
+
+<p>For more information about AVDs, see <a
+href="{@docRoot}tools/devices/index.html">Creating and Managing Virtual Devices</a>
+
+<h3>Other Notes</h3>
+
+<p><strong>Maps External Library</strong></p>
+
+<p>In previous versions of the SDK, the com.google.android.maps package was
+included in the standard Android library and system image. In the Android 1.5
+SDK, that is not the case. The Android 1.5 library and system image do not
+include the Maps external library (com.google.android.maps). However, the Maps
+external library is available as part of the Google APIs add-on for the Android
+SDK, downloadable from this location: </p>
+
+<p style="margin-left:2em;"><a
+href="http://code.google.com/android/add-ons/google-apis">http://code.google.com
+/android/add-ons/google-apis</a> </p>
+
+<p>For your convenience, the Google APIs add-on is included in the SDK. </p>
+
+<p>For information about how to register for a Maps API Key, see
+<a href="http://code.google.com/android/add-ons/google-apis/mapkey.html">
+Obtaining a Maps API Key</a>.</p>
+
+<p><strong>USB Drivers for Windows</strong></p>
+
+<p>If you are using Windows and want to develop or test your application on an
+Android-powered device (such as the T-Mobile G1), you need an appropriate USB
+driver. For your convenience, the Windows version of the Android SDK includes
+these USB drivers that you can install, to let you develop on the device:</p>
+
+<ul>
+<li>USB driver for 32-bit XP and Vista</li>
+<li>USB driver for 64-bit Vista only</li>
+</ul>
+
+<p>For driver installation or
+upgrade instructions, see <a
+href="{@docRoot}sdk/win-usb.html">USB Driver for Windows</a>.</p>
+</p>
+
+<h3>Resolved Issues, Changes</h3>
+
+<p><strong>Media</strong></p>
+<ul>
+<li>Updated documentation for {@link android.media.SoundPool
+android.media.SoundPool}</li>
+<li>{@link android.webkit.WebView} objects no longer automatically save
+thumbnails. The {@link android.webkit.WebView#capturePicture() capturePicture()}
+method will need to be called manually.</li>
+</ul>
+
+<h3>Known Issues</h3>
+
+<p><strong>Sensor problems in Emulator</strong></p>
+
+<ul>
+<li>If your application uses the Sensor API and you are running it in the
+emulator on the Android 1.5 system image, you may experience problems. Your
+application may generate ANR messages or crash when using the sensors. The
+problem is being investigated.</li>
+</ul>
+
+<p><strong>Other</strong></p>
+
+<ul>
+<li>We regret to inform developers that Android 1.5 will not include support for
+the Zilog Z80 processor architecture.</li>
+</ul>
+
+
+<h2 id="1.1_r1">Android 1.1 SDK, Release 1</h2>
+
+<p>This SDK provides the development tools and Android system image you need to
+create applications for Android-powered devices. Applications developed on this
+SDK will be compatible with mobile devices running the Android 1.1 platform.
+</p>
+
+<p>This release provides an updated system image (Android 1.1), updated
+documentation, and the same set of development tools provided in the Android 1.0
+r2 SDK. The updated system image includes bug fixes and some smaller features,
+as well as a few minor API changes from the 1.0 version. </p>
+
+<p>For details about the Android 1.1 system image included in the SDK &mdash;
+including bug fixes, features, and API changes &mdash; please read the <a
+href="{@docRoot}about/versions/android-1.1.html">Android 1.1 version notes</a>.</p>
+
+<h3>App Versioning for Android 1.1</h3>
+
+<p>If you are using this SDK to build an application that is compatible
+<em>only</em> with Android-powered devices running the Android 1.1 platform,
+please note that you <strong>must</strong> set the the
+<code>android:minSdkVersion</code> attribute in the application's manifest to
+the API Level of Android 1.1 &mdash; "2".</p>
+
+<p>Specifically, you specify the <code>android:minSdkVersion</code> attribute in
+a <code>&lt;uses-sdk&gt;</code> element as a child of
+<code>&lt;manifest&gt;</code> in the manifest file. When set, the attribute
+looks like this: </p>
+
+<pre><code>&lt;manifest&gt;
+ ...
+ &lt;uses-sdk android:minSdkVersion="2" /&gt;
+ ...
+&lt;/manifest&gt;</code>
+</pre>
+
+<p>By setting <code>android:minSdkVersion</code> in this way, you ensure that
+users will only be able to install your application if their devices are running
+the Android 1.1 platform. In turn, this ensures that your application will
+function properly on their devices, especially if it uses APIs introduced in
+Android 1.1. </p>
+
+<p>If your application uses APIs introduced in Android 1.1 but does not declare
+<code>&lt;uses-sdk android:minSdkVersion="2" /&gt;</code>, then it will run properly on
+Android 1.1 devices but <em>not</em> on Android 1.0 devices. </p>
+
+<p>If your application does not use any new APIs introduced in Android 1.1, you
+can indicate Android 1.0 compatibility by removing <code>android:minSdkVersion</code> or
+setting the attribute to "1". However, before publishing your application, you
+must make sure to compile your application against the Android 1.0 system image
+(available in the Android 1.0 SDK), to ensure that it builds and functions
+properly for Android 1.0 devices. You should test the application against system
+images corresponding to the API Levels that the application is designed to be
+compatible with.</p>
+
+<p>If you are sure your application is not using Android 1.1 APIs and has no
+need to use them, you might find it easier to keep working in the Android 1.0
+SDK, rather than migrating to the Android 1.1 SDK and having to do additional
+testing.</p>
+
+
+<h3>ADT Plugin Compatibility</h3>
+
+<p>For this version of the SDK &mdash; Android 1.1 SDK, Release 1
+&mdash; the compatible version of the Android Development Tools (ADT)
+Plugin for Eclipse is <strong>0.8.0</strong>. If you are using a
+previous version of ADT, you should update to the latest version for use
+with this SDK. For information about how to update your ADT plugin, see
+<a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin for Eclipse</a>.</p>
+
+<h3>Installation and Upgrade Notes</h3>
+
+<p>If you've been developing an application using an Android 1.0 SDK no
+changes to your application are needed. You may want to wipe application
+user data (emulator option <code>-wipe-data</code>) when running your
+application on the Android 1.1 emulator for the first time.</p>
+
+<h3>Other Notes</h3>
+
+<p><strong>MapView API Key</strong></p>
+
+<p>com.google.android.maps.MapView is a class that lets you
+easily integrate Google Maps into your application. Before you can
+access the maps data, you will need to register with the Google Maps
+service and receive a Maps API Key, which you then add to your MapView
+for authentication to the server.</p>
+
+<p>Developers should note that the registration service for MapView is now
+active and Google Maps is actively enforcing the Maps API Key requirement.
+For information about how to register for a Maps API Key, see
+<a href="http://code.google.com/android/add-ons/google-apis/mapkey.html">
+Obtaining a Maps API Key</a>.</p>
+
+<p><strong>USB Drivers for Windows</strong></p>
+
+<p>If you using Windows and want to develop or test your application on an
+Android-powered device (such as the T-Mobile G1), you need an appropriate USB
+driver. For your convenience, the Windows version of the Android SDK includes
+these USB drivers that you can install, to let you develop on the device:</p>
+
+<ul>
+<li>USB driver for 32-bit XP and Vista</li>
+<li>USB driver for 64-bit Vista only</li>
+</ul>
+
+<p>The USB driver files are located in the
+<code>&lt;SDK&gt;/usb_driver</code> directory. For details and
+installation instructions, see <a
+href="{@docRoot}tools/device.html#setting-up">Connecting Hardware Devices</a>.</p>
+</p>
+
+<h3>Resolved Issues, Changes</h3>
+
+<p><strong>Emulator</strong></p>
+<ul>
+<li>Emulator now saves the user image in &lt;android&gt;/SDK1.1/</code></li>
+</ul>
+
+<h3>Known Issues</h3>
+
+<p><strong>JUnit and Eclipse/ADT</strong></p>
+<ul>
+<li>If you are developing in Eclipse/ADT and want to add JUnit test
+classes, you can do so. However, you need to set up a custom JUnit configuration
+before your tests will run properly. For detailed information about how to set
+up the JUnit configuration, see the troubleshooting topic <a
+href="{@docRoot}resources/faq/troubleshooting.html#addjunit">Running a Junit test class
+in Eclipse</a>.</li>
+</ul>
+
+<p><strong>Other</strong></p>
+
+<ul>
+<li>It is not possible to send MMS messages between emulator instances. </li>
+<li>In some cases, you may encounter problems when using the browser on an
+emulator started with the command-line option <code>-http-proxy</code>. </li>
+<li>On the OSX platform, if you manually remove the ~/.android directory
+using <code>rm -rf ~/.android</code>, then try to run
+the emulator, it crashes. This happens because the emulator fails to create
+a new .android directory before attempting to create the child SDK1.0 directory.
+To work around this issue, manually create a new .android directory using
+<code>mkdir ~/.android</code>, then run the emulator. The emulator
+creates the SDK1.0 directory and starts normally. </li>
+<li>We regret to inform developers that Android 1.1 will not include support
+for ARCNet network interfaces.</li>
+<li>The final set of Intent patterns honored by Android 1.0 has not yet been
+fully documented. Documentation will be provided in future releases.</li>
+<li>In ADT Editor, you can add at most ten new resource values at a time,
+in a given res/values/*.xml, using the form in the Android Resources pane.
+If you add more than ten, the Android Resources pane will not display the
+attributes fields for the additional resource entries. To work around this
+problem, you can close the file in the editor and open it again, or you
+can edit the resource entries in the XML text mode. </li>
+<li>The emulator's battery-control commands (<code>power &lt;option&gt</code>)
+are not working in this release.</li>
+</ul>
+
+
+<h2 id="1.0_r2">Android 1.0 SDK, Release 2</h2>
+
+<p>This SDK release includes the Android 1.0 platform and application API.
+Applications developed on this SDK will be compatible with mobile devices
+running the Android 1.0 platform.</p>
+
+<p>This release includes mainly bug fixes, although some smaller features were
+added.</p>
+
+<h3>ADT Plugin Compatibility</h3>
+
+<p>For this release of the SDK, the compatible version of the Android
+Development Tools (ADT) Plugin for Eclipse is <strong>0.8.0</strong>. If you are
+using a previous version of ADT, you should update to the latest version for use
+with this SDK. For information about how to update your ADT plugin, see <a
+href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin for Eclipse</a>.</p>
+
+<h3>Other Notes</h3>
+
+<p><strong>T-Mobile G1 Compatibility</strong></p>
+
+<p>This version of the SDK has been tested for compatibility with the first
+Android-powered mobile device, the T-Mobile
+G1. </p>
+
+<p><strong>MapView API Key</strong></p>
+
+<p>MapView is a class that lets you easily integrate Google Maps into your
+application. Before you can access the maps data, you will need to register with
+the Google Maps service and receive a Maps API Key, which you then add to your
+MapView for authentication to the server.</p>
+
+<p>Developers should note that the registration service for MapView is now
+active and Google Maps is actively enforcing the Maps API Key requirement. For
+information about how to register for a Maps API Key, see <a
+href="http://code.google.com/android/add-ons/google-apis/mapkey.html">http://code.google.com/android/add-ons/google-apis/mapkey.html</a>.
+</p>
+
+<p><strong>USB Driver for Windows</strong></p>
+<p>If you using Windows and want to develop or test your application on an
+Android-powered device (such as the T-Mobile G1), you need an appropriate USB
+driver. For your convenience, the Windows version of the Android SDK includes a
+USB driver that you can install, to let you develop on the device. The USB
+driver files are located in the <code>&lt;SDK&gt;/usb_driver</code> directory.
+
+</p>
+
+<h3>Resolved Issues, Changes</h3>
+<ul>
+<li>The android.jar in this SDK release now includes several classes that were
+missing from the previous SDK. </li>
+<li>The android.R.styleable class and its fields were removed from the public
+API, to better ensure forward-compatibility for applications. The constants
+declared in android.R.styleable were platform-specific and subject to arbitrary
+change across versions, so were not suitable for use by applications. You can
+still access the platform's styleable attributes from your resources or code. To
+do so, declare a custom resource element using a
+<code>&lt;declare-styleable&gt;</code> in your project's res/values/R.attrs
+file, then declare the attribute inside. For examples, see
+&lt;sdk&gt;/samples/ApiDemos/res/values/attrs.xml. For more information about
+custom resources, see <a
+href="{@docRoot}guide/topics/resources/available-resources.html#customresources">Custom
+Layout Resources</a>. Note that the android.R.styleable documentation is still
+provided in the SDK, but only as a reference of the platform's styleable
+attributes for the various elements.</li>
+<li>The VM now properly ensures that private classes are not
+available to applications through reflection. If you were using reflection
+to access private classes in a previous release, you will now get a run-time
+error. </li>
+
+<li>The Settings and Email applications are now included in the SDK and
+available in the emulator.</li>
+<li>We regret to inform developers that SDK 1.0_r2 does not support MFM, RLL,
+or Winchester hard disk drives.</li>
+<li>In the emulator, the control key for enabling/disabling trackball mode
+is changed from Control-T to F6. You can also enter trackball mode temporarily
+using the Delete key. While the key is pressed, you can send trackball events.</li>
+</ul>
+
+<p>Unless otherwise noted, Known Issues from the previous SDK release also apply
+to this release.</p>
+
+
+
+
+
+
+<h2 id="1.0_r1">Android 1.0 SDK, Release 1</h2>
+
+<p>This SDK release is the first to include the Android 1.0 platform and application API. Applications developed on this SDK will be compatible with mobile devices running the Android 1.0 platform, when such devices are available.</p>
+
+<p>This release includes mainly bug fixes, although some smaller features were added. The Android 1.0 also includes several API changes from the 0.9 version. For those porting from the M5 release, the SDK also includes the legacy changes overview and API Differences Reports. See the current Overview of Changes for more information. </p>
+
+<h3>ADT Plugin Compatibility</h3>
+
+<p>For this version of the SDK &mdash; Android 1.0 SDK, Release 1 &mdash; the compatible version of the Android Development Tools (ADT) Plugin for Eclipse is <strong>0.8.0</strong>. If you are using a previous version of ADT, you should update to the latest version for use with this SDK. For information about how to update your ADT plugin, see <a href="{@docRoot}sdk/1.0_r1/upgrading.html">Upgrading the SDK</a>.</p>
+
+<h3>Installation and Upgrade Notes</h3>
+
+<p>If you've been developing an application using a previous SDK version and you want the application to run on Android-powered mobile devices, you must port the application to the Android 1.0 SDK. Please see <a href="{@docRoot}sdk/1.0_r1/upgrading.html">Upgrading the SDK</a> for detailed instructions on how to make the transition to this release. Be sure to wipe application user data (emulator option <code>-wipe-data</code>) when running your application on the Android 1.0 SDK emulator.</p>
+
+<h3>Other Notes</h3>
+
+<p><strong>MapView API Key</strong></p>
+
+<p>MapView is a class that lets you easily integrate Google Maps into your application. Before you can access the maps data, you will need to register with the Google Maps service and receive a Maps API Key, which you then add to your MapView for authentication to the server.</p>
+
+<p>Currently, the registration service for MapView is not yet active and Google Maps is not yet enforcing the Maps API Key requirement. However, note that the registration service will be activated soon, so that MapViews in any application deployed to a mobile device will require registration and a valid Maps API Key. </p>
+
+<p>As soon as the registration service becomes available, we will update the page at <a href="http://code.google.com/android/add-ons/google-apis/mapkey.html">http://code.google.com/android/add-ons/google-apis/mapkey.html</a> with details about how and where to register. Please check that page periodically for registration information, if you are using a MapView.</p>
+
+
+<h3>Resolved Issues, Changes</h3>
+
+<p><strong>Emulator</strong></p>
+<ul>
+<li>Emulator now saves the user image in &lt;android&gt;/SDK1.0/</code></li>
+<li>Fixed EsounD-related freezes on Linux.</li>
+<li>Fixed the documentation in -help-audio. '-audio list' doesn't work, one
+ needs to call -help-audio-out and -help-audio-in to get the list of valid
+ audio backends.</li>
+<li>Fixed scrollwheel Dpad emulation in rotated mode. before that, using the
+ scroll-wheel would always generated Dpad Up/Down events, even when in
+ landscape mode.</li>
+
+<li>Several Obsolete command options were removed.</li>
+<li>Setting the network speed through the console or the -netspeed option will
+ properly modify the connectivity icon on the device.</li>
+<li>Setting the GSM voice registration state to 'roaming' in the console will
+ properly modify the voice icon on the device</li>
+</ul>
+
+<p><strong>SQLite</strong></p>
+<ul>
+<li>SQLite is now included in the SDK package on all platforms. </li>
+</ul>
+
+<p><strong>Other</strong></p>
+
+<ul>
+<li>It is not possible to send MMS messages between emulator instances. </li>
+<li>In some cases, you may encounter problems when using the browser on an
+emulator started with the command-line option <code>-http-proxy</code>. </li>
+
+<li>We regret to inform developers that Android 1.0 will not include support for
+dot-matrix printers.</li>
+<li>On the OSX platform, if you manually remove the ~/.android directory
+using <code>rm -rf ~/.android</code>, then try to run
+the emulator, it crashes. This happens because the emulator fails to create
+a new .android directory before attempting to create the child SDK1.0 directory.
+To work around this issue, manually create a new .android directory using
+<code>mkdir ~/.android</code>, then run the emulator. The emulator
+creates the SDK1.0 directory and starts normally. </li>
+<li>The final set of Intent patterns honored by Android 1.0 has not yet been
+fully documented. Documentation will be provided in future releases.</li>
+<li>In ADT Editor, you can add at most ten new resource values at a time,
+in a given res/values/*.xml, using the form in the Android Resources pane.
+If you add more than ten, the Android Resources pane will not display the
+attributes fields for the additional resource entries. To work around this
+problem, you can close the file in the editor and open it again, or you
+can edit the resource entries in the XML text mode. </li>
+<li>The emulator's battery-control commands (<code>power &lt;option&gt</code>)
+are not working in this release.</li>
+
+</ul>
+
diff --git a/docs/html/tools/sdk/addons.jd b/docs/html/tools/sdk/addons.jd
new file mode 100644
index 000000000000..8c5e1ed1c745
--- /dev/null
+++ b/docs/html/tools/sdk/addons.jd
@@ -0,0 +1,9 @@
+page.title=SDK Add-Ons
+
+@jd:body
+
+
+
+<p>A page that lists SDK addons and links to release notes. Links to dashboards etc.</p>
+
+
diff --git a/docs/html/sdk/adt-notes.jd b/docs/html/tools/sdk/adt-notes.jd
index 291b543f13fb..291b543f13fb 100644
--- a/docs/html/sdk/adt-notes.jd
+++ b/docs/html/tools/sdk/adt-notes.jd
diff --git a/docs/html/sdk/adt_download.html b/docs/html/tools/sdk/adt_download.html
index 5ba2ef5be745..5ba2ef5be745 100644
--- a/docs/html/sdk/adt_download.html
+++ b/docs/html/tools/sdk/adt_download.html
diff --git a/docs/html/sdk/download.jd b/docs/html/tools/sdk/download.jd
index af256096139c..af256096139c 100644
--- a/docs/html/sdk/download.jd
+++ b/docs/html/tools/sdk/download.jd
diff --git a/docs/html/sdk/eclipse-adt.jd b/docs/html/tools/sdk/eclipse-adt.jd
index e117118b8d04..ac200b69789f 100644
--- a/docs/html/sdk/eclipse-adt.jd
+++ b/docs/html/tools/sdk/eclipse-adt.jd
@@ -1,31 +1,14 @@
-page.title=ADT Plugin for Eclipse
-adt.zip.version=18.0.0
-adt.zip.download=ADT-18.0.0.zip
-adt.zip.bytes=12834793
-adt.zip.checksum=b446fa157ed97af79d1e21629201efbb
+page.title=ADT Plugin
@jd:body
<div id="qv-wrapper">
<div id="qv">
- <h2>In this document</h2>
- <ol>
- <li><a href="#notes">Revisions</a></li>
- <li><a href="#installing">Installing the ADT Plugin</a>
- <ol>
- <li><a href="#preparing">Preparing for Installation</a></li>
- <li><a href="#downloading">Downloading the ADT Plugin</a>
- <li><a href="#configuring">Configuring the ADT Plugin</a></li>
- <li><a href="#troubleshooting">Troubleshooting</a></li>
- </ol>
- </li>
- <li><a href="#updating">Updating the ADT Plugin</a></li>
- </ol>
-
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/developing/tools/adt.html">Android Developer Tools</a></li>
+ <li><a href="{@docRoot}sdk/installing/installing-adt.html">Installing the Eclipse
+Plugin</a></li>
</ol>
</div>
@@ -57,7 +40,7 @@ how to update ADT to the latest version or how to uninstall it, if necessary.
<p>For information about the features provided by the ADT plugin, such as code
editor features, SDK tool integration, and the graphical layout editor (for drag-and-drop layout
-editing), see the <a href="{@docRoot}guide/developing/tools/adt.html">Android Developer Tools</a>
+editing), see the <a href="{@docRoot}tools/help/adt.html">Android Developer Tools</a>
document.</p>
@@ -86,13 +69,13 @@ function toggleDiv(link) {
return false;
}
</script>
+
<style>
.toggleable {
-padding: .25em 1em;
+padding: 5px 0 0;
}
.toggleme {
- padding: 1em 1em 0 2em;
- line-height:1em;
+ padding: 10px 0 0 20px;
}
.toggleable a {
text-decoration:none;
@@ -104,7 +87,7 @@ padding: .25em 1em;
display:none;
}
#jd-content .toggle-img {
- margin:0;
+ margin:0 5px 3px 0;
}
</style>
@@ -122,7 +105,7 @@ ADT 18.0.0</a> <em>(April 2012)</em>
<ul>
<li>Java 1.6 or higher is required for ADT 18.0.0.</li>
<li>Eclipse Helios (Version 3.6.2) or higher is required for ADT 18.0.0.</li>
- <li>ADT 18.0.0 is designed for use with <a href="{@docRoot}sdk/tools-notes.html">SDK Tools
+ <li>ADT 18.0.0 is designed for use with <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools
r18</a>. If you haven't already installed SDK Tools r18 into your SDK, use the Android SDK
Manager to do so.</li>
</ul>
@@ -156,7 +139,7 @@ ADT 17.0.0</a> <em>(March 2012)</em>
<ul>
<li>Java 1.6 or higher is required for ADT 17.0.0.</li>
<li>Eclipse Helios (Version 3.6.2) or higher is required for ADT 17.0.0.</li>
- <li>ADT 17.0.0 is designed for use with <a href="{@docRoot}sdk/tools-notes.html">SDK Tools
+ <li>ADT 17.0.0 is designed for use with <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools
r17</a>. If you haven't already installed SDK Tools r17 into your SDK, use the Android SDK
Manager to do so.</li>
</ul>
@@ -183,7 +166,7 @@ of the URI that includes the app package name. This URI is replaced with the app
build time.</li>
</ul>
</li>
- <li>Improved Lint features. See the <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r17</a>
+ <li>Improved Lint features. See the <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r17</a>
release notes.</li>
<li>Improved the Lint user interface
<ul>
@@ -256,7 +239,7 @@ ADT 16.0.1</a> <em>(December 2011)</em>
<dd>
<ul>
<li>Eclipse Helios (Version 3.6) or higher is required for ADT 16.0.1.</li>
- <li>ADT 16.0.1 is designed for use with <a href="{@docRoot}sdk/tools-notes.html">SDK Tools
+ <li>ADT 16.0.1 is designed for use with <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools
r16</a>. If you haven't already installed SDK Tools r16 into your SDK, use the Android SDK
Manager to do so.</li>
</ul>
@@ -291,7 +274,7 @@ ADT 16.0.0</a> <em>(December 2011)</em>
<li>Eclipse Helios (Version 3.6) or higher is required for ADT
16.0.0.</li>
<li>ADT 16.0.0 is designed for use with <a
-href="{@docRoot}sdk/tools-notes.html">SDK Tools r16</a>. If you haven't already installed SDK Tools
+href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r16</a>. If you haven't already installed SDK Tools
r16 into your SDK, use the Android SDK Manager to do so.</li>
</ul>
</dd>
@@ -318,7 +301,7 @@ ADT 15.0.1</a> <em>(November 2011)</em>
<dl>
<dt>Dependencies:</dt>
- <dd>ADT 15.0.1 is designed for use with <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r15</a>.
+ <dd>ADT 15.0.1 is designed for use with <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r15</a>.
If you haven't already installed SDK Tools r15 into your SDK, use the Android SDK Manager to
do so.</dd>
@@ -352,7 +335,7 @@ ADT 15.0.0</a> <em>(October 2011)</em>
<dt>Dependencies:</dt>
-<dd>ADT 15.0.0 is designed for use with <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r15</a>.
+<dd>ADT 15.0.0 is designed for use with <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r15</a>.
If you haven't already installed SDK Tools r15 into your SDK, use the Android SDK Manager to
do so.</dd>
@@ -383,7 +366,7 @@ ADT 14.0.0</a> <em>(October 2011)</em>
<dt>Dependencies:</dt>
-<dd>ADT 14.0.0 is designed for use with <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r14</a>.
+<dd>ADT 14.0.0 is designed for use with <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r14</a>.
If you haven't already installed SDK Tools r14 into your SDK, use the Android SDK Manager to
do so.</dd>
@@ -501,7 +484,7 @@ ADT 12.0.0</a> <em>(July 2011)</em>
<dt>Dependencies:</dt>
-<dd>ADT 12.0.0 is designed for use with <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r12</a>. If you haven't
+<dd>ADT 12.0.0 is designed for use with <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r12</a>. If you haven't
already installed SDK Tools r12 into your SDK, use
the Android SDK Manager to do so.</dd>
@@ -924,7 +907,7 @@ example, ADT 8.x is for SDK Tools r8.</li>
"export signed/unsigned application package", ADT does <em>not</em> insert it.
If you manually set <code>debuggable="true"</code> in the manifest file, then release builds will
actually create a debug build (it does not remove it if you placed it there).</p></li>
- <li>Automatic <a href="{@docRoot}guide/developing/tools/proguard.html">ProGuard</a> support in
+ <li>Automatic <a href="{@docRoot}tools/help/proguard.html">ProGuard</a> support in
release builds. For it to work, you need to have a <code>proguard.config</code>
property in the <code>default.properties</code> file that points to a ProGuard config file.</li>
<li>Completely rewritten Visual Layout Editor. (This is still a work in progress.) Now includes:
@@ -997,7 +980,7 @@ called <code>src/</code>. There is now support for any number of source folders,
with no name restriction. They can even be in subfolder such as
<code>src/java</code>. If you are already working with library projects created
in ADT 0.9.7, see <a
-href="{@docRoot}guide/developing/projects/index.html#libraryMigrating">Migrating
+href="{@docRoot}tools/projects/index.html#libraryMigrating">Migrating
library projects to ADT 0.9.8</a> for important information about moving
to the new ADT environment.</li>
<li>Adds support for library projects that depend on other library
@@ -1035,7 +1018,7 @@ code and resources in a separate development project. You can then reference the
library project from other Android projects and, at build time, the tools
compile the shared code and resources as part of the dependent applications.
More information about this feature is available in the <a
-href="{@docRoot}guide/developing/projects/index.html#LibraryProjects">Creating and Managing Projects</a> document. </p>
+href="{@docRoot}tools/projects/index.html#LibraryProjects">Creating and Managing Projects</a> document. </p>
<p>If you are not developing in Eclipse, <a
href="tools-notes.html">SDK Tools r6</a> provides the equivalent library
project support through the Ant build system.</p>
@@ -1124,7 +1107,7 @@ ADT 0.9.5</a> <em>(December 2009)</em>
<dd><p>ADT 0.9.5 requires features provided in SDK Tools r4 or higher. If you install
ADT 0.9.5, which is highly recommended, you should use the Android SDK
Manager to download the latest SDK Tools into your SDK. For more information,
-see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>.</p>
+see <a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a>.</p>
</dd>
<dt>General notes:</dt>
@@ -1151,7 +1134,7 @@ ADT 0.9.4</a> <em>(October 2009)</em>
<dd><p>ADT 0.9.4 requires features provided in SDK Tools r3 or higher. If you install
ADT 0.9.4, which is highly recommended, you should use the Android SDK
Manager to download the latest SDK Tools into your SDK. For more information,
-see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>.</p>
+see <a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a>.</p>
</dd>
<dt>Project Creation Wizard:</dt>
@@ -1193,221 +1176,3 @@ revision 3.</li>
</dl>
</div>
</div>
-
-
-
-<h2 id="installing">Installing the ADT Plugin</h2>
-
-<p>The sections below provide instructions on how to download and install
-ADT into your Eclipse environment. If you encounter problems, see the <a
-href="#troubleshooting">Troubleshooting</a> section.</p>
-
-
-<h3 id="preparing">Preparing Your Development Computer</h3>
-
-<p>ADT is a plugin for the Eclipse IDE. Before you can install or use ADT,
-you must have a compatible version of Eclipse installed on your development
-computer. Check the <a
-href="requirements.html">System Requirements</a> document for
-a list of Eclipse versions that are compatible with the Android SDK.</li></p>
-
-<ul>
-<li>If Eclipse is already installed on your computer, make sure that it is
-a version that is compatible with ADT and the Android SDK.
-
-<li>If you need to install or update Eclipse, you can download it from this
-location:
-
-<p style="margin-left:2em;"><a href=
-"http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a>
-</p>
-
-<p>The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP
-version of Eclipse is recommended.</p></li>
-</ul>
-
-<p>Additionally, before you can configure or use ADT, you must install the
-Android SDK starter package, as described in <a
-href="installing.html#Installing">Downloading the SDK Starter Package</a>.
-Specifically, you need to install a compatible version of the Android SDK Tools
-and at least one development platform. To simplify ADT setup, we recommend
-installing the Android SDK prior to installing ADT. </p>
-
-<p>When your Eclipse and Android SDK environments are ready, continue with the
-ADT installation as described in the steps below. </p>
-
-<h3 id="downloading">Downloading the ADT Plugin</h3>
-
-<p>Use the Update Manager feature of your Eclipse installation to install the latest
-revision of ADT on your development computer.</p>
-
-<p>Assuming that you have a compatible version of the Eclipse IDE installed, as
-described in <a href="#preparing">Preparing for Installation</a>, above, follow
-these steps to download the ADT plugin and install it in your Eclipse
-environment.</p>
-
-
-<ol>
- <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Install New
-Software...</strong>.</li>
- <li>Click <strong>Add</strong>, in the top-right corner.</li>
- <li>In the Add Repository dialog that appears, enter "ADT Plugin" for the <em>Name</em> and the
-following URL for the <em>Location</em>:
- <pre>https://dl-ssl.google.com/android/eclipse/</pre>
- </li>
- <li>Click <strong>OK</strong>
- <p>Note: If you have trouble acquiring the plugin, try using "http" in the Location URL,
-instead of "https" (https is preferred for security reasons).</p></li>
- <li>In the Available Software dialog, select the checkbox next to Developer Tools and click
-<strong>Next</strong>.</li>
- <li>In the next window, you'll see a list of the tools to be downloaded. Click
-<strong>Next</strong>. </li>
- <li>Read and accept the license agreements, then click <strong>Finish</strong>.
- <p>Note: If you get a security warning saying that the authenticity or validity of
-the software can't be established, click <strong>OK</strong>.</p></li>
- <li>When the installation completes, restart Eclipse. </li>
-</ol>
-
-<h3 id="configuring">Configuring the ADT Plugin</h3>
-
-<p>After you've successfully downloaded the ADT as described above, the next step
-is to modify your ADT preferences in Eclipse to point to the Android SDK directory:</p>
-
-<ol>
- <li>Select <strong>Window</strong> &gt; <strong>Preferences...</strong> to open the Preferences
- panel (Mac OS X: <strong>Eclipse</strong> &gt; <strong>Preferences</strong>).</li>
- <li>Select <strong>Android</strong> from the left panel.</li>
- <p>You may see a dialog asking whether you want to send usage statistics to Google. If so,
-make your choice and click <strong>Proceed</strong>. You cannot continue with this procedure until
-you click <strong>Proceed</strong>.</p>
- <li>For the <em>SDK Location</em> in the main panel, click <strong>Browse...</strong> and
- locate your downloaded SDK directory. </li>
- <li>Click <strong>Apply</strong>, then <strong>OK</strong>.</li>
-</ol>
-
-<p>Done! If you haven't encountered any problems, then the installation is
-complete. If you're installing the Android SDK for the first time, return to <a
-href="{@docRoot}sdk/installing.html#InstallingADT">Installing the SDK</a> to complete your setup.
-</p>
-
-
-<h3 id="troubleshooting">Troubleshooting ADT Installation</h3>
-
-<p> If you are having trouble downloading the ADT plugin after following the
-steps above, here are some suggestions: </p>
-
-<ul>
- <li>If Eclipse can not find the remote update site containing the ADT plugin,
-try changing the remote site URL to use http, rather than https. That is, set
-the Location for the remote site to:
-<pre>http://dl-ssl.google.com/android/eclipse/</pre></li>
-<li>If you are behind a firewall (such as a corporate firewall), make sure that
-you have properly configured your proxy settings in Eclipse. In Eclipse,
-you can configure proxy information from the main Eclipse menu in
-<strong>Window</strong> (on Mac OS X, <strong>Eclipse</strong>) &gt;
-<strong>Preferences</strong> &gt; <strong>General</strong> &gt; <strong>Network
-Connections</strong>.</li>
-</ul>
-
-<p> If you are still unable to use Eclipse to download the ADT plugin as a
-remote update site, you can download the ADT zip file to your local machine and
-manually install it:</p>
-
-<ol>
- <li>Download the current ADT Plugin zip file from the table below (do not unpack it).
-
- <table class="download">
- <tr>
- <th>Name</th>
- <th>Package</th>
- <th>Size</th>
- <th>MD5 Checksum</th>
- </tr>
- <tr>
- <td>ADT {@adtZipVersion}</td>
- <td>
- <a href="http://dl.google.com/android/{@adtZipDownload}">{@adtZipDownload}</a>
- </td>
- <td>{@adtZipBytes} bytes</td>
- <td>{@adtZipChecksum}</td>
- </tr>
-</table>
-</li>
-
-</li>
- <li>Follow steps 1 and 2 in the <a href="#installing">default install
- instructions</a> (above).</li>
- <li>In the Add Site dialog, click <strong>Archive</strong>.</li>
- <li>Browse and select the downloaded zip file.</li>
- <li>Enter a name for the local update site (e.g.,
- "Android Plugin") in the "Name" field.</li>
- <li>Click <strong>OK</strong>.
- <li>Follow the remaining procedures as listed for
- <a href="#installing">default installation</a> above,
- starting from step 4.</li>
-</ol>
-
-<p>To update your plugin once you've installed using the zip file, you will have
-to follow these steps again instead of the default update instructions.</p>
-
-<h4>Other install errors</h4>
-
-<p>Note that there are features of ADT that require some optional
-Eclipse packages (for example, WST). If you encounter an error when
-installing ADT, your Eclipse installion might not include these packages.
-For information about how to quickly add the necessary packages to your
-Eclipse installation, see the troubleshooting topic
-<a href="{@docRoot}resources/faq/troubleshooting.html#installeclipsecomponents">ADT
-Installation Error: "requires plug-in org.eclipse.wst.sse.ui"</a>.</p>
-
-<h4>For Linux users</h4>
-<p>If you encounter this error when installing the ADT Plugin for Eclipse:
-<pre>
-An error occurred during provisioning.
-Cannot connect to keystore.
-JKS</pre>
-<p>
-...then your development machine lacks a suitable Java VM. Installing Sun
-Java 6 will resolve this issue and you can then reinstall the ADT
-Plugin.</p>
-
-
-<h2 id="updating">Updating the ADT Plugin</h2>
-
-<p>From time to time, a new revision of the ADT Plugin becomes available, with
-new features and bug fixes. Generally, when a new revision of ADT is available,
-you should update to it as soon as convenient. </p>
-
-<p>In some cases, a new revision of ADT will have a dependency on a specific
-revision of the Android SDK Tools. If such dependencies exist, you will need to
-update the SDK Tools package of the SDK after installing the new revision of
-ADT. To update the SDK Tools package, use the Android SDK Manager, as
-described in <a href="adding-components.html">Adding SDK Packages</a>.</p>
-
-<p>To learn about new features of each ADT revision and also any dependencies on
-the SDK Tools, see the listings in the <a href="#notes">Revisions</a>
-section. To determine the version currently installed, open the
-Eclipse Installed Software window using <strong>Help</strong>
-&gt; <strong>Software Updates</strong> and refer to the version listed for
-"Android Development Tools".</p>
-
-<p>Follow the steps below to check whether an update is available and, if so,
-to install it. </p>
-
-<ol>
- <li>Select <strong>Help</strong> &gt; <strong>Check for Updates</strong>.
- <p>If there are no updates available, a dialog will say so and you're done.</p></li>
- <li>If there are updates available, select Android DDMS, Android Development Tools,
- and Android Hierarchy Viewer, then click <strong>Next</strong>.</li>
- <li>In the Update Details dialog, click <strong>Next</strong>.</li>
- <li>Read and accept the license agreement and then click <strong>Finish</strong>.
- This will download and install the latest version of Android DDMS and
- Android Development Tools.</li>
- <li>Restart Eclipse.</li>
-</ol>
-
-
-<p>If you encounter problems during the update, remove the existing ADT plugin from Eclipse, then
-perform a fresh installation, using the instructions for <a href="#installing">Installing the ADT
-Plugin</a>.</p>
-
diff --git a/docs/html/tools/sdk/images/2.0/camera-modes.png b/docs/html/tools/sdk/images/2.0/camera-modes.png
new file mode 100644
index 000000000000..ac4c1da57880
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.0/camera-modes.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.0/email-inbox.png b/docs/html/tools/sdk/images/2.0/email-inbox.png
new file mode 100644
index 000000000000..50d1c19033ac
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.0/email-inbox.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.0/mms-search.png b/docs/html/tools/sdk/images/2.0/mms-search.png
new file mode 100644
index 000000000000..22c7dca9db2f
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.0/mms-search.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.0/multiple-accounts.png b/docs/html/tools/sdk/images/2.0/multiple-accounts.png
new file mode 100644
index 000000000000..aa4cb157870d
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.0/multiple-accounts.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.0/quick-connect.png b/docs/html/tools/sdk/images/2.0/quick-connect.png
new file mode 100644
index 000000000000..0bbf7dd27a65
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.0/quick-connect.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.2/22browser.png b/docs/html/tools/sdk/images/2.2/22browser.png
new file mode 100644
index 000000000000..817439da650c
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.2/22browser.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.2/22exchange.png b/docs/html/tools/sdk/images/2.2/22exchange.png
new file mode 100644
index 000000000000..1fa1f590b1b0
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.2/22exchange.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.2/22gallery.png b/docs/html/tools/sdk/images/2.2/22gallery.png
new file mode 100644
index 000000000000..0cb74adcb2e8
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.2/22gallery.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.2/22home.png b/docs/html/tools/sdk/images/2.2/22home.png
new file mode 100644
index 000000000000..a11ea3077457
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.2/22home.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.2/22hotspot.png b/docs/html/tools/sdk/images/2.2/22hotspot.png
new file mode 100644
index 000000000000..0951439451ed
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.2/22hotspot.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.2/22keyboard.png b/docs/html/tools/sdk/images/2.2/22keyboard.png
new file mode 100644
index 000000000000..69f95ca8ff3e
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.2/22keyboard.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.2/jit-graph.png b/docs/html/tools/sdk/images/2.2/jit-graph.png
new file mode 100644
index 000000000000..52b8d60cf784
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.2/jit-graph.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.3/ffc.png b/docs/html/tools/sdk/images/2.3/ffc.png
new file mode 100644
index 000000000000..136a395fad1b
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.3/ffc.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.3/home-menu.png b/docs/html/tools/sdk/images/2.3/home-menu.png
new file mode 100644
index 000000000000..e9c8620bf0b3
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.3/home-menu.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.3/home-plain.png b/docs/html/tools/sdk/images/2.3/home-plain.png
new file mode 100644
index 000000000000..a6255f6a4bb1
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.3/home-plain.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.3/nfc.png b/docs/html/tools/sdk/images/2.3/nfc.png
new file mode 100644
index 000000000000..a21b6ab90a33
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.3/nfc.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.3/onetouch.png b/docs/html/tools/sdk/images/2.3/onetouch.png
new file mode 100644
index 000000000000..2789612f02a6
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.3/onetouch.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.3/power.png b/docs/html/tools/sdk/images/2.3/power.png
new file mode 100644
index 000000000000..7b0785d8351e
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.3/power.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.3/running.png b/docs/html/tools/sdk/images/2.3/running.png
new file mode 100644
index 000000000000..fe9a1a08f870
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.3/running.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.3/selection.png b/docs/html/tools/sdk/images/2.3/selection.png
new file mode 100644
index 000000000000..46ff28c92523
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.3/selection.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/2.3/sipcall.png b/docs/html/tools/sdk/images/2.3/sipcall.png
new file mode 100644
index 000000000000..48a5a1d12919
--- /dev/null
+++ b/docs/html/tools/sdk/images/2.3/sipcall.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/browser.png b/docs/html/tools/sdk/images/3.0/browser.png
new file mode 100644
index 000000000000..0f16b2772b40
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/browser.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/browser_full.png b/docs/html/tools/sdk/images/3.0/browser_full.png
new file mode 100644
index 000000000000..08a329d6de5e
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/browser_full.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/camera.png b/docs/html/tools/sdk/images/3.0/camera.png
new file mode 100644
index 000000000000..7dabdfc0516b
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/camera.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/camera_full.png b/docs/html/tools/sdk/images/3.0/camera_full.png
new file mode 100644
index 000000000000..3ee95c993ff8
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/camera_full.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/contacts.png b/docs/html/tools/sdk/images/3.0/contacts.png
new file mode 100644
index 000000000000..9304701e07d2
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/contacts.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/contacts_full.png b/docs/html/tools/sdk/images/3.0/contacts_full.png
new file mode 100644
index 000000000000..b5eaf5b19b2e
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/contacts_full.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/copy.png b/docs/html/tools/sdk/images/3.0/copy.png
new file mode 100644
index 000000000000..d5a4c3ee43d7
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/copy.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/copy_full.png b/docs/html/tools/sdk/images/3.0/copy_full.png
new file mode 100644
index 000000000000..124cf523bd0b
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/copy_full.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/home_hero1.png b/docs/html/tools/sdk/images/3.0/home_hero1.png
new file mode 100644
index 000000000000..c00391f09658
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/home_hero1.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/home_hero1_full.png b/docs/html/tools/sdk/images/3.0/home_hero1_full.png
new file mode 100644
index 000000000000..1910ed21e79d
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/home_hero1_full.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/homescreen_cust_port.png b/docs/html/tools/sdk/images/3.0/homescreen_cust_port.png
new file mode 100644
index 000000000000..b003a30e81a1
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/homescreen_cust_port.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/homescreen_cust_port_full.png b/docs/html/tools/sdk/images/3.0/homescreen_cust_port_full.png
new file mode 100644
index 000000000000..9c64edd6824d
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/homescreen_cust_port_full.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/mail_drag.png b/docs/html/tools/sdk/images/3.0/mail_drag.png
new file mode 100644
index 000000000000..1f09a7a51af7
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/mail_drag.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/mail_drag_full.png b/docs/html/tools/sdk/images/3.0/mail_drag_full.png
new file mode 100644
index 000000000000..be4472f8acd5
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/mail_drag_full.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/tasks.png b/docs/html/tools/sdk/images/3.0/tasks.png
new file mode 100644
index 000000000000..a4ba1bacabad
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/tasks.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/tasks_full.png b/docs/html/tools/sdk/images/3.0/tasks_full.png
new file mode 100644
index 000000000000..d2a224135ed6
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/tasks_full.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.0/widgets.png b/docs/html/tools/sdk/images/3.0/widgets.png
new file mode 100644
index 000000000000..d84766623dc7
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.0/widgets.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.1/controls.png b/docs/html/tools/sdk/images/3.1/controls.png
new file mode 100644
index 000000000000..e0ca1f81d3af
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.1/controls.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.1/home.png b/docs/html/tools/sdk/images/3.1/home.png
new file mode 100644
index 000000000000..ea0a75a589da
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.1/home.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.1/home_full.png b/docs/html/tools/sdk/images/3.1/home_full.png
new file mode 100644
index 000000000000..2b8e85e3e600
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.1/home_full.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.1/resizeable.png b/docs/html/tools/sdk/images/3.1/resizeable.png
new file mode 100644
index 000000000000..c9f5e8ea4c8a
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.1/resizeable.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/3.1/tasks.png b/docs/html/tools/sdk/images/3.1/tasks.png
new file mode 100644
index 000000000000..89d69e5d043e
--- /dev/null
+++ b/docs/html/tools/sdk/images/3.1/tasks.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/allapps-lg.png b/docs/html/tools/sdk/images/4.0/allapps-lg.png
new file mode 100644
index 000000000000..f5eba3c3a7a4
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/allapps-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/allapps.png b/docs/html/tools/sdk/images/4.0/allapps.png
new file mode 100644
index 000000000000..317a49ae4707
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/allapps.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/bbench.png b/docs/html/tools/sdk/images/4.0/bbench.png
new file mode 100644
index 000000000000..f1130923590a
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/bbench.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/beam-lg.png b/docs/html/tools/sdk/images/4.0/beam-lg.png
new file mode 100644
index 000000000000..608fc94f5437
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/beam-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/beam-maps-lg.png b/docs/html/tools/sdk/images/4.0/beam-maps-lg.png
new file mode 100644
index 000000000000..96ac235e719a
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/beam-maps-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/beam-maps.png b/docs/html/tools/sdk/images/4.0/beam-maps.png
new file mode 100644
index 000000000000..63b6756273a1
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/beam-maps.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/beam.png b/docs/html/tools/sdk/images/4.0/beam.png
new file mode 100644
index 000000000000..0eb7d26696c7
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/beam.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/browser-lg.png b/docs/html/tools/sdk/images/4.0/browser-lg.png
new file mode 100644
index 000000000000..fe3fe81465d2
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/browser-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/browser-tabs-lg.png b/docs/html/tools/sdk/images/4.0/browser-tabs-lg.png
new file mode 100644
index 000000000000..0ea8f1079182
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/browser-tabs-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/browser-tabs.png b/docs/html/tools/sdk/images/4.0/browser-tabs.png
new file mode 100644
index 000000000000..413b0c636b37
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/browser-tabs.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/browser.png b/docs/html/tools/sdk/images/4.0/browser.png
new file mode 100644
index 000000000000..4bc8179f2a82
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/browser.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/calendar-widget-lg.png b/docs/html/tools/sdk/images/4.0/calendar-widget-lg.png
new file mode 100644
index 000000000000..39fc986a558c
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/calendar-widget-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/calendar-widget.png b/docs/html/tools/sdk/images/4.0/calendar-widget.png
new file mode 100644
index 000000000000..80a57f71af2e
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/calendar-widget.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/camera-lg.png b/docs/html/tools/sdk/images/4.0/camera-lg.png
new file mode 100644
index 000000000000..7d96a4f6840d
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/camera-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/camera.png b/docs/html/tools/sdk/images/4.0/camera.png
new file mode 100644
index 000000000000..74545495ff4c
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/camera.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/contact-call-lg.png b/docs/html/tools/sdk/images/4.0/contact-call-lg.png
new file mode 100644
index 000000000000..40b1f404041f
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/contact-call-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/contact-call.png b/docs/html/tools/sdk/images/4.0/contact-call.png
new file mode 100644
index 000000000000..5550b575f028
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/contact-call.png
Binary files differ
diff --git a/docs/html/sdk/images/4.0/contact-call.xcf b/docs/html/tools/sdk/images/4.0/contact-call.xcf
index 3046e928cd64..3046e928cd64 100644
--- a/docs/html/sdk/images/4.0/contact-call.xcf
+++ b/docs/html/tools/sdk/images/4.0/contact-call.xcf
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/contact-connect-lg.png b/docs/html/tools/sdk/images/4.0/contact-connect-lg.png
new file mode 100644
index 000000000000..ad0d04c7639d
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/contact-connect-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/contact-connect.png b/docs/html/tools/sdk/images/4.0/contact-connect.png
new file mode 100644
index 000000000000..d958206a43a2
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/contact-connect.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/contact-email-lg.png b/docs/html/tools/sdk/images/4.0/contact-email-lg.png
new file mode 100644
index 000000000000..db75a467eb88
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/contact-email-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/contact-email.png b/docs/html/tools/sdk/images/4.0/contact-email.png
new file mode 100644
index 000000000000..9e5460dcd74c
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/contact-email.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/contact-faves-lg.png b/docs/html/tools/sdk/images/4.0/contact-faves-lg.png
new file mode 100644
index 000000000000..1ec3fd02509e
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/contact-faves-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/contact-faves.png b/docs/html/tools/sdk/images/4.0/contact-faves.png
new file mode 100644
index 000000000000..57e4ca61e77a
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/contact-faves.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/face-unlock-lg.png b/docs/html/tools/sdk/images/4.0/face-unlock-lg.png
new file mode 100644
index 000000000000..3fd1695a615e
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/face-unlock-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/face-unlock.png b/docs/html/tools/sdk/images/4.0/face-unlock.png
new file mode 100644
index 000000000000..00afb83dbd36
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/face-unlock.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/folders.xcf b/docs/html/tools/sdk/images/4.0/folders.xcf
new file mode 100644
index 000000000000..66cc02caade1
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/folders.xcf
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/gallery-edit-lg.png b/docs/html/tools/sdk/images/4.0/gallery-edit-lg.png
new file mode 100644
index 000000000000..3d6688f45c75
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/gallery-edit-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/gallery-edit.png b/docs/html/tools/sdk/images/4.0/gallery-edit.png
new file mode 100644
index 000000000000..69744ec92cf1
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/gallery-edit.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/gallery-share-lg.png b/docs/html/tools/sdk/images/4.0/gallery-share-lg.png
new file mode 100644
index 000000000000..749f51edf30e
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/gallery-share-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/gallery-share.png b/docs/html/tools/sdk/images/4.0/gallery-share.png
new file mode 100644
index 000000000000..443a70c94aee
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/gallery-share.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/gallery-widget.png b/docs/html/tools/sdk/images/4.0/gallery-widget.png
new file mode 100644
index 000000000000..e72fd0dc1b75
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/gallery-widget.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/home-lg.png b/docs/html/tools/sdk/images/4.0/home-lg.png
new file mode 100644
index 000000000000..5b9021d6df71
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/home-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/home.png b/docs/html/tools/sdk/images/4.0/home.png
new file mode 100644
index 000000000000..cd24732978a8
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/home.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/live-effects.png b/docs/html/tools/sdk/images/4.0/live-effects.png
new file mode 100644
index 000000000000..11a0122d5e40
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/live-effects.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/lock-camera-lg.png b/docs/html/tools/sdk/images/4.0/lock-camera-lg.png
new file mode 100644
index 000000000000..c82cec68450b
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/lock-camera-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/lock-camera.png b/docs/html/tools/sdk/images/4.0/lock-camera.png
new file mode 100644
index 000000000000..d3cc1537de1c
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/lock-camera.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/lock-lg.png b/docs/html/tools/sdk/images/4.0/lock-lg.png
new file mode 100644
index 000000000000..b859e117027e
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/lock-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/lock.png b/docs/html/tools/sdk/images/4.0/lock.png
new file mode 100644
index 000000000000..d1688265fa04
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/lock.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/quick-responses-lg.png b/docs/html/tools/sdk/images/4.0/quick-responses-lg.png
new file mode 100644
index 000000000000..39cea9ae57c8
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/quick-responses-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/quick-responses.png b/docs/html/tools/sdk/images/4.0/quick-responses.png
new file mode 100644
index 000000000000..d43f34835022
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/quick-responses.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/screenshot-lg.png b/docs/html/tools/sdk/images/4.0/screenshot-lg.png
new file mode 100644
index 000000000000..30ac33933f79
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/screenshot-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/screenshot.png b/docs/html/tools/sdk/images/4.0/screenshot.png
new file mode 100644
index 000000000000..b23c91347466
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/screenshot.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/tasks-lg.png b/docs/html/tools/sdk/images/4.0/tasks-lg.png
new file mode 100644
index 000000000000..58b5c5d2b79e
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/tasks-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/tasks.png b/docs/html/tools/sdk/images/4.0/tasks.png
new file mode 100644
index 000000000000..34a9d4af5cb5
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/tasks.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/text-replace-lg.png b/docs/html/tools/sdk/images/4.0/text-replace-lg.png
new file mode 100644
index 000000000000..047d8025312a
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/text-replace-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/text-replace.png b/docs/html/tools/sdk/images/4.0/text-replace.png
new file mode 100644
index 000000000000..d2bda3e6959a
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/text-replace.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/tts-lg.png b/docs/html/tools/sdk/images/4.0/tts-lg.png
new file mode 100644
index 000000000000..2f4905118ceb
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/tts-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/tts.png b/docs/html/tools/sdk/images/4.0/tts.png
new file mode 100644
index 000000000000..3eae634b1d22
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/tts.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/usage-all-lg.png b/docs/html/tools/sdk/images/4.0/usage-all-lg.png
new file mode 100644
index 000000000000..fd7eebaf973a
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/usage-all-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/usage-all.png b/docs/html/tools/sdk/images/4.0/usage-all.png
new file mode 100644
index 000000000000..048db83309e7
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/usage-all.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/usage-maps-lg.png b/docs/html/tools/sdk/images/4.0/usage-maps-lg.png
new file mode 100644
index 000000000000..b14437069589
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/usage-maps-lg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/4.0/usage-maps.png b/docs/html/tools/sdk/images/4.0/usage-maps.png
new file mode 100644
index 000000000000..a6dcd219aa4d
--- /dev/null
+++ b/docs/html/tools/sdk/images/4.0/usage-maps.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/battery.png b/docs/html/tools/sdk/images/battery.png
new file mode 100644
index 000000000000..10fd16b16afe
--- /dev/null
+++ b/docs/html/tools/sdk/images/battery.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/camera.png b/docs/html/tools/sdk/images/camera.png
new file mode 100644
index 000000000000..6078388ea232
--- /dev/null
+++ b/docs/html/tools/sdk/images/camera.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/donut_small_bg.png b/docs/html/tools/sdk/images/donut_small_bg.png
new file mode 100644
index 000000000000..f514b504fd15
--- /dev/null
+++ b/docs/html/tools/sdk/images/donut_small_bg.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/market.png b/docs/html/tools/sdk/images/market.png
new file mode 100644
index 000000000000..8d11134c1c4a
--- /dev/null
+++ b/docs/html/tools/sdk/images/market.png
Binary files differ
diff --git a/docs/html/tools/sdk/images/search.png b/docs/html/tools/sdk/images/search.png
new file mode 100644
index 000000000000..10ab910bab86
--- /dev/null
+++ b/docs/html/tools/sdk/images/search.png
Binary files differ
diff --git a/docs/html/tools/sdk/index.jd b/docs/html/tools/sdk/index.jd
new file mode 100644
index 000000000000..fb7106577b10
--- /dev/null
+++ b/docs/html/tools/sdk/index.jd
@@ -0,0 +1,10 @@
+page.title=Android SDK
+header.hide=1
+
+@jd:body
+
+<p>This page should not exist.</p>
+
+
+
+
diff --git a/docs/html/sdk/installing.jd b/docs/html/tools/sdk/installing.jd
index 7461eb0c427a..4837ab7ff1e9 100644
--- a/docs/html/sdk/installing.jd
+++ b/docs/html/tools/sdk/installing.jd
@@ -65,8 +65,8 @@ function toggleDiv(link) {
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a></li>
- <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a></li>
+ <li><a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin for Eclipse</a></li>
+ <li><a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a></li>
</ol>
</div>
@@ -83,7 +83,7 @@ this page.</p>
<p>If you already have an Android SDK, use the Android SDK Manager tool to install
updated tools and new Android platforms into your existing environment. For information about how to
-do that, see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>.</p>
+do that, see <a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a>.</p>
<h2 id="Preparing">Step 1. Preparing Your Development Computer</h2>
@@ -142,13 +142,13 @@ highly recommended approach and is the fastest way to get started with Android.
</p>
<p>If you'd like to use ADT for developing Android applications, install it now.
-Read <a href="{@docRoot}sdk/eclipse-adt.html#installing">Installing the ADT Plugin</a> for
+Read <a href="{@docRoot}tools/sdk/eclipse-adt.html#installing">Installing the ADT Plugin</a> for
step-by-step installation instructions, then return here to continue the
last step in setting up your Android SDK.</p>
<p>If you prefer to work in a different IDE, you do not need to
install Eclipse or ADT. Instead, you can directly use the SDK tools to build and
-debug your application. The <a href="{@docRoot}guide/developing/index.html">Introduction</a>
+debug your application. The <a href="{@docRoot}tools/workflow/index.html">Introduction</a>
to Android application development outlines the major steps that you need to complete when
developing in Eclipse or other IDEs.</p>
@@ -207,14 +207,14 @@ Repository</em> and <em>Third party Add-ons</em>.</p>
and other utility tools. These tools are installed with the Android SDK starter package and receive
periodic updates. You can access these tools in the <code>&lt;sdk&gt;/tools/</code> directory of
your SDK. To learn more about
-them, see <a href="{@docRoot}guide/developing/tools/index.html#tools-sdk">SDK Tools</a> in the
+them, see <a href="{@docRoot}tools/index.html#tools-sdk">SDK Tools</a> in the
developer guide.</li>
<li><strong>SDK Platform-tools</strong> &mdash; Contains platform-dependent tools for developing
and debugging your application. These tools support the latest features of the Android platform and
are typically updated only when a new platform becomes available. You can access these tools in the
<code>&lt;sdk&gt;/platform-tools/</code> directory. To learn more about them, see <a
-href="{@docRoot}guide/developing/tools/index.html#tools-platform">Platform Tools</a> in the
+href="{@docRoot}tools/index.html#tools-platform">Platform Tools</a> in the
developer guide.</li>
<li><strong>Android platforms</strong> &mdash; An SDK platform is
@@ -229,14 +229,14 @@ your applications on an actual device. You <em>do not</em> need the USB driver u
you plan to debug your application on an actual Android-powered device. If you
develop on Mac OS X or Linux, you do not need a special driver to debug
your application on an Android-powered device. See <a
-href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a> for more information
+href="{@docRoot}tools/device.html">Using Hardware Devices</a> for more information
about developing on a real device.</li>
<li><strong>Samples</strong> &mdash; Contains the sample code and apps available
for each Android development platform. If you are just getting started with
Android development, make sure to download the samples to your SDK. <!--The download
includes not only a set of very useful sample apps, but also the source for <a
-href="{@docRoot}resources/tutorials/hello-world.html">Hello World</a> and other
+href="{@docRoot}training/basics/firstapp/index.html">Building Your First App</a> and other
tutorials. --></li>
<li><strong>Documentation</strong> &mdash; Contains a local copy of the latest
@@ -349,7 +349,7 @@ developing Android apps. The next section describes the contents of the Android
you with the packages you've just installed.</p>
<p>For more information about using the Android SDK Manager, see the <a
-href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a> document. </p>
+href="{@docRoot}sdk/exploring.html">Exploring the SDK</a> document. </p>
<h2 id="sdkContents">Step 5. Exploring the SDK (Optional)</h2>
@@ -443,7 +443,7 @@ width="9px" />
<div class="toggleme">
<p>Adding both <code>tools/</code> and <code>platform-tools/</code> to your PATH lets you run
-command line <a href="{@docRoot}guide/developing/tools/index.html">tools</a> without needing to
+command line <a href="{@docRoot}tools/index.html">tools</a> without needing to
supply the full path to the tool directories. Depending on your operating system, you can
include these directories in your PATH in the following way:</p>
@@ -477,7 +477,7 @@ begin developing applications. Here are a few ways you can get started: </p>
<p><strong>Set up the Hello World application</strong></p>
<ul>
<li>If you have just installed the SDK for the first time, go to the <a
- href="{@docRoot}resources/tutorials/hello-world.html">Hello
+ href="{@docRoot}training/basics/firstapp/index.html">Hello
World tutorial</a>. The tutorial takes you step-by-step through the process
of setting up your first Android project, including setting up an Android
Virtual Device (AVD) on which to run the application.
@@ -495,7 +495,7 @@ first step in getting started with Android development. </p>
href="{@docRoot}guide/basics/what-is-android.html">What is
Android?</a></li>
<li>Learn about the Android framework and how applications run on it in
- <a href="{@docRoot}guide/topics/fundamentals.html">Application
+ <a href="{@docRoot}guide/components/fundamentals.html">Application
Fundamentals</a>.</li>
<li>Take a look at the Android framework API specification in the <a
href="{@docRoot}reference/packages.html">Reference</a> tab.</li>
@@ -504,12 +504,12 @@ first step in getting started with Android development. </p>
<p><strong>Explore the development tools</strong></p>
<ul>
<li>Get an overview of the <a
- href="{@docRoot}guide/developing/tools/index.html">development
+ href="{@docRoot}tools/index.html">development
tools</a> that are available to you.</li>
- <li>Read the <a href="{@docRoot}guide/developing/index.html">Introduction</a> to Android
+ <li>Read the <a href="{@docRoot}tools/workflow/index.html">Introduction</a> to Android
application development.
</li>
- <li>Read <a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a> to learn
+ <li>Read <a href="{@docRoot}tools/device.html">Using Hardware Devices</a> to learn
how to set up an Android-powered device so you can run and test your application.</li>
</ul>
diff --git a/docs/html/tools/sdk/libraries.jd b/docs/html/tools/sdk/libraries.jd
new file mode 100644
index 000000000000..9e47c4af58bc
--- /dev/null
+++ b/docs/html/tools/sdk/libraries.jd
@@ -0,0 +1,9 @@
+page.title=Libraries
+
+@jd:body
+
+
+
+<p>A page that lists libraries and links to release notes. Links to dashboards etc.</p>
+
+
diff --git a/docs/html/sdk/ndk/1.5_r1/index.jd b/docs/html/tools/sdk/ndk/1.5_r1/index.jd
index 4c70a8a6f91e..4c70a8a6f91e 100644
--- a/docs/html/sdk/ndk/1.5_r1/index.jd
+++ b/docs/html/tools/sdk/ndk/1.5_r1/index.jd
diff --git a/docs/html/sdk/ndk/1.6_r1/index.jd b/docs/html/tools/sdk/ndk/1.6_r1/index.jd
index 090dcdc37867..090dcdc37867 100644
--- a/docs/html/sdk/ndk/1.6_r1/index.jd
+++ b/docs/html/tools/sdk/ndk/1.6_r1/index.jd
diff --git a/docs/html/sdk/ndk/index.jd b/docs/html/tools/sdk/ndk/index.jd
index fddbcc7e713b..956d939c1d6f 100644
--- a/docs/html/sdk/ndk/index.jd
+++ b/docs/html/tools/sdk/ndk/index.jd
@@ -1,16 +1,16 @@
ndk=true
-ndk.win_download=android-ndk-r7c-windows.zip
-ndk.win_bytes=80361003
-ndk.win_checksum=e86184cdc4bf71d32fa9185fad8544e2
+ndk.win_download=android-ndk-r8-windows.zip
+ndk.win_bytes=109928336
+ndk.win_checksum=37b1a2576f28752fcc09e1b9c07e3f14
-ndk.mac_download=android-ndk-r7c-darwin-x86.tar.bz2
-ndk.mac_bytes=73836512
-ndk.mac_checksum=025f57feb5f32ed993a5fa7f5996477d
+ndk.mac_download=android-ndk-r8-darwin-x86.tar.bz2
+ndk.mac_bytes=96650992
+ndk.mac_checksum=81ce5de731f945692123b377afe0bad9
-ndk.linux_download=android-ndk-r7c-linux-x86.tar.bz2
-ndk.linux_bytes=63432410
-ndk.linux_checksum=0bc21b78823dcf6f86b988203626b1fe
+ndk.linux_download=android-ndk-r8-linux-x86.tar.bz2
+ndk.linux_bytes=88310791
+ndk.linux_checksum=5c9afc9695ad67c61f82fbf896803c05
page.title=Android NDK
@@ -38,13 +38,13 @@ function toggleDiv(link) {
return false;
}
</script>
+
<style>
.toggleable {
-padding: .25em 1em;
+padding: 5px 0 0;
}
.toggleme {
- padding: 1em 1em 0 2em;
- line-height:1em;
+ padding: 10px 0 0 20px;
}
.toggleable a {
text-decoration:none;
@@ -53,15 +53,88 @@ padding: .25em 1em;
text-decoration:underline;
}
.toggleable.closed .toggleme {
- display:none;}
+ display:none;
+}
#jd-content .toggle-img {
- margin:0;
+ margin:0 5px 3px 0;
}
</style>
<div class="toggleable open">
<a href="#" onclick="return toggleDiv(this)"><img src=
"{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px">
+ Android NDK, Revision 8</a> <em>(May 2012)</em>
+
+ <div class="toggleme">
+ <p>This release of the NDK includes support for MIPS ABI and a few additional fixes.</p>
+
+ </dl>
+ <dt>New features:</dt>
+
+ <dd>
+ <ul>
+ <li>Added support for the MIPS ABI, which allows you to generate machine code that runs on
+ compatible MIPS-based Android devices. Major features for MIPS include MIPS-specific
+ toolchains, system headers, libraries and debugging support. For more details regarding
+ MIPS support, see {@code docs/CPU-MIPS.html} in the NDK package.
+
+ <p>By default, code is generated for ARM-based devices. You can add {@code mips} to
+ your {@code APP_ABI} definition in your {@code Application.mk} file to build
+ for MIPS platforms. For example, the following line instructs {@code ndk-build}
+ to build your code for three distinct ABIs:</p>
+
+ <pre>APP_ABI := armeabi armeabi-v7a <strong>mips</strong></pre>
+
+ <p>Unless you rely on architecture-specific assembly sources, such as ARM assembly
+ code, you should not need to touch your {@code Android.mk} files to build MIPS
+ machine code.</p>
+ </li>
+
+ <li>You can build a standalone MIPS toolchain using the {@code --arch=mips}
+ option when calling <code>make-standalone-toolchain.sh</code>. See
+ {@code docs/STANDALONE-TOOLCHAIN.html} for more details.
+ </li>
+ </ul>
+
+ <p class="note"><strong>Note:</strong> To ensure that your applications are available
+to users only if their devices are capable of running them, Google Play filters applications based
+on the instruction set information included in your application — no action is needed on your part
+to enable the filtering. Additionally, the Android system itself also checks your application at
+install time and allows the installation to continue only if the application provides a library that
+is compiled for the device's CPU architecture.</p>
+ </dd>
+
+ <dt>Important bug fixes:</dt>
+
+ <dd>
+ <ul>
+ <li>Fixed a typo in GAbi++ implementation where the result of {@code
+ dynamic_cast&lt;D&gt;(b)} of base class object {@code b} to derived class {@code D} is
+ incorrectly adjusted in the opposite direction from the base class.
+ (<a href="http://code.google.com/p/android/issues/detail?id=28721">Issue 28721</a>)
+ </li>
+ <li>Fixed an issue in which {@code make-standalone-toolchain.sh} fails to copy
+ {@code libsupc++.*}.</li>
+ </ul>
+ </dd>
+
+ <dt>Other bug fixes:</dt>
+
+ <dd>
+ <ul>
+ <li>Fixed {@code ndk-build.cmd} to ensure that {@code ndk-build.cmd} works correctly even
+ if the user has redefined the {@code SHELL} environment variable, which may be changed
+ when installing a variety of development tools in Windows environments.
+ </li>
+ </ul>
+ </dd>
+ </dl>
+ </div>
+</div>
+
+<div class="toggleable closed">
+ <a href="#" onclick="return toggleDiv(this)"><img src=
+ "{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px">
Android NDK, Revision 7c</a> <em>(April 2012)</em>
<div class="toggleme">
@@ -986,7 +1059,7 @@ float AMotionEvent_getHistoricalRawY(const AInputEvent* motion_event,
<p>Before you get started make sure that you have downloaded the latest <a href=
"{@docRoot}sdk/index.html">Android SDK</a> and upgraded your applications and environment as
needed. The NDK is compatible with older platform versions but not older versions of the SDK tools.
- Also, take a moment to review the <a href="{@docRoot}sdk/ndk/overview.html#reqs">System and
+ Also, take a moment to review the <a href="{@docRoot}tools/sdk/ndk/overview.html#reqs">System and
Software Requirements</a>
for the NDK, if you haven't already.</p>
@@ -1046,7 +1119,7 @@ Software Requirements</a>
<p>The NDK includes sample Android applications that illustrate how to use native code in your
Android applications. For more information, see <a href=
- "{@docRoot}sdk/ndk/overview.html#samples">Sample Applications</a>.</p>
+ "{@docRoot}tools/sdk/ndk/overview.html#samples">Sample Applications</a>.</p>
<h2 id="forum">Discussion Forum and Mailing List</h2>
diff --git a/docs/html/sdk/ndk/overview.jd b/docs/html/tools/sdk/ndk/overview.jd
index d2a974621bef..98ef1fcc7a77 100644
--- a/docs/html/sdk/ndk/overview.jd
+++ b/docs/html/tools/sdk/ndk/overview.jd
@@ -49,12 +49,15 @@ page.title=What is the NDK?
<p>The latest release of the NDK supports the following instruction sets:</p>
<ul>
- <li>ARMv5TE (including Thumb-1 instructions)</li>
+ <li>ARMv5TE, including Thumb-1 instructions (see {@code docs/CPU-ARCH-ABIS.html} for more
+information)</li>
- <li>ARMv7-A (including Thumb-2 and VFPv3-D16 instructions, with optional support for
- NEON/VFPv3-D32 instructions)</li>
+ <li>ARMv7-A, including Thumb-2 and VFPv3-D16 instructions, with optional support for
+ NEON/VFPv3-D32 instructions (see {@code docs/CPU-ARM-NEON.html} for more information)</li>
- <li>x86 instructions (see CPU-ARCH-ABIS.HTML for more information)</li>
+ <li>x86 instructions (see {@code docs/CPU-X86.html} for more information)</li>
+
+ <li>MIPS instructions (see {@code docs/CPU-MIPS.html} for more information)</li>
</ul>
<p>ARMv5TE machine code will run on all ARM-based Android devices. ARMv7-A will run only on
@@ -89,13 +92,14 @@ page.title=What is the NDK?
<ul>
<li>Write your application using the Android framework and use JNI to access the APIs provided
by the Android NDK. This technique allows you to take advantage of the convenience of the
- Android framework, but still allows you to write native code when necessary. You can install
- applications that use native code through the JNI on devices that run Android 1.5 or
- later.</li>
+ Android framework, but still allows you to write native code when necessary. If you use this
+ approach, your application must target specific, minimum Android platform levels, see <a
+ href="#platform-compat">Android platform compatibility</a> for more information.</li>
<li>
<p>Write a native activity, which allows you to implement the lifecycle callbacks in native
- code. The Android SDK provides the {@link android.app.NativeActivity} class, which is a convenience class that notifies your
+ code. The Android SDK provides the {@link android.app.NativeActivity} class, which is a
+ convenience class that notifies your
native code of any activity lifecycle callbacks (<code>onCreate()</code>, <code>onPause()</code>,
<code>onResume()</code>, etc). You can implement the callbacks in your native code to handle
these events when they occur. Applications that use native activities must be run on Android
@@ -155,7 +159,7 @@ page.title=What is the NDK?
<p>The NDK package includes a set of documentation that describes the capabilities of the NDK and
how to use it to create shared libraries for your Android applications. In this release, the
documentation is provided only in the downloadable NDK package. You can find the documentation in
- the <code>&lt;ndk&gt;/docs/</code> directory. Included are these files:</p>
+ the <code>&lt;ndk&gt;/docs/</code> directory. Included are these files (partial listing):</p>
<ul>
<li>
@@ -177,9 +181,6 @@ page.title=What is the NDK?
lets your application code detect the target device's CPU family and the optional features at
runtime.</li>
- <li>CPU-ARM-NEON.HTML &mdash; a description of how to build with optional ARM NEON / VFPv3-D32
- instructions.</li>
-
<li>CHANGES.HTML &mdash; a complete list of changes to the NDK across all releases.</li>
<li>DEVELOPMENT.HTML &mdash; describes how to modify the NDK and generate release packages for it</li>
@@ -282,7 +283,7 @@ page.title=What is the NDK?
<p>For more information about developing with the Android SDK tools and what
you need to do to create, build, and run your applications, see
- the <a href="{@docRoot}guide/developing/index.html">Overview</a>
+ the <a href="{@docRoot}tools/workflow/index.html">Overview</a>
section for developing on Android.</p>
<h4 id="hello-jni">Exploring the hello-jni Sample</h4>
@@ -473,21 +474,49 @@ later)</li>
will <em>not</em> work with Cygwin 1.5 installations.</li>
</ul>
- <h4>Android platform compatibility</h4>
+ <h4 id="platform-compat">Android platform compatibility</h4>
<ul>
- <li>The native libraries created by the Android NDK can only be used on devices running the
- Android 1.5 platform version or later. This is due to toolchain and ABI related changes that
- make the native libraries incompatible with 1.0 and 1.1 system images.</li>
-
- <li>For this reason, you should use native libraries produced with the NDK in applications that
- are deployable to devices running the Android 1.5 platform version or later.</li>
+ <li>The native libraries created by the Android NDK can only be used on devices running
+ specific minimum Android platform versions. The minimum required platform version depends on
+ the CPU architecture of the devices you are targeting. The following table details which
+ Android platform versions are compatible with native code developed for specific CPU
+ architectures.
+
+ <table style="margin:1em;">
+ <tr>
+ <th>Native Code CPU Architecture Used</th>
+ <th>Compatible Android Platform(s)</th>
+ </tr>
+
+ <tr>
+ <td>ARM, ARM-NEON</td>
+ <td>Android 1.5 (API Level 3) and higher</td>
+ </tr>
+
+ <tr>
+ <td>x86</td>
+ <td>Android 2.3 (API Level 9) and higher</td>
+ </tr>
+
+ <tr>
+ <td>MIPS</td>
+ <td>Android 2.3 (API Level 9) and higher</td>
+ </tr>
+ </table>
+
+ <p>These requirements mean you can use native libraries produced with the NDK in
+ applications that are deployable to ARM-based devices running Android 1.5 or later. If you are
+ deploying native libraries to x86 and MIPS-based devices, your application must target Android
+ 2.3 or later.</p>
+ </li>
<li>To ensure compatibility, an application using a native library produced with the NDK
<em>must</em> declare a <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>
&lt;uses-sdk&gt;</code></a> element in its manifest file, with an
<code>android:minSdkVersion</code> attribute value of "3" or higher. For example:
- <pre style="margin:1em;">
+
+<pre style="margin:1em;">
&lt;manifest&gt;
&lt;uses-sdk android:minSdkVersion="3" /&gt;
...
@@ -498,8 +527,8 @@ later)</li>
<li>If you use this NDK to create a native library that uses the OpenGL ES APIs, the
application containing the library can be deployed only to devices running the minimum platform
versions described in the table below. To ensure compatibility, make sure that your application
- declares the proper <code>android:minSdkVersion</code> attribute value, as given in the
- table.</li>
+ declares the proper <code>android:minSdkVersion</code> attribute value, as shown in the
+ following table.</li>
<li style="list-style: none; display: inline">
<table style="margin:1em;">
@@ -514,7 +543,7 @@ later)</li>
<tr>
<td>OpenGL ES 1.1</td>
- <td>Android 1.6 and higher</td>
+ <td>Android 1.6 (API Level 4) and higher</td>
<td><code>android:minSdkVersion="4"</code></td>
</tr>
@@ -522,14 +551,14 @@ later)</li>
<tr>
<td>OpenGL ES 2.0</td>
- <td>Android 2.0 and higher</td>
+ <td>Android 2.0 (API Level 5) and higher</td>
<td><code>android:minSdkVersion="5"</code></td>
</tr>
</table>
<p>For more information about API Level and its relationship to Android platform versions,
- see <a href="{@docRoot}guide/appendix/api-levels.html">Android API Levels</a>.</p>
+ see <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">Android API Levels</a>.</p>
</li>
<li>Additionally, an application using the OpenGL ES APIs should declare a
diff --git a/docs/html/tools/sdk/older_releases.jd b/docs/html/tools/sdk/older_releases.jd
new file mode 100644
index 000000000000..bb274b67aa7a
--- /dev/null
+++ b/docs/html/tools/sdk/older_releases.jd
@@ -0,0 +1,613 @@
+page.title=SDK Archives
+@jd:body
+
+<p>This page provides a full list of archived and obsolete SDK releases,
+including non-current versions of active releases and "early look" versions that
+were released before Android 1.0. <strong>These are provided for
+informational and archival purposes only</strong>.</p>
+
+<div class="special">
+<p>If you are just starting to develop applications for Android, please
+download the current <a href="{@docRoot}sdk/index.html">Android
+SDK</a>. With the current Android SDK, you can add any current and previous
+version of the Android platform as a component and use it for
+development and testing.</p>
+<p>If you already have an Android SDK for platform version 1.6 or newer, then
+you do not need to install a new SDK&mdash;especially not one from this page.
+You should install older platforms as components of your existing SDK.
+See <a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a>.</p>
+</div>
+
+
+<h2>Archived SDKs</h2>
+
+<p>The tables below provides Android SDKs that are current in terms of their
+platform version, but do not provide the latest Android development
+environment and tools. Instead of downloading one of these, as a separate
+SDK for each version of the platform, you should instead use the new
+version-neutral Android SDK to download each version of
+the Android platfrom as an individual component.</p>
+
+<p>Please download the current <a
+href="http://developer.android.com/sdk/index.html">Android SDK</a>.</p>
+
+
+<h3>Release 1.6 r1</h3>
+ <p><em>September 2009 - <a href="RELEASENOTES.html#1.6_r1">Release
+Notes</a></em></p>
+
+ <table class="download">
+ <tr>
+ <th>Platform</th>
+ <th>Package</th>
+ <th>Size</th>
+ <th>MD5 Checksum</th>
+ </tr>
+ <tr>
+ <td>Windows</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-windows-1.6_r1.zip">android-sdk-
+windows-1 .6_r1.zip</a>
+ </td>
+ <td>260529085 bytes</td>
+ <td>2bcbacbc7af0363058ca1cac6abad848</td>
+ </tr>
+ <tr class="alt-color">
+ <td>Mac OS X (intel)</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-mac_x86-1.6_r1.zip">android-sdk-
+mac_x86-1 .6_r1.zip</a>
+ </td>
+ <td>247412515 bytes</td>
+ <td>eb13cc79602d492e89103efcf48ac1f6</td>
+ </tr>
+ <tr>
+ <td>Linux (i386)</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-linux_x86-1.6_r1.tgz">android-
+sdk- linux_x86-1.6_r1.tgz</a>
+ </td>
+ <td>238224860 bytes</td>
+ <td>b4bf0e610ff6db2fb6fb09c49cba1e79</td>
+ </tr>
+
+ </table>
+
+
+<h3>Release 1.5 r3</h3>
+ <p><em>July 2009 - <a href="RELEASENOTES.html#1.5_r3">Release
+Notes</a></em></p>
+
+ <table class="download">
+ <tr>
+ <th>Platform</th>
+ <th>Package</th>
+ <th>Size</th>
+ <th>MD5 Checksum</th>
+ </tr>
+ <tr>
+ <td>Windows</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-windows-1.5_r3.zip">android-sdk-
+windows-1 .5_r3.zip</a>
+ </td>
+ <td>191477853 bytes</td>
+ <td>1725fd6963ce69102ba7192568dfc711</td>
+ </tr>
+ <tr class="alt-color">
+ <td>Mac OS X (intel)</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-mac_x86-1.5_r3.zip">android-sdk-
+mac_x86-1 .5_r3.zip</a>
+ </td>
+ <td>183024673 bytes</td>
+ <td>b1bafdaefdcec89a14b604b504e7daec</td>
+ </tr>
+ <tr>
+ <td>Linux (i386)</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-linux_x86-1.5_r3.zip">android-
+sdk- linux_x86-1.5_r3.zip</a>
+ </td>
+ <td>178117561 bytes</td>
+ <td>350d0211678ced38da926b8c9ffa4fac</td>
+ </tr>
+
+ </table>
+
+
+<h3>Release 1.1 r1</h3>
+ <p><em>February 2009 - <a href="RELEASENOTES.html#1.1_r1">Release
+Notes</a></em></p>
+
+ <table class="download">
+ <tr>
+ <th>Platform</th>
+ <th>Package</th>
+ <th>Size</th>
+ <th>MD5 Checksum</th>
+ </tr>
+ <tr>
+ <td>Windows</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-windows-1.1_r1.zip">android-sdk-
+windows-1
+.1_r1.zip</a>
+ </td>
+ <td>86038515 bytes</td>
+ <td>8c4b9080b430025370689e03d20842f3</td>
+ </tr>
+ <tr class="alt-color">
+ <td>Mac OS X (intel)</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-mac_x86-1.1_r1.zip">android-sdk-
+mac_x86-1
+.1_r1.zip</a>
+ </td>
+ <td>79046151 bytes</td>
+ <td>becf0f1763d61eedce15d2a903d6c1dd</td>
+ </tr>
+ <tr>
+ <td>Linux (i386)</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-linux_x86-1.1_r1.zip">android-
+sdk-
+linux_x86-1.1_r1.zip</a>
+ </td>
+ <td>79345522 bytes</td>
+ <td>ebcb16b0cd4aef198b4dd9a1418efbf1</td>
+ </tr>
+
+ </table>
+
+
+<h3>Release 1.0 r2</h3>
+ <p><em>November 2008 - <a href="RELEASENOTES.html#1.0_r2">Release
+Notes</a></em></p>
+
+ <table class="download">
+ <tr>
+ <th>Platform</th>
+ <th>Package</th>
+ <th>Size</th>
+ <th>MD5 Checksum</th>
+ </tr>
+ <tr>
+ <td>Windows</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-windows-1.0_r2.zip">android-sdk-
+windows-1
+.0_r2.zip</a>
+ </td>
+ <td>98360564 bytes</td>
+ <td>a5e1af8ac145946b4a9627516ad4a711</td>
+ </tr>
+ <tr class="alt-color">
+ <td>Mac OS X (intel)</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-mac_x86-1.0_r2.zip">android-sdk-
+mac_x86-1
+.0_r2.zip</a>
+ </td>
+ <td>93771410 bytes</td>
+ <td>87b99d5e9f59b78363a63200c11498e8</td>
+ </tr>
+ <tr>
+ <td>Linux (i386)</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-linux_x86-1.0_r2.zip">android-
+sdk-
+linux_x86-1.0_r2.zip</a>
+ </td>
+ <td>94186463 bytes</td>
+ <td>a1f3b6d854596f850f5008856d0f380e</td>
+ </tr>
+
+ </table>
+
+
+
+
+<h2>Obsolete SDK Releases</h2>
+
+<p>These tables provide Android SDK releases that have been superceded by
+an active release (shown above) and that are now obsolete.</p>
+
+
+<h3>Release 1.5 r2</h3>
+ <p><em>May 2009 - <a href="RELEASENOTES.html#1.5_r2">Release
+Notes</a></em></p>
+
+ <table class="download">
+ <tr>
+ <th>Platform</th>
+ <th>Package</th>
+ <th>Size</th>
+ <th>MD5 Checksum</th>
+ </tr>
+ <tr>
+ <td>Windows</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-windows-1.5_r2.zip">android-sdk-
+windows-1 .5_r2.zip</a>
+ </td>
+ <td>178346828 bytes</td>
+ <td>ba54ac6bda45921d442b74b6de6ff6a9</td>
+ </tr>
+ <tr class="alt-color">
+ <td>Mac OS X (intel)</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-mac_x86-1.5_r2.zip">android-sdk-
+mac_x86-1 .5_r2.zip</a>
+ </td>
+ <td>169945128 bytes</td>
+ <td>f4e06a5194410243f213d0177713d6c9</td>
+ </tr>
+ <tr>
+ <td>Linux (i386)</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-linux_x86-1.5_r2.zip">android-
+sdk- linux_x86-1.5_r2.zip</a>
+ </td>
+ <td>165035130 bytes</td>
+ <td>1d3c3d099e95a31c43a7b3e6ae307ed3</td>
+ </tr>
+
+ </table>
+
+
+<h3>Release 1.5 r1</h3>
+ <p><em>April 2009 - <a href="RELEASENOTES.html#1.5_r1">Release
+Notes</a></em></p>
+
+ <table class="download">
+ <tr>
+ <th>Platform</th>
+ <th>Package</th>
+ <th>Size</th>
+ <th>MD5 Checksum</th>
+ </tr>
+ <tr>
+ <td>Windows</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-windows-1.5_r1.zip">android-sdk-
+windows-1 .5_r1.zip</a>
+ </td>
+ <td>176263368 bytes</td>
+ <td>42be980eb2d3efaced01ea6c32c0045f</td>
+ </tr>
+ <tr class="alt-color">
+ <td>Mac OS X (intel)</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-mac_x86-1.5_r1.zip">android-sdk-
+mac_x86-1 .5_r1.zip</a>
+ </td>
+ <td>167848675 bytes</td>
+ <td>5b2a8d9f096032db4a75bfa0d689a51b</td>
+ </tr>
+ <tr>
+ <td>Linux (i386)</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-linux_x86-1.5_r1.zip">android-
+sdk- linux_x86-1.5_r1.zip</a>
+ </td>
+ <td>162938845 bytes</td>
+ <td>2addfd315da0ad8b5bde6b09d5ff3b06</td>
+ </tr>
+
+ </table>
+
+
+<h3>Release 1.0 r1</h3>
+ <p><em>September 23, 2008 - <a href="RELEASENOTES.html#1.0_r1">Release
+Notes</a></em></p>
+
+ <table class="download">
+ <tr>
+ <th>Platform</th>
+ <th>Package</th>
+ <th>Size</th>
+ <th>MD5 Checksum</th>
+ </tr>
+ <tr>
+ <td>Windows</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-windows-1.0_r1.zip">android-sdk-
+windows-1 .0_r1.zip</a>
+ </td>
+ <td>89.7 MB bytes</td>
+ <td>d69f4ee93d4010f726c04302662fd999</td>
+ </tr>
+ <tr class="alt-color">
+ <td>Mac OS X (intel)</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-mac_x86-1.0_r1.zip">android-sdk-
+mac_x86-1 .0_r1.zip</a>
+ </td>
+ <td>87.5 MB bytes</td>
+ <td>564876ada22872e50c2866806de9fc5c</td>
+ </tr>
+ <tr>
+ <td>Linux (i386)</td>
+ <td>
+ <a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-linux_x86-1.0_r1.zip">android-
+sdk- linux_x86-1.0_r1.zip</a>
+ </td>
+ <td>87.8 MB bytes</td>
+ <td>2660b4029039b7d714e59827e9a9a11d</td>
+ </tr>
+
+ </table>
+
+
+
+
+<h2>Non-Compatible SDK Releases</h2>
+
+<!-- <div class="special"> -->
+<p>The SDKs listed below are "early-look" versions that were released in
+ the year preceding the full release of Android 1.0 in September 2008. Because
+ these early-look SDKs were released before the Android 1.0 API specification was
+ finalized, they do not provide a compliant Android execution environment.
+ Consequently, applications that you develop in these SDKs will not be able to
+ run on any Android-powered devices.</p>
+
+<p>If you have an older application that you built in one of the early-look
+SDKs, you must migrate it to the Android 1.0 SDK (or later release) before you
+will be able to deploy it to an Android-powered device. To help with this
+migration, each SDK package below provides information about API changes from
+the previous version. You can find the migration information in the
+documentation included in each SDK package.</p>
+<!-- </div> -->
+
+<h4>Version 0.9 Beta</h4>
+<p><em>August 18, 2008 - <a href="OLD_RELEASENOTES.html#0.9_beta">Release Notes</a></em></p>
+ <table>
+ <tr>
+ <th colspan="2">Package</th>
+ <th>Size</th>
+ <th>MD5 Checksum</th>
+ </tr>
+ <tr>
+ <td>Windows</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-windows-0.9_beta.zip">
+android-sdk-windows-0.9_beta.zip</a></td>
+ <td>93,126,573 bytes</td>
+ <td>305031ad8335d1b6040bdd5a65349d6d</td>
+ </tr>
+ <tr class="alt">
+ <td>Mac OS X (intel)</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-mac_x86-0.9_beta.zip">
+android-sdk-mac_x86-0.9_beta.zip</a></td>
+ <td>91,374,464 bytes</td>
+ <td>9a6969159091cede46302e11049fe3ca</td>
+ </tr>
+ <tr>
+ <td>Linux (i386)</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk-linux_x86-0.9_beta.zip"
+>android-sdk-linux_x86-0.9_beta.zip</a></td>
+ <td>91,821,068 bytes</td>
+ <td>077e5ef549dd9c5be54bd88e6a8e196c</td>
+ </tr>
+ </table>
+
+<h4>Version m5-rc15</h4>
+ <p><em>March 3, 2008 - <a href="OLD_RELEASENOTES.html#m5-rc15">Release Notes</a></em></p>
+ <table>
+ <tr>
+ <th colspan="2">Package</th>
+ <th>Size</th>
+ <th>MD5 Checksum</th>
+ </tr>
+ <tr>
+ <td>Windows</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk_m5-rc15_windows.zip">
+android-sdk_m5-rc15_windows.zip</a></td>
+ <td>79 MB</td>
+ <td>ecce40bc50201886d95ba2690cdbc5ce</td>
+ </tr>
+ <tr class="alt">
+ <td>Mac OS X (intel)</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk_m5-rc15_mac-x86.zip">
+android-sdk_m5-rc15_mac-x86.zip</a></td>
+ <td>76 MB</td>
+ <td>45a6385bbc1b2cb295409cfc81fb04b4</td>
+ </tr>
+ <tr>
+ <td>Linux (i386)</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk_m5-rc15_linux-x86.zip">
+android-sdk_m5-rc15_linux-x86.zip</a></td>
+ <td>76 MB</td>
+ <td>e913f785afecdeed34c30639fd8c5862</td>
+ </tr>
+ </table>
+
+ <h4>Version m5-rc14</h4>
+ <p><em>February 12, 2008 - <a href="OLD_RELEASENOTES.html#m5-rc14">Release Notes</a></em></p>
+ <table>
+ <tr>
+ <th colspan="2">Package</th>
+ <th>Size</th>
+ <th>MD5 Checksum</th>
+ </tr>
+ <tr>
+ <td>Windows</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk_m5-rc14_windows.zip">
+android-sdk_m5-rc14_windows.zip</a></td>
+ <td>79 MB</td>
+ <td>ecc75c1e69588350634ca25867ce05a0</td>
+ </tr>
+ <tr class="alt">
+ <td>Mac OS X (intel)</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk_m5-rc14_mac-x86.zip">
+android-sdk_m5-rc14_mac-x86.zip</a></td>
+ <td>76 MB</td>
+ <td>844c80d0adb1a326f5a9fff262c61efc</td>
+ </tr>
+ <tr>
+ <td>Linux (i386)</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android-sdk_m5-rc14_linux-x86.zip">
+android-sdk_m5-rc14_linux-x86.zip</a></td>
+ <td>76 MB</td>
+ <td>f8b863c8a880afe9bb84124f5976aab1</td>
+ </tr>
+ </table>
+
+
+
+
+ <h4>Version m3-rc37a</h4>
+ <p><em>December 14, 2007 - <a href="OLD_RELEASENOTES.html#m3-rc37a">Release Notes</a></em></p>
+ <table>
+ <tr>
+ <th colspan="2">Package</th>
+ <th>Size</th>
+ <th>MD5 Checksum</th>
+ </tr>
+ <tr>
+ <td>Windows</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android_sdk_windows_m3-rc37a.zip">
+android_sdk_windows_m3-rc37a.zip</a></td>
+ <td>58 MB</td>
+ <td>5db5aea20a2c2f010baefc4b1091a575</td>
+ </tr>
+ <tr class="alt">
+ <td>Mac OS X (intel)</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android_sdk_darwin_m3-rc37a.zip">
+android_sdk_darwin_m3-rc37a.zip</a></td>
+ <td>54 MB</td>
+ <td>0b22e73fbd07b4af4009387afce3a37f</td>
+ </tr>
+ <tr>
+ <td>Linux (i386)</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android_sdk_linux_m3-rc37a.zip">
+android_sdk_linux_m3-rc37a.zip</a></td>
+ <td>54 MB</td>
+ <td>41285beecc4f9926e6ecf5f12610b356</td>
+ </tr>
+ </table>
+
+
+
+
+ <h4>Version m3-rc22a</h4>
+ <p><em>November 16, 2007 - <a href="OLD_RELEASENOTES.html#m3-rc22a">Release Notes</a></em></p>
+ <table>
+ <tr>
+ <th colspan="2">Package</th>
+ <th>Size</th>
+ <th>MD5 Checksum</th>
+ </tr>
+ <tr>
+ <td>Windows</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android_sdk_windows_m3-rc22a.zip">
+android_sdk_windows_m3-rc22a.zip</a></td>
+ <td>59 MB</td>
+ <td>aa3dee05a9872752a3bc4efd0f93e98b</td>
+ </tr>
+ <tr class="alt">
+ <td>Mac OS X (intel)</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android_sdk_darwin_m3-rc22a.zip">
+android_sdk_darwin_m3-rc22a.zip</a></td>
+ <td>55 MB</td>
+ <td>0547f45614ad94c3af22c3c0aa6f709f</td>
+ </tr>
+ <tr>
+ <td>Linux (i386)</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android_sdk_linux_m3-rc22a.zip">
+android_sdk_linux_m3-rc22a.zip</a></td>
+ <td>55 MB</td>
+ <td>84b3455de5cdfd841a172c13d24c382e</td>
+ </tr>
+ </table>
+
+
+
+
+ <h4>Version m3-rc20a</h4>
+ <p><em>November 12, 2007 - <a href="OLD_RELEASENOTES.html#m3-rc20a">Release Notes</a></em></p>
+ <table>
+ <tr>
+ <th colspan="2">Package</th>
+ <th>Size</th>
+ <th>MD5 Checksum</th>
+ </tr>
+ <tr>
+ <td>Windows</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android_sdk_windows_m3-rc20a.zip">
+android_sdk_windows_m3-rc20a.zip</a></td>
+ <td>59 MB</td>
+ <td>a404b875708df7339ba77bdf2e08dc06</td>
+ </tr>
+ <tr class="alt">
+ <td>Mac OS X (intel)</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android_sdk_darwin_m3-rc20a.zip">
+android_sdk_darwin_m3-rc20a.zip</a></td>
+ <td>55 MB</td>
+ <td>8fc29aeaa45eda84bfac854ebd02a6da</td>
+ </tr>
+ <tr>
+ <td>Linux (i386)</td>
+ <td>
+<a
+href="{@docRoot}sdk/download.html?v=archives/android_sdk_linux_m3-rc20a.zip">
+android_sdk_linux_m3-rc20a.zip</a></td>
+ <td>55 MB</td>
+ <td>9196759df9b69cd89a220b156f133364</td>
+ </tr>
+ </table>
diff --git a/docs/html/tools/sdk/platforms.jd b/docs/html/tools/sdk/platforms.jd
new file mode 100644
index 000000000000..27e89dea5b6c
--- /dev/null
+++ b/docs/html/tools/sdk/platforms.jd
@@ -0,0 +1,9 @@
+page.title=Android Development Platforms
+
+@jd:body
+
+
+
+<p>A page that lists platforms and links to release notes. Links to dashboards etc.</p>
+
+
diff --git a/docs/html/tools/sdk/preview/features.jd b/docs/html/tools/sdk/preview/features.jd
new file mode 100644
index 000000000000..02897cd5c304
--- /dev/null
+++ b/docs/html/tools/sdk/preview/features.jd
@@ -0,0 +1,8 @@
+@jd:body
+
+<script type="text/javascript">
+ document.location=toRoot+"about/versions/android-3.0.html"
+</script>
+
+<p>You should have already been redirected by your browser. Please go to the
+<a href="{@docRoot}about/versions/android-3.0.html">Android 3.0 Platform</a>.</p> \ No newline at end of file
diff --git a/docs/html/sdk/preview/index.jd b/docs/html/tools/sdk/preview/index.jd
index ed8f7e0d5522..ed8f7e0d5522 100644
--- a/docs/html/sdk/preview/index.jd
+++ b/docs/html/tools/sdk/preview/index.jd
diff --git a/docs/html/tools/sdk/preview/installing.jd b/docs/html/tools/sdk/preview/installing.jd
new file mode 100644
index 000000000000..c40e531cdf17
--- /dev/null
+++ b/docs/html/tools/sdk/preview/installing.jd
@@ -0,0 +1,8 @@
+@jd:body
+
+<script type="text/javascript">
+ document.location=toRoot+"sdk/installing/index.html"
+</script>
+
+<p>You should have already been redirected by your browser. Please go to
+<a href="{@docRoot}sdk/installing/index.html">Installing the SDK</a>.</p> \ No newline at end of file
diff --git a/docs/html/sdk/preview/requirements.jd b/docs/html/tools/sdk/preview/requirements.jd
index b5aed80ef644..b5aed80ef644 100644
--- a/docs/html/sdk/preview/requirements.jd
+++ b/docs/html/tools/sdk/preview/requirements.jd
diff --git a/docs/html/sdk/preview/upgrading.jd b/docs/html/tools/sdk/preview/upgrading.jd
index 1c53bdbfe07f..1c53bdbfe07f 100644
--- a/docs/html/sdk/preview/upgrading.jd
+++ b/docs/html/tools/sdk/preview/upgrading.jd
diff --git a/docs/html/sdk/tools-notes.jd b/docs/html/tools/sdk/tools-notes.jd
index 062f8f1b75c7..f08209b31f1c 100644
--- a/docs/html/sdk/tools-notes.jd
+++ b/docs/html/tools/sdk/tools-notes.jd
@@ -12,8 +12,7 @@ latest revision of the SDK Tools in the <code>&lt;sdk&gt;/tools</code> directory
of the SDK Tools, use the <em>Android SDK Manager</em> to get the
update, rather than downloading a new SDK starter package. For more information
about how to update, see <a
-href="{@docRoot}sdk/adding-components.html#UpdatingComponents">Updating SDK
-Components</a>.</p>
+href="{@docRoot}sdk/exploring.html#UpdatingComponents">Exploring the SDK</a>.</p>
<h2 id="notes">Revisions</h2>
@@ -44,11 +43,10 @@ function toggleDiv(link) {
</script>
<style>
.toggleable {
-padding: .25em 1em;
+padding: 5px 0 0;
}
.toggleme {
- padding: 1em 1em 0 2em;
- line-height:1em;
+ padding: 10px 0 0 20px;
}
.toggleable a {
text-decoration:none;
@@ -60,7 +58,7 @@ padding: .25em 1em;
display:none;
}
#jd-content .toggle-img {
- margin:0;
+ margin:0 5px 3px 0;
}
</style>
@@ -72,7 +70,7 @@ padding: .25em 1em;
<div class="toggleme">
<p class="note"><strong>Note:</strong> This update of SDK Tools is only available through
-the <a href="{@docRoot}sdk/adding-components.html">Android SDK Manager</a>. Use this tool to
+the <a href="{@docRoot}sdk/exploring.html">Android SDK Manager</a>. Use this tool to
download and install this update.</p>
<dl>
@@ -82,7 +80,7 @@ download and install this update.</p>
<li>Android SDK Platform-tools revision 9 or later.</li>
<li>If you are developing in Eclipse with ADT, note that the SDK Tools r19 is designed for
use with ADT 18.0.0 and later. If you haven't already, we highly recommend updating your
- <a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin</a> to 18.0.0.</li>
+ <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a> to 18.0.0.</li>
<li>If you are developing outside Eclipse, you must have
<a href="http://ant.apache.org/">Apache Ant</a> 1.8 or later.</li>
</ul>
@@ -117,7 +115,7 @@ acceleration.</li>
<li>Android SDK Platform-tools revision 9 or later.</li>
<li>If you are developing in Eclipse with ADT, note that the SDK Tools r18 is designed for
use with ADT 18.0.0 and later. If you haven't already, we highly recommend updating your
- <a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin</a> to 18.0.0.</li>
+ <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a> to 18.0.0.</li>
<li>If you are developing outside Eclipse, you must have
<a href="http://ant.apache.org/">Apache Ant</a> 1.8 or later.</li>
</ul>
@@ -159,7 +157,7 @@ in some cases.</li>
<li>Android SDK Platform-tools revision 9 or later.</li>
<li>If you are developing in Eclipse with ADT, note that the SDK Tools r17 is designed for
use with ADT 17.0.0 and later. If you haven't already, we highly recommend updating your
- <a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin</a> to 17.0.0.</li>
+ <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a> to 17.0.0.</li>
<li>If you are developing outside Eclipse, you must have
<a href="http://ant.apache.org/">Apache Ant</a> 1.8 or later.</li>
</ul>
@@ -171,11 +169,11 @@ in some cases.</li>
<ul>
<li>Added support for hardware accelerated graphics rendering. This feature requires an
API Level 15, Revision 3 or later system image.
-(<a href="{@docRoot}guide/developing/devices/emulator.html#accel-graphics">more info</a>)
+(<a href="{@docRoot}tools/devices/emulator.html#accel-graphics">more info</a>)
</li>
<li>Added support for running Android x86 system images in virtualization mode on
Windows and Mac OS X.
-(<a href="{@docRoot}guide/developing/devices/emulator.html#accel-vm">more info</a>)
+(<a href="{@docRoot}tools/devices/emulator.html#accel-vm">more info</a>)
<p class="note"><strong>Note:</strong> Use the Android SDK Manager to download and
install x86 system images. Android x86 system images are not available for all API levels.</p>
</li>
@@ -263,7 +261,7 @@ ignore attribute. (<a
<li>Android SDK Platform-tools revision 9 or later.</li>
<li>If you are developing in Eclipse with ADT, note that the SDK Tools r16 is designed for use
with ADT 16.0.0 and later. If you haven't already, we highly recommend updating your
- <a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin</a> to 16.0.0.</li>
+ <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a> to 16.0.0.</li>
<li>If you are developing outside Eclipse, you must have <a href="http://ant.apache.org/">Apache
Ant</a> 1.8 or later.</li>
</ul>
@@ -311,7 +309,7 @@ ignore attribute. (<a
<ul><li>Android SDK Platform-tools revision 9 or later.</li>
<li>If you are developing in Eclipse with ADT, note that the SDK Tools r15 is designed for use
with ADT 15.0.0 and later. If you haven't already, we highly recommend updating your <a
- href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin</a> to 15.0.0.</li>
+ href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a> to 15.0.0.</li>
<li>If you are developing outside Eclipse, you must have <a href="http://ant.apache.org/">Apache
Ant</a> 1.8 or later.</li>
</ul>
@@ -359,7 +357,7 @@ ignore attribute. (<a
<ul><li>Android SDK Platform-tools revision 8 or later.</li>
<li>If you are developing in Eclipse with ADT, note that the SDK Tools r14 is designed for use
with ADT 14.0.0 and later. If you haven't already, we highly recommend updating your <a
- href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin</a> to 14.0.0.</li>
+ href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a> to 14.0.0.</li>
<li>If you are developing outside Eclipse, you must have <a href="http://ant.apache.org/">Apache
Ant</a> 1.8 or later.</li>
</ul>
@@ -378,7 +376,7 @@ ignore attribute. (<a
<li>Changed Ant <code>build.xml</code> file to support improvements to the
build system and added and modified Ant commands to support these changes. For a list of Ant
commands, see the
-<a href="{@docRoot}guide/developing/building/building-cmdline.html#AntReference">Ant Command
+<a href="{@docRoot}tools/building/building-cmdline.html#AntReference">Ant Command
Reference</a>.</li>
<li>Changed how library projects are built.</li>
<li>Improved incremental builds, so that resource compilation runs less frequently. Builds no
@@ -408,7 +406,7 @@ SDK Tools, Revision 13</a> <em>(September 2011)</em>
<dd>
<p>If you are developing in Eclipse with ADT, note that the SDK Tools r13 is designed for use with
ADT 12.0.0 and later. If you haven't already, we highly recommend updating your <a
-href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin</a> to 12.0.0.</p>
+href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a> to 12.0.0.</p>
<p>If you are developing outside Eclipse, you must have <a href="http://ant.apache.org/">Apache
Ant</a> 1.8 or later.</p>
@@ -437,7 +435,7 @@ SDK Tools, Revision 12</a> <em>(July 2011)</em>
<dd>
<p>If you are developing in Eclipse with ADT, note that the SDK Tools r12 is designed for use with
ADT 12.0.0 and later. If you haven't already, we highly recommend updating your <a
-href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin</a> to 12.0.0.</p>
+href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a> to 12.0.0.</p>
<p>If you are developing outside Eclipse, you must have <a href="http://ant.apache.org/">Apache
Ant</a> 1.8 or later.</p>
@@ -463,7 +461,7 @@ SDK Tools, Revision 11</a> <em>(May 2011)</em>
<dd>
<p>If you are developing in Eclipse with ADT, note that the SDK Tools r11 is designed for use with
ADT 10.0.1 and later. If you haven't already, we highly recommend updating your <a
-href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin</a> to 10.0.1.</p>
+href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a> to 10.0.1.</p>
<p>If you are developing outside Eclipse, you must have <a href="http://ant.apache.org/">Apache
Ant</a> 1.8 or later.</p>
@@ -587,8 +585,8 @@ Ant</a> 1.8 or later.</p>
(Android 2.1, Android 2.2, and so on) use the same (latest) version of build
tools such as <code>adb</code>, <code>aapt</code>, <code>aidl</code>, and
<code>dx</code>. To download the Platform-tools component, use the Android SDK
-Manager, as described in <a href="adding-components.html">Adding SDK
-Components</a></p>
+Manager, as described in <a href="{@docRoot}sdk/exploring.html">Exploring the
+SDK</a></p>
<dt>Upgrading from SDK Tools r7:</dt>
<dd>
@@ -621,7 +619,7 @@ build.</li>
configuration file using the <code>android</code> tool &mdash; the build tools
then automatically run ProGuard against the project sources during the build.
For more information, see the <a
-href="{@docRoot}guide/developing/tools/proguard.html">ProGuard</a>
+href="{@docRoot}tools/help/proguard.html">ProGuard</a>
documentation. </li>
<li>New overridable Ant javac properties: <code>java.encoding</code>,
<code>java.source</code>, and <code>java.target</code> (default values are
@@ -688,7 +686,7 @@ code and resources in a separate development project. You can then reference the
library project from other Android projects and, at build time, the tools
compile the shared code and resources as part of the dependent applications.
More information about this feature is available in the <a
-href="{@docRoot}guide/developing/projects/index.html#LibraryProjects">Creating and Managing Projects</a> document.</p>
+href="{@docRoot}tools/projects/index.html#LibraryProjects">Creating and Managing Projects</a> document.</p>
<p>If you are developing in Eclipse, <a href="eclipse-adt.html">ADT</a>
provides the equivalent library project support.</p>
</dd>
@@ -850,7 +848,7 @@ tool that helps you optimize your layout hierarchies. When run against your
layout files, the tool analyzes their hierarchies and notifies you of
inefficiencies and other potential issues. The tool also provides simple
solutions for the issues it finds. For usage, see <a
-href="/guide/developing/tools/layoutopt.html">layoutopt</a>.</p>
+href="/tools/help/layoutopt.html">layoutopt</a>.</p>
</dd>
</dl>
</div>
diff --git a/docs/html/tools/sdk/usb-drivers.jd b/docs/html/tools/sdk/usb-drivers.jd
new file mode 100644
index 000000000000..27e89dea5b6c
--- /dev/null
+++ b/docs/html/tools/sdk/usb-drivers.jd
@@ -0,0 +1,9 @@
+page.title=Android Development Platforms
+
+@jd:body
+
+
+
+<p>A page that lists platforms and links to release notes. Links to dashboards etc.</p>
+
+
diff --git a/docs/html/tools/sdk/win-usb.jd b/docs/html/tools/sdk/win-usb.jd
new file mode 100644
index 000000000000..d32234002843
--- /dev/null
+++ b/docs/html/tools/sdk/win-usb.jd
@@ -0,0 +1,172 @@
+page.title=Google USB Driver
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#notes">Revisions</a></li>
+ <li><a href="#WinUsbDriver">Downloading the Google USB Driver</a></li>
+ </ol>
+ <h2>See also</h2>
+ <ol>
+ <li><a href="{@docRoot}tools/extras/oem-usb.html#InstallingDriver">Installing a USB Driver</a></li>
+ <li><a href="{@docRoot}tools/device.html">Using Hardware Devices</a></li>
+ <li><a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a></li>
+ </ol>
+</div>
+</div>
+
+<p>The Google USB driver is a downloadable component for the Android SDK, available
+from the SDK Manager. The driver is for Windows only and provides the necessary drivers for the
+following devices:</p>
+ <ul>
+ <li>ADP1 / T-Mobile G1*</li>
+ <li>ADP2 / Google Ion / T-Mobile myTouch 3G*</li>
+ <li>Verizon Droid*</li>
+ <li>Nexus One</li>
+ <li>Nexus S</li>
+ </ul>
+ <p>* <em>Or similar hardware on other carriers</em></p>
+
+ <p>All other devices require Windows drivers provided by the hardware manufacturer, as listed in
+the <a href="{@docRoot}tools/extras/oem-usb.html">OEM USB Drivers</a> document. The Galaxy Nexus
+driver is also distributed by <a
+href="http://www.samsung.com/us/support/downloads/verizon-wireless/SCH-I515MSAVZW">Samsung</a>
+(listed as model SCH-I515).</p>
+
+<p class="note"><strong>Note:</strong>
+If you're developing on Mac OS X or Linux, then you do not need to install a USB driver. To start
+developing with your device, also read <a href="{@docRoot}tools/device.html">Using
+Hardware Devices</a>.</p>
+
+<p>The sections below provide instructions on how to download and install the Google USB Driver
+for Windows. </p>
+
+
+
+
+<h2 id="notes">Revisions</h2>
+
+<p>The sections below provide notes about successive revisions of the USB Driver
+for Windows, as denoted by revision number. To determine what revision of the
+USB Driver for Windows you are using, refer to the "Installed Packages" listing
+in the Android SDK Manager.</p>
+
+<script type="text/javascript">
+function toggleDiv(link) {
+ var toggleable = $(link).parent();
+ if (toggleable.hasClass("closed")) {
+ //$(".toggleme", toggleable).slideDown("fast");
+ toggleable.removeClass("closed");
+ toggleable.addClass("open");
+ $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/triangle-opened.png"));
+ } else {
+ //$(".toggleme", toggleable).slideUp("fast");
+ toggleable.removeClass("open");
+ toggleable.addClass("closed");
+ $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/triangle-closed.png"));
+ }
+ return false;
+}
+</script>
+<style>
+.toggleable {
+padding: .25em 1em;
+}
+.toggleme {
+ padding: 1em 1em 0 2em;
+ line-height:1em;
+}
+.toggleable a {
+ text-decoration:none;
+}
+.toggleme a {
+ text-decoration:underline;
+}
+.toggleable.closed .toggleme {
+ display:none;
+}
+#jd-content .toggle-img {
+ margin:0;
+}
+</style>
+
+<div class="toggleable opened">
+ <a href="#" onclick="return toggleDiv(this)">
+ <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px"
+width="9px" />
+USB Driver for Windows, Revision 4</a> <em>(December 2010)</em>
+ <div class="toggleme">
+
+<dl>
+<dt><p>Adds support for the Nexus S.</p></dt>
+</dl>
+ </div>
+</div>
+
+<div class="toggleable closed">
+ <a href="#" onclick="return toggleDiv(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
+width="9px" />
+USB Driver for Windows, Revision 3</a> <em>(January 2010)</em>
+ <div class="toggleme">
+
+<dl>
+<dt><p>Adds support for the Nexus One.</p></dt>
+</dl>
+ </div>
+</div>
+
+<div class="toggleable closed">
+ <a href="#" onclick="return toggleDiv(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+USB Driver for Windows, Revision 2</a> <em>(November 2009)</em>
+ <div class="toggleme">
+
+<dl>
+<dt><p>Adds support for the Verizon Droid (or similar hardware on
+other carriers).</p></dt>
+</dl>
+ </div>
+</div>
+
+<div class="toggleable closed">
+ <a href="#" onclick="return toggleDiv(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+USB Driver for Windows, Revision 1</a> <em>(October 2009)</em>
+ <div class="toggleme">
+
+<dl>
+<dt><p>Initial release of the WinUsb-based driver, with support
+for the T-Mobile G1 and myTouch 3G (and similar devices).</p></dt>
+</dl>
+ </div>
+</div>
+
+
+<h2 id="WinUsbDriver">Downloading the Google USB Driver</h2>
+
+<div class="figure" style="width:536px;margin:0">
+ <img src="{@docRoot}images/developing/sdk-usb-driver.png" alt="" />
+ <p class="img-caption"><strong>Figure 1.</strong> The SDK Manager
+ with the Google USB Driver selected.</p>
+</div>
+
+<p>The USB Driver for Windows is available for download as an optional SDK
+component. You need the driver only if you are developing on Windows and
+want to connect an Android-powered device (ADP, Nexus One, or Nexus S) to your
+development environment over USB. </p>
+
+<p>To download the driver, use the Android SDK Manager tool that is
+included with the <a href="{@docRoot}sdk/index.html">Android SDK</a>:</p>
+<ol>
+ <li>Launch the Android SDK Manager by double-clicking <code>SDK Manager.exe</code>,
+ at the root of your SDK directory.</li>
+ <li>Expand <em>Extras</em>.</li>
+ <li>Check <strong>Google USB Driver package</strong> and click <strong>Install</strong>.</li>
+ <li>Proceed to install the package. When done, the driver files are
+downloaded into the <code>&lt;sdk&gt;\extras\google\usb_driver\</code> directory.</li>
+</ol>
+
+<p>For installation information, read <a href="{@docRoot}tools/extras/oem-usb.html#InstallingDriver">Installing a USB Driver</a>.</p>
diff --git a/docs/html/resources/tutorials/testing/activity_test.jd b/docs/html/tools/testing/activity_test.jd
index f88b7687be1a..8288249ea820 100644
--- a/docs/html/resources/tutorials/testing/activity_test.jd
+++ b/docs/html/tools/testing/activity_test.jd
@@ -1,6 +1,6 @@
-page.title=Activity Testing
-parent.title=Tutorials
-parent.link=../../browser.html?tag=tutorial
+page.title=Activity Testing Tutorial
+parent.title=Testing
+parent.link=index.html
@jd:body
<div id="qv-wrapper">
<div id="qv">
@@ -54,22 +54,16 @@ parent.link=../../browser.html?tag=tutorial
<h2 id="#Appendix">Appendix</h2>
<ol>
<li>
- <a href="#InstallCompletedTestApp">Installing the Completed Test Application Java File</a>
+ <a href="#InstallCompletedTestApp">Installing the Completed Test Application File</a>
</li>
<li>
<a href="#EditorCommandLine">For Users Not Developing In Eclipse</a>
</li>
</ol>
-<h2>Related Tutorials</h2>
-<ol>
- <li>
- <a href="{@docRoot}resources/tutorials/testing/helloandroid_test.html">Hello, Testing</a>
- </li>
-</ol>
<h2>See Also</h2>
<ol>
<li>
- <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Android Applications</a>
+ <a href="{@docRoot}tools/testing/testing_android.html">Testing Fundamentals</a>
</li>
<li>
{@link android.test.ActivityInstrumentationTestCase2}
@@ -86,7 +80,7 @@ parent.link=../../browser.html?tag=tutorial
<p>
Android includes powerful tools for testing applications. The tools extend JUnit with additional features, provide convenience classes for mock Android system objects, and use
instrumentation to give you control over your main application while you are testing it. The entire Android testing environment is discussed in the document
- <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Android Applications</a>.
+ <a href="{@docRoot}tools/testing/testing_android.html">Testing Fundamentals</a>.
</p>
<p>
This tutorial demonstrates the Android testing tools by presenting a simple Android application and then leading you step-by-step through the creation of a test application for it.
@@ -135,21 +129,22 @@ parent.link=../../browser.html?tag=tutorial
</p>
<ul>
<li>
- Basic knowledge of Android programming. If you haven't yet written an Android application, do the
- <a href="{@docRoot}resources/tutorials/hello-world.html">Hello, World</a> tutorial. If you
- want to learn more about Spinner, the application under test, then you might want to visit the
- <a href="{@docRoot}resources/tutorials/views/hello-spinner.html">Hello Views &gt; Spinner</a> example.
+ Basic knowledge of Android programming. If you haven't yet written an Android application,
+ do the class
+ <a href="{@docRoot}training/basics/firstapp/index.html">Building Your First App</a>.
+ If you want to learn more about Spinner, the application under test, then you
+ might want to review the "Spinner" sample app.
</li>
<li>
Some familiarity with the Android testing framework and concepts. If you haven't explored
- Android testing yet, start by reading the Developer Guide topic <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Android Applications</a>
- or following the <a href="{@docRoot}resources/tutorials/testing/helloandroid_test.html">
- Hello, Testing</a> tutorial.
+ Android testing yet, start by reading the
+ <a href="{@docRoot}tools/testing/testing_android.html">Testing Fundamentals</a>
+ guide.
</li>
<li>
Eclipse with ADT. This tutorial describes how to set up and run a test application using
Eclipse with ADT. If you haven't yet installed Eclipse and the ADT plugin,
- follow the steps in <a href="{@docRoot}sdk/installing.html">Installing the SDK</a>
+ follow the steps in <a href="{@docRoot}sdk/installing/index.html">Installing the SDK</a>
to install them before continuing. If you are not developing in Eclipse, you will
find instructions for setting up and running the test application in the
<a href="#EditorCommandLine">appendix</a> of this document.
@@ -163,7 +158,7 @@ parent.link=../../browser.html?tag=tutorial
open the Android SDK and AVD Manager and check in the
<strong>Installed Packages</strong> panel.
If aren't sure how to download a platform into your SDK,
- read <a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>.
+ read <a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a>.
</p>
</li>
</ul>
@@ -186,63 +181,21 @@ parent.link=../../browser.html?tag=tutorial
you can install the completed SpinnerTest application first, and then follow the
text. You may get more from the tutorial, however, if you create the test application
as you go. The instructions for installing the completed test application are in the
- section <a href="#InstallCompletedTestApp">Installing the Completed Test Application Java File</a>.
+ section
+ <a href="#InstallCompletedTestApp">Installing the Completed Test Application File</a>.
</li>
</ul>
<p>
- The sample applications are provided in the SDK component named
- "Samples for SDK API 8" and in later versions of the Samples.
-</p>
-<p>
- To get started with the tutorial, first use the Android SDK and AVD manager to install an
- appropriate version of the Samples:
-</p>
-<ol>
- <li>
- In Eclipse, select <strong>Window</strong> &gt; <strong>Android SDK and AVD Manager</strong>.
- </li>
- <li>
- Open the <strong>Installed Packages</strong> panel and check whether
- &quot;Samples for SDK API 8&quot; (or higher version) is listed.
- If so, skip to the next section,
- <a href="#SetupProjects">Setting Up the Projects</a>, to get started with the tutorial.
- Otherwise, continue with the next step.
- </li>
- <li>
- Open the <strong>Available Packages</strong> panel.
- </li>
- <li>
- Select the &quot;Samples for SDK API 8&quot; component and click <strong>Install Selected</strong>.
- </li>
- <li>
- Verify and accept the component and then click <strong>Install Accepted</strong>.
- The Samples component will now be installed into your SDK.
- </li>
-</ol>
-<p>
- When the installation is complete, the applications in the
- Samples component are stored at this location on your computer:
-</p>
-<p style="margin-left:2em">
- <code>&lt;<em>sdk</em>&gt;/samples/android-8/</code>
-</p>
-<p>
- For general information about the Samples, see
- <a href="{@docRoot}resources/samples/get.html">Getting the Samples</a>
-</p>
-<p class="note">
- <strong>Note:</strong> Although the sample code for this tutorial is provided in the
- &quot;Samples for SDK API 8&quot; component, that does not imply that you need to build or
- run the application against the corresponding platform (Android 2.2).
- The API level referenced in the Samples component name indicates only the origin branch from
- which the samples were built.
+ The sample applications are described in more detail in the
+ <a href="{@docRoot}tools/samples/index.html">Samples</a> topic. Follow the instructions to
+ download the version of the samples that's appropriate for the platform you're working with.
</p>
<h2 id="SetupEmulator">Setting Up the Emulator</h2>
<p>
In this tutorial, you will use the Android emulator to run applications. The emulator needs
an Android Virtual Device (AVD) with an API level equal to or higher than the one you set for the projects in the previous step.
To find out how to check this and create the right AVD if necessary,
- see <a href="{@docRoot}guide/developing/devices/managing-avds.html">Creating an AVD</a>.
+ see <a href="{@docRoot}tools/devices/managing-avds.html">Creating an AVD</a>.
</p>
<p>
As a test of the AVD and emulator, run the SpinnerActivity application in Eclipse with ADT. When it starts,
@@ -637,7 +590,7 @@ import android.widget.SpinnerAdapter;
Code in a test application that interacts with a View of the application under test must run in the main application's thread, also
known as the <em>UI thread</em>. To do this, you use the {@link android.app.Activity#runOnUiThread(java.lang.Runnable) Activity.runOnUiThread()}
method. You pass the code to <code>runOnUiThread()</code>in an anonymous {@link java.lang.Runnable Runnable} object. To set
- the Java statements in the <code>Runnable</code> object, you override the object's {@link java.lang.Runnable#run()} method.
+ the statements in the <code>Runnable</code> object, you override the object's {@link java.lang.Runnable#run()} method.
</p>
<p>
To send key events to the UI of the application under test, you use the <a href="{@docRoot}reference/android/test/InstrumentationTestCase.html#sendKeys(int...)">sendKeys</a>() method.
@@ -789,7 +742,7 @@ import android.widget.SpinnerAdapter;
<p>
<strong>Note:</strong> If you would like to learn more about the difference between losing
focus/pausing and killing an application,
- read about the <a href="{@docRoot}guide/topics/fundamentals/activities.html#Lifecycle">activity
+ read about the <a href="{@docRoot}guide/components/activities.html#Lifecycle">activity
lifecycle</a>.
</p>
<p>
@@ -1122,7 +1075,7 @@ lifecycle</a>.
<ul>
<li>
If you haven't done so already, read the
- <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Android Applications</a>
+ <a href="{@docRoot}tools/testing/testing_android.html">Testing Fundamentals</a>
document in the <em>Dev Guide</em>. It provides an overview of how testing on Android
works. If you are just getting started with Android testing, reading that document will
help you understand the tools available to you, so that you can develop effective
@@ -1178,15 +1131,15 @@ lifecycle</a>.
</li>
</ul>
<h2 id="Appendix">Appendix</h2>
-<h3 id="InstallCompletedTestApp">Installing the Completed Test Application Java File</h3>
+<h3 id="InstallCompletedTestApp">Installing the Completed Test Application File</h3>
<p>
The recommended approach to this tutorial is to follow the instructions step-by-step and
write the test code as you go. However, if you want to do this tutorial quickly,
- you can install the entire Java file for the test application into the test project.
+ you can install the entire file for the test application into the test project.
</p>
<p>
To do this, you first create a test project with the necessary structure and files by using
- the automated tools in Eclipse. Then you exit Eclipse and copy the test application's Java file
+ the automated tools in Eclipse. Then you exit Eclipse and copy the test application's file
from the SpinnerTest sample project into your test project. The SpinnerTest sample project is
part of the Samples component of the SDK.
</p>
@@ -1194,7 +1147,7 @@ lifecycle</a>.
The result is a complete test application, ready to run against the Spinner sample application.
</p>
<p>
- To install the test application Java file, follow these steps:
+ To install the test application file, follow these steps:
</p>
<ol>
<li>
@@ -1236,11 +1189,11 @@ lifecycle</a>.
</p>
<ul>
<li>
- <a href="{@docRoot}guide/developing/tools/adb.html">adb</a> - Installs and uninstalls applications and test applications to a device or the emulator. You
+ <a href="{@docRoot}tools/help/adb.html">adb</a> - Installs and uninstalls applications and test applications to a device or the emulator. You
also use this tool to run the test application from the command line.
</li>
<li>
- <a href="{@docRoot}guide/developing/tools/android.html">android</a> - Manages projects and test projects. This tool also manages AVDs and Android platforms.
+ <a href="{@docRoot}tools/help/android.html">android</a> - Manages projects and test projects. This tool also manages AVDs and Android platforms.
</li>
</ul>
<p>
@@ -1262,7 +1215,7 @@ lifecycle</a>.
<li>
<code>SpinnerTest</code> contains all the code for the test application. If you want to run quickly through the tutorial, you can
install the test code and then follow the text. You may get more from the tutorial, however, if you write the code as you go. The instructions
- for installing the test code are in the section <a href="#InstallCompletedTestApp">Appendix: Installing the Completed Test Application</a>.
+ for installing the test code are in the section <a href="#InstallCompletedTestApp">Appendix: Installing the Completed Test Application File</a>.
</li>
</ul>
</li>
@@ -1292,7 +1245,7 @@ $ android create test-project -m ../Spinner -n SpinnerActivityTest -p SpinnerAct
This will create a new Android test project in the <em>new</em> directory <code>SpinnerActivityTest</code>. You do this
so that the solution to the tutorial that is in <code>SpinnerTest</code> is left untouched. If you want to use the solution
code instead of entering it as you read through the tutorial, refer to the section
- <a href="#InstallCompletedTestApp">Appendix: Installing the Completed Test Application</a>.
+ <a href="#InstallCompletedTestApp">Appendix: Installing the Completed Test Application File</a>.
</p>
<p class="Note">
<strong>Note:</strong> Running <code>android create test-project</code> will automatically create
diff --git a/docs/html/guide/topics/testing/activity_testing.jd b/docs/html/tools/testing/activity_testing.jd
index 51121f4c4c08..7190b98d1a9f 100644
--- a/docs/html/guide/topics/testing/activity_testing.jd
+++ b/docs/html/tools/testing/activity_testing.jd
@@ -60,22 +60,18 @@ parent.link=index.html
<h2>Related Tutorials</h2>
<ol>
<li>
- <a href="{@docRoot}resources/tutorials/testing/helloandroid_test.html">
- Hello, Testing</a>
- </li>
- <li>
- <a href="{@docRoot}resources/tutorials/testing/activity_test.html">Activity Testing</a>
+ <a href="{@docRoot}tools/testing/activity_test.html">Activity Testing Tutorial</a>
</li>
</ol>
<h2>See Also</h2>
<ol>
<li>
- <a href="{@docRoot}guide/developing/testing/testing_eclipse.html">
- Testing in Eclipse, with ADT</a>
+ <a href="{@docRoot}tools/testing/testing_eclipse.html">
+ Testing from Eclipse with ADT</a>
</li>
<li>
- <a href="{@docRoot}guide/developing/testing/testing_otheride.html">
- Testing in Other IDEs</a>
+ <a href="{@docRoot}tools/testing/testing_otheride.html">
+ Testing from Other IDEs</a>
</li>
</ol>
</div>
@@ -89,7 +85,7 @@ parent.link=index.html
<p>
This document describes how to test activities using instrumentation and other test
facilities. The document assumes you have already read
- <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Fundamentals</a>,
+ <a href="{@docRoot}tools/testing/testing_android.html">Testing Fundamentals</a>,
the introduction to the Android testing and instrumentation framework.
</p>
<h2 id="ActivityTestAPI">The Activity Testing API</h2>
@@ -219,31 +215,16 @@ parent.link=index.html
</ul>
<h2 id="NextSteps">Next Steps</h2>
<p>
- To learn how to set up and run tests in Eclipse, please refer to <a
- href="{@docRoot}guide/developing/testing/testing_eclipse.html">Testing in
- Eclipse, with ADT</a>. If you're not working in Eclipse, refer to <a
- href="{@docRoot}guide/developing/testing/testing_otheride.html">Testing in Other
- IDEs</a>.
+ To learn how to set up and run tests in Eclipse, please refer to
+<a href="{@docRoot}tools/testing/testing_eclipse.html">Testing from Eclipse with ADT</a>.
+ If you're not working in Eclipse, refer to
+<a href="{@docRoot}tools/testing/testing_otheride.html">Testing from Other IDEs</a>.
</p>
<p>
- If you want a step-by-step introduction to testing activities, try one of the
- testing tutorials:
+ If you want a step-by-step introduction to testing activities, try the
+ <a href="{@docRoot}tools/testing/activity_test.html">Activity Testing Tutorial</a>, which
+ guides you through a testing scenario that you develop against an activity-oriented application.
</p>
-<ul>
- <li>
- The <a
- href="{@docRoot}resources/tutorials/testing/helloandroid_test.html">Hello,
- Testing</a> tutorial introduces basic testing concepts and procedures in the
- context of the Hello, World application.
- </li>
- <li>
- The <a
- href="{@docRoot}resources/tutorials/testing/activity_test.html">Activity
- Testing</a> tutorial is an excellent follow-up to the Hello, Testing tutorial.
- It guides you through a more complex testing scenario that you develop against a
- more realistic activity-oriented application.
- </li>
-</ul>
<h2 id="UITesting">Appendix: UI Testing Notes</h2>
<p>
The following sections have tips for testing the UI of your Android application, specifically
diff --git a/docs/html/guide/topics/testing/contentprovider_testing.jd b/docs/html/tools/testing/contentprovider_testing.jd
index edaae8cda7d9..a6440df0f4c4 100644
--- a/docs/html/guide/topics/testing/contentprovider_testing.jd
+++ b/docs/html/tools/testing/contentprovider_testing.jd
@@ -35,20 +35,26 @@ parent.link=index.html
<li>{@link android.test.IsolatedContext}</li>
<li>{@link android.test.mock.MockContentResolver}</li>
</ol>
+ <h2>Related Tutorials</h2>
+ <ol>
+ <li>
+ <a href="{@docRoot}tools/testing/activity_test.html">Activity Testing Tutorial</a>
+ </li>
+ </ol>
<h2>See Also</h2>
<ol>
<li>
<a
- href="{@docRoot}guide/topics/testing/testing_android.html">
+ href="{@docRoot}tools/testing/testing_android.html">
Testing Fundamentals</a>
</li>
<li>
- <a href="{@docRoot}guide/developing/testing/testing_eclipse.html">
- Testing in Eclipse, with ADT</a>
+ <a href="{@docRoot}tools/testing/testing_eclipse.html">
+ Testing From Eclipse with ADT</a>
</li>
<li>
- <a href="{@docRoot}guide/developing/testing/testing_otheride.html">
- Testing in Other IDEs</a>
+ <a href="{@docRoot}tools/testing/testing_otheride.html">
+ Testing From Other IDEs</a>
</li>
</ol>
</div>
@@ -65,7 +71,7 @@ parent.link=index.html
familiar with content providers or the Android testing framework, please read
<a href="{@docRoot}guide/topics/providers/content-providers.html">Content Providers</a>,
the guide to developing content providers, and
- <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Fundamentals</a>,
+ <a href="{@docRoot}tools/testing/testing_android.html">Testing Fundamentals</a>,
the introduction to the Android testing and instrumentation framework.
</p>
<h2 id="DesignAndTest">Content Provider Design and Testing</h2>
@@ -86,12 +92,12 @@ parent.link=index.html
<p>
As with other Android tests, provider test packages are run under the control of the test
runner {@link android.test.InstrumentationTestRunner}. The section
- <a href="{@docRoot}guide/topics/testing/testing_android.html#InstrumentationTestRunner">
+ <a href="{@docRoot}tools/testing/testing_android.html#InstrumentationTestRunner">
Running Tests With InstrumentationTestRunner</a> describes the test runner in
- more detail. The topic <a href="{@docRoot}guide/developing/testing/testing_eclipse.html">
- Testing in Eclipse, with ADT</a> shows you how to run a test package in Eclipse, and the
- topic <a href="{@docRoot}guide/developing/testing/testing_otheride.html">
- Testing in Other IDEs</a>
+ more detail. The topic <a href="{@docRoot}tools/testing/testing_eclipse.html">
+ Testing From Eclipse with ADT</a> shows you how to run a test package in Eclipse, and the
+ topic <a href="{@docRoot}tools/testing/testing_otheride.html">
+ Testing From Other IDEs</a>
shows you how to run a test package from the command line.
</p>
<h2 id="ContentProviderTestAPI">Content Provider Testing API</h2>
@@ -125,7 +131,7 @@ parent.link=index.html
The constructor then creates a {@link android.test.mock.MockContentResolver} to use as the
resolver for the test. The {@link android.test.mock.MockContentResolver} class is described in
detail in the section
- <a href="{@docRoot}guide/topics/testing/testing_android.html#MockObjectClasses">Mock object
+ <a href="{@docRoot}tools/testing/testing_android.html#MockObjectClasses">Mock object
classes</a>.
</p>
<p>
@@ -140,12 +146,12 @@ classes</a>.
{@link android.test.ProviderTestCase2} uses {@link android.test.IsolatedContext} and
{@link android.test.mock.MockContentResolver}, which are standard mock object classes. To
learn more about them, please read
- <a href="{@docRoot}guide/topics/testing/testing_android.html#MockObjectClasses">
+ <a href="{@docRoot}tools/testing/testing_android.html#MockObjectClasses">
Testing Fundamentals</a>.
</p>
<h2 id="WhatToTest">What To Test</h2>
<p>
- The topic <a href="{@docRoot}guide/topics/testing/what_to_test.html">What To Test</a>
+ The topic <a href="{@docRoot}tools/testing/what_to_test.html">What To Test</a>
lists general considerations for testing Android components.
Here are some specific guidelines for testing content providers.
</p>
@@ -198,28 +204,14 @@ classes</a>.
</ul>
<h2 id="NextSteps">Next Steps</h2>
<p>
- To learn how to set up and run tests in Eclipse, please refer to <a
- href="{@docRoot}guide/developing/testing/testing_eclipse.html">Testing in
- Eclipse, with ADT</a>. If you're not working in Eclipse, refer to <a
- href="{@docRoot}guide/developing/testing/testing_otheride.html">Testing in Other
- IDEs</a>.
+ To learn how to set up and run tests in Eclipse, please refer to
+<a href="{@docRoot}tools/testing/testing_eclipse.html">Testing from Eclipse with ADT</a>.
+ If you're not working in Eclipse, refer to
+<a href="{@docRoot}tools/testing/testing_otheride.html">Testing From Other IDEs</a>.
</p>
<p>
- If you want a step-by-step introduction to testing activities, try one of the
- testing tutorials:
+ If you want a step-by-step introduction to testing activities, try the
+ <a href="{@docRoot}tools/testing/activity_test.html">Activity Testing Tutorial</a>, which
+ guides you through a testing scenario that you develop against an activity-oriented application.
</p>
-<ul>
- <li>
- The <a
- href="{@docRoot}resources/tutorials/testing/helloandroid_test.html">Hello,
- Testing</a> tutorial introduces basic testing concepts and procedures in the
- context of the Hello, World application.
- </li>
- <li>
- The <a
- href="{@docRoot}resources/tutorials/testing/activity_test.html">Activity
- Testing</a> tutorial is an excellent follow-up to the Hello, Testing tutorial.
- It guides you through a more complex testing scenario that you develop against a
- more realistic activity-oriented application.
- </li>
-</ul>
+
diff --git a/docs/html/tools/testing/index.jd b/docs/html/tools/testing/index.jd
new file mode 100644
index 000000000000..56de4cf80658
--- /dev/null
+++ b/docs/html/tools/testing/index.jd
@@ -0,0 +1,40 @@
+page.title=Testing
+@jd:body
+
+<p> The Android framework includes an integrated testing framework that helps you test all aspects
+of your application and the SDK tools include tools for setting up and running test applications.
+Whether you are working in Eclipse with ADT or working from the command line, the SDK tools help you
+set up and run your tests within an emulator or the device you are targeting. </p>
+
+<p>If you aren't yet familiar with the Android testing framework, start by reading <a
+href="{@docRoot}tools/testing/testing_android.html">Testing Fundamentals</a>. For a step-by-step
+introduction to Android testing, try the <a
+href="{@docRoot}tools/testing/activity_test.html">Activity Testing Tutorial</a>. </p>
+
+
+
+<div class="landing-docs">
+
+ <div class="col-13" style="margin-left:0">
+ <h3>Blog Articles</h3>
+
+ <a href="http://android-developers.blogspot.com/2010/12/new-gingerbread-api-strictmode.html">
+ <h4>New Gingerbread API: StrictMode</h4>
+ <p>StrictMode is a new API in Gingerbread which primarily lets you set a policy on a thread
+declaring what you’re not allowed to do on that thread, and what the penalty is if you violate the
+policy. Implementation-wise, this policy is simply a thread-local integer bitmask.</p>
+ </a>
+
+ <a href="http://android-developers.blogspot.com/2010/10/traceview-war-story.html">
+ <h4>Traceview War Story</h4>
+ <p>I recently took my first serious look at Traceview, and it occurred to me, first, that
+there are probably a few other Android developers who haven’t used it and, second, that this is an
+opportunity to lecture sternly on one of my favorite subjects: performance improvement and
+profiling.</p>
+ </a>
+ </div>
+
+
+</div>
+
+
diff --git a/docs/html/guide/topics/testing/service_testing.jd b/docs/html/tools/testing/service_testing.jd
index eae860784933..7c56fd947df6 100644
--- a/docs/html/guide/topics/testing/service_testing.jd
+++ b/docs/html/tools/testing/service_testing.jd
@@ -30,22 +30,18 @@ parent.link=index.html
<h2>Related Tutorials</h2>
<ol>
<li>
- <a href="{@docRoot}resources/tutorials/testing/helloandroid_test.html">
- Hello, Testing</a>
- </li>
- <li>
- <a href="{@docRoot}resources/tutorials/testing/activity_test.html">Activity Testing</a>
+ <a href="{@docRoot}tools/testing/activity_test.html">Activity Testing Tutorial</a>
</li>
</ol>
<h2>See Also</h2>
<ol>
<li>
- <a href="{@docRoot}guide/developing/testing/testing_eclipse.html">
- Testing in Eclipse, with ADT</a>
+ <a href="{@docRoot}tools/testing/testing_eclipse.html">
+ Testing From Eclipse with ADT</a>
</li>
<li>
- <a href="{@docRoot}guide/developing/testing/testing_otheride.html">
- Testing in Other IDEs</a>
+ <a href="{@docRoot}tools/testing/testing_otheride.html">
+ Testing From Other IDEs</a>
</li>
</ol>
</div>
@@ -58,9 +54,9 @@ parent.link=index.html
</p>
<p>
This document describes techniques for testing Service objects. If you aren't familiar with the
- Service class, please read the <a href="{@docRoot}guide/topics/fundamentals/services.html">
+ Service class, please read the <a href="{@docRoot}guide/components/services.html">
Services</a> document. If you aren't familiar with Android testing, please read
- <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Fundamentals</a>,
+ <a href="{@docRoot}tools/testing/testing_android.html">Testing Fundamentals</a>,
the introduction to the Android testing and instrumentation framework.
</p>
<h2 id="DesignAndTest">Service Design and Testing</h2>
@@ -141,12 +137,12 @@ parent.link=index.html
You inject a mock Context into the Service under test with the
{@link android.test.AndroidTestCase#setContext(Context) setContext()} method. The mock
Context classes you can use are described in more detail in
- <a href="{@docRoot}guide/topics/testing/testing_android.html#MockObjectClasses">
+ <a href="{@docRoot}tools/testing/testing_android.html#MockObjectClasses">
Testing Fundamentals</a>.
</p>
<h2 id="TestAreas">What to Test</h2>
<p>
- The topic <a href="{@docRoot}guide/topics/testing/what_to_test.html">What To Test</a>
+ The topic <a href="{@docRoot}tools/testing/what_to_test.html">What To Test</a>
lists general considerations for testing Android components.
Here are some specific guidelines for testing a Service:
</p>
diff --git a/docs/html/guide/topics/testing/testing_android.jd b/docs/html/tools/testing/testing_android.jd
index adbc59d7cea1..acf5ec2ef1eb 100755
--- a/docs/html/guide/topics/testing/testing_android.jd
+++ b/docs/html/tools/testing/testing_android.jd
@@ -62,29 +62,25 @@ parent.link=index.html
<h2>Related tutorials</h2>
<ol>
<li>
- <a href="{@docRoot}resources/tutorials/testing/helloandroid_test.html">
- Hello, Testing</a>
- </li>
- <li>
- <a href="{@docRoot}resources/tutorials/testing/activity_test.html">Activity Testing</a>
+ <a href="{@docRoot}tools/testing/activity_test.html">Activity Testing Tutorial</a>
</li>
</ol>
<h2>See also</h2>
<ol>
<li>
- <a href="{@docRoot}guide/developing/testing/testing_eclipse.html">
- Testing in Eclipse, with ADT</a>
+ <a href="{@docRoot}tools/testing/testing_eclipse.html">
+ Testing from Eclipse with ADT</a>
</li>
<li>
- <a href="{@docRoot}guide/developing/testing/testing_otheride.html">
- Testing in Other IDEs</a>
+ <a href="{@docRoot}tools/testing/testing_otheride.html">
+ Testing from Other IDEs</a>
</li>
<li>
- <a href="{@docRoot}guide/developing/tools/monkeyrunner_concepts.html">
+ <a href="{@docRoot}tools/help/monkeyrunner_concepts.html">
monkeyrunner</a>
</li>
<li>
- <a href="{@docRoot}guide/developing/tools/monkey.html">UI/Application Exerciser Monkey</a>
+ <a href="{@docRoot}tools/help/monkey.html">UI/Application Exerciser Monkey</a>
</li>
</ol>
</div>
@@ -121,9 +117,9 @@ parent.link=index.html
</li>
<li>
The SDK also provides
- <a href="{@docRoot}guide/developing/tools/monkeyrunner_concepts.html">monkeyrunner</a>, an API
+ <a href="{@docRoot}tools/help/monkeyrunner_concepts.html">monkeyrunner</a>, an API
testing devices with Python programs, and <a
- href="{@docRoot}guide/developing/tools/monkey.html">UI/Application Exerciser Monkey</a>,
+ href="{@docRoot}tools/help/monkey.html">UI/Application Exerciser Monkey</a>,
a command-line tool for stress-testing UIs by sending pseudo-random events to a device.
</li>
</ul>
@@ -225,7 +221,7 @@ parent.link=index.html
<h3 id="JUnit">JUnit</h3>
<p>
You can use the JUnit {@link junit.framework.TestCase TestCase} class to do unit testing on
- a plain Java object. <code>TestCase</code> is also the base class for
+ a class that doesn't call Android APIs. <code>TestCase</code> is also the base class for
{@link android.test.AndroidTestCase}, which you can use to test Android-dependent objects.
Besides providing the JUnit framework, AndroidTestCase offers Android-specific setup,
teardown, and helper methods.
@@ -331,14 +327,14 @@ parent.link=index.html
</p>
<ul>
<li>
- <a href="{@docRoot}guide/topics/testing/activity_testing.html">Activity Testing</a>
+ <a href="{@docRoot}tools/testing/activity_testing.html">Activity Testing</a>
</li>
<li>
- <a href="{@docRoot}guide/topics/testing/contentprovider_testing.html">
+ <a href="{@docRoot}tools/testing/contentprovider_testing.html">
Content Provider Testing</a>
</li>
<li>
- <a href="{@docRoot}guide/topics/testing/service_testing.html">Service Testing</a>
+ <a href="{@docRoot}tools/testing/service_testing.html">Service Testing</a>
</li>
</ul>
<p>
@@ -395,7 +391,7 @@ parent.link=index.html
objects, and {@link android.app.Service} objects. Some test cases also provide mock
{@link android.content.Intent} objects. You use these mocks both to isolate tests
from the rest of the system and to facilitate dependency injection for testing. These classes
- are found in the Java packages {@link android.test} and {@link android.test.mock}.
+ are found in the packages {@link android.test} and {@link android.test.mock}.
</p>
<p>
Mock objects isolate tests from a running system by stubbing out or overriding
@@ -486,12 +482,13 @@ parent.link=index.html
</p>
<p>
You specify <code>InstrumentationTestRunner</code> or a subclass in your test package's
- manifest file, in the <a href="{@docRoot}guide/topics/manifest/instrumentation-element.html">
- instrumentation</a> element. Also, <code>InstrumentationTestRunner</code> code resides
+ manifest file, in the
+<code><a href="{@docRoot}guide/topics/manifest/instrumentation-element.html">&lt;instrumentation&gt;</a></code>
+ element. Also, <code>InstrumentationTestRunner</code> code resides
in the shared library <code>android.test.runner</code>, which is not normally linked to
Android code. To include it, you must specify it in a
- <a href="{@docRoot}guide/topics/manifest/uses-library-element.html">uses-library</a> element.
- You do not have to set up these elements yourself. Both Eclipse with ADT and the
+<code><a href="{@docRoot}guide/topics/manifest/uses-library-element.html">&lt;uses-library&gt;</a></code>
+ element. You do not have to set up these elements yourself. Both Eclipse with ADT and the
<code>android</code> command-line tool construct them automatically and add them to your
test package's manifest file.
</p>
@@ -504,7 +501,7 @@ parent.link=index.html
To run {@link android.test.InstrumentationTestRunner}, you use internal system classes called by
Android tools. When you run a test in Eclipse with ADT, the classes are called automatically.
When you run a test from the command line, you run these classes with
- <a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge (adb)</a>.
+ <a href="{@docRoot}tools/help/adb.html">Android Debug Bridge (adb)</a>.
</p>
<p>
The system classes load and start the test package, kill any processes that
@@ -525,10 +522,10 @@ parent.link=index.html
</p>
<p>
To learn more about running tests, please read the topics
- <a href="{@docRoot}guide/developing/testing/testing_eclipse.html"">
- Testing in Eclipse, with ADT</a> or
- <a href="{@docRoot}guide/developing/testing/testing_otheride.html">
- Testing in Other IDes</a>.
+ <a href="{@docRoot}tools/testing/testing_eclipse.html">
+ Testing from Eclipse with ADT</a> or
+ <a href="{@docRoot}tools/testing/testing_otheride.html">
+ Testing from Other IDEs</a>.
</p>
<h2 id="TestResults">Seeing Test Results</h2>
<p>
@@ -543,11 +540,11 @@ parent.link=index.html
<p>
The test results have a format that is specific to the IDE that you are using. The test
results format for Eclipse with ADT is described in
- <a href="{@docRoot}guide/developing/testing/testing_eclipse.html#RunTestEclipse">
- Testing in Eclipse, with ADT</a>. The test results format for tests run from the
+ <a href="{@docRoot}tools/testing/testing_eclipse.html#RunTestEclipse">
+ Testing from Eclipse with ADT</a>. The test results format for tests run from the
command line is described in
- <a href="{@docRoot}guide/developing/testing/testing_otheride.html#RunTestsCommand">
- Testing in Other IDEs</a>.
+ <a href="{@docRoot}tools/testing/testing_otheride.html#RunTestsCommand">
+ Testing from Other IDEs</a>.
</p>
<h2 id="Monkeys">monkey and monkeyrunner</h2>
<p>
@@ -555,16 +552,16 @@ parent.link=index.html
</p>
<ul>
<li>
-The <a href="{@docRoot}guide/developing/tools/monkey.html">UI/Application Exerciser Monkey</a>,
+The <a href="{@docRoot}tools/help/monkey.html">UI/Application Exerciser Monkey</a>,
usually called "monkey", is a command-line tool that sends pseudo-random streams of
keystrokes, touches, and gestures to a device. You run it with the
- <a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a> (adb) tool.
+ <a href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a> (adb) tool.
You use it to stress-test your application and report back errors that are encountered.
You can repeat a stream of events by running the tool each time with the same random
number seed.
</li>
<li>
- The <a href="{@docRoot}guide/developing/tools/monkeyrunner_concepts.html">monkeyrunner</a> tool
+ The <a href="{@docRoot}tools/help/monkeyrunner_concepts.html">monkeyrunner</a> tool
is an API and execution environment for test programs written in Python. The API
includes functions for connecting to a device, installing and uninstalling packages,
taking screenshots, comparing two images, and running a test package against an
@@ -613,54 +610,31 @@ The <a href="{@docRoot}guide/developing/tools/monkey.html">UI/Application Exerci
</p>
<h2 id="WhatToTest">What to Test</h2>
<p>
- The topic <a href="{@docRoot}guide/topics/testing/what_to_test.html">What To Test</a>
+ The topic <a href="{@docRoot}tools/testing/what_to_test.html">What To Test</a>
describes the key functionality you should test in an Android application, and the key
situations that might affect that functionality.
</p>
<p>
Most unit testing is specific to the Android component you are testing.
- The topics <a href="{@docRoot}guide/topics/testing/activity_testing.html">Activity Testing</a>,
- <a href="{@docRoot}guide/topics/testing/contentprovider_testing.html">
- Content Provider Testing</a>, and <a href="{@docRoot}guide/topics/testing/service_testing.html">
+ The topics <a href="{@docRoot}tools/testing/activity_testing.html">Activity Testing</a>,
+ <a href="{@docRoot}tools/testing/contentprovider_testing.html">
+ Content Provider Testing</a>, and <a href="{@docRoot}tools/testing/service_testing.html">
Service Testing</a> each have a section entitled "What To Test" that lists possible testing
areas.
</p>
<p>
When possible, you should run these tests on an actual device. If this is not possible, you can
- use the <a href="{@docRoot}guide/developing/devices/emulator.html">Android Emulator</a> with
+ use the <a href="{@docRoot}tools/devices/emulator.html">Android Emulator</a> with
Android Virtual Devices configured for the hardware, screens, and versions you want to test.
</p>
<h2 id="NextSteps">Next Steps</h2>
<p>
- To learn how to set up and run tests in Eclipse, please refer to <a
- href="{@docRoot}guide/developing/testing/testing_eclipse.html">Testing in
- Eclipse, with ADT</a>. If you're not working in Eclipse, refer to <a
- href="{@docRoot}guide/developing/testing/testing_otheride.html">Testing in Other
- IDEs</a>.
+ To learn how to set up and run tests in Eclipse, please refer to
+<a href="{@docRoot}tools/testing/testing_eclipse.html">Testing from Eclipse with ADT</a>.
+ If you're not working in Eclipse, refer to
+<a href="{@docRoot}tools/testing/testing_otheride.html">Testing from Other IDEs</a>.
</p>
<p>
- If you want a step-by-step introduction to Android testing, try one of the
- testing tutorials or sample test packages:
+ If you want a step-by-step introduction to Android testing, try the
+ <a href="{@docRoot}tools/testing/activity_test.html">Activity Testing Tutorial</a>.
</p>
-<ul>
- <li>
- The <a
- href="{@docRoot}resources/tutorials/testing/helloandroid_test.html">Hello,
- Testing</a> tutorial introduces basic testing concepts and procedures in the
- context of the Hello, World application.
- </li>
- <li>
- The <a href="{@docRoot}resources/tutorials/testing/activity_test.html">Activity
- Testing</a> tutorial is an excellent follow-up to the Hello, Testing tutorial.
- It guides you through a more complex testing scenario that you develop against a
- more realistic application.
- </li>
- <!-- sample is not available
- <li>
- The sample test package <a href="{@docRoot}resources/samples/AlarmServiceTest/index.html">
- Alarm Service Test</a> is an example of testing a {@link android.app.Service}. It contains
- a set of unit tests for the Alarm Service sample application's {@link android.app.Service}.
- </li>
- -->
-</ul>
-
diff --git a/docs/html/guide/developing/testing/testing_eclipse.jd b/docs/html/tools/testing/testing_eclipse.jd
index 4e9ecca991b3..7d3be47ec1da 100644
--- a/docs/html/guide/developing/testing/testing_eclipse.jd
+++ b/docs/html/tools/testing/testing_eclipse.jd
@@ -16,12 +16,12 @@ parent.link=index.html
This topic explains how create and run tests of Android applications in Eclipse with ADT.
Before you read this topic, you should read about how to create an Android application with the
basic processes for creating and running applications with ADT, as described in
- <a href="{@docRoot}guide/developing/projects/projects-eclipse.html">Managing Projects from
+ <a href="{@docRoot}tools/projects/projects-eclipse.html">Managing Projects from
Eclipse</a>
- and <a href="{@docRoot}guide/developing/building/building-eclipse.html">Building and Running
+ and <a href="{@docRoot}tools/building/building-eclipse.html">Building and Running
from Eclipse</a>.
You may also want to read
- <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Fundamentals</a>,
+ <a href="{@docRoot}tools/testing/testing_android.html">Testing Fundamentals</a>,
which provides an overview of the Android testing framework.
</p>
<p>
@@ -52,7 +52,7 @@ from Eclipse</a>.
<p>
If you are not developing in Eclipse or you want to learn how to create and run tests from the
command line, see
- <a href="{@docRoot}guide/developing/testing/testing_otheride.html">Testing from Other IDEs</a>.
+ <a href="{@docRoot}tools/testing/testing_otheride.html">Testing from Other IDEs</a>.
</p>
<h2 id="CreateTestProjectEclipse">Creating a Test Project</h2>
<p>
@@ -107,7 +107,7 @@ from Eclipse</a>.
path where you want your project.
<p>
To learn more about choosing the location of test projects, please read
- <a href="{@docRoot}guide/topics/testing/testing_android.html#TestProjectPaths">
+ <a href="{@docRoot}tools/testing/testing_android.html#TestProjectPaths">
Testing Fundamentals</a>.
</p>
</li>
@@ -145,14 +145,14 @@ from Eclipse</a>.
{@link android.test android.test}. These extend the JUnit
{@link junit.framework.TestCase TestCase} class. The Android test classes for Activity objects
also provide instrumentation for testing an Activity. To learn more about test case
- classes, please read the topic <a href="{@docRoot}guide/topics/testing/testing_android.html">
+ classes, please read the topic <a href="{@docRoot}tools/testing/testing_android.html">
Testing Fundamentals</a>.
</p>
<p>
Before you create your test package, you choose the Java package identifier you want to use
for your test case classes and the Android package name you want to use. To learn more
about this, please read
- <a href="{@docRoot}guide/topics/testing/testing_android.html#PackageNames">
+ <a href="{@docRoot}tools/testing/testing_android.html#PackageNames">
Testing Fundamentals</a>.
</p>
<p>
@@ -223,7 +223,7 @@ from Eclipse</a>.
</p>
<p>
The Resources tab contains an
- <a href="{@docRoot}resources/tutorials/testing/activity_test.html">Activity Testing</a>
+ <a href="{@docRoot}tools/testing/activity_test.html">Activity Testing</a>
tutorial with more information about creating test classes and methods.
</p>
<h2 id="RunTestEclipse">Running Tests</h2>
@@ -241,7 +241,7 @@ from Eclipse</a>.
To run tests created in Eclipse with ADT with command-line tools, you must first
install additional files into the test project using the <code>android</code>
tool's "create test-project" option. To see how to do this, read
- <a href="{@docRoot}guide/developing/testing/testing_otheride.html#CreateProject">
+ <a href="{@docRoot}tools/testing/testing_otheride.html#CreateProject">
Testing in Other IDEs</a>.
</p>
</div>
@@ -305,7 +305,7 @@ from Eclipse</a>.
<li>
In the Emulator Launch Parameters pane, set the Android emulator flags you want to
use. These are documented in the topic
- <a href="{@docRoot}guide/developing/tools/emulator.html#startup-options">
+ <a href="{@docRoot}tools/help/emulator.html#startup-options">
Android Emulator</a>.
</li>
</ul>
@@ -351,7 +351,7 @@ from Eclipse</a>.
sample test package, which tests the
<a href="{@docRoot}resources/samples/Spinner/index.html">Spinner</a>
sample application. This test package is also featured in the
- <a href="{@docRoot}resources/tutorials/testing/activity_test.html">Activity Testing</a>
+ <a href="{@docRoot}tools/testing/activity_test.html">Activity Testing</a>
tutorial.
</p>
</div>
@@ -363,7 +363,7 @@ from Eclipse</a>.
In the following description of these messages, <code><em>devicename</em></code> is the name of
the device or emulator you are using to run the test, and <code><em>port</em></code> is the
port number for the device. The name and port number are in the format used by the
- <code><a href="{@docRoot}guide/developing/tools/adb.html#devicestatus">adb devices</a></code>
+ <code><a href="{@docRoot}tools/help/adb.html#devicestatus">adb devices</a></code>
command. Also, <code><em>testfile</em></code> is the <code>.apk</code> filename of the test
package you are running, and <em>appfile</em> is the filename of the application under test.
</p>
diff --git a/docs/html/guide/developing/testing/testing_otheride.jd b/docs/html/tools/testing/testing_otheride.jd
index 7745ae775f41..0678f52bf29e 100644
--- a/docs/html/guide/developing/testing/testing_otheride.jd
+++ b/docs/html/tools/testing/testing_otheride.jd
@@ -47,11 +47,11 @@ parent.link=index.html
<h2>See Also</h2>
<ol>
<li>
- <a href="{@docRoot}guide/topics/testing/testing_android.html">
+ <a href="{@docRoot}tools/testing/testing_android.html">
Testing Fundamentals</a>
</li>
<li>
- <a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a>
+ <a href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a>
</li>
</ol>
</div>
@@ -62,13 +62,13 @@ parent.link=index.html
or if you prefer to work from the command line. This document assumes that you already know how
to create a Android application in your programming environment. Before you start this
document, you should read the topic
- <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Fundamentals</a>,
+ <a href="{@docRoot}tools/testing/testing_android.html">Testing Fundamentals</a>,
which provides an overview of Android testing.
</p>
<p>
If you are developing in Eclipse with ADT, you can set up and run your tests
directly in Eclipse. For more information, please read
- <a href="{@docRoot}guide/developing/testing/testing_eclipse.html">
+ <a href="{@docRoot}tools/testing/testing_eclipse.html">
Testing from Eclipse with ADT</a>.
</p>
<h2 id="CreateTestProjectCommand">Working with Test Projects</h2>
@@ -108,7 +108,7 @@ android create test-project -m &lt;main_path&gt; -n &lt;project_name&gt; -p &lt;
value of <code>--main</code> should be <code>../HelloAndroid</code>.
<p>
To learn more about choosing the location of test projects, please read
- <a href="{@docRoot}guide/topics/testing/testing_android.html#TestProjects">
+ <a href="{@docRoot}tools/testing/testing_android.html#TestProjects">
Testing Fundamentals</a>.
</p>
</td>
@@ -135,7 +135,7 @@ android create test-project -m &lt;main_path&gt; -n &lt;project_name&gt; -p &lt;
This creates a new test project with the appropriate directories and build files. The directory
structure and build file contents are identical to those in a regular Android application
project. They are described in detail in the topic
- <a href="{@docRoot}guide/developing/projects/index.html">Managing Projects</a>.
+ <a href="{@docRoot}tools/projects/index.html">Managing Projects</a>.
</p>
<p>
The operation also creates an <code>AndroidManifest.xml</code> file with instrumentation
@@ -143,9 +143,8 @@ android create test-project -m &lt;main_path&gt; -n &lt;project_name&gt; -p &lt;
are testing and control it with instrumentation.
</p>
<p>
- For example, suppose you create the <a href="{@docRoot}resources/tutorials/hello-world.html">
- Hello, World</a> tutorial application in the directory <code>~/source/HelloAndroid</code>.
- In the tutorial, this application uses the package name <code>com.example.helloandroid</code>
+ For example, suppose you create a project in the directory <code>~/source/HelloAndroid</code>,
+with the package name <code>com.example.helloandroid</code>,
and the activity name <code>HelloAndroid</code>. You can to create the test for this in
<code>~/source/HelloAndroidTest</code>. To do so, you enter:
</p>
@@ -179,10 +178,7 @@ $ android create test-project -m ../HelloAndroid -n HelloAndroidTest -p HelloAnd
<li>
<code>android:targetPackage=&quot;com.example.helloandroid&quot;</code>: specifies
that the tests in HelloAndroidTest should be run against the application with the
- <em>Android</em> package name <code>com.example.helloandroid</code>. This is the
- package name of the <a
- href="{@docRoot}resources/tutorials/hello-world.html">Hello, World</a>
- tutorial application.
+ <em>Android</em> package name <code>com.example.helloandroid</code>.
</li>
<li>
<code>android:label=&quot;Tests for .HelloAndroid&quot;</code>: specifies a
@@ -290,15 +286,15 @@ $ android create test-project -m ../HelloAndroid -n HelloAndroidTest -p HelloAnd
</p>
<p>
To learn more about creating test packages, see the topic <a
- href="{@docRoot}guide/topics/testing/testing_android.html">Testing Fundamentals</a>,
+ href="{@docRoot}tools/testing/testing_android.html">Testing Fundamentals</a>,
which provides an overview of Android testing. If you prefer to follow a tutorial,
- try the <a href="{@docRoot}resources/tutorials/testing/activity_test.html">Activity Testing</a>
+ try the <a href="{@docRoot}tools/testing/activity_test.html">Activity Testing</a>
tutorial, which leads you through the creation of tests for an actual Android application.
</p>
<h2 id="RunTestsCommand">Running Tests</h2>
<p>
You run tests from the command line, either with Ant or with an
- <a href="{@docRoot}guide/developing/tools/adb.html">
+ <a href="{@docRoot}tools/help/adb.html">
Android Debug Bridge (adb)</a> shell.
</p>
<h3 id="RunTestsAnt">Quick build and run with Ant</h3>
@@ -320,7 +316,7 @@ $ android create test-project -m ../HelloAndroid -n HelloAndroidTest -p HelloAnd
<h3 id="RunTestsDevice">Running tests on a device or emulator</h3>
<p>
When you run tests from the command line with
- <a href="{@docRoot}guide/developing/tools/adb.html">
+ <a href="{@docRoot}tools/help/adb.html">
Android Debug Bridge (adb)</a>, you get more options for choosing the tests
to run than with any other method. You can select individual test methods, filter tests
according to their annotation, or specify testing options. Since the test run is controlled
diff --git a/docs/html/guide/topics/testing/what_to_test.jd b/docs/html/tools/testing/what_to_test.jd
index 99061df9f74d..77ae2114f3e2 100644
--- a/docs/html/guide/topics/testing/what_to_test.jd
+++ b/docs/html/tools/testing/what_to_test.jd
@@ -78,9 +78,9 @@ parent.link=index.html
</p>
<p>
You can use the emulator to test network access and bandwidth. To learn more, please see
- <a href="{@docRoot}guide/developing/tools/emulator.html#netspeed">Network Speed Emulation</a>.
+ <a href="{@docRoot}tools/help/emulator.html#netspeed">Network Speed Emulation</a>.
To test GPS, you can use the emulator console and {@link android.location.LocationManager}. To
learn more about the emulator console, please see
- <a href="{@docRoot}guide/developing/tools/emulator.html#console">
+ <a href="{@docRoot}tools/help/emulator.html#console">
Using the Emulator Console</a>.
</p>
diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs
new file mode 100644
index 000000000000..27fbd2de74fc
--- /dev/null
+++ b/docs/html/tools/tools_toc.cs
@@ -0,0 +1,214 @@
+<ul id="nav">
+
+ <li class="nav-section">
+ <div class="nav-section-header empty">
+ <a href="<?cs var:toroot ?>tools/index.html"><span class="en">Developer Tools</span></a>
+ </div>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot
+?>sdk/index.html"><span class="en">Download</span></a></div>
+ <ul>
+ <li class="nav-section">
+ <div class="nav-section-header">
+ <a href="<?cs var:toroot ?>sdk/installing/index.html"><span class="en">Installing
+ the SDK</span></a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>sdk/installing/adding-packages.html">
+ <span class="en">Adding Platforms and Packages</span></a></li>
+ <li><a href="<?cs var:toroot ?>sdk/installing/installing-adt.html">
+ <span class="en">Installing the Eclipse Plugin</span></a></li>
+ <li><a href="<?cs var:toroot ?>sdk/installing/next.html">
+ <span class="en">Next Steps</span></a></li>
+ </ul>
+ </li>
+ <li><a href="<?cs var:toroot ?>sdk/exploring.html">
+ <span class="en">Exploring the SDK</span></a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header">
+ <a href="/tools/workflow/index.html"><span class="en">Workflow</span></a>
+ </div>
+ <ul>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/tools/devices/index.html"><span class="en">Setting Up Virtual Devices</span></a></div>
+ <ul>
+ <li><a href="/tools/devices/managing-avds.html"><span class="en">With AVD Manager</span></a></li>
+ <li><a href="/tools/devices/managing-avds-cmdline.html"><span class="en">From the Command Line</span></a></li>
+ <li><a href="/tools/devices/emulator.html"><span class="en">Using the Android Emulator</span></a></li>
+ </ul>
+ </li>
+ <li><a href="/tools/device.html"><span class="en">Using Hardware Devices</span></a></li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/tools/projects/index.html"><span class="en">Setting Up Projects</span></a></div>
+ <ul>
+ <li><a href="/tools/projects/projects-eclipse.html"><span class="en">From Eclipse with ADT</span></a></li>
+ <li><a href="/tools/projects/projects-cmdline.html"><span class="en">From the Command Line</span></a></li>
+ </ul>
+ </li>
+
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="/tools/building/index.html"><span class="en">Building and Running</span></a></div>
+ <ul>
+ <li><a href="/tools/building/building-eclipse.html"><span class="en">From Eclipse with ADT</span></a></li>
+ <li><a href="/tools/building/building-cmdline.html"><span class="en">From the Command Line</span></a></li>
+ </ul>
+ </li>
+
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot?>tools/testing/index.html">
+ <span class="en">Testing</span>
+ </a></div>
+ <ul>
+ <li>
+ <a href="<?cs var:toroot?>tools/testing/testing_android.html">
+ <span class="en">Fundamentals</span></a>
+ </li>
+ <li><a href="<?cs var:toroot ?>tools/testing/testing_eclipse.html">
+ <span class="en">From Eclipse</span></a>
+ </li>
+ <li><a href="<?cs var:toroot ?>tools/testing/testing_otheride.html">
+ <span class="en">From Other IDEs</span></a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot?>tools/testing/activity_testing.html">
+ <span class="en">Activity Testing</span></a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot?>tools/testing/service_testing.html">
+ <span class="en">Service Testing</span></a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot?>tools/testing/contentprovider_testing.html">
+ <span class="en">Content Provider Testing</span></a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>tools/testing/what_to_test.html">
+ <span class="en">What To Test</span></a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>tools/testing/activity_test.html">
+ <span class="en">Activity Testing Tutorial</span></a>
+ </li>
+ </ul>
+ </li><!-- end of testing -->
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>tools/debugging/index.html"><span class="en">Debugging</span></a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>tools/debugging/debugging-projects.html"><span class="en">From Eclipse with ADT</span></a></li>
+ <li><a href="<?cs var:toroot ?>tools/debugging/debugging-projects-cmdline.html"><span class="en">From Other IDEs</span></a></li>
+ <li><a href="<?cs var:toroot ?>tools/debugging/ddms.html"><span class="en">Using DDMS</span></a></li>
+ <li><a href="<?cs var:toroot ?>tools/debugging/debugging-log.html"><span class="en">Reading and Writing Logs</span></a></li>
+ <li><a href="<?cs var:toroot ?>tools/debugging/debugging-ui.html"><span class="en">Optimizing your UI</span></a></li>
+ <li><a href="<?cs var:toroot ?>tools/debugging/debugging-tracing.html"><span class="en">Profiling with Traceview and dmtracedump</span></a></li>
+ <li><a href="<?cs var:toroot ?>tools/debugging/debugging-devtools.html"><span class="en">Using the Dev Tools App</span></a></li>
+ </ul>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>tools/publishing/publishing_overview.html"><span class="en">Publishing</span></a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>tools/publishing/preparing.html"><span class="en">Preparing for Release</span></a></li>
+ <li><a href="<?cs var:toroot ?>tools/publishing/versioning.html"><span class="en">Versioning Your Apps</span></a></li>
+ <li><a href="<?cs var:toroot ?>tools/publishing/app-signing.html"><span class="en">Signing Your Apps</span></a></li>
+ </ul>
+ </li>
+</ul>
+</li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>tools/help/index.html"><span
+class="en">Tools Help</span></a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>tools/help/adb.html">adb</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/adt.html">ADT</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/android.html">android</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/bmgr.html">bmgr</a>
+ <li><a href="<?cs var:toroot ?>tools/help/dmtracedump.html">dmtracedump</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/draw9patch.html">Draw 9-Patch</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/emulator.html">Emulator</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/etc1tool.html">etc1tool</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/hierarchy-viewer.html">Hierarchy Viewer</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/hprof-conv.html">hprof-conv</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/layoutopt.html">layoutopt</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/logcat.html">logcat</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/mksdcard.html">mksdcard</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/monkey.html">monkey</a></li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot
+?>tools/help/monkeyrunner_concepts.html"><span class="en">monkeyrunner</span></a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>tools/help/MonkeyDevice.html"><span
+class="en">MonkeyDevice</span></a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/MonkeyImage.html"><span
+class="en">MonkeyImage</span></a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/MonkeyRunner.html"><span
+class="en">MonkeyRunner</span></a></li>
+ </ul>
+ </li>
+ <li><a href="<?cs var:toroot ?>tools/help/proguard.html">ProGuard</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/traceview.html">Traceview</a></li>
+ <li><a href="<?cs var:toroot ?>tools/help/zipalign.html">zipalign</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot
+?>tools/revisions/index.html"><span class="en">Revisions</span></a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>tools/sdk/tools-notes.html">
+ <span class="en">Tools</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>tools/sdk/eclipse-adt.html">
+ <span class="en">ADT Plugin</span>
+ </a></li>
+ <!--
+ <li><a href="<?cs var:toroot ?>tools/sdk/addons.html"><span class="en">Add-ons</span></a></li>
+ -->
+ <li class="nav-section">
+ <div class="nav-section-header">
+ <a href="<?cs var:toroot ?>tools/sdk/ndk/index.html">
+ <span class="en">NDK</span></a>
+ </div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>tools/sdk/ndk/overview.html">What is the NDK?</a></li>
+ </ul>
+ </li>
+ <li><a href="<?cs var:toroot ?>tools/revisions/platforms.html"><span
+class="en">Platforms</span></a></li>
+ </ul>
+ </li>
+
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot
+?>tools/extras/index.html"><span class="en">Extras</span></a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>tools/extras/support-library.html"><span class="en">Support
+Library</span></a></li>
+ <li><a href="<?cs var:toroot ?>tools/extras/oem-usb.html"><span
+class="en">USB Drivers</span></a>
+ </li>
+ </ul>
+ </li>
+
+
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot
+?>tools/samples/index.html"><span class="en">Samples</span></a></div>
+ </li>
+
+
+</ul><!-- nav -->
+
+<script type="text/javascript">
+<!--
+ buildToggleLists();
+ changeNavLang(getLangPref());
+//-->
+</script>
diff --git a/docs/html/guide/developing/index.jd b/docs/html/tools/workflow.jd
index 3af4a8c06ca7..4eb5adace56b 100644
--- a/docs/html/guide/developing/index.jd
+++ b/docs/html/tools/workflow.jd
@@ -28,35 +28,35 @@ development steps encompass four development phases, which include:</p>
<p>During this phase you install and set up your development environment. You also create
Android Virtual Devices (AVDs) and connect hardware devices on which you can install your
applications.</p>
- <p>See <a href="{@docRoot}guide/developing/devices/index.html">Managing Virtual Devices</a>
- and <a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a> for more
+ <p>See <a href="{@docRoot}tools/devices/index.html">Managing Virtual Devices</a>
+ and <a href="{@docRoot}tools/device.html">Using Hardware Devices</a> for more
information.
</li>
<li><strong>Development</strong>
<p>During this phase you set up and develop your Android project, which contains all of the
source code and resource files for your application. For more informations, see
- <a href="{@docRoot}guide/developing/projects/index.html">Create an Android project</a>.</p>
+ <a href="{@docRoot}tools/projects/index.html">Create an Android project</a>.</p>
</li>
<li><strong>Debugging and Testing</strong>
<p>During this phase you build your project into a debuggable <code>.apk</code> package that you
can install and run on the emulator or an Android-powered device. If you are using Eclipse,
builds are generated each time you project is saved. If you're using another IDE,
you can build your project using Ant and install it on a device using
- <a href="{@docRoot}guide/developing/tools/adb.html">adb</a>. For more information, see
- <a href="{@docRoot}guide/developing/building/index.html">Build and run your application</a>.</p>
+ <a href="{@docRoot}tools/help/adb.html">adb</a>. For more information, see
+ <a href="{@docRoot}tools/building/index.html">Build and run your application</a>.</p>
<p>Next, you debug your application using a JDWP-compliant debugger along with the debugging
and logging tools that are provided with the Android SDK. Eclipse already comes packaged with
a compatible debugger. For more information see,
- <a href="{@docRoot}guide/developing/debugging/index.html">Debug your application with the
+ <a href="{@docRoot}tools/debugging/index.html">Debug your application with the
SDK debugging and logging tools</a>.</p>
<p>Last, you test your application using various Android SDK testing tools. For more
- information, see <a href="{@docRoot}guide/developing/testing/index.html">Test your application
+ information, see <a href="{@docRoot}tools/testing/index.html">Test your application
with the Testing and Instrumentation framework</a>.</p>
</li>
<li><strong>Publishing</strong>
<p>During this phase you configure and build your application for release and distribute your
application to users. For more information, see
- <a href="{@docRoot}guide/publishing/publishing_overview.html">Publishing Overview</a>.</p>
+ <a href="{@docRoot}tools/publishing/publishing_overview.html">Publishing Overview</a>.</p>
</li>
</ul>
@@ -66,15 +66,15 @@ development steps encompass four development phases, which include:</p>
all of the tools below, because you will have to run them from the command line.</p>
<dl>
- <dt><a href="{@docRoot}guide/developing/tools/android.html">android</a></dt>
+ <dt><a href="{@docRoot}tools/help/android.html">android</a></dt>
<dd>Create and update Android projects and create, move, and delete AVDs.</dd>
- <dt><a href="{@docRoot}guide/developing/devices/emulator.html">Android Emulator</a></dt>
+ <dt><a href="{@docRoot}tools/devices/emulator.html">Android Emulator</a></dt>
<dd>Run your Android applications on an emulated Android platform.</dd>
- <dt><a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a></dt>
+ <dt><a href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a></dt>
<dd>Interface with your emulator or connected device (install apps, shell the device, issue
commands, etc.).</dd>
@@ -108,7 +108,7 @@ Jarsigner to
sign your applications, but you can set up Eclipse to do this automatically as well.</p>
<p>For more information on the tools provided with the Android SDK, see the
- <a href="{@docRoot}guide/developing/tools/index.html">Tools</a> section of the documentation.</p>
+ <a href="{@docRoot}tools/index.html">Tools</a> section of the documentation.</p>
<h2 id="ThirdParty">Other Third-Party Development Tools</h2>
<p>
diff --git a/docs/html/tools/workflow/app-signing.jd b/docs/html/tools/workflow/app-signing.jd
new file mode 100644
index 000000000000..ac45242516b5
--- /dev/null
+++ b/docs/html/tools/workflow/app-signing.jd
@@ -0,0 +1,618 @@
+page.title=Signing Your Applications
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>Quickview</h2>
+
+<ul>
+<li>All Android apps <em>must</em> be signed</li>
+<li>You can sign with a self-signed key</li>
+<li>How you sign your apps is critical &mdash; read this document carefully</li>
+<li>Determine your signing strategy early in the development process</li>
+</ul>
+
+<h2>In this document</h2>
+
+<ol>
+<li><a href="#signing">Signing Process</a></li>
+<li><a href="#strategies">Signing Strategies</a></li>
+<li><a href="#setup">Basic Setup for Signing</a></li>
+<li><a href="#debugmode">Signing in Debug Mode</a></li>
+<li><a href="#releasemode">Signing Release Mode</a>
+ <ol>
+ <li><a href="#cert">Obtain a suitable private key</a></li>
+ <li><a href="#releasecompile">Compile the application in release mode</a></li>
+ <li><a href="#signapp">Sign your application with your private key</a></li>
+ <li><a href="#align">Align the final APK package</a></li>
+ <li><a href="#ExportWizard">Compile and sign with Eclipse ADT</a></li>
+ </ol>
+</li>
+<li><a href="#secure-key">Securing Your Private Key</a></li>
+
+</ol>
+
+<h2>See also</h2>
+
+<ol>
+<li><a href="{@docRoot}tools/publishing/versioning.html">Versioning Your Applications</a></li>
+<li><a href="{@docRoot}tools/publishing/preparing.html">Preparing to Publish</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>The Android system requires that all installed applications be digitally signed with a
+certificate whose private key is held by the application's developer. The Android system uses the
+certificate as a means of identifying the author of an application and establishing trust
+relationships between applications. The certificate is not used to control which applications the
+user can install. The certificate does not need to be signed by a certificate authority: it is
+perfectly allowable, and typical, for Android applications to use self-signed certificates.</p>
+
+<p>The important points to understand about signing Android applications are:</p>
+
+<ul>
+ <li>All applications <em>must</em> be signed. The system will not install an application
+on an emulator or a device if it is not signed.</li>
+ <li>To test and debug your application, the build tools sign your application with a special debug
+ key that is created by the Android SDK build tools.</li>
+ <li>When you are ready to release your application for end-users, you must sign it with a suitable
+ private key. You cannot publish an application that is signed with the debug key generated
+ by the SDK tools.</li>
+ <li>You can use self-signed certificates to sign your applications. No certificate authority is
+ needed.</li>
+ <li>The system tests a signer certificate's expiration date only at install time. If an
+application's signer certificate expires after the application is installed, the application
+will continue to function normally.</li>
+ <li>You can use standard tools &mdash; Keytool and Jarsigner &mdash; to generate keys and
+sign your application {@code .apk} files.</li>
+ <li>After you sign your application for release, we recommend that you use the
+ <code>zipalign</code> tool to optimize the final APK package.</li>
+</ul>
+
+<p>The Android system will not install or run an application that is not signed appropriately. This
+applies wherever the Android system is run, whether on an actual device or on the emulator.
+For this reason, you must <a href="#setup">set up signing</a> for your application before you can
+run it or debug it on an emulator or device.</p>
+
+<h2 id="signing">Signing Process</h3>
+
+<p>The Android build process signs your application differently depending on which build mode you
+use to build your application. There are two build modes: <em>debug mode</em> and <em>release
+mode</em>. You use debug mode when you are developing and testing your application. You use
+release mode when you want to build a release version of your application that you can
+distribute directly to users or publish on an application marketplace such as Google Play.</p>
+
+<p>When you build in <em>debug mode</em> the Android SDK build tools use the Keytool utility
+(included in the JDK) to create a debug key. Because the SDK build tools created the debug key,
+they know the debug key's alias and password. Each time you compile your application in debug mode,
+the build tools use the debug key along with the Jarsigner utility (also included in the JDK) to
+sign your application's <code>.apk</code> file. Because the alias and password are known to the SDK
+build tools, the tools don't need to prompt you for the debug key's alias and password each time
+you compile.</p>
+
+<p>When you build in <em>release mode</em> you use your own private key to sign your application. If
+you don't have a private key, you can use the Keytool utility to create one for you. When you
+compile your application in release mode, the build tools use your private key along with the
+Jarsigner utility to sign your application's <code>.apk</code> file. Because the certificate and
+private key you use are your own, you will have to provide the password for the keystore and key
+alias.</p>
+
+<p>The debug signing process happens automatically when you run or debug your application using
+Eclipse with the ADT plugin. Debug signing also happens automatically when you use the Ant build
+script with the <code>debug</code> option. You can automate the release signing process by using the
+Eclipse Export Wizard or by modifying the Ant build script and building with the
+<code>release</code> option.</p>
+
+<h2 id="strategies">Signing Strategies</h2>
+
+<p>Some aspects of application signing may affect how you approach the development
+of your application, especially if you are planning to release multiple
+applications. </p>
+
+<p>In general, the recommended strategy for all developers is to sign
+all of your applications with the same certificate, throughout the expected
+lifespan of your applications. There are several reasons why you should do so: </p>
+
+<ul>
+<li>Application upgrade &ndash; As you release updates to your application, you
+will want to continue to sign the updates with the same certificate or set of
+certificates, if you want users to upgrade seamlessly to the new version. When
+the system is installing an update to an application, it compares the
+certificate(s) in the new version with those in the existing version. If the
+certificates match exactly, including both the certificate data and order, then
+the system allows the update. If you sign the new version without using matching
+certificates, you will also need to assign a different package name to the
+application &mdash; in this case, the user installs the new version as a
+completely new application. </li>
+
+<li>Application modularity &ndash; The Android system allows applications that
+are signed by the same certificate to run in the same process, if the
+applications so requests, so that the system treats them as a single application.
+In this way you can deploy your application in modules, and users can update
+each of the modules independently if needed.</li>
+
+<li>Code/data sharing through permissions &ndash; The Android system provides
+signature-based permissions enforcement, so that an application can expose
+functionality to another application that is signed with a specified
+certificate. By signing multiple applications with the same certificate and
+using signature-based permissions checks, your applications can share code and
+data in a secure manner. </li>
+
+</ul>
+
+<p>Another important consideration in determining your signing strategy is
+how to set the validity period of the key that you will use to sign your
+applications.</p>
+
+<ul>
+<li>If you plan to support upgrades for a single application, you should ensure
+that your key has a validity period that exceeds the expected lifespan of
+that application. A validity period of 25 years or more is recommended.
+When your key's validity period expires, users will no longer be
+able to seamlessly upgrade to new versions of your application.</li>
+
+<li>If you will sign multiple distinct applications with the same key,
+you should ensure that your key's validity period exceeds the expected
+lifespan of <em>all versions of all of the applications</em>, including
+dependent applications that may be added to the suite in the future. </li>
+
+<li>If you plan to publish your application(s) on Google Play, the
+key you use to sign the application(s) must have a validity period
+ending after 22 October 2033. Google Play enforces this requirement
+to ensure that users can seamlessly upgrade applications when
+new versions are available. </li>
+</ul>
+
+<p>As you design your application, keep these points in mind and make sure to
+use a <a href="#cert">suitable certificate</a> to sign your applications. </p>
+
+<h2 id="setup">Basic Setup for Signing</h2>
+
+<p>Before you begin, make sure that the Keytool utility and Jarsigner utility are available to
+the SDK build tools. Both of these tools are available in the JDK. In most cases, you can tell
+the SDK build tools how to find these utilities by setting your <code>JAVA_HOME</code> environment
+variable so it references a suitable JDK. Alternatively, you can add the JDK version of Keytool and
+Jarsigner to your <code>PATH</code> variable.</p>
+
+<p>If you are developing on a version of Linux that originally came with GNU Compiler for
+Java, make sure that the system is using the JDK version of Keytool, rather than the gcj
+version. If Keytool is already in your <code>PATH</code>, it might be pointing to a symlink at
+<code>/usr/bin/keytool</code>. In this case, check the symlink target to be sure it points
+to the Keytool in the JDK.</p>
+
+<h2 id="debugmode">Signing in Debug Mode</h2>
+
+<p>The Android build tools provide a debug signing mode that makes it easier for you
+to develop and debug your application, while still meeting the Android system
+requirement for signing your APK.
+When using debug mode to build your app, the SDK tools invoke Keytool to automatically create
+a debug keystore and key. This debug key is then used to automatically sign the APK, so
+you do not need to sign the package with your own key.</p>
+
+<p>The SDK tools create the debug keystore/key with predetermined names/passwords:</p>
+<ul>
+<li>Keystore name: "debug.keystore"</li>
+<li>Keystore password: "android"</li>
+<li>Key alias: "androiddebugkey"</li>
+<li>Key password: "android"</li>
+<li>CN: "CN=Android Debug,O=Android,C=US"</li>
+</ul>
+
+<p>If necessary, you can change the location/name of the debug keystore/key or
+supply a custom debug keystore/key to use. However, any custom debug
+keystore/key must use the same keystore/key names and passwords as the default
+debug key (as described above). (To do so in Eclipse/ADT, go to
+<strong>Windows</strong> &gt; <strong>Preferences</strong> &gt;
+<strong>Android</strong> &gt; <strong>Build</strong>.) </p>
+
+<p class="caution"><strong>Caution:</strong> You <em>cannot</em> release your application
+to the public when signed with the debug certificate.</p>
+
+<h3>Eclipse Users</h3>
+
+<p>If you are developing in Eclipse/ADT (and have set up Keytool and Jarsigner as described above in
+<a href="#setup">Basic Setup for Signing</a>),
+signing in debug mode is enabled by default. When you run or debug your
+application, ADT signs the {@code .apk} file with the debug certificate, runs {@code zipalign} on
+the package, then installs it on
+the selected emulator or connected device. No specific action on your part is needed,
+provided ADT has access to Keytool.</p>
+
+<h3>Ant Users</h3>
+
+<p>If you are using Ant to build your {@code .apk} file, debug signing mode
+is enabled by using the <code>debug</code> option with the <code>ant</code> command
+(assuming that you are using a <code>build.xml</code> file generated by the
+<code>android</code> tool). When you run <code>ant debug</code> to
+compile your app, the build script generates a keystore/key and signs the APK for you.
+The script then also aligns the APK with the <code>zipalign</code> tool.
+No other action on your part is needed. Read
+<a href="{@docRoot}tools/building/building-cmdline.html#DebugMode">Building and Running Apps
+on the Command Line</a> for more information.</p>
+
+
+<h3 id="debugexpiry">Expiry of the Debug Certificate</h3>
+
+<p>The self-signed certificate used to sign your application in debug mode (the default on
+Eclipse/ADT and Ant builds) will have an expiration date of 365 days from its creation date.</p>
+
+<p>When the certificate expires, you will get a build error. On Ant builds, the error
+looks like this:</p>
+
+<pre>debug:
+[echo] Packaging bin/samples-debug.apk, and signing it with a debug key...
+[exec] Debug Certificate expired on 8/4/08 3:43 PM</pre>
+
+<p>In Eclipse/ADT, you will see a similar error in the Android console.</p>
+
+<p>To fix this problem, simply delete the <code>debug.keystore</code> file.
+The default storage location for AVDs is in <code>~/.android/</code> on OS X and Linux,
+in <code>C:\Documents and Settings\&lt;user>\.android\</code> on Windows XP, and in
+<code>C:\Users\&lt;user>\.android\</code> on Windows Vista and Windows 7.</p>
+
+
+<p>The next time you build, the build tools will regenerate a new keystore and debug key.</p>
+
+<p>Note that, if your development machine is using a non-Gregorian locale, the build
+tools may erroneously generate an already-expired debug certificate, so that you get an
+error when trying to compile your application. For workaround information, see the
+troubleshooting topic <a href="{@docRoot}resources/faq/troubleshooting.html#signingcalendar">
+I&nbsp;can't&nbsp;compile my app because the build tools generated an expired debug
+certificate</a>. </p>
+
+
+<h2 id="releasemode">Signing in Release Mode</h2>
+
+<p>When your application is ready for release to other users, you must:</p>
+<ol>
+ <li><a href="#cert">Obtain a suitable private key</a></li>
+ <li><a href="#releasecompile">Compile the application in release mode</a></li>
+ <li><a href="#signapp">Sign your application with your private key</a></li>
+ <li><a href="#align">Align the final APK package</a></li>
+</ol>
+
+<p>If you are developing in Eclipse with the ADT plugin, you can use the Export Wizard
+to perform the compile, sign, and align procedures. The Export Wizard even allows you to
+generate a new keystore and private key in the process. So if you use Eclipse, you can
+skip to <a href="#ExportWizard">Compile and sign with Eclipse ADT</a>.</p>
+
+
+
+<h3 id="cert">1. Obtain a suitable private key</h3>
+
+<p>In preparation for signing your application, you must first ensure that
+you have a suitable private key with which to sign. A suitable private
+key is one that:</p>
+
+<ul>
+<li>Is in your possession</li>
+<li>Represents the personal, corporate, or organizational entity to be identified
+with the application</li>
+<li>Has a validity period that exceeds the expected lifespan of the application
+or application suite. A validity period of more than 25 years is recommended.
+<p>If you plan to publish your application(s) on Google Play, note that a
+validity period ending after 22 October 2033 is a requirement. You can not upload an
+application if it is signed with a key whose validity expires before that date.
+</p></li>
+<li>Is not the debug key generated by the Android SDK tools. </li>
+</ul>
+
+<p>The key may be self-signed. If you do not have a suitable key, you must
+generate one using Keytool. Make sure that you have Keytool available, as described
+in <a href="#setup">Basic Setup</a>.</p>
+
+<p>To generate a self-signed key with Keytool, use the <code>keytool</code>
+command and pass any of the options listed below (and any others, as
+needed). </p>
+
+<p class="warning"><strong>Warning:</strong> Keep your private key secure.
+Before you run Keytool, make sure to read
+<a href="#secure-key">Securing Your Private Key</a> for a discussion of how to keep
+your key secure and why doing so is critically important to you and to users. In
+particular, when you are generating your key, you should select strong passwords
+for both the keystore and key.</p>
+
+<table>
+<tr>
+<th>Keytool Option</th>
+<th>Description</th>
+</tr>
+<tr>
+<td><code>-genkey</code></td><td>Generate a key pair (public and private
+keys)</td>
+</tr>
+<tr>
+<td><code>-v</code></td><td>Enable verbose output.</td>
+</tr>
+<tr>
+<td><code>-alias &lt;alias_name&gt;</code></td><td>An alias for the key. Only
+the first 8 characters of the alias are used.</td>
+</tr>
+<tr>
+<td><code>-keyalg &lt;alg&gt;</code></td><td>The encryption algorithm to use
+when generating the key. Both DSA and RSA are supported.</td>
+</tr>
+<tr>
+<td><code>-keysize &lt;size&gt;</code></td><td>The size of each generated key
+(bits). If not supplied, Keytool uses a default key size of 1024 bits. In
+general, we recommend using a key size of 2048 bits or higher. </td>
+</tr>
+<tr>
+<td><code>-dname &lt;name&gt;</code></td><td><p>A Distinguished Name that describes
+who created the key. The value is used as the issuer and subject fields in the
+self-signed certificate. </p><p>Note that you do not need to specify this option
+in the command line. If not supplied, Jarsigner prompts you to enter each
+of the Distinguished Name fields (CN, OU, and so on).</p></td>
+</tr>
+<tr>
+<td><code>-keypass &lt;password&gt;</code></td><td><p>The password for the
+key.</p> <p>As a security precaution, do not include this option in your command
+line. If not supplied, Keytool prompts you to enter the password. In this way,
+your password is not stored in your shell history.</p></td>
+</tr>
+<tr>
+<td><code>-validity &lt;valdays&gt;</code></td><td><p>The validity period for the
+key, in days. </p><p><strong>Note:</strong> A value of 10000 or greater is recommended.</p></td>
+</tr>
+<tr>
+<td><code>-keystore&nbsp;&lt;keystore-name&gt;.keystore</code></td><td>A name
+for the keystore containing the private key.</td>
+</tr>
+<tr>
+<td><code>-storepass &lt;password&gt;</code></td><td><p>A password for the
+keystore.</p><p>As a security precaution, do not include this option in your
+command line. If not supplied, Keytool prompts you to enter the password. In
+this way, your password is not stored in your shell history.</p></td>
+</tr>
+</table>
+
+<p>Here's an example of a Keytool command that generates a private key:</p>
+
+<pre>$ keytool -genkey -v -keystore my-release-key.keystore
+-alias alias_name -keyalg RSA -keysize 2048 -validity 10000</pre>
+
+<p>Running the example command above, Keytool prompts you to provide
+passwords for the keystore and key, and to provide the Distinguished
+Name fields for your key. It then generates the keystore as a file called
+<code>my-release-key.keystore</code>. The keystore and key are
+protected by the passwords you entered. The keystore contains
+a single key, valid for 10000 days. The alias is a name that you &mdash;
+will use later, to refer to this keystore when signing your application. </p>
+
+<p>For more information about Keytool, see the documentation at
+<a
+href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html">
+http://docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html</a></p>
+
+
+
+<h3 id="releasecompile">2. Compile the application in release mode</h3>
+
+<p>In order to release your application to users, you must compile it in release mode.
+In release mode, the compiled application is not signed by default and you will need
+to sign it with your private key.</p>
+
+<p class="caution"><strong>Caution:</strong>
+You can not release your application unsigned, or signed with the debug key.</p>
+
+<h4>With Eclipse</h4>
+
+<p>To export an <em>unsigned</em> APK from Eclipse, right-click the project in the Package
+Explorer and select <strong>Android Tools</strong> > <strong>Export Unsigned Application
+Package</strong>. Then specify the file location for the unsigned APK.
+(Alternatively, open your <code>AndroidManifest.xml</code> file in Eclipse, select
+the <strong>Manifest</strong> tab, and click <strong>Export an unsigned APK</strong>.)</p>
+
+<p>Note that you can combine the compiling and signing steps with the Export Wizard. See
+<a href="#ExportWizard">Compiling and signing with Eclipse ADT</a>.</p>
+
+<h4>With Ant</h4>
+
+<p>If you are using Ant, you can enable release mode by using the <code>release</code> option
+with the <code>ant</code> command. For example, if you are running Ant from the
+directory containing your {@code build.xml} file, the command would look like this:</p>
+
+<pre>$ ant release</pre>
+
+<p>By default, the build script compiles the application APK without signing it. The output file
+in your project {@code bin/} will be <code><em>&lt;your_project_name></em>-unsigned.apk</code>.
+Because the application APK is still unsigned, you must manually sign it with your private
+key and then align it using {@code zipalign}.</p>
+
+<p>However, the Ant build script can also perform the signing
+and aligning for you, if you have provided the path to your keystore and the name of
+your key alias in the project's {@code ant.properties} file. With this information provided,
+the build script will prompt you for your keystore and alias password when you perform
+<code>ant release</code>, it will sign the package and then align it. The final output
+file in {@code bin/} will instead be
+<code><em>&lt;your_project_name></em>-release.apk</code>. With these steps
+automated for you, you're able to skip the manual procedures below (steps 3 and 4).
+To learn how to specify your keystore and alias in the {@code ant.properties} file,
+see <a href="{@docRoot}tools/building/building-cmdline.html#ReleaseMode">
+Building and Running Apps on the Command Line</a>.</p>
+
+
+
+<h3 id="signapp">3. Sign your application with your private key</h3>
+
+<p>When you have an application package that is ready to be signed, you can do sign it
+using the Jarsigner tool. Make sure that you have Jarsigner available on your
+machine, as described in <a href="#setup">Basic Setup</a>. Also, make sure that
+the keystore containing your private key is available.</p>
+
+<p>To sign your application, you run Jarsigner, referencing both the
+application's APK and the keystore containing the private key with which to
+sign the APK. The table below shows the options you could use. </p>
+
+<table>
+<tr>
+<th>Jarsigner Option</th>
+<th>Description</th>
+</tr>
+<tr>
+<td><code>-keystore&nbsp;&lt;keystore-name&gt;.keystore</code></td><td>The name of
+the keystore containing your private key.</td>
+</tr>
+<tr>
+<td><code>-verbose</code></td><td>Enable verbose output.</td>
+</tr>
+<tr>
+<td><code>-sigalg</code></td><td>The name of the signature algorithim to use in signing the APK.
+Use the value {@code MD5withRSA}.</td>
+</tr>
+<tr>
+<td><code>-digestalg</code></td><td>The message digest algorithim to use in processing the entries
+of an APK. Use the value {@code SHA1}.</td>
+</tr>
+<tr>
+<td><code>-storepass &lt;password&gt;</code></td><td><p>The password for the
+keystore. </p><p>As a security precaution, do not include this option
+in your command line unless you are working at a secure computer.
+If not supplied, Jarsigner prompts you to enter the password. In this
+way, your password is not stored in your shell history.</p></td>
+</tr>
+<tr>
+<td><code>-keypass &lt;password&gt;</code></td><td><p>The password for the private
+key. </p><p>As a security precaution, do not include this option
+in your command line unless you are working at a secure computer.
+If not supplied, Jarsigner prompts you to enter the password. In this
+way, your password is not stored in your shell history.</p></td>
+</tr>
+</table>
+
+<p>Here's how you would use Jarsigner to sign an application package called
+<code>my_application.apk</code>, using the example keystore created above.
+</p>
+
+<pre>$ jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore my-release-key.keystore
+my_application.apk alias_name</pre>
+
+<p>Running the example command above, Jarsigner prompts you to provide
+passwords for the keystore and key. It then modifies the APK
+in-place, meaning the APK is now signed. Note that you can sign an
+APK multiple times with different keys.</p>
+
+<p class="caution"><strong>Caution:</strong> As of JDK 7, the default signing algorithim has
+changed, requiring you to specify the signature and digest algorithims ({@code -sigalg} and {@code
+-digestalg}) when you sign an APK.</p>
+
+<p>To verify that your APK is signed, you can use a command like this:</p>
+
+<pre>$ jarsigner -verify my_signed.apk</pre>
+
+<p>If the APK is signed properly, Jarsigner prints "jar verified".
+If you want more details, you can try one of these commands:</p>
+
+<pre>$ jarsigner -verify -verbose my_application.apk</pre>
+
+<p>or</p>
+
+<pre>$ jarsigner -verify -verbose -certs my_application.apk</pre>
+
+<p>The command above, with the <code>-certs</code> option added, will show you the
+"CN=" line that describes who created the key.</p>
+
+<p class="note"><strong>Note:</strong> If you see "CN=Android Debug", this means the APK was
+signed with the debug key generated by the Android SDK. If you intend to release
+your application, you must sign it with your private key instead of the debug
+key.</p>
+
+<p>For more information about Jarsigner, see the documentation at
+<a href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/jarsigner.html">
+http://docs.oracle.com/javase/6/docs/technotes/tools/windows/jarsigner.html</a></p>
+
+
+<h3 id="align">4. Align the final APK package</h3>
+
+<p>Once you have signed the APK with your private key, run <code>zipalign</code> on the file.
+This tool ensures that all uncompressed data starts with a particular byte alignment,
+relative to the start of the file. Ensuring alignment at 4-byte boundaries provides
+a performance optimization when installed on a device. When aligned, the Android
+system is able to read files with {@code mmap()}, even if
+they contain binary data with alignment restrictions, rather than copying all
+of the data from the package. The benefit is a reduction in the amount of
+RAM consumed by the running application.</p>
+
+<p>The <code>zipalign</code> tool is provided with the Android SDK, inside the
+<code>tools/</code> directory. To align your signed APK, execute:</p>
+
+<pre>$ zipalign -v 4 <em>your_project_name</em>-unaligned.apk <em>your_project_name</em>.apk</pre>
+
+<p>The {@code -v} flag turns on verbose output (optional). {@code 4} is the
+byte-alignment (don't use anything other than 4). The first file argument is
+your signed {@code .apk} file (the input) and the second file is the destination {@code .apk} file
+(the output). If you're overriding an existing APK, add the {@code -f} flag.</p>
+
+<p class="caution"><strong>Caution:</strong> Your input APK must be signed with your
+private key <strong>before</strong> you optimize the package with {@code zipalign}.
+If you sign it after using {@code zipalign}, it will undo the alignment.</p>
+
+<p>For more information, read about the
+<a href="{@docRoot}tools/help/zipalign.html">zipalign</a> tool.
+
+
+<h3 id="ExportWizard">Compile and sign with Eclipse ADT</h3>
+
+<p>If you are using Eclipse with the ADT plugin, you can use the Export Wizard to
+export a <em>signed</em> APK (and even create a new keystore,
+if necessary). The Export Wizard performs all the interaction with
+the Keytool and Jarsigner for you, which allows you to sign the package using a GUI
+instead of performing the manual procedures to compile, sign,
+and align, as discussed above. Once the wizard has compiled and signed your package,
+it will also perfom package alignment with {@code zipalign}.
+Because the Export Wizard uses both Keytool and Jarsigner, you should
+ensure that they are accessible on your computer, as described above
+in the <a href="#setup">Basic Setup for Signing</a>.</p>
+
+<p>To create a signed and aligned APK in Eclipse:</p>
+
+<ol>
+ <li>Select the project in the Package
+Explorer and select <strong>File > Export</strong>.</li>
+ <li>Open the Android folder, select Export Android Application,
+ and click <strong>Next</strong>.
+ <p>The Export Android Application wizard now starts, which will
+ guide you through the process of signing your application,
+ including steps for selecting the private key with which to sign the APK
+ (or creating a new keystore and private key).</p>
+ <li>Complete the Export Wizard and your application will be compiled,
+ signed, aligned, and ready for distribution.</li>
+</ol>
+
+
+
+<h2 id="secure-key">Securing Your Private Key</h2>
+
+<p>Maintaining the security of your private key is of critical importance, both
+to you and to the user. If you allow someone to use your key, or if you leave
+your keystore and passwords in an unsecured location such that a third-party
+could find and use them, your authoring identity and the trust of the user
+are compromised. </p>
+
+<p>If a third party should manage to take your key without your knowledge or
+permission, that person could sign and distribute applications that maliciously
+replace your authentic applications or corrupt them. Such a person could also
+sign and distribute applications under your identity that attack other
+applications or the system itself, or corrupt or steal user data. </p>
+
+<p>Your reputation as a developer entity depends on your securing your private
+key properly, at all times, until the key is expired. Here are some tips for
+keeping your key secure: </p>
+
+<ul>
+<li>Select strong passwords for the keystore and key.</li>
+<li>When you generate your key with Keytool, <em>do not</em> supply the
+<code>-storepass</code> and <code>-keypass</code> options at the command line.
+If you do so, your passwords will be available in your shell history,
+which any user on your computer could access.</li>
+<li>Similarly, when signing your applications with Jarsigner,
+<em>do not</em> supply the <code>-storepass</code> and <code>-keypass</code>
+options at the command line. </li>
+<li>Do not give or lend anyone your private key, and do not let unauthorized
+persons know your keystore and key passwords.</li>
+</ul>
+
+<p>In general, if you follow common-sense precautions when generating, using,
+and storing your key, it will remain secure. </p> \ No newline at end of file
diff --git a/docs/html/tools/workflow/index.jd b/docs/html/tools/workflow/index.jd
new file mode 100644
index 000000000000..5ae06e69faa3
--- /dev/null
+++ b/docs/html/tools/workflow/index.jd
@@ -0,0 +1,150 @@
+page.title=Introduction
+@jd:body
+
+<p>To develop apps for Android devices, you use a set of tools that are included in the Android SDK.
+Once you've downloaded and installed the SDK, you can access these tools right from your Eclipse IDE,
+through the ADT plugin, or from the command line. Developing with Eclipse is the preferred method because
+it can directly invoke the tools that you need while developing applications.</p>
+
+ <p>However, you may choose to develop with another IDE or a simple text editor and invoke the
+ tools on the command line or with scripts. This is a less streamlined way to develop because you
+ will sometimes have to call command line tools manually, but you will have access to the same
+ number of features that you would have in Eclipse.</p>
+
+<div class="figure" style="width:461px">
+ <img src="{@docRoot}images/developing/developing_overview.png"
+ alt="Development process for Android applications"
+ height="738" />
+ <p class="img-caption">
+ <strong>Figure 1.</strong> The development process for Android applications.
+ </p>
+</div>
+
+<p>The basic steps for developing applications (with or without Eclipse) are shown in figure 1. The
+development steps encompass four development phases, which include:</p>
+
+<ul>
+ <li><strong>Setup</strong>
+ <p>During this phase you install and set up your development environment. You also create
+ Android Virtual Devices (AVDs) and connect hardware devices on which you can install your
+ applications.</p>
+ <p>See <a href="{@docRoot}tools/devices/index.html">Managing Virtual Devices</a>
+ and <a href="{@docRoot}tools/device.html">Using Hardware Devices</a> for more
+ information.
+ </li>
+ <li><strong>Development</strong>
+ <p>During this phase you set up and develop your Android project, which contains all of the
+ source code and resource files for your application. For more informations, see
+ <a href="{@docRoot}tools/projects/index.html">Create an Android project</a>.</p>
+ </li>
+ <li><strong>Debugging and Testing</strong>
+ <p>During this phase you build your project into a debuggable <code>.apk</code> package that you
+ can install and run on the emulator or an Android-powered device. If you are using Eclipse,
+ builds are generated each time you project is saved. If you're using another IDE,
+ you can build your project using Ant and install it on a device using
+ <a href="{@docRoot}tools/help/adb.html">adb</a>. For more information, see
+ <a href="{@docRoot}tools/building/index.html">Build and run your application</a>.</p>
+ <p>Next, you debug your application using a JDWP-compliant debugger along with the debugging
+ and logging tools that are provided with the Android SDK. Eclipse already comes packaged with
+ a compatible debugger. For more information see,
+ <a href="{@docRoot}tools/debugging/index.html">Debug your application with the
+ SDK debugging and logging tools</a>.</p>
+ <p>Last, you test your application using various Android SDK testing tools. For more
+ information, see <a href="{@docRoot}tools/testing/index.html">Test your application
+ with the Testing and Instrumentation framework</a>.</p>
+ </li>
+ <li><strong>Publishing</strong>
+ <p>During this phase you configure and build your application for release and distribute your
+ application to users. For more information, see
+ <a href="{@docRoot}tools/publishing/publishing_overview.html">Publishing Overview</a>.</p>
+ </li>
+</ul>
+
+<h2 id="EssentialTools">Essential command line tools</h2>
+
+ <p>When developing in IDEs or editors other than Eclipse, be familiar with
+ all of the tools below, because you will have to run them from the command line.</p>
+
+ <dl>
+ <dt><a href="{@docRoot}tools/help/android.html">android</a></dt>
+
+ <dd>Create and update Android projects and create, move, and delete AVDs.</dd>
+
+ <dt><a href="{@docRoot}tools/devices/emulator.html">Android Emulator</a></dt>
+
+ <dd>Run your Android applications on an emulated Android platform.</dd>
+
+ <dt><a href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a></dt>
+
+ <dd>Interface with your emulator or connected device (install apps, shell the device, issue
+ commands, etc.).</dd>
+ </dl>
+
+ <p>In addition to the above tools that are included with the SDK, you need the following open
+ source and third-party tools:</p>
+
+ <dl>
+ <dt>Ant</dt>
+
+ <dd>To compile and build your Android project into an installable .apk file.</dd>
+
+ <dt>Keytool</dt>
+
+ <dd>To generate a keystore and private key, used to sign your .apk file. Keytool is part of the
+ JDK.</dd>
+
+ <dt>Jarsigner (or similar signing tool)</dt>
+
+ <dd>To sign your .apk file with a private key generated by Keytool. Jarsigner is part of the
+ JDK.</dd>
+ </dl>
+
+ <p>If you are using Eclipse and ADT, tools such as <code>adb</code> and <code>android</code>
+ are automatically called by Eclipse and ADT so you don't have to manually invoke these tools.
+ You need to be familiar with <code>adb</code>, however, because certain functions are not
+accessible from
+ Eclipse, such as the <code>adb</code> shell commands. You might also need to call Keytool and
+Jarsigner to
+ sign your applications, but you can set up Eclipse to do this automatically as well.</p>
+
+<p>For more information on the tools provided with the Android SDK, see the
+ <a href="{@docRoot}tools/index.html">Tools</a> section of the documentation.</p>
+
+<h2 id="ThirdParty">Other Third-Party Development Tools</h2>
+<p>
+ The tools described in this section are not developed by the Android SDK team. The Android Dev Guide
+ does not provide documentation for these tools. Please refer to the linked documents in each
+ section for documentation.
+</p>
+<h3 id="IntelliJ">Developing in IntelliJ IDEA</h3>
+<div style="float: right">
+<img alt="The IntelliJ graphical user interface" height="500px"
+src="{@docRoot}images/developing/intellijidea_android_ide.png"/>
+</div>
+<p>
+ IntelliJ IDEA is a powerful Java IDE from JetBrains that provides
+ full-cycle Android development support in both the free Community
+ Edition and the Ultimate edition.
+</p>
+<p>
+ The IDE ensures compatibility with the latest Android SDK and offers a
+ smart code editor with completion, quick navigation between code and
+ resources, a graphical debugger, unit testing support using Android
+ Testing Framework, and the ability to run applications in either the
+ emulator or a USB-connected device.
+</p>
+<p>
+ <strong>Links:</strong>
+</p>
+<ul>
+ <li>
+ <a href="http://www.jetbrains.com/idea">IntelliJ IDEA official website</a>
+</li>
+ <li>
+ <a href="http://www.jetbrains.com/idea/features/google_android.html">Android support in IntelliJ IDEA</a>
+</li>
+ <li>
+ <a href="http://wiki.jetbrains.net/intellij/Android">IntelliJ IDEA Android Tutorials</a>
+ </li>
+</ul>
+
diff --git a/docs/html/tools/workflow/publishing/app-signing.jd b/docs/html/tools/workflow/publishing/app-signing.jd
new file mode 100644
index 000000000000..ac45242516b5
--- /dev/null
+++ b/docs/html/tools/workflow/publishing/app-signing.jd
@@ -0,0 +1,618 @@
+page.title=Signing Your Applications
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>Quickview</h2>
+
+<ul>
+<li>All Android apps <em>must</em> be signed</li>
+<li>You can sign with a self-signed key</li>
+<li>How you sign your apps is critical &mdash; read this document carefully</li>
+<li>Determine your signing strategy early in the development process</li>
+</ul>
+
+<h2>In this document</h2>
+
+<ol>
+<li><a href="#signing">Signing Process</a></li>
+<li><a href="#strategies">Signing Strategies</a></li>
+<li><a href="#setup">Basic Setup for Signing</a></li>
+<li><a href="#debugmode">Signing in Debug Mode</a></li>
+<li><a href="#releasemode">Signing Release Mode</a>
+ <ol>
+ <li><a href="#cert">Obtain a suitable private key</a></li>
+ <li><a href="#releasecompile">Compile the application in release mode</a></li>
+ <li><a href="#signapp">Sign your application with your private key</a></li>
+ <li><a href="#align">Align the final APK package</a></li>
+ <li><a href="#ExportWizard">Compile and sign with Eclipse ADT</a></li>
+ </ol>
+</li>
+<li><a href="#secure-key">Securing Your Private Key</a></li>
+
+</ol>
+
+<h2>See also</h2>
+
+<ol>
+<li><a href="{@docRoot}tools/publishing/versioning.html">Versioning Your Applications</a></li>
+<li><a href="{@docRoot}tools/publishing/preparing.html">Preparing to Publish</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>The Android system requires that all installed applications be digitally signed with a
+certificate whose private key is held by the application's developer. The Android system uses the
+certificate as a means of identifying the author of an application and establishing trust
+relationships between applications. The certificate is not used to control which applications the
+user can install. The certificate does not need to be signed by a certificate authority: it is
+perfectly allowable, and typical, for Android applications to use self-signed certificates.</p>
+
+<p>The important points to understand about signing Android applications are:</p>
+
+<ul>
+ <li>All applications <em>must</em> be signed. The system will not install an application
+on an emulator or a device if it is not signed.</li>
+ <li>To test and debug your application, the build tools sign your application with a special debug
+ key that is created by the Android SDK build tools.</li>
+ <li>When you are ready to release your application for end-users, you must sign it with a suitable
+ private key. You cannot publish an application that is signed with the debug key generated
+ by the SDK tools.</li>
+ <li>You can use self-signed certificates to sign your applications. No certificate authority is
+ needed.</li>
+ <li>The system tests a signer certificate's expiration date only at install time. If an
+application's signer certificate expires after the application is installed, the application
+will continue to function normally.</li>
+ <li>You can use standard tools &mdash; Keytool and Jarsigner &mdash; to generate keys and
+sign your application {@code .apk} files.</li>
+ <li>After you sign your application for release, we recommend that you use the
+ <code>zipalign</code> tool to optimize the final APK package.</li>
+</ul>
+
+<p>The Android system will not install or run an application that is not signed appropriately. This
+applies wherever the Android system is run, whether on an actual device or on the emulator.
+For this reason, you must <a href="#setup">set up signing</a> for your application before you can
+run it or debug it on an emulator or device.</p>
+
+<h2 id="signing">Signing Process</h3>
+
+<p>The Android build process signs your application differently depending on which build mode you
+use to build your application. There are two build modes: <em>debug mode</em> and <em>release
+mode</em>. You use debug mode when you are developing and testing your application. You use
+release mode when you want to build a release version of your application that you can
+distribute directly to users or publish on an application marketplace such as Google Play.</p>
+
+<p>When you build in <em>debug mode</em> the Android SDK build tools use the Keytool utility
+(included in the JDK) to create a debug key. Because the SDK build tools created the debug key,
+they know the debug key's alias and password. Each time you compile your application in debug mode,
+the build tools use the debug key along with the Jarsigner utility (also included in the JDK) to
+sign your application's <code>.apk</code> file. Because the alias and password are known to the SDK
+build tools, the tools don't need to prompt you for the debug key's alias and password each time
+you compile.</p>
+
+<p>When you build in <em>release mode</em> you use your own private key to sign your application. If
+you don't have a private key, you can use the Keytool utility to create one for you. When you
+compile your application in release mode, the build tools use your private key along with the
+Jarsigner utility to sign your application's <code>.apk</code> file. Because the certificate and
+private key you use are your own, you will have to provide the password for the keystore and key
+alias.</p>
+
+<p>The debug signing process happens automatically when you run or debug your application using
+Eclipse with the ADT plugin. Debug signing also happens automatically when you use the Ant build
+script with the <code>debug</code> option. You can automate the release signing process by using the
+Eclipse Export Wizard or by modifying the Ant build script and building with the
+<code>release</code> option.</p>
+
+<h2 id="strategies">Signing Strategies</h2>
+
+<p>Some aspects of application signing may affect how you approach the development
+of your application, especially if you are planning to release multiple
+applications. </p>
+
+<p>In general, the recommended strategy for all developers is to sign
+all of your applications with the same certificate, throughout the expected
+lifespan of your applications. There are several reasons why you should do so: </p>
+
+<ul>
+<li>Application upgrade &ndash; As you release updates to your application, you
+will want to continue to sign the updates with the same certificate or set of
+certificates, if you want users to upgrade seamlessly to the new version. When
+the system is installing an update to an application, it compares the
+certificate(s) in the new version with those in the existing version. If the
+certificates match exactly, including both the certificate data and order, then
+the system allows the update. If you sign the new version without using matching
+certificates, you will also need to assign a different package name to the
+application &mdash; in this case, the user installs the new version as a
+completely new application. </li>
+
+<li>Application modularity &ndash; The Android system allows applications that
+are signed by the same certificate to run in the same process, if the
+applications so requests, so that the system treats them as a single application.
+In this way you can deploy your application in modules, and users can update
+each of the modules independently if needed.</li>
+
+<li>Code/data sharing through permissions &ndash; The Android system provides
+signature-based permissions enforcement, so that an application can expose
+functionality to another application that is signed with a specified
+certificate. By signing multiple applications with the same certificate and
+using signature-based permissions checks, your applications can share code and
+data in a secure manner. </li>
+
+</ul>
+
+<p>Another important consideration in determining your signing strategy is
+how to set the validity period of the key that you will use to sign your
+applications.</p>
+
+<ul>
+<li>If you plan to support upgrades for a single application, you should ensure
+that your key has a validity period that exceeds the expected lifespan of
+that application. A validity period of 25 years or more is recommended.
+When your key's validity period expires, users will no longer be
+able to seamlessly upgrade to new versions of your application.</li>
+
+<li>If you will sign multiple distinct applications with the same key,
+you should ensure that your key's validity period exceeds the expected
+lifespan of <em>all versions of all of the applications</em>, including
+dependent applications that may be added to the suite in the future. </li>
+
+<li>If you plan to publish your application(s) on Google Play, the
+key you use to sign the application(s) must have a validity period
+ending after 22 October 2033. Google Play enforces this requirement
+to ensure that users can seamlessly upgrade applications when
+new versions are available. </li>
+</ul>
+
+<p>As you design your application, keep these points in mind and make sure to
+use a <a href="#cert">suitable certificate</a> to sign your applications. </p>
+
+<h2 id="setup">Basic Setup for Signing</h2>
+
+<p>Before you begin, make sure that the Keytool utility and Jarsigner utility are available to
+the SDK build tools. Both of these tools are available in the JDK. In most cases, you can tell
+the SDK build tools how to find these utilities by setting your <code>JAVA_HOME</code> environment
+variable so it references a suitable JDK. Alternatively, you can add the JDK version of Keytool and
+Jarsigner to your <code>PATH</code> variable.</p>
+
+<p>If you are developing on a version of Linux that originally came with GNU Compiler for
+Java, make sure that the system is using the JDK version of Keytool, rather than the gcj
+version. If Keytool is already in your <code>PATH</code>, it might be pointing to a symlink at
+<code>/usr/bin/keytool</code>. In this case, check the symlink target to be sure it points
+to the Keytool in the JDK.</p>
+
+<h2 id="debugmode">Signing in Debug Mode</h2>
+
+<p>The Android build tools provide a debug signing mode that makes it easier for you
+to develop and debug your application, while still meeting the Android system
+requirement for signing your APK.
+When using debug mode to build your app, the SDK tools invoke Keytool to automatically create
+a debug keystore and key. This debug key is then used to automatically sign the APK, so
+you do not need to sign the package with your own key.</p>
+
+<p>The SDK tools create the debug keystore/key with predetermined names/passwords:</p>
+<ul>
+<li>Keystore name: "debug.keystore"</li>
+<li>Keystore password: "android"</li>
+<li>Key alias: "androiddebugkey"</li>
+<li>Key password: "android"</li>
+<li>CN: "CN=Android Debug,O=Android,C=US"</li>
+</ul>
+
+<p>If necessary, you can change the location/name of the debug keystore/key or
+supply a custom debug keystore/key to use. However, any custom debug
+keystore/key must use the same keystore/key names and passwords as the default
+debug key (as described above). (To do so in Eclipse/ADT, go to
+<strong>Windows</strong> &gt; <strong>Preferences</strong> &gt;
+<strong>Android</strong> &gt; <strong>Build</strong>.) </p>
+
+<p class="caution"><strong>Caution:</strong> You <em>cannot</em> release your application
+to the public when signed with the debug certificate.</p>
+
+<h3>Eclipse Users</h3>
+
+<p>If you are developing in Eclipse/ADT (and have set up Keytool and Jarsigner as described above in
+<a href="#setup">Basic Setup for Signing</a>),
+signing in debug mode is enabled by default. When you run or debug your
+application, ADT signs the {@code .apk} file with the debug certificate, runs {@code zipalign} on
+the package, then installs it on
+the selected emulator or connected device. No specific action on your part is needed,
+provided ADT has access to Keytool.</p>
+
+<h3>Ant Users</h3>
+
+<p>If you are using Ant to build your {@code .apk} file, debug signing mode
+is enabled by using the <code>debug</code> option with the <code>ant</code> command
+(assuming that you are using a <code>build.xml</code> file generated by the
+<code>android</code> tool). When you run <code>ant debug</code> to
+compile your app, the build script generates a keystore/key and signs the APK for you.
+The script then also aligns the APK with the <code>zipalign</code> tool.
+No other action on your part is needed. Read
+<a href="{@docRoot}tools/building/building-cmdline.html#DebugMode">Building and Running Apps
+on the Command Line</a> for more information.</p>
+
+
+<h3 id="debugexpiry">Expiry of the Debug Certificate</h3>
+
+<p>The self-signed certificate used to sign your application in debug mode (the default on
+Eclipse/ADT and Ant builds) will have an expiration date of 365 days from its creation date.</p>
+
+<p>When the certificate expires, you will get a build error. On Ant builds, the error
+looks like this:</p>
+
+<pre>debug:
+[echo] Packaging bin/samples-debug.apk, and signing it with a debug key...
+[exec] Debug Certificate expired on 8/4/08 3:43 PM</pre>
+
+<p>In Eclipse/ADT, you will see a similar error in the Android console.</p>
+
+<p>To fix this problem, simply delete the <code>debug.keystore</code> file.
+The default storage location for AVDs is in <code>~/.android/</code> on OS X and Linux,
+in <code>C:\Documents and Settings\&lt;user>\.android\</code> on Windows XP, and in
+<code>C:\Users\&lt;user>\.android\</code> on Windows Vista and Windows 7.</p>
+
+
+<p>The next time you build, the build tools will regenerate a new keystore and debug key.</p>
+
+<p>Note that, if your development machine is using a non-Gregorian locale, the build
+tools may erroneously generate an already-expired debug certificate, so that you get an
+error when trying to compile your application. For workaround information, see the
+troubleshooting topic <a href="{@docRoot}resources/faq/troubleshooting.html#signingcalendar">
+I&nbsp;can't&nbsp;compile my app because the build tools generated an expired debug
+certificate</a>. </p>
+
+
+<h2 id="releasemode">Signing in Release Mode</h2>
+
+<p>When your application is ready for release to other users, you must:</p>
+<ol>
+ <li><a href="#cert">Obtain a suitable private key</a></li>
+ <li><a href="#releasecompile">Compile the application in release mode</a></li>
+ <li><a href="#signapp">Sign your application with your private key</a></li>
+ <li><a href="#align">Align the final APK package</a></li>
+</ol>
+
+<p>If you are developing in Eclipse with the ADT plugin, you can use the Export Wizard
+to perform the compile, sign, and align procedures. The Export Wizard even allows you to
+generate a new keystore and private key in the process. So if you use Eclipse, you can
+skip to <a href="#ExportWizard">Compile and sign with Eclipse ADT</a>.</p>
+
+
+
+<h3 id="cert">1. Obtain a suitable private key</h3>
+
+<p>In preparation for signing your application, you must first ensure that
+you have a suitable private key with which to sign. A suitable private
+key is one that:</p>
+
+<ul>
+<li>Is in your possession</li>
+<li>Represents the personal, corporate, or organizational entity to be identified
+with the application</li>
+<li>Has a validity period that exceeds the expected lifespan of the application
+or application suite. A validity period of more than 25 years is recommended.
+<p>If you plan to publish your application(s) on Google Play, note that a
+validity period ending after 22 October 2033 is a requirement. You can not upload an
+application if it is signed with a key whose validity expires before that date.
+</p></li>
+<li>Is not the debug key generated by the Android SDK tools. </li>
+</ul>
+
+<p>The key may be self-signed. If you do not have a suitable key, you must
+generate one using Keytool. Make sure that you have Keytool available, as described
+in <a href="#setup">Basic Setup</a>.</p>
+
+<p>To generate a self-signed key with Keytool, use the <code>keytool</code>
+command and pass any of the options listed below (and any others, as
+needed). </p>
+
+<p class="warning"><strong>Warning:</strong> Keep your private key secure.
+Before you run Keytool, make sure to read
+<a href="#secure-key">Securing Your Private Key</a> for a discussion of how to keep
+your key secure and why doing so is critically important to you and to users. In
+particular, when you are generating your key, you should select strong passwords
+for both the keystore and key.</p>
+
+<table>
+<tr>
+<th>Keytool Option</th>
+<th>Description</th>
+</tr>
+<tr>
+<td><code>-genkey</code></td><td>Generate a key pair (public and private
+keys)</td>
+</tr>
+<tr>
+<td><code>-v</code></td><td>Enable verbose output.</td>
+</tr>
+<tr>
+<td><code>-alias &lt;alias_name&gt;</code></td><td>An alias for the key. Only
+the first 8 characters of the alias are used.</td>
+</tr>
+<tr>
+<td><code>-keyalg &lt;alg&gt;</code></td><td>The encryption algorithm to use
+when generating the key. Both DSA and RSA are supported.</td>
+</tr>
+<tr>
+<td><code>-keysize &lt;size&gt;</code></td><td>The size of each generated key
+(bits). If not supplied, Keytool uses a default key size of 1024 bits. In
+general, we recommend using a key size of 2048 bits or higher. </td>
+</tr>
+<tr>
+<td><code>-dname &lt;name&gt;</code></td><td><p>A Distinguished Name that describes
+who created the key. The value is used as the issuer and subject fields in the
+self-signed certificate. </p><p>Note that you do not need to specify this option
+in the command line. If not supplied, Jarsigner prompts you to enter each
+of the Distinguished Name fields (CN, OU, and so on).</p></td>
+</tr>
+<tr>
+<td><code>-keypass &lt;password&gt;</code></td><td><p>The password for the
+key.</p> <p>As a security precaution, do not include this option in your command
+line. If not supplied, Keytool prompts you to enter the password. In this way,
+your password is not stored in your shell history.</p></td>
+</tr>
+<tr>
+<td><code>-validity &lt;valdays&gt;</code></td><td><p>The validity period for the
+key, in days. </p><p><strong>Note:</strong> A value of 10000 or greater is recommended.</p></td>
+</tr>
+<tr>
+<td><code>-keystore&nbsp;&lt;keystore-name&gt;.keystore</code></td><td>A name
+for the keystore containing the private key.</td>
+</tr>
+<tr>
+<td><code>-storepass &lt;password&gt;</code></td><td><p>A password for the
+keystore.</p><p>As a security precaution, do not include this option in your
+command line. If not supplied, Keytool prompts you to enter the password. In
+this way, your password is not stored in your shell history.</p></td>
+</tr>
+</table>
+
+<p>Here's an example of a Keytool command that generates a private key:</p>
+
+<pre>$ keytool -genkey -v -keystore my-release-key.keystore
+-alias alias_name -keyalg RSA -keysize 2048 -validity 10000</pre>
+
+<p>Running the example command above, Keytool prompts you to provide
+passwords for the keystore and key, and to provide the Distinguished
+Name fields for your key. It then generates the keystore as a file called
+<code>my-release-key.keystore</code>. The keystore and key are
+protected by the passwords you entered. The keystore contains
+a single key, valid for 10000 days. The alias is a name that you &mdash;
+will use later, to refer to this keystore when signing your application. </p>
+
+<p>For more information about Keytool, see the documentation at
+<a
+href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html">
+http://docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html</a></p>
+
+
+
+<h3 id="releasecompile">2. Compile the application in release mode</h3>
+
+<p>In order to release your application to users, you must compile it in release mode.
+In release mode, the compiled application is not signed by default and you will need
+to sign it with your private key.</p>
+
+<p class="caution"><strong>Caution:</strong>
+You can not release your application unsigned, or signed with the debug key.</p>
+
+<h4>With Eclipse</h4>
+
+<p>To export an <em>unsigned</em> APK from Eclipse, right-click the project in the Package
+Explorer and select <strong>Android Tools</strong> > <strong>Export Unsigned Application
+Package</strong>. Then specify the file location for the unsigned APK.
+(Alternatively, open your <code>AndroidManifest.xml</code> file in Eclipse, select
+the <strong>Manifest</strong> tab, and click <strong>Export an unsigned APK</strong>.)</p>
+
+<p>Note that you can combine the compiling and signing steps with the Export Wizard. See
+<a href="#ExportWizard">Compiling and signing with Eclipse ADT</a>.</p>
+
+<h4>With Ant</h4>
+
+<p>If you are using Ant, you can enable release mode by using the <code>release</code> option
+with the <code>ant</code> command. For example, if you are running Ant from the
+directory containing your {@code build.xml} file, the command would look like this:</p>
+
+<pre>$ ant release</pre>
+
+<p>By default, the build script compiles the application APK without signing it. The output file
+in your project {@code bin/} will be <code><em>&lt;your_project_name></em>-unsigned.apk</code>.
+Because the application APK is still unsigned, you must manually sign it with your private
+key and then align it using {@code zipalign}.</p>
+
+<p>However, the Ant build script can also perform the signing
+and aligning for you, if you have provided the path to your keystore and the name of
+your key alias in the project's {@code ant.properties} file. With this information provided,
+the build script will prompt you for your keystore and alias password when you perform
+<code>ant release</code>, it will sign the package and then align it. The final output
+file in {@code bin/} will instead be
+<code><em>&lt;your_project_name></em>-release.apk</code>. With these steps
+automated for you, you're able to skip the manual procedures below (steps 3 and 4).
+To learn how to specify your keystore and alias in the {@code ant.properties} file,
+see <a href="{@docRoot}tools/building/building-cmdline.html#ReleaseMode">
+Building and Running Apps on the Command Line</a>.</p>
+
+
+
+<h3 id="signapp">3. Sign your application with your private key</h3>
+
+<p>When you have an application package that is ready to be signed, you can do sign it
+using the Jarsigner tool. Make sure that you have Jarsigner available on your
+machine, as described in <a href="#setup">Basic Setup</a>. Also, make sure that
+the keystore containing your private key is available.</p>
+
+<p>To sign your application, you run Jarsigner, referencing both the
+application's APK and the keystore containing the private key with which to
+sign the APK. The table below shows the options you could use. </p>
+
+<table>
+<tr>
+<th>Jarsigner Option</th>
+<th>Description</th>
+</tr>
+<tr>
+<td><code>-keystore&nbsp;&lt;keystore-name&gt;.keystore</code></td><td>The name of
+the keystore containing your private key.</td>
+</tr>
+<tr>
+<td><code>-verbose</code></td><td>Enable verbose output.</td>
+</tr>
+<tr>
+<td><code>-sigalg</code></td><td>The name of the signature algorithim to use in signing the APK.
+Use the value {@code MD5withRSA}.</td>
+</tr>
+<tr>
+<td><code>-digestalg</code></td><td>The message digest algorithim to use in processing the entries
+of an APK. Use the value {@code SHA1}.</td>
+</tr>
+<tr>
+<td><code>-storepass &lt;password&gt;</code></td><td><p>The password for the
+keystore. </p><p>As a security precaution, do not include this option
+in your command line unless you are working at a secure computer.
+If not supplied, Jarsigner prompts you to enter the password. In this
+way, your password is not stored in your shell history.</p></td>
+</tr>
+<tr>
+<td><code>-keypass &lt;password&gt;</code></td><td><p>The password for the private
+key. </p><p>As a security precaution, do not include this option
+in your command line unless you are working at a secure computer.
+If not supplied, Jarsigner prompts you to enter the password. In this
+way, your password is not stored in your shell history.</p></td>
+</tr>
+</table>
+
+<p>Here's how you would use Jarsigner to sign an application package called
+<code>my_application.apk</code>, using the example keystore created above.
+</p>
+
+<pre>$ jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore my-release-key.keystore
+my_application.apk alias_name</pre>
+
+<p>Running the example command above, Jarsigner prompts you to provide
+passwords for the keystore and key. It then modifies the APK
+in-place, meaning the APK is now signed. Note that you can sign an
+APK multiple times with different keys.</p>
+
+<p class="caution"><strong>Caution:</strong> As of JDK 7, the default signing algorithim has
+changed, requiring you to specify the signature and digest algorithims ({@code -sigalg} and {@code
+-digestalg}) when you sign an APK.</p>
+
+<p>To verify that your APK is signed, you can use a command like this:</p>
+
+<pre>$ jarsigner -verify my_signed.apk</pre>
+
+<p>If the APK is signed properly, Jarsigner prints "jar verified".
+If you want more details, you can try one of these commands:</p>
+
+<pre>$ jarsigner -verify -verbose my_application.apk</pre>
+
+<p>or</p>
+
+<pre>$ jarsigner -verify -verbose -certs my_application.apk</pre>
+
+<p>The command above, with the <code>-certs</code> option added, will show you the
+"CN=" line that describes who created the key.</p>
+
+<p class="note"><strong>Note:</strong> If you see "CN=Android Debug", this means the APK was
+signed with the debug key generated by the Android SDK. If you intend to release
+your application, you must sign it with your private key instead of the debug
+key.</p>
+
+<p>For more information about Jarsigner, see the documentation at
+<a href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/jarsigner.html">
+http://docs.oracle.com/javase/6/docs/technotes/tools/windows/jarsigner.html</a></p>
+
+
+<h3 id="align">4. Align the final APK package</h3>
+
+<p>Once you have signed the APK with your private key, run <code>zipalign</code> on the file.
+This tool ensures that all uncompressed data starts with a particular byte alignment,
+relative to the start of the file. Ensuring alignment at 4-byte boundaries provides
+a performance optimization when installed on a device. When aligned, the Android
+system is able to read files with {@code mmap()}, even if
+they contain binary data with alignment restrictions, rather than copying all
+of the data from the package. The benefit is a reduction in the amount of
+RAM consumed by the running application.</p>
+
+<p>The <code>zipalign</code> tool is provided with the Android SDK, inside the
+<code>tools/</code> directory. To align your signed APK, execute:</p>
+
+<pre>$ zipalign -v 4 <em>your_project_name</em>-unaligned.apk <em>your_project_name</em>.apk</pre>
+
+<p>The {@code -v} flag turns on verbose output (optional). {@code 4} is the
+byte-alignment (don't use anything other than 4). The first file argument is
+your signed {@code .apk} file (the input) and the second file is the destination {@code .apk} file
+(the output). If you're overriding an existing APK, add the {@code -f} flag.</p>
+
+<p class="caution"><strong>Caution:</strong> Your input APK must be signed with your
+private key <strong>before</strong> you optimize the package with {@code zipalign}.
+If you sign it after using {@code zipalign}, it will undo the alignment.</p>
+
+<p>For more information, read about the
+<a href="{@docRoot}tools/help/zipalign.html">zipalign</a> tool.
+
+
+<h3 id="ExportWizard">Compile and sign with Eclipse ADT</h3>
+
+<p>If you are using Eclipse with the ADT plugin, you can use the Export Wizard to
+export a <em>signed</em> APK (and even create a new keystore,
+if necessary). The Export Wizard performs all the interaction with
+the Keytool and Jarsigner for you, which allows you to sign the package using a GUI
+instead of performing the manual procedures to compile, sign,
+and align, as discussed above. Once the wizard has compiled and signed your package,
+it will also perfom package alignment with {@code zipalign}.
+Because the Export Wizard uses both Keytool and Jarsigner, you should
+ensure that they are accessible on your computer, as described above
+in the <a href="#setup">Basic Setup for Signing</a>.</p>
+
+<p>To create a signed and aligned APK in Eclipse:</p>
+
+<ol>
+ <li>Select the project in the Package
+Explorer and select <strong>File > Export</strong>.</li>
+ <li>Open the Android folder, select Export Android Application,
+ and click <strong>Next</strong>.
+ <p>The Export Android Application wizard now starts, which will
+ guide you through the process of signing your application,
+ including steps for selecting the private key with which to sign the APK
+ (or creating a new keystore and private key).</p>
+ <li>Complete the Export Wizard and your application will be compiled,
+ signed, aligned, and ready for distribution.</li>
+</ol>
+
+
+
+<h2 id="secure-key">Securing Your Private Key</h2>
+
+<p>Maintaining the security of your private key is of critical importance, both
+to you and to the user. If you allow someone to use your key, or if you leave
+your keystore and passwords in an unsecured location such that a third-party
+could find and use them, your authoring identity and the trust of the user
+are compromised. </p>
+
+<p>If a third party should manage to take your key without your knowledge or
+permission, that person could sign and distribute applications that maliciously
+replace your authentic applications or corrupt them. Such a person could also
+sign and distribute applications under your identity that attack other
+applications or the system itself, or corrupt or steal user data. </p>
+
+<p>Your reputation as a developer entity depends on your securing your private
+key properly, at all times, until the key is expired. Here are some tips for
+keeping your key secure: </p>
+
+<ul>
+<li>Select strong passwords for the keystore and key.</li>
+<li>When you generate your key with Keytool, <em>do not</em> supply the
+<code>-storepass</code> and <code>-keypass</code> options at the command line.
+If you do so, your passwords will be available in your shell history,
+which any user on your computer could access.</li>
+<li>Similarly, when signing your applications with Jarsigner,
+<em>do not</em> supply the <code>-storepass</code> and <code>-keypass</code>
+options at the command line. </li>
+<li>Do not give or lend anyone your private key, and do not let unauthorized
+persons know your keystore and key passwords.</li>
+</ul>
+
+<p>In general, if you follow common-sense precautions when generating, using,
+and storing your key, it will remain secure. </p> \ No newline at end of file
diff --git a/docs/html/guide/publishing/preparing.jd b/docs/html/tools/workflow/publishing/preparing.jd
index 8e75728edcd1..4633d7e85af5 100644
--- a/docs/html/guide/publishing/preparing.jd
+++ b/docs/html/tools/workflow/publishing/preparing.jd
@@ -20,15 +20,15 @@ page.title=Preparing for Release
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/publishing/publishing_overview.html">Publishing Overview</a></li>
- <li><a href="{@docRoot}guide/publishing/app-signing.html">Signing Your Applications</a></li>
- <li><a href="{@docRoot}guide/publishing/publishing.html">Publishing on Google Play</a></li>
+ <li><a href="{@docRoot}tools/publishing/publishing_overview.html">Publishing Overview</a></li>
+ <li><a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a></li>
+ <li><a href="{@docRoot}tools/publishing/publishing.html">Publishing on Google Play</a></li>
</ol>
</div>
</div>
<p>Before you distribute your Android application to users you need to prepare it for release. The
-preparation process is a required <a href="{@docRoot}guide/developing/index.html">development
+preparation process is a required <a href="{@docRoot}tools/workflow/index.html">development
task</a> for all Android applications and is the first step in the publishing process (see figure
1).</p>
@@ -44,7 +44,7 @@ application marketplace such as Google Play.</p>
<p>This document summarizes the main tasks you need to perform to prepare your application for
release. The tasks that are described in this document apply to all Android applications regardless
how they are released or distributed to users. If you are releasing your application through Google
-Play, you should also read <a href="{@docRoot}guide/publishing/publishing.html">Publishing on
+Play, you should also read <a href="{@docRoot}tools/publishing/publishing.html">Publishing on
Google Play</a> to be sure your release-ready application satisfies all Google Play
requirements.</p>
@@ -58,7 +58,7 @@ in this document.</p>
id="figure1" />
<p class="img-caption">
<strong>Figure 1.</strong> Preparing for release is a required <a
-href="{@docRoot}guide/developing/index.html">development
+href="{@docRoot}tools/workflow/index.html">development
task</a> and is the first step in the publishing process.
</p>
@@ -97,8 +97,8 @@ and create promotional text while you are gathering materials for release.</p>
<p>You usually perform the tasks listed in figure 2 after you have throroughly debugged and tested
your application. The Android SDK contains several tools to help you test and debug your Android
applications. For more information, see the <a
-href="{@docRoot}guide/developing/debugging/index.html">Debugging</a> and <a
-href="{@docRoot}guide/developing/testing/index.html">Testing</a> sections in the Dev Guide.</p>
+href="{@docRoot}tools/debugging/index.html">Debugging</a> and <a
+href="{@docRoot}tools/testing/index.html">Testing</a> sections in the Dev Guide.</p>
<h2 id="publishing-gather">Gathering Materials and Resources</h2>
@@ -114,7 +114,7 @@ developer holds the private key). The Android system uses the certificate as a m
the author of an application and establishing trust relationships between applications. The
certificate that you use for signing does not need to be signed by a certificate authority; the
Android system allows you to sign your applications with a self-signed certificate. To learn about
-certificate requirements, see <a href="{@docRoot}guide/publishing/app-signing.html#cert">Obtain a
+certificate requirements, see <a href="{@docRoot}tools/publishing/app-signing.html#cert">Obtain a
suitable private key</a>.</p>
<p class="caution"><strong>Important:</strong> Your application must be signed with a cryptographic
@@ -194,7 +194,7 @@ added to your code, such as {@link android.os.Debug#startMethodTracing()} and
<h4>Clean up your project directories</h4>
<p>Clean up your project and make sure it conforms to the directory structure described in <a
-href="{@docRoot}guide/developing/projects/index.html#ApplicationProjects">Android Projects</a>.
+href="{@docRoot}tools/projects/index.html#ApplicationProjects">Android Projects</a>.
Leaving stray or orphaned files in your project can prevent your application from compiling and
cause your application to behave unpredictably. At a minimum you should do the following cleanup
tasks:</p>
@@ -202,7 +202,7 @@ tasks:</p>
<ul>
<li>Review the contents of your <code>jni/</code>, <code>lib/</code>, and <code>src/</code>
directories. The <code>jni/</code> directory should contain only source files associated with the
- <a href="{@docRoot}sdk/ndk/index.html">Android NDK</a>, such as
+ <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a>, such as
<code>.c</code>, <code>.cpp</code>, <code>.h</code>, and <code>.mk</code> files. The
<code>lib/</code> directory should contain only third-party library files or private library
files, including prebuilt shared and static libraries (for example, <code>.so</code> files). The
@@ -237,7 +237,7 @@ tasks:</p>
<p>We recommend that you specify values for these attributes, which are located in the
<a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a>
element. For more information see
- <a href="{@docRoot}guide/publishing/versioning.html">Versioning your Application</a>.</p>
+ <a href="{@docRoot}tools/publishing/versioning.html">Versioning your Application</a>.</p>
</li>
</ul>
@@ -271,7 +271,7 @@ doing the following:</p>
<li><strong>Consider using the Support Library</strong>
<p>If your application is designed for devices running Android 3.x, make your application
compatible with older versions of Android by adding the
- <a href="{@docRoot}sdk/compatibility-library.html">Support Library</a> to your
+ <a href="{@docRoot}tools/extras/support-library.html">Support Library</a> to your
application project. The Support Library provides static support libraries that you can add to
your Android application, which enables you to use APIs that are either not available on
older platform versions or use utility APIs that are not part of the framework APIs.</p>
@@ -291,7 +291,7 @@ current user has purchased it. Using Google Play Licensing is optional even if y
releasing your app through Google Play.</p>
<p>For more information about Google Play Licensing Service and how to use it in your
-application, see <a href="{@docRoot}guide/market/licensing/index.html">Application Licensing</a>.</p>
+application, see <a href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a>.</p>
<h2 id="publishing-build">Building Your Application for Release</h2>
@@ -305,35 +305,35 @@ the Ant build script from the command line, you can automate the entire build pr
<p>You can use the Eclipse Export Wizard to build a release-ready <code>.apk</code> file that is
signed with your private key and optimized. To learn how to run the Export Wizard, see
-<a href="{@docRoot}guide/publishing/app-signing.html#ExportWizard">Compile and sign with Eclipse
+<a href="{@docRoot}tools/publishing/app-signing.html#ExportWizard">Compile and sign with Eclipse
ADT</a>. The Export Wizard compiles your application for release, signs your application with your
private key, and optimizes your application with the zipalign tool. The Export Wizard should run
successfully if you have run or debugged your application from Eclipse and you have no errors in
-your application (see <a href="{@docRoot}guide/developing/building/building-eclipse.html">Building
+your application (see <a href="{@docRoot}tools/building/building-eclipse.html">Building
and Running from Eclipse with ADT</a> for more information.</p>
<p>The Export Wizard assumes that you have a <a href="#billing-keys">certificate and private key</a>
suitable for signing your application. If you do not have a suitable certificate and private key,
the Export Wizard will help you generate one (see
-<a href="{@docRoot}guide/publishing/app-signing.html">Signing Your Applications</a> for more
+<a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a> for more
information about the signing process and signing guidelines.</p>
<h3>Building with Ant</h3>
<p>You can use the Ant build script (included in the Android SDK) to build a release-ready
<code>.apk</code> file that is signed with your private key and optimized. To learn how to do this,
-see <a href="{@docRoot}guide/developing/building/building-cmdline.html#ReleaseMode">Building in
+see <a href="{@docRoot}tools/building/building-cmdline.html#ReleaseMode">Building in
Release Mode</a>. This build method assumes you have a <a href="#billing-keys">certificate and
private key</a> suitable for signing your application. If you do not have a suitable certificate and
private key, the Export Wizard will help you generate one (see
-<a href="{@docRoot}guide/publishing/app-signing.html">Signing Your Applications</a> for more
+<a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a> for more
information about the signing process and signing guidelines.</p>
<h2 id="publishing-resources">Preparing External Servers and Resources</h2>
<p>If your application relies on a remote server, make sure the server is secure and that it is
configured for production use. This is particularly important if you are implementing <a
-href="{@docRoot}guide/market/billing/index.html">in-app billing</a> in your application and you are
+href="{@docRoot}guide/google/play/billing/index.html">in-app billing</a> in your application and you are
performing the signature verification step on a remote server.</p>
<p>Also, if your application fetches content from a remote server or a real-time service (such as a
@@ -347,12 +347,12 @@ one handset-sized device and one tablet-sized device to verify that your user in
sized correctly and that your application's performance and battery efficiency are acceptable.</p>
<p>As a starting point for testing, see
-<a href="{@docRoot}guide/topics/testing/what_to_test.html">What to Test</a>. This article provides
+<a href="{@docRoot}tools/testing/what_to_test.html">What to Test</a>. This article provides
a summary of common Android situations that you should consider when you are testing. When you are
done testing and you are satisfied that the release version of your application
behaves correctly, you can release your application to users. For more information, see
-<a href="{@docRoot}guide/publishing/publishing_overview.html#publishing-release">Releasing Your
+<a href="{@docRoot}tools/publishing/publishing_overview.html#publishing-release">Releasing Your
Application to Users</a>. If you are publishing your application on Google Play, see
-<a href="{@docRoot}guide/publishing/publishing.html">Publishing on Google Play</a>.</p>
+<a href="{@docRoot}tools/publishing/publishing.html">Publishing on Google Play</a>.</p>
diff --git a/docs/html/guide/publishing/publishing.jd b/docs/html/tools/workflow/publishing/publishing.jd
index b9513ab034ef..a54b030290ed 100644
--- a/docs/html/guide/publishing/publishing.jd
+++ b/docs/html/tools/workflow/publishing/publishing.jd
@@ -34,8 +34,8 @@ page.title=Publishing on Google Play
<h2>See also</h2>
<ol>
-<li><a href="{@docRoot}guide/publishing/publishing_overview.html">Publishing Overview</a></li>
-<li><a href="{@docRoot}guide/publishing/preparing.html">Preparing for Release</a></li>
+<li><a href="{@docRoot}tools/publishing/publishing_overview.html">Publishing Overview</a></li>
+<li><a href="{@docRoot}tools/publishing/preparing.html">Preparing for Release</a></li>
</ol>
<div id="qv-extra">
@@ -73,8 +73,8 @@ your Android applications to users around the world. When you release your appli
Google Play you have access to a suite of developer tools that let you analyze your sales,
identify market trends, and control who your applications are being distributed to. You also have
access to several revenue-enhancing features, such as <a
-href="{@docRoot}guide/market/billing/index.html">in-app billing</a> and
-<a href="{@docRoot}guide/market/licensing/index.html">application licensing</a>.</p>
+href="{@docRoot}guide/google/play/billing/index.html">in-app billing</a> and
+<a href="{@docRoot}guide/google/play/licensing/index.html">application licensing</a>.</p>
<p>Before you can publish applications on Google Play, you need to <a
href="http://play.google.com/apps/publish">register</a> as a Google Play developer. During the
@@ -108,12 +108,12 @@ status of your app from Unpublished to Published.</li>
id="figure1" />
<p class="img-caption">
<strong>Figure 1.</strong> To publish apps on Google Play you must first <a
-href="{@docRoot}guide/publishing/preparing.html">prepare your app for release</a> and then perform
+href="{@docRoot}tools/publishing/preparing.html">prepare your app for release</a> and then perform
three simple tasks.
</p>
<p class="caution"><strong>Important:</strong> You must <a
-href="{@docRoot}guide/publishing/preparing.html">prepare your application for release</a> before you
+href="{@docRoot}tools/publishing/preparing.html">prepare your application for release</a> before you
can publish it on Google Play. When you prepare your application for release you configure it for
release and build it in release mode. Building in release mode signs your application's {@code .apk}
file with your private release key. You cannot publish an application on Google Play unless it is
@@ -150,7 +150,7 @@ href="https://support.google.com/androidmarket/developer/bin/answer.py?hl=en&ans
href="http://support.google.com/androidmarket/developer/bin/answer.py?hl=en&answer=188189&topic=
2364761&ctx=topic">content rating</a>. In addition, if you want to sell items within your app using
the in-app billing feature, you can use the Developer Console to <a
-href="http://grendel.sea.corp.google.com:48014/guide/market/billing/billing_admin.html#billing-list
+href="http://grendel.sea.corp.google.com:48014/guide/google/play/billing/billing_admin.html#billing-list
- setup">create a product list</a> and control which items are available for purchase in your
app.</p>
@@ -192,9 +192,9 @@ using Google Play filters. Filtering compares device configurations that you dec
app's manifest file to the configuration defined by a device. For example, if you declare the camera
filter in your manifest, only those devices that have a camera will see your app on Google
Play. Filters must be configured in your application's manifest file when you are <a
-href="{@docRoot}guide/publishing/preparing.html">preparing your app for release</a> (that is, before
+href="{@docRoot}tools/publishing/preparing.html">preparing your app for release</a> (that is, before
you upload your app to Google Play). For more information, see <a
-href="{@docRoot}guide/appendix/market-filters.html">Filters on Google Play</a>.</p>
+href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a>.</p>
<p>You can also use the multiple APK feature to distribute different {@code .apk} files under the same
application listing and the same package name; however, you should use this option only as a last
@@ -209,9 +209,9 @@ not possible. To help you publish your application for as many devices as possib
allows you to publish multiple APKs under the same application listing. Google Play then supplies
each APK to the appropriate devices based on configuration support you've declared in the manifest
file of each APK. To use this feature, you need to build your separate {@code .apk} files when you are <a
-href="{@docRoot}guide/publishing/preparing.html">preparing your app for release</a> (that is, before
+href="{@docRoot}tools/publishing/preparing.html">preparing your app for release</a> (that is, before
you upload your app to Google Play). For more information, see <a
-href="{@docRoot}guide/market/publishing/multiple-apks.html">Multiple APK Support</a>.</p>
+href="{@docRoot}guide/google/play/publishing/multiple-apks.html">Multiple APK Support</a>.</p>
<h2 id="marketupgrade">Publishing Updates on Google Play</h2>
@@ -254,11 +254,11 @@ higher.</p>
<p>For complete information about Google Play Licensing Service and how to
use it in your application, read <a
-href="{@docRoot}guide/market/licensing/index.html">Application Licensing</a>.</p>
+href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a>.</p>
<h2 id="marketinappbilling">Using Google Play In-app Billing</h2>
-<p><a href="{@docRoot}guide/market/billing/billing_overview.html">Google Play In-app Billing</a>
+<p><a href="{@docRoot}guide/google/play/billing/billing_overview.html">Google Play In-app Billing</a>
is a Google Play service that lets you sell digital content in your applications. You can use
the service to sell a wide range of content, including downloadable content such as media files or
photos, and virtual content such as game levels or potions.</p>
@@ -275,12 +275,12 @@ Checkout Merchant account. Also, because the service uses no dedicated framework
in-app billing to any application that uses a minimum API level of 4 or higher.</p>
<p>To help you integrate in-app billing into your application, the Android SDK provides a <a
-href="{@docRoot}guide/market/billing/billing_integrate.html#billing-download">sample application</a>
+href="{@docRoot}guide/google/play/billing/billing_integrate.html#billing-download">sample application</a>
that demonstrates a simple implementation of in-app billing. The sample application contains
examples of billing-related classes you can use to implement in-app billing in your application. It
also contains examples of the database, user interface, and business logic you might use to
implement in-app billing. For more information about the in-app billing feature, see the
-<a href="{@docRoot}guide/market/billing/index.html">In-app Billing documentation</a>.</p>
+<a href="{@docRoot}guide/google/play/billing/index.html">In-app Billing documentation</a>.</p>
<h2 id="marketintent">Linking to Your Apps on Google Play</h2>
diff --git a/docs/html/guide/publishing/publishing_overview.jd b/docs/html/tools/workflow/publishing/publishing_overview.jd
index 6fb77e18b4a6..ca0dca8ce233 100755
--- a/docs/html/guide/publishing/publishing_overview.jd
+++ b/docs/html/tools/workflow/publishing/publishing_overview.jd
@@ -21,9 +21,9 @@ page.title=Publishing Overview
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/publishing/preparing.html">Preparing for
+ <li><a href="{@docRoot}tools/publishing/preparing.html">Preparing for
Release</a></li>
- <li><a href="{@docRoot}guide/publishing/publishing.html">Publishing on Google Play</a></li>
+ <li><a href="{@docRoot}tools/publishing/publishing.html">Publishing on Google Play</a></li>
</ol>
</div>
</div>
@@ -47,7 +47,7 @@ However, you can also release applications by sending them directly to users or
download them from your own website.</p>
<p>Figure 1 shows how the publishing process fits into the overall Android <a
-href="{@docRoot}guide/developing/index.html">application development process</a>.
+href="{@docRoot}tools/workflow/index.html">application development process</a>.
The publishing process is typically performed after you finish testing your application in a debug
environment. Also, as a best practice, your application should meet all of your release criteria for
functionality, performance, and stability before you begin the publishing process.</p>
@@ -56,7 +56,7 @@ functionality, performance, and stability before you begin the publishing proces
process fits into the overall development process" height="86" id="figure1" />
<p class="img-caption">
<strong>Figure 1.</strong> Publishing is the last phase of the Android <a
-href="{@docRoot}guide/developing/index.html">application development process</a>.
+href="{@docRoot}tools/workflow/index.html">application development process</a>.
</p>
<h2 id="publishing-prepare">Preparing Your Application for Release</h2>
@@ -107,7 +107,7 @@ property.</p>
<code>.apk</code> file that you can distribute to users.</p>
<p>To learn how to prepare your application for release, see <a
-href="{@docRoot}guide/publishing/preparing.html">Preparing for Release</a> in the Dev Guide. This
+href="{@docRoot}tools/publishing/preparing.html">Preparing for Release</a> in the Dev Guide. This
topic provides step-by-step instructions for configuring and building a release version of your
application.</p>
@@ -129,8 +129,8 @@ your Android applications to users around the world. When you release your appli
Google Play you have access to a suite of developer tools that let you analyze your sales,
identify market trends, and control who your applications are being distributed to. You also have
access to several revenue-enhancing features that are not available anywhere else, such as <a
-href="{@docRoot}guide/market/billing/index.html">in-app billing</a> and <a
-href="{@docRoot}guide/market/licensing.html">application licensing</a>. This rich array of tools
+href="{@docRoot}guide/google/play/billing/index.html">in-app billing</a> and <a
+href="{@docRoot}guide/google/play/licensing.html">application licensing</a>. This rich array of tools
and features, coupled with numerous end-user community features, makes Google Play the premier
marketplace for selling and buying Android applications.</p>
@@ -170,7 +170,7 @@ marketplace for selling and buying Android applications.</p>
</ul>
<p>For information about Google Play, see <a
-href="{@docRoot}guide/publishing/publishing.html#market">Publishing on Google Play</a>. This
+href="{@docRoot}tools/publishing/publishing.html#market">Publishing on Google Play</a>. This
topic provides an introduction to Google Play features and provides a step-by-step guide for
distributing your applications on Google Play.</p>
diff --git a/docs/html/guide/publishing/versioning.jd b/docs/html/tools/workflow/publishing/versioning.jd
index da57e3ebc710..e0b443501306 100644
--- a/docs/html/guide/publishing/versioning.jd
+++ b/docs/html/tools/workflow/publishing/versioning.jd
@@ -24,8 +24,8 @@ page.title=Versioning Your Applications
<h2>See also</h2>
<ol>
-<li><a href="{@docRoot}guide/publishing/preparing.html">Preparing to Publish Your Application</a></li>
-<li><a href="{@docRoot}guide/publishing/publishing.html#market">Publishing On Google Play</a></li>
+<li><a href="{@docRoot}tools/publishing/preparing.html">Preparing to Publish Your Application</a></li>
+<li><a href="{@docRoot}tools/publishing/publishing.html#market">Publishing On Google Play</a></li>
<li><a href="{@docRoot}guide/topics/manifest/manifest-intro.html">The AndroidManifest.xml File</a></li>
</ol>
@@ -171,4 +171,4 @@ maximum API Level. </p>
<p>For more information, see the <a
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
manifest element documentation and the <a
-href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document.</p>
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a> document.</p>
diff --git a/docs/html/tools/workflow/publishing_overview.jd b/docs/html/tools/workflow/publishing_overview.jd
new file mode 100755
index 000000000000..ca0dca8ce233
--- /dev/null
+++ b/docs/html/tools/workflow/publishing_overview.jd
@@ -0,0 +1,231 @@
+page.title=Publishing Overview
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+ <h2>Quickview</h2>
+ <ul>
+ <li>Learn how to publish Android apps.</li>
+ <li>Find out how to prepare apps for release.</li>
+ <li>Learn how to release apps to users.</li>
+ </ul>
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#publishing-prepare">Preparing Your Application for Release</a></li>
+ <li><a href="#publishing-release">Releasing Your Application to Users</a>
+ <ol>
+ <li><a href="#publishing-market">Releasing on Google Play</a></li>
+ <li><a href="#publishing-website">Releasing on your own website</a></li>
+ <li><a href="#publishing-email">Releasing through email</a></li>
+ </ol>
+ </ol>
+ <h2>See also</h2>
+ <ol>
+ <li><a href="{@docRoot}tools/publishing/preparing.html">Preparing for
+ Release</a></li>
+ <li><a href="{@docRoot}tools/publishing/publishing.html">Publishing on Google Play</a></li>
+ </ol>
+</div>
+</div>
+
+<p>Publishing is the process that makes your Android applications available to users. When you
+publish an Android application you perform two main tasks:</p>
+
+<ul>
+ <li>You prepare the application for release.
+ <p>During the preparation step you build a release version of your application, which users can
+ download and install on their Android-powered devices.</p>
+ </li>
+ <li>You release the application to users.
+ <p>During the release step you publicize, sell, and distribute the release version of your
+ application to users.</p>
+ </li>
+</ul>
+
+<p>Usually, you release your application through an application marketplace, such as Google Play.
+However, you can also release applications by sending them directly to users or by letting users
+download them from your own website.</p>
+
+<p>Figure 1 shows how the publishing process fits into the overall Android <a
+href="{@docRoot}tools/workflow/index.html">application development process</a>.
+The publishing process is typically performed after you finish testing your application in a debug
+environment. Also, as a best practice, your application should meet all of your release criteria for
+functionality, performance, and stability before you begin the publishing process.</p>
+
+<img src="{@docRoot}images/publishing/publishing_overview.png" alt="Shows where the publishing
+ process fits into the overall development process" height="86" id="figure1" />
+<p class="img-caption">
+ <strong>Figure 1.</strong> Publishing is the last phase of the Android <a
+href="{@docRoot}tools/workflow/index.html">application development process</a>.
+</p>
+
+<h2 id="publishing-prepare">Preparing Your Application for Release</h2>
+
+<p>Preparing your application for release is a multi-step process that involves the following
+tasks:</p>
+
+<ul>
+
+ <li>Configuring your application for release.
+ <p>At a minimum you need to remove {@link android.util.Log} calls and remove the
+ <a href="{@docRoot}guide/topics/manifest/application-element.html#debug">android:debuggable</a>
+ attribute from your manifest file. You should also provide values for the
+ <code>android:versionCode</code> and <code>android:versionName</code> attributes, which are
+ located in the
+ <a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a>
+ element. You may also have to configure several other settings to meet Google Play
+ requirements or accomodate whatever method you're using to release your application.</p>
+ </li>
+ <li>Building and signing a release version of your application.
+ <p>The Android Development Tools (ADT) plugin and the Ant build script that are provided
+ with the Android SDK tools provide everything you need to build and sign a release version of
+ your application.</p>
+ </li>
+ <li>Testing the release version of your application.
+ <p>Before you distribute your application, you should thoroughly test the release version on at
+ least one target handset device and one target tablet device.</p>
+ </li>
+ <li>Updating application resources for release.
+ <p>You need to be sure that all application resources such as multimedia files and graphics
+ are updated and included with your application or staged on the proper production servers.</p>
+ </li>
+ <li>Preparing remote servers and services that your application depends on.
+ <p>If your application depends on external servers or services, you need to be sure they
+ are secure and production ready.</p>
+ </li>
+</ul>
+
+<p>You may have to perform several other tasks as part of the preparation process. For example, you
+will need to get a private key for signing your application, and you may need to get a Maps API
+release key if you are using the <a
+href="http://code.google.com/android/add-ons/google-apis/maps-overview.html">Google Maps external
+library</a>. You will also need to create an icon for your application, and you may want to prepare
+an End User License Agreement (EULA) to protect your person, organization, and intellectual
+property.</p>
+
+<p>When you are finished preparing your application for release you will have a signed
+<code>.apk</code> file that you can distribute to users.</p>
+
+<p>To learn how to prepare your application for release, see <a
+href="{@docRoot}tools/publishing/preparing.html">Preparing for Release</a> in the Dev Guide. This
+topic provides step-by-step instructions for configuring and building a release version of your
+application.</p>
+
+<h2 id="publishing-release">Releasing Your Application to Users</h2>
+
+<p>You can release your Android applications several ways. Usually, you release applications
+through an application marketplace, such as Google Play, but you can also release applications
+on your own website or by sending an application directly to a user. Google Play is the
+recommended marketplace for Android applications and is particularly useful if you want to
+distribute your applications to a large global audience. The other two release methods&mdash;server
+distribution and email distribution&mdash;are useful if you are releasing an application to a small
+group of users (for example, a work group in an enterprise environment), or if you do not want to
+make your application available to the general public.</p>
+
+<h3 id="publishing-market">Releasing Your Applications on Google Play</h3>
+
+<p>Google Play is a robust publishing platform that helps you publicize, sell, and distribute
+your Android applications to users around the world. When you release your applications through
+Google Play you have access to a suite of developer tools that let you analyze your sales,
+identify market trends, and control who your applications are being distributed to. You also have
+access to several revenue-enhancing features that are not available anywhere else, such as <a
+href="{@docRoot}guide/google/play/billing/index.html">in-app billing</a> and <a
+href="{@docRoot}guide/google/play/licensing.html">application licensing</a>. This rich array of tools
+and features, coupled with numerous end-user community features, makes Google Play the premier
+marketplace for selling and buying Android applications.</p>
+
+<p>Releasing your application on Google Play is a simple process that involves three basic
+ steps:</p>
+
+<div class="figure" style="width:275px">
+ <img src="{@docRoot}images/publishing/publishing_unknown_sources.png"
+ alt="Screenshot showing the graphical user interface element that allows unknown sources
+ to be installed" />
+ <p class="img-caption">
+ <strong>Figure 2.</strong> The <strong>Unknown sources</strong> setting lets you install
+ applications that are not published on Google Play .
+ </p>
+</div>
+
+<ul>
+ <li>Preparing promotional materials.
+ <p>To fully leverage the marketing and publicity capabilities of Google Play, you need to
+ create promotional materials for your application, such as screenshots, videos, graphics, and
+ promotional text.</p>
+ </li>
+ <li>Configuring options and uploading assets.
+ <p>Google Play lets you target your application to a worldwide pool of users and devices.
+ By configuring various Google Play settings, you can choose the countries you want to
+ reach, the listing languages you want to use, and the price you want to charge in each
+ country. You can also configure listing details such as the application type, category, and
+ content rating. When you are done configuring options you can upload your promotional materials
+ and your application as a draft (unpublished) application.</p>
+ </li>
+ <li>Publishing the release version of your application.
+ <p>If you are satisfied that your publishing settings are correctly configured and your
+ uploaded application is ready to be released to the public, you can simply click
+ <strong>Publish</strong > in the developer console and within minutes your application will be
+ live and available for download around the world.</p>
+ </li>
+</ul>
+
+<p>For information about Google Play, see <a
+href="{@docRoot}tools/publishing/publishing.html#market">Publishing on Google Play</a>. This
+topic provides an introduction to Google Play features and provides a step-by-step guide for
+distributing your applications on Google Play.</p>
+
+<h3 id="publishing-website">Releasing your application on your own website</h3>
+
+<p>If you do not want to release your application on an application marketplace like Google Play,
+you can release your application by making it available for download on your own website or server.
+To do this, you must first prepare your application for release (that is, you must build it for
+release and sign it). Then all you need to do is host the release-ready application on your website
+and provide a download link for the application. When users browse to your website with their
+Android-powered devices and download your application, the Android system will automatically start
+installing the application on the device. However, the installation process will start automatically
+only if the user has configured their device to allow the installation of non-Google Play
+applications.</p>
+
+<div class="figure" style="width:275px">
+ <img src="{@docRoot}images/publishing/publishing_via_email.png"
+ alt="Screenshot showing the graphical user interface users see when you send them an app"
+ height="453" />
+ <p class="img-caption">
+ <strong>Figure 3.</strong> Users can simply click <strong>Install</strong> when you send them
+ an application via email.
+ </p>
+</div>
+
+<p>By default, Android-powered devices allow users to install applications only if the applications
+have been downloaded from Google Play. To allow the installation of applications from other
+sources, users need to enable the <strong>Unknown sources</strong> setting on their devices, and
+they need to make this configuration change before they download your application to their
+device (see figure 2).</p>
+
+<p class="note"><strong>Note:</strong> Some network providers do not allow users to install
+applications from unknown sources.</p>
+
+<p>Although it is relatively easy to release your application on your own website, it can be
+inefficient and cumbersome. For example, if you want to monetize your application you will
+have to process and track all financial transactions yourself and you will not be able to use
+Google Play's in-app billing feature to sell in-app products. In addition, you will not be
+able to use the licensing feature to help prevent unauthorized installation and use of your
+application.</p>
+
+<h3 id="publishing-email">Releasing your application through email</h3>
+
+<p>The easiest and quickest way to release your application is to send it to a user through
+email. To do this, you prepare your application for release and then attach it to an email
+and send it to a user. When the user opens your email message on their Android-powered device
+the Android system will recognize the <code>.apk</code> and display an <strong>Install Now</strong>
+button in the email message (see figure 3). Users can install your application by touching the
+button.</p>
+
+<p class="note"><strong>Note:</strong> The <strong>Install Now</strong> button appears only if a
+user has configured their device to allow the installation of non-Google Play applications and
+they open your email with the native Gmail application.</p>
+
+<p>Releasing applications through email is convenient if you are sending your application to
+only a few trusted users, but it provides few protections from piracy and unauthorized
+distribution; that is, anyone you send your application to can simply forward it to someone else.
+else.
diff --git a/docs/html/tools/workflow/versioning.jd b/docs/html/tools/workflow/versioning.jd
new file mode 100644
index 000000000000..e0b443501306
--- /dev/null
+++ b/docs/html/tools/workflow/versioning.jd
@@ -0,0 +1,174 @@
+page.title=Versioning Your Applications
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>Quickview</h2>
+
+<ul>
+<li>Your application <em>must</em> be versioned</a></li>
+<li>You set the version in the application's manifest file</li>
+<li>How you version your applications affects how users upgrade </li>
+<li>Determine your versioning strategy early in the development process, including considerations for future releases.</li>
+</ul>
+
+<h2>In this document</h2>
+
+<ol>
+<li><a href="#appversioning">Setting Application Version</a></li>
+<li><a href="#minsdkversion">Specifying Your Application's System API Requirements</a>
+</ol>
+
+
+<h2>See also</h2>
+
+<ol>
+<li><a href="{@docRoot}tools/publishing/preparing.html">Preparing to Publish Your Application</a></li>
+<li><a href="{@docRoot}tools/publishing/publishing.html#market">Publishing On Google Play</a></li>
+<li><a href="{@docRoot}guide/topics/manifest/manifest-intro.html">The AndroidManifest.xml File</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>Versioning is a critical component of your application upgrade and maintenance
+strategy. Versioning is important because:</p>
+
+<ul>
+<li>Users need to have specific information about the application version that
+is installed on their devices and the upgrade versions available for
+installation. </li>
+<li>Other applications &mdash; including other applications that you publish as
+a suite &mdash; need to query the system for your application's version, to
+determine compatibility and identify dependencies.</li>
+<li>Services through which you will publish your application(s) may also need to
+query your application for its version, so that they can display the version to
+users. A publishing service may also need to check the application version to
+determine compatibility and establish upgrade/downgrade relationships.</li>
+</ul>
+
+<p>The Android system does not use app version information to enforce
+restrictions on upgrades, downgrades, or compatibility of third-party apps. Instead, you (the
+developer) are responsible for enforcing version restrictions within your application or by
+informing users of the version restrictions and limitations. The Android system does, however,
+enforce system version compatibility as expressed by the <code>minSdkVersion</code> attribute in the
+manifest. This attribute allows an application to specify the minimum system API with which it is
+compatible. For more information see <a href="#minsdkversion">Specifying Minimum System API
+Version</a>.</p>
+
+<h2 id="appversioning">Setting Application Version</h2>
+<p>To define the version information for your application, you set attributes in
+the application's manifest file. Two attributes are available, and you should
+always define values for both of them: </p>
+
+<ul>
+<li><code>android:versionCode</code> &mdash; An integer value that represents
+the version of the application code, relative to other versions.
+
+<p>The value is an integer so that other applications can programmatically
+evaluate it, for example to check an upgrade or downgrade relationship. You can
+set the value to any integer you want, however you should make sure that each
+successive release of your application uses a greater value. The system does not
+enforce this behavior, but increasing the value with successive releases is
+normative. </p>
+
+<p>Typically, you would release the first version of your application with
+versionCode set to 1, then monotonically increase the value with each release,
+regardless whether the release constitutes a major or minor release. This means
+that the <code>android:versionCode</code> value does not necessarily have a
+strong resemblance to the application release version that is visible to the
+user (see <code>android:versionName</code>, below). Applications and publishing
+services should not display this version value to users.</p>
+</li>
+<li><code>android:versionName</code> &mdash; A string value that represents the
+release version of the application code, as it should be shown to users.
+<p>The value is a string so that you can describe the application version as a
+&lt;major&gt;.&lt;minor&gt;.&lt;point&gt; string, or as any other type of
+absolute or relative version identifier. </p>
+
+<p>As with <code>android:versionCode</code>, the system does not use this value
+for any internal purpose, other than to enable applications to display it to
+users. Publishing services may also extract the <code>android:versionName</code>
+value for display to users.</p>
+</li>
+</ul>
+
+<p>You define both of these version attributes in the
+<code>&lt;manifest&gt;</code> element of the manifest file. </p>
+
+<p>Here's an example manifest that shows the <code>android:versionCode</code>
+and <code>android:versionName</code> attributes in the
+<code>&lt;manifest&gt;</code> element. </p>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.example.package.name"
+ android:versionCode="2"
+ android:versionName="1.1"&gt;
+ &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
+ ...
+ &lt;/application&gt;
+&lt;/manifest&gt;
+</pre>
+
+<p>In this example, note that <code>android:versionCode</code> value indicates
+that the current .apk contains the second release of the application code, which
+corresponds to a minor follow-on release, as shown by the
+<code>android:versionName</code> string. </p>
+
+<p>The Android framework provides an API to let applications query the system
+for version information about your application. To obtain version information,
+applications use the
+{@link android.content.pm.PackageManager#getPackageInfo(java.lang.String, int)}
+method of {@link android.content.pm.PackageManager PackageManager}. </p>
+
+<h2 id="minsdkversion">Specifying Your Application's System API Requirements</h2>
+
+<p>If your application requires a specific minimum version of the Android
+platform, or is designed only to support a certain range of Android platform
+versions, you can specify those version requirements as API Level identifiers
+in the application's manifest file. Doing so ensures that your
+application can only be installed on devices that
+are running a compatible version of the Android system. </p>
+
+<p>To specify API Level requirements, add a <code>&lt;uses-sdk&gt;</code>
+element in the application's manifest, with one or more of these attributes: </p>
+
+<ul>
+<li><code>android:minSdkVersion</code> &mdash; The minimum version
+of the Android platform on which the application will run, specified
+by the platform's API Level identifier. </li>
+<li><code>android:targetSdkVersion</code> &mdash; Specifies the API Level
+on which the application is designed to run. In some cases, this allows the
+application to use manifest elements or behaviors defined in the target
+API Level, rather than being restricted to using only those defined
+for the minimum API Level.</li>
+<li><code>android:maxSdkVersion</code> &mdash; The maximum version
+of the Android platform on which the application is designed to run,
+specified by the platform's API Level identifier. <strong>Important:</strong> Please read the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
+documentation before using this attribute. </li>
+</ul>
+
+<p>When preparing to install your application, the system checks the value of this
+attribute and compares it to the system version. If the
+<code>android:minSdkVersion</code> value is greater than the system version, the
+system aborts the installation of the application. Similarly, the system
+installs your application only if its <code>android:maxSdkVersion</code>
+is compatible with the platform version.</p>
+
+<p>If you do not specify these attributes in your manifest, the system assumes
+that your application is compatible with all platform versions, with no
+maximum API Level. </p>
+
+<p>To specify a minimum platform version for your application, add a
+<code>&lt;uses-sdk&gt;</code> element as a child of
+<code>&lt;manifest&gt;</code>, then define the
+<code>android:minSdkVersion</code> as an attribute. </p>
+
+<p>For more information, see the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
+manifest element documentation and the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a> document.</p>
diff --git a/docs/html/training/advanced.jd b/docs/html/training/advanced.jd
new file mode 100644
index 000000000000..7f9ddd4d291b
--- /dev/null
+++ b/docs/html/training/advanced.jd
@@ -0,0 +1,11 @@
+page.title=Advanced Training
+
+@jd:body
+
+<p>Advanced Training contains a variety of classes that teach you best practices in Android
+development. These classes simplify the steps required to enhance your app with powerful
+platform features or effectively optimize your app performance.</p>
+
+<p>What you see now is still the beginning. We plan to add many more classes, expand and refine
+existing classes, re-organize, and build courses that help you enhance your apps using
+objective-oriented collections of classes.</p> \ No newline at end of file
diff --git a/docs/html/training/backward-compatible-ui/index.jd b/docs/html/training/backward-compatible-ui/index.jd
index 7e27e68e19d2..f81b5a79bacb 100644
--- a/docs/html/training/backward-compatible-ui/index.jd
+++ b/docs/html/training/backward-compatible-ui/index.jd
@@ -14,7 +14,7 @@ next.link=abstracting.html
<ul>
<li>API level 5</li>
- <li><a href="{@docRoot}sdk/compatibility-library.html">The Android Support Package</a></li>
+ <li><a href="{@docRoot}tools/extras/support-library.html">The Android Support Package</a></li>
</ul>
<h2>You should also read</h2>
diff --git a/docs/html/training/basics/activity-lifecycle/index.jd b/docs/html/training/basics/activity-lifecycle/index.jd
index d278f042e839..127c1c24925f 100644
--- a/docs/html/training/basics/activity-lifecycle/index.jd
+++ b/docs/html/training/basics/activity-lifecycle/index.jd
@@ -21,7 +21,7 @@ Project</a>)</li>
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/fundamentals/activities.html">Activities</a></li>
+ <li><a href="{@docRoot}guide/components/activities.html">Activities</a></li>
</ul>
diff --git a/docs/html/training/basics/activity-lifecycle/pausing.jd b/docs/html/training/basics/activity-lifecycle/pausing.jd
index 216d55e1d87a..fa88beb39bfb 100644
--- a/docs/html/training/basics/activity-lifecycle/pausing.jd
+++ b/docs/html/training/basics/activity-lifecycle/pausing.jd
@@ -21,7 +21,7 @@ next.link=stopping.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/fundamentals/activities.html">Activities</a>
+ <li><a href="{@docRoot}guide/components/activities.html">Activities</a>
</li>
</ul>
diff --git a/docs/html/training/basics/activity-lifecycle/recreating.jd b/docs/html/training/basics/activity-lifecycle/recreating.jd
index 941f1fd11c37..005a95b2d9c0 100644
--- a/docs/html/training/basics/activity-lifecycle/recreating.jd
+++ b/docs/html/training/basics/activity-lifecycle/recreating.jd
@@ -23,7 +23,7 @@ previous.link=stopping.html
Different Screens</a></li>
<li><a
href="{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime Changes</a></li>
- <li><a href="{@docRoot}guide/topics/fundamentals/activities.html">Activities</a>
+ <li><a href="{@docRoot}guide/components/activities.html">Activities</a>
</li>
</ul>
diff --git a/docs/html/training/basics/activity-lifecycle/starting.jd b/docs/html/training/basics/activity-lifecycle/starting.jd
index 1d328c717856..c32968bab907 100644
--- a/docs/html/training/basics/activity-lifecycle/starting.jd
+++ b/docs/html/training/basics/activity-lifecycle/starting.jd
@@ -22,7 +22,7 @@ next.link=pausing.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/fundamentals/activities.html">Activities</a></li>
+ <li><a href="{@docRoot}guide/components/activities.html">Activities</a></li>
</ul>
<h2>Try it out</h2>
diff --git a/docs/html/training/basics/activity-lifecycle/stopping.jd b/docs/html/training/basics/activity-lifecycle/stopping.jd
index 7dfc6d322aa9..d56c921e3761 100644
--- a/docs/html/training/basics/activity-lifecycle/stopping.jd
+++ b/docs/html/training/basics/activity-lifecycle/stopping.jd
@@ -21,7 +21,7 @@ next.link=recreating.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/fundamentals/activities.html">Activities</a>
+ <li><a href="{@docRoot}guide/components/activities.html">Activities</a>
</li>
</ul>
@@ -37,7 +37,7 @@ class="button">Download the demo</a>
</div>
<p>Properly stopping and restarting your activity is an important process in the activity lifecycle
-that ensures your users perceive that your app is always alive and doesn't loose their progress.
+that ensures your users perceive that your app is always alive and doesn't lose their progress.
There are a few of key scenarios in which your activity is stopped and restarted:</p>
<ul>
diff --git a/docs/html/training/basics/firstapp/building-ui.jd b/docs/html/training/basics/firstapp/building-ui.jd
index dae70a227d1c..df8089fb7830 100644
--- a/docs/html/training/basics/firstapp/building-ui.jd
+++ b/docs/html/training/basics/firstapp/building-ui.jd
@@ -19,7 +19,7 @@ next.link=starting-activity.html
<ol>
<li><a href="#LinearLayout">Use a Linear Layout</a></li>
- <li><a href="#TextInput">Add a Text Input Box</a></li>
+ <li><a href="#TextInput">Add a Text Field</a></li>
<li><a href="#Strings">Add String Resources</a></li>
<li><a href="#Button">Add a Button</a></li>
<li><a href="#Weight">Make the Input Box Fill in the Screen Width</a></li>
@@ -61,7 +61,7 @@ Hardware</a>.</p>
</div>
</div>
-<img src="{@docRoot}images/viewgroup.png" alt="" />
+<img src="{@docRoot}images/viewgroup.png" alt="" width="440" />
<p class="img-caption"><strong>Figure 1.</strong> Illustration of how {@link
android.view.ViewGroup} objects form branches in the layout and contain {@link
android.view.View} objects.</p>
@@ -130,12 +130,12 @@ href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layout</a> guide.</p>
-<h2 id="TextInput">Add a Text Input Box</h2>
+<h2 id="TextInput">Add a Text Field</h2>
-<p>To create a user-editable text box, add an {@link android.widget.EditText
+<p>To create a user-editable text field, add an {@link android.widget.EditText
&lt;EditText>} element inside the {@link android.widget.LinearLayout &lt;LinearLayout>}. The {@link
android.widget.EditText} class is a subclass of {@link android.view.View} that displays an editable
-text box.</p>
+text field.</p>
<p>Like every {@link android.view.View} object, you must define certain XML attributes to specify
the {@link android.widget.EditText} object's properties. Here’s how you should declare it
@@ -185,7 +185,8 @@ first time. It tells the SDK tools that the resource ID needs to be created. Thu
compiled, the SDK tools use the ID value, <code>edit_message</code>, to create a new identifier in
your project's {@code gen/R.java} file that is now assiciated with the {@link
android.widget.EditText} element. Once the resource ID is created, other references to the ID do not
-need the plus symbol. See the sidebox for more information about resource objects.</p></dd>
+need the plus symbol. This is the only attribute that may need the plus-symbol. See the sidebox for
+more information about resource objects.</p></dd>
<dt><a
href="{@docRoot}reference/android/view/View.html#attr_android:layout_width">{@code
@@ -202,12 +203,12 @@ href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layouts</a> guide.</d
<dt><a
href="{@docRoot}reference/android/widget/TextView.html#attr_android:hint">{@code
android:hint}</a></dt>
-<dd>This is a default string to display when the text box is empty. Instead of using a hard-coded
-string as the value, the value given in this example refers to a string resource. When you add the
-{@code
-"@string/edit_message"} value, you’ll see a compiler error because there’s no matching string
-resource by that name. You'll fix this in the next section by defining the string
-resource.</dd>
+<dd>This is a default string to display when the text field is empty. Instead of using a hard-coded
+string as the value, the {@code "@string/edit_message"} value refers to a string resource defined
+in a separate file. Because this value refers to an existing resource, it does not need the
+plus-symbol. However, because you haven't defined the string resource yet, you’ll see a compiler
+error when you add the {@code "@string/edit_message"} value. You'll fix this in the next section by
+defining the string resource.</dd>
</dl>
@@ -276,9 +277,9 @@ figure 2.</p>
android.widget.Button} widgets have their widths set to
<code>"wrap_content"</code>.</p>
-<p>This works fine for the button, but not as well for the text box, because the user might type
+<p>This works fine for the button, but not as well for the text field, because the user might type
something longer and there's extra space left on the screen. So, it'd be nice to fill that width
-using the text box.
+using the text field.
{@link android.widget.LinearLayout} enables such a design with the <em>weight</em> property, which
you can specify using the <a
href="{@docRoot}reference/android/widget/LinearLayout.LayoutParams.html#weight">{@code
diff --git a/docs/html/training/basics/firstapp/creating-project.jd b/docs/html/training/basics/firstapp/creating-project.jd
index 5a89f2e7b8e4..4fbfe3490a8d 100644
--- a/docs/html/training/basics/firstapp/creating-project.jd
+++ b/docs/html/training/basics/firstapp/creating-project.jd
@@ -23,9 +23,9 @@ next.link=running-app.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}sdk/installing.html">Installing the
+ <li><a href="{@docRoot}sdk/installing/index.html">Installing the
SDK</a></li>
- <li><a href="{@docRoot}guide/developing/projects/index.html">Managing Projects</a></li>
+ <li><a href="{@docRoot}tools/projects/index.html">Managing Projects</a></li>
</ul>
@@ -42,8 +42,8 @@ SDK tools from a command line.</p>
<p class="note"><strong>Note:</strong> You should already have the Android SDK installed, and if
you're using Eclipse, you should have installed the <a
-href="{@docRoot}sdk/eclipse-adt.html">ADT plugin</a> as well. If you have not installed
-these, see <a href="{@docRoot}sdk/installing.html">Installing the Android SDK</a> and return here
+href="{@docRoot}tools/sdk/eclipse-adt.html">ADT plugin</a> as well. If you have not installed
+these, see <a href="{@docRoot}sdk/installing/index.html">Installing the Android SDK</a> and return here
when you've completed the installation.</p>
@@ -59,7 +59,7 @@ when you've completed the installation.</p>
The resulting dialog should have a folder labeled <em>Android</em>. (If you don’t see the
<em>Android</em> folder,
then you have not installed the ADT plugin&mdash;see <a
-href="{@docRoot}sdk/eclipse-adt.html#installing">Installing the ADT Plugin</a>).</li>
+href="{@docRoot}tools/sdk/eclipse-adt.html#installing">Installing the ADT Plugin</a>).</li>
<li>Open the <em>Android</em> folder, select <em>Android Project</em> and click
<strong>Next</strong>.</li>
<li>Enter a project name (such as "MyFirstApp") and click <strong>Next</strong>.</li>
@@ -68,7 +68,7 @@ href="{@docRoot}sdk/eclipse-adt.html#installing">Installing the ADT Plugin</a>).
support older versions, but setting the build target to the latest version allows you to
easily optimize your app for a great user experience on the latest Android-powered devices.</p>
<p>If you don't see any built targets listed, you need to install some using the Android SDK
-Manager tool. See <a href="{@docRoot}sdk/installing.html#AddingComponents">step 4 in the
+Manager tool. See <a href="{@docRoot}sdk/installing/index.html#AddingComponents">step 4 in the
installing guide</a>.</p>
<p>Click <strong>Next</strong>.</p></li>
<li>Specify other app details, such as the:
@@ -87,7 +87,7 @@ app (an activity represents a single screen in your app). Enter "MyFirstActivity
<li><em>Minimum SDK</em>: Select <em>4 (Android 1.6)</em>.
<p>Because this version is lower than the build target selected for the app, a warning
appears, but that's alright. You simply need to be sure that you don't use any APIs that require an
-<a href="{@docRoot}guide/appendix/api-levels.html">API level</a> greater than the minimum SDK
+<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level</a> greater than the minimum SDK
version without first using some code to verify the device's system version (you'll see this in some
other classes).</p>
</li>
@@ -117,7 +117,7 @@ support older versions, but setting the build target to the latest version allow
your app for the latest devices.</p>
<p>If you don't see any targets listed, you need to
install some using the Android SDK
-Manager tool. See <a href="{@docRoot}sdk/installing.html#AddingComponents">step 4 in the
+Manager tool. See <a href="{@docRoot}sdk/installing/index.html#AddingComponents">step 4 in the
installing guide</a>.</p></li>
<li>Execute:
<pre class="no-pretty-print">
diff --git a/docs/html/training/basics/firstapp/index.jd b/docs/html/training/basics/firstapp/index.jd
index 9ff5b18867d3..43b289bfb051 100644
--- a/docs/html/training/basics/firstapp/index.jd
+++ b/docs/html/training/basics/firstapp/index.jd
@@ -35,7 +35,7 @@ to:</p>
<li>Download the latest SDK tools and platforms using the SDK Manager.</li>
</ol>
-<p>If you haven't already done this setup, read <a href="{@docRoot}sdk/installing.html">Installing
+<p>If you haven't already done this setup, read <a href="{@docRoot}sdk/installing/index.html">Installing
the SDK</a>. Once you've finished the setup, you're ready to begin this class.</p>
<p>This class uses a tutorial format that incrementally builds a small Android app in order to teach
diff --git a/docs/html/training/basics/firstapp/running-app.jd b/docs/html/training/basics/firstapp/running-app.jd
index 43b898396475..5105a3bec987 100644
--- a/docs/html/training/basics/firstapp/running-app.jd
+++ b/docs/html/training/basics/firstapp/running-app.jd
@@ -25,9 +25,9 @@ next.link=building-ui.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a></li>
- <li><a href="{@docRoot}guide/developing/devices/index.html">Managing Virtual Devices</a></li>
- <li><a href="{@docRoot}guide/developing/projects/index.html">Managing Projects</a></li>
+ <li><a href="{@docRoot}tools/device.html">Using Hardware Devices</a></li>
+ <li><a href="{@docRoot}tools/devices/index.html">Managing Virtual Devices</a></li>
+ <li><a href="{@docRoot}tools/projects/index.html">Managing Projects</a></li>
</ul>
@@ -85,7 +85,7 @@ the app.</p>
<ol>
<li>Plug in your Android-powered device to your machine with a USB cable.
If you’re developing on Windows, you might need to install the appropriate USB driver for your
-device. For help installing drivers, see the <a href=”{@docRoot}sdk/oem-usb.html”>OEM USB
+device. For help installing drivers, see the <a href="{@docRoot}tools/extras/oem-usb.html">OEM USB
Drivers</a> document.</li>
<li>Ensure that <strong>USB debugging</strong> is enabled in the device Settings (open Settings
and navitage to <strong>Applications > Development</strong> on most devices, or select
@@ -116,7 +116,7 @@ lesson</a>.</p>
<h2 id="Emulator">Run on the Emulator</h2>
<p>Whether you’re using Eclipse or the command line, you need to first create an <a
-href="{@docRoot}guide/developing/devices/index.html">Android Virtual
+href="{@docRoot}tools/devices/index.html">Android Virtual
Device</a> (AVD). An AVD is a
device configuration for the Android emulator that allows you to model
different device configurations.</p>
diff --git a/docs/html/training/basics/firstapp/starting-activity.jd b/docs/html/training/basics/firstapp/starting-activity.jd
index c548c1de259e..a8d32b63e23f 100644
--- a/docs/html/training/basics/firstapp/starting-activity.jd
+++ b/docs/html/training/basics/firstapp/starting-activity.jd
@@ -31,7 +31,7 @@ previous.link=building-ui.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}sdk/installing.html">Installing the
+ <li><a href="{@docRoot}sdk/installing/index.html">Installing the
SDK</a></li>
</ul>
@@ -42,7 +42,7 @@ SDK</a></li>
<p>After completing the <a href="building-ui.html">previous lesson</a>, you have an app that
-shows an activity (a single screen) with a text box and a button. In this lesson, you’ll add some
+shows an activity (a single screen) with a text field and a button. In this lesson, you’ll add some
code to <code>MyFirstActivity</code> that
starts a new activity when the user selects the Send button.</p>
@@ -90,7 +90,7 @@ the signature must be exactly as shown. Specifically, the method must:</p>
android.view.View} that was clicked)</li>
</ul>
-<p>Next, you’ll fill in this method to read the contents of the text box and deliver that text to
+<p>Next, you’ll fill in this method to read the contents of the text field and deliver that text to
another activity.</p>
@@ -290,8 +290,8 @@ public void onCreate(Bundle savedInstanceState) {
}
</pre>
-<p>You can now run the app, type a message in the text box, press Send, and view the message on the
-second activity.</p>
+<p>You can now run the app, type a message in the text field, press Send, and view the message on
+the second activity.</p>
<img src="{@docRoot}images/training/firstapp/firstapp.png" />
<p class="img-caption"><strong>Figure 1.</strong> Both activities in the final app, running
diff --git a/docs/html/training/basics/fragments/communicating.jd b/docs/html/training/basics/fragments/communicating.jd
index e3e308f1bd31..3ac987372ec7 100644
--- a/docs/html/training/basics/fragments/communicating.jd
+++ b/docs/html/training/basics/fragments/communicating.jd
@@ -19,7 +19,7 @@ previous.link=fragment-ui.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a></li>
+ <li><a href="{@docRoot}guide/components/fragments.html">Fragments</a></li>
</ul>
<h2>Try it out</h2>
diff --git a/docs/html/training/basics/fragments/creating.jd b/docs/html/training/basics/fragments/creating.jd
index c4a9b4686c2c..0646230beb26 100644
--- a/docs/html/training/basics/fragments/creating.jd
+++ b/docs/html/training/basics/fragments/creating.jd
@@ -21,7 +21,7 @@ next.link=fragment-ui.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a></li>
+ <li><a href="{@docRoot}guide/components/fragments.html">Fragments</a></li>
</ul>
<h2>Try it out</h2>
@@ -84,7 +84,7 @@ android.app.Activity#onPause()} method is called, any fragments in the activity
to {@link android.support.v4.app.Fragment#onPause()}.</p>
<p>More information about the fragment lifecycle and callback methods is available in the <a
-href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a> developer guide.</p>
+href="{@docRoot}guide/components/fragments.html">Fragments</a> developer guide.</p>
diff --git a/docs/html/training/basics/fragments/fragment-ui.jd b/docs/html/training/basics/fragments/fragment-ui.jd
index f906f468971f..4ec4de56366d 100644
--- a/docs/html/training/basics/fragments/fragment-ui.jd
+++ b/docs/html/training/basics/fragments/fragment-ui.jd
@@ -20,7 +20,7 @@ next.link=communicating.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a></li>
+ <li><a href="{@docRoot}guide/components/fragments.html">Fragments</a></li>
<li><a href="{@docRoot}guide/practices/tablets-and-handsets.html">Supporting Tablets and
Handsets</a></li>
</ul>
diff --git a/docs/html/training/basics/fragments/index.jd b/docs/html/training/basics/fragments/index.jd
index dcdcd3174cd8..bc93f43df923 100644
--- a/docs/html/training/basics/fragments/index.jd
+++ b/docs/html/training/basics/fragments/index.jd
@@ -23,7 +23,7 @@ layouts</a></li>
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a></li>
+ <li><a href="{@docRoot}guide/components/fragments.html">Fragments</a></li>
<li><a href="{@docRoot}guide/practices/tablets-and-handsets.html">Supporting Tablets and
Handsets</a></li>
</ul>
diff --git a/docs/html/training/basics/fragments/support-lib.jd b/docs/html/training/basics/fragments/support-lib.jd
index e2166f5db8ff..ba10b782aee4 100644
--- a/docs/html/training/basics/fragments/support-lib.jd
+++ b/docs/html/training/basics/fragments/support-lib.jd
@@ -17,12 +17,12 @@ next.link=creating.html
</ol>
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}sdk/compatibility-library.html">Support Library</a></li>
+ <li><a href="{@docRoot}tools/extras/support-library.html">Support Library</a></li>
</ul>
</div>
</div>
-<p>The Android <a href="{@docRoot}sdk/compatibility-library.html">Support Library</a> provides a JAR
+<p>The Android <a href="{@docRoot}tools/extras/support-library.html">Support Library</a> provides a JAR
file with an API library that allow you to use some of the more recent Android APIs in your app
while running on earlier versions of Android. For instance, the Support Library provides a version
of the {@link android.app.Fragment} APIs that you can use on Android 1.6 (API level 4) and
diff --git a/docs/html/training/basics/intents/index.jd b/docs/html/training/basics/intents/index.jd
index c661d98b9b35..d94ff0154a84 100644
--- a/docs/html/training/basics/intents/index.jd
+++ b/docs/html/training/basics/intents/index.jd
@@ -24,7 +24,7 @@ Lifecycle</a>)</li>
<li><a
href="http://android-developers.blogspot.com/2009/11/integrating-application-with-intents.html">
Integrating Application with Intents (blog post)</a></li>
- <li><a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent
Filters</a></li>
</ul>
@@ -32,7 +32,7 @@ Filters</a></li>
</div>
<p>An Android app typically has several <a
-href="{@docRoot}guide/topics/fundamentals/activities.html">activities</a>. Each activity displays a
+href="{@docRoot}guide/components/activities.html">activities</a>. Each activity displays a
user interface that allows the user to perform a specific task (such as view a map or take a photo).
To take the user from one activity to another, your app must use an {@link
android.content.Intent} to define your app's "intent" to do something. When you pass an
diff --git a/docs/html/training/basics/intents/sending.jd b/docs/html/training/basics/intents/sending.jd
index bfd8f9bcf827..f2a2cc3e38b6 100644
--- a/docs/html/training/basics/intents/sending.jd
+++ b/docs/html/training/basics/intents/sending.jd
@@ -166,7 +166,7 @@ the intent. If it is <code>false</code>, then there aren't any apps to handle th
starts in case you need to disable the feature that uses the intent before the user attempts to use
it. If you know of a specific app that can handle the intent, you can also provide a link for the
user to download the app (see how to <a
-href="{@docRoot}guide/publishing/publishing.html#marketintent">link to an app on Google
+href="{@docRoot}distribute/googleplay/promote/linking.html">link to your product on Google
Play</a>).</p>
diff --git a/docs/html/training/basics/network-ops/connecting.jd b/docs/html/training/basics/network-ops/connecting.jd
new file mode 100644
index 000000000000..f70cf58989f3
--- /dev/null
+++ b/docs/html/training/basics/network-ops/connecting.jd
@@ -0,0 +1,284 @@
+page.title=Connecting to the Network
+parent.title=Performing Network Operations
+parent.link=index.html
+
+trainingnavtop=true
+next.title=Managing Network Usage
+next.link=managing.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#http-client">Choose an HTTP Client</a></li>
+ <li><a href="#connection">Check the Network Connection</a></li>
+ <li><a href="#AsyncTask">Perform Network Operations on a Separate Thread</a></li>
+ <li><a href="#download">Connect and Download Data</a></li>
+ <li><a href="#stream">Convert the InputStream to a String</a></li>
+
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a></li>
+ <li><a href="{@docRoot}training/efficient-downloads/index.html">Transferring Data Without Draining the Battery</a></li>
+ <li><a href="{@docRoot}guide/webapps/index.html">Web Apps Overview</a></li>
+ <li><a href="{@docRoot}guide/components/fundamentals.html">Application Fundamentals</a></li>
+</ul>
+
+</div>
+</div>
+
+<p>This lesson shows you how to implement a simple application that connects to
+the network. It explains some of the best practices you should follow in
+creating even the simplest network-connected app.</p>
+
+<p>Note that to perform the network operations described in this lesson, your
+application manifest must include the following permissions:</p>
+
+<pre>&lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
+&lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&gt;</pre>
+
+
+
+<h2 id="http-client">Choose an HTTP Client</h2>
+
+<p>Most network-connected Android apps use HTTP to send and receive data.
+Android includes two HTTP clients: {@link java.net.HttpURLConnection} and Apache
+ {@link org.apache.http.client.HttpClient}. Both support HTTPS, streaming uploads and downloads, configurable
+timeouts, IPv6, and connection pooling. We recommend using {@link
+java.net.HttpURLConnection} for applications targeted at Gingerbread and higher. For
+more discussion of this topic, see the blog post <a
+href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html"
+>Android's HTTP Clients</a>.</p>
+
+<h2 id="connection">Check the Network Connection</h2>
+
+<p>Before your app attempts to connect to the network, it should check to see whether a
+network connection is available using
+{@link android.net.ConnectivityManager#getActiveNetworkInfo getActiveNetworkInfo()}
+and {@link android.net.NetworkInfo#isConnected isConnected()}.
+Remember, the device may be out of range of a
+network, or the user may have disabled both Wi-Fi and mobile data access.
+For more discussion of this topic, see the lesson <a
+href="{@docRoot}training/network-ops/managing.html">Managing Network
+Usage</a>.</p>
+
+<pre>
+public void myClickHandler(View view) {
+ ...
+ ConnectivityManager connMgr = (ConnectivityManager)
+ getSystemService(Context.CONNECTIVITY_SERVICE);
+ NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
+ if (networkInfo != null &amp;&amp; networkInfo.isConnected()) {
+ // fetch data
+ } else {
+ // display error
+ }
+ ...
+}</pre>
+
+<h2 id="AsyncTask">Perform Network Operations on a Separate Thread</h2>
+
+<p>Network operations can involve unpredictable delays. To prevent this from
+causing a poor user experience, always perform network operations on a separate
+thread from the UI. The {@link android.os.AsyncTask} class provides one of the
+simplest ways to fire off a new task from the UI thread. For more discussion of
+this topic, see the blog post <a
+href="http://android-developers.blogspot.com/2010/07/multithreading-for-
+performance.html">Multithreading For Performance</a>.</p>
+
+
+<p>In the following snippet, the <code>myClickHandler()</code> method invokes <code>new
+DownloadWebpageTask().execute(stringUrl)</code>. The
+<code>DownloadWebpageTask</code> class is a subclass of {@link
+android.os.AsyncTask}. <code>DownloadWebpageTask</code> implements the following
+{@link android.os.AsyncTask} methods:</p>
+
+ <ul>
+
+ <li>{@link android.os.AsyncTask#doInBackground doInBackground()} executes
+the method <code>downloadUrl()</code>. It passes the web page URL as a
+parameter. The method <code>downloadUrl()</code> fetches and processes the web
+page content. When it finishes, it passes back a result string.</li>
+
+ <li>{@link android.os.AsyncTask#onPostExecute onPostExecute()} takes the
+returned string and displays it in the UI.</li>
+
+
+ </ul>
+
+<pre>
+public class HttpExampleActivity extends Activity {
+ private static final String DEBUG_TAG = "HttpExample";
+ private EditText urlText;
+ private TextView textView;
+
+ &#64;Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main);
+ urlText = (EditText) findViewById(R.id.myUrl);
+ textView = (TextView) findViewById(R.id.myText);
+ }
+
+ // When user clicks button, calls AsyncTask.
+ // Before attempting to fetch the URL, makes sure that there is a network connection.
+ public void myClickHandler(View view) {
+ // Gets the URL from the UI's text field.
+ String stringUrl = urlText.getText().toString();
+ ConnectivityManager connMgr = (ConnectivityManager)
+ getSystemService(Context.CONNECTIVITY_SERVICE);
+ NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
+ if (networkInfo != null &amp;&amp; networkInfo.isConnected()) {
+ new DownloadWebpageText().execute(stringUrl);
+ } else {
+ textView.setText("No network connection available.");
+ }
+ }
+
+ // Uses AsyncTask to create a task away from the main UI thread. This task takes a
+ // URL string and uses it to create an HttpUrlConnection. Once the connection
+ // has been established, the AsyncTask downloads the contents of the webpage as
+ // an InputStream. Finally, the InputStream is converted into a string, which is
+ // displayed in the UI by the AsyncTask's onPostExecute method.
+ private class DownloadWebpageText extends AsyncTask<String, Void, String> {
+ &#64;Override
+ protected String doInBackground(String... urls) {
+
+ // params comes from the execute() call: params[0] is the url.
+ try {
+ return downloadUrl(urls[0]);
+ } catch (IOException e) {
+ return "Unable to retrieve web page. URL may be invalid.";
+ }
+ }
+ // onPostExecute displays the results of the AsyncTask.
+ &#64;Override
+ protected void onPostExecute(String result) {
+ textView.setText(result);
+ }
+ }
+ ...
+}</pre>
+
+<p>The sequence of events in this snippet is as follows:</p>
+<ol>
+
+ <li>When users click the button that invokes {@code myClickHandler()},
+ the app passes
+the specified URL to the {@link android.os.AsyncTask} subclass
+<code>DownloadWebpageTask</code>.</li>
+
+ <li>The {@link android.os.AsyncTask} method {@link
+android.os.AsyncTask#doInBackground doInBackground()} calls the
+<code>downloadUrl()</code> method. </li>
+
+ <li>The <code>downloadUrl()</code> method takes a URL string as a parameter
+and uses it to create a {@link java.net.URL} object.</li>
+
+ <li>The {@link java.net.URL} object is used to establish an {@link
+java.net.HttpURLConnection}.</li>
+
+ <li>Once the connection has been established, the {@link
+java.net.HttpURLConnection} object fetches the web page content as an {@link
+java.io.InputStream}.</li>
+
+ <li>The {@link java.io.InputStream} is passed to the <code>readIt()</code>
+method, which converts the stream to a string.</li>
+
+ <li>Finally, the {@link android.os.AsyncTask}'s {@link
+android.os.AsyncTask#onPostExecute onPostExecute()} method displays the string
+in the main activity's UI.</li>
+
+</ol>
+
+ <h2 id="download">Connect and Download Data</h2>
+
+ <p>In your thread that performs your network transactions, you can use
+ {@link java.net.HttpURLConnection} to perform a {@code GET} and download your data.
+ After you call {@code connect()}, you can get an {@link java.io.InputStream} of the data
+ by calling {@code getInputStream()}.
+
+ <p>In the following snippet, the {@link android.os.AsyncTask#doInBackground
+doInBackground()} method calls the method <code>downloadUrl()</code>. The
+<code>downloadUrl()</code> method takes the given URL and uses it to connect to
+the network via {@link java.net.HttpURLConnection}. Once a connection has been
+established, the app uses the method <code>getInputStream()</code> to retrieve
+the data as an {@link java.io.InputStream}.</p>
+
+<pre>
+// Given a URL, establishes an HttpUrlConnection and retrieves
+// the web page content as a InputStream, which it returns as
+// a string.
+private String downloadUrl(String myurl) throws IOException {
+ InputStream is = null;
+ // Only display the first 500 characters of the retrieved
+ // web page content.
+ int len = 500;
+
+ try {
+ URL url = new URL(myurl);
+ HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+ conn.setReadTimeout(10000 /* milliseconds */);
+ conn.setConnectTimeout(15000 /* milliseconds */);
+ conn.setRequestMethod("GET");
+ conn.setDoInput(true);
+ // Starts the query
+ conn.connect();
+ int response = conn.getResponseCode();
+ Log.d(DEBUG_TAG, "The response is: " + response);
+ is = conn.getInputStream();
+
+ // Convert the InputStream into a string
+ String contentAsString = readIt(is, len);
+ return contentAsString;
+
+ // Makes sure that the InputStream is closed after the app is
+ // finished using it.
+ } finally {
+ if (is != null) {
+ is.close();
+ }
+ }
+}</pre>
+
+<p>Note that the method <code>getResponseCode()</code> returns the connection's
+<a href="http://www.w3.org/Protocols/HTTP/HTRESP.html">status code</a>. This is
+a useful way of getting additional information about the connection. A status
+code of 200 indicates success.</p>
+
+<h2 id="stream">Convert the InputStream to a String</h2>
+
+<p>An {@link java.io.InputStream} is a readable source of bytes. Once you get an {@link java.io.InputStream},
+it's common to decode or convert it into a
+target data type. For example, if you were downloading image data, you might
+decode and display it like this:</p>
+
+<pre>InputStream is = null;
+...
+Bitmap bitmap = BitmapFactory.decodeStream(is);
+ImageView imageView = (ImageView) findViewById(R.id.image_view);
+imageView.setImageBitmap(bitmap);
+</pre>
+
+<p>In the example shown above, the {@link java.io.InputStream} represents the text of a
+web page. This is how the example converts the {@link java.io.InputStream} to
+a string so that the activity can display it in the UI:</p>
+
+<pre>// Reads an InputStream and converts it to a String.
+public String readIt(InputStream stream, int len) throws IOException, UnsupportedEncodingException {
+ Reader reader = null;
+ reader = new InputStreamReader(stream, "UTF-8");
+ char[] buffer = new char[len];
+ reader.read(buffer);
+ return new String(buffer);
+}</pre>
+
+
+
diff --git a/docs/html/training/basics/network-ops/index.jd b/docs/html/training/basics/network-ops/index.jd
new file mode 100644
index 000000000000..b213c035d423
--- /dev/null
+++ b/docs/html/training/basics/network-ops/index.jd
@@ -0,0 +1,73 @@
+page.title=Performing Network Operations
+
+trainingnavtop=true
+startpage=true
+next.title=Connecting to the Network
+next.link=connecting.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+
+<h2>Dependencies and prerequisites</h2>
+<ul>
+ <li>Android 1.6 (API level 4) or higher</li>
+ <li>A device that is able to connect to mobile and Wi-Fi networks</li>
+</ul>
+
+
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a></li>
+ <li><a href="{@docRoot}training/efficient-downloads/index.html">Transferring Data Without Draining the Battery</a></li>
+ <li><a href="{@docRoot}guide/webapps/index.html">Web Apps Overview</a></li>
+</ul>
+
+
+<h2>Try it out</h2>
+
+<div class="download-box">
+ <a href="{@docRoot}shareables/training/NetworkUsage.zip"
+class="button">Download the sample</a>
+ <p class="filename">NetworkUsage.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>This class explains the basic tasks involved in connecting to the network,
+monitoring the network connection (including connection changes), and giving
+users control over an app's network usage. It also describes how to parse and
+consume XML data.</p>
+
+<p>This class includes a sample application that illustrates how to perform
+common network operations. You can download the sample (to the right) and use it
+as a source of reusable code for your own application.</p>
+
+<p>By going through these lessons, you'll have the
+fundamental building blocks for creating Android applications that download
+content and parse data efficiently, while minimizing network traffic.</p>
+
+
+
+<h2>Lessons</h2>
+
+<dl>
+ <dt><b><a href="connecting.html">Connecting to the Network</a></b></dt>
+
+ <dd>Learn how to connect to the network, choose an HTTP client, and perform
+network operations outside of the UI thread.</dd>
+
+ <dt><b><a href="managing.html">Managing Network Usage</a></b></dt>
+
+ <dd>Learn how to check a
+device's network connection, create a preferences UI for controlling network
+usage, and respond to connection changes.</dd>
+
+ <dt><b><a href="xml.html">Parsing XML Data</a></b></dt>
+ <dd>Learn how to parse and consume XML data.</dd>
+
+</dl>
+
diff --git a/docs/html/training/basics/network-ops/managing.jd b/docs/html/training/basics/network-ops/managing.jd
new file mode 100644
index 000000000000..33cb19571b47
--- /dev/null
+++ b/docs/html/training/basics/network-ops/managing.jd
@@ -0,0 +1,445 @@
+page.title=Managing Network Usage
+parent.title=Performing Network Operations
+parent.link=index.html
+
+trainingnavtop=true
+
+previous.title=Connecting to the Network
+previous.link=connecting.html
+next.title=Parsing XML Data
+next.link=xml.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+ <ol>
+ <li><a href="#check-connection">Check a Device's Network Connection</a></li>
+ <li><a href="#manage-usage">Manage Network Usage</a></li>
+ <li><a href="#prefs">Implement a Preferences Activity</a></li>
+ <li><a href="#pref-change">Respond to Preference Changes</a></li>
+ <li><a href="#detect-changes">Detect Connection Changes</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a></li>
+ <li><a href="{@docRoot}training/efficient-downloads/index.html">Transferring Data Without Draining the Battery</a></li>
+ <li><a href="{@docRoot}guide/webapps/index.html">Web Apps Overview</a></li>
+</ul>
+
+<h2>Try it out</h2>
+
+<div class="download-box">
+ <a href="{@docRoot}shareables/training/NetworkUsage.zip"
+class="button">Download the sample</a>
+ <p class="filename">NetworkUsage.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>This lesson describes how to write applications that have fine-grained
+control over their usage of network resources. If your application performs a
+lot of network operations, you should provide user settings that allow users
+to control your app’s data habits, such as how often your app syncs data,
+whether to perform uploads/downloads only when on Wi-Fi, whether to use data
+while roaming, and so on. With these controls available to them, users are much
+less likely to disable your app’s access to background data when they approach their
+limits, because they can instead precisely control how much data your app
+uses.</p>
+
+<p>For general guidelines on how to write apps that minimize the battery life
+impact of downloads and network connections, see
+<a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a>
+and <a href="{@docRoot}training/efficient-downloads/index.html">Transferring Data Without Draining the Battery</a>.
+
+<h2 id="check-connection">Check a Device's Network Connection</h2>
+
+<p>A device can have various types of network connections. This lesson
+focuses on using either a Wi-Fi or a mobile network connection. For the full
+list of possible network types, see {@link android.net.ConnectivityManager}.<p>
+
+<p>Wi-Fi is typically faster. Also, mobile data is often metered, which can get
+expensive.
+A common strategy for apps is to only fetch large data
+if a Wi-Fi network is available.</p>
+
+<p>Before you perform network operations, it's good practice to check the state of
+network connectivity. Among other things, this could prevent your app from inadvertently using
+the wrong radio. If a network connection is unavailable, your application
+should respond gracefully. To check the network connection, you typically use
+the following classes:</p>
+
+<ul>
+
+ <li>{@link android.net.ConnectivityManager}: Answers queries about the state
+of network connectivity. It also notifies applications when network
+connectivity changes. </li>
+
+ <li>{@link android.net.NetworkInfo}: Describes the status of a network
+interface of a given type (currently either Mobile or Wi-Fi).
+ </li>
+
+</ul>
+
+
+
+<p>This code snippet tests network connectivity for Wi-Fi and mobile. It
+determines whether these network interfaces are available (that is, whether
+network connectivity is possible) and/or connected (that is, whether network
+connectivity exists and if it is possible to establish sockets and pass
+data): </p>
+
+<pre>
+private static final String DEBUG_TAG = &quot;NetworkStatusExample&quot;;
+...
+ConnectivityManager connMgr = (ConnectivityManager)
+ getSystemService(Context.CONNECTIVITY_SERVICE);
+NetworkInfo networkInfo = connMgr.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
+boolean isWifiConn = networkInfo.isConnected();
+networkInfo = connMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
+boolean isMobileConn = networkInfo.isConnected();
+Log.d(DEBUG_TAG, "Wifi connected: " + isWifiConn);
+Log.d(DEBUG_TAG, "Mobile connected: " + isMobileConn);
+</pre>
+
+<p>Note that you should not base decisions on whether a network is
+&quot;available.&quot; You should always check {@link
+android.net.NetworkInfo#isConnected isConnected()} before performing network
+operations, since {@link android.net.NetworkInfo#isConnected isConnected()}
+handles cases like flaky mobile networks, airplane mode, and restricted
+background data.</p>
+
+<p>A more concise way of checking whether a network interface is available is as
+follows. The method {@link
+android.net.ConnectivityManager#getActiveNetworkInfo() getActiveNetworkInfo()}
+returns a {@link android.net.NetworkInfo} instance representing the first
+connected network interface it can find, or <code>null</code> if none if the
+interfaces is connected (meaning that an
+internet connection is not available):</p>
+
+<pre>
+public boolean isOnline() {
+ ConnectivityManager connMgr = (ConnectivityManager)
+ getSystemService(Context.CONNECTIVITY_SERVICE);
+ NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
+ return (networkInfo != null && networkInfo.isConnected());
+} </pre>
+
+<p>To query more fine-grained state you can use {@link
+android.net.NetworkInfo.DetailedState}, but this should seldom be necessary.</p>
+
+
+<h2 id="manage-usage">Manage Network Usage</h2>
+
+<p>You can implement a preferences activity that gives users explicit control
+over your app's usage of network resources. For
+example:</p>
+
+<ul>
+
+<li>You might allow users to upload videos only when the device is connected to a
+Wi-Fi network.</li>
+
+<li>You might sync (or not) depending on specific criteria such as network
+availability, time interval, and so on.</li>
+
+</ul>
+
+<p>To write an app that supports network access and managing
+network usage, your manifest must have the right permissions and
+intent filters.
+</p>
+
+<ul>
+ <li>The manifest excerpted below includes the following permissions:
+ <ul>
+
+ <li>{@link android.Manifest.permission#INTERNET
+android.permission.INTERNET}&mdash;Allows applications to open network
+sockets.</li>
+
+ <li>{@link android.Manifest.permission#ACCESS_NETWORK_STATE
+android.permission.ACCESS_NETWORK_STATE}&mdash;Allows applications to access
+information about networks.</li>
+
+ </ul>
+ </li>
+
+ <li>You can declare the intent filter for the
+{@link android.content.Intent#ACTION_MANAGE_NETWORK_USAGE} action (introduced in
+Android 4.0) to indicate that your application defines an activity that offers
+options to control data usage. {@link
+android.content.Intent#ACTION_MANAGE_NETWORK_USAGE} shows settings for managing
+the network data usage of a specific application. When your app has a settings activity
+that allows users to control network usage, you should declare this intent filter for that activity.
+In the sample application, this action is handled by the class
+<code>SettingsActivity</code>, which displays a preferences UI to let users
+decide when to download a feed.</li>
+
+</ul>
+
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.example.android.networkusage"
+ ...&gt;
+
+ &lt;uses-sdk android:minSdkVersion="4"
+ android:targetSdkVersion="14" /&gt;
+
+ &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
+ &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
+
+ &lt;application
+ ...&gt;
+ ...
+ &lt;activity android:label="SettingsActivity" android:name=".SettingsActivity"&gt;
+ &lt;intent-filter&gt;
+ &lt;action android:name="android.intent.action.MANAGE_NETWORK_USAGE" /&gt;
+ &lt;category android:name="android.intent.category.DEFAULT" /&gt;
+ &lt;/intent-filter&gt;
+ &lt;/activity&gt;
+ &lt;/application&gt;
+&lt;/manifest&gt;
+</pre>
+
+<h2 id="prefs">Implement a Preferences Activity</h2>
+
+<p>As you can see in the manifest excerpt above, the sample app's activity
+<code>SettingsActivity</code> has an intent filter for the {@link
+android.content.Intent#ACTION_MANAGE_NETWORK_USAGE} action.
+<code>SettingsActivity</code> is a subclass of {@link
+android.preference.PreferenceActivity}. It displays a preferences screen
+(shown in figure 1) that
+lets users specify the following:</p>
+
+<ul>
+
+ <li>Whether to display summaries for each XML feed entry, or just a link for
+each entry.</li>
+
+ <li>Whether to download the XML feed if any network connection is available,
+or only if Wi-Fi is available.</li>
+
+</ul>
+
+<img src="{@docRoot}images/training/basics/network-settings1.png" alt="Preferences panel" />
+
+<img src="{@docRoot}images/training/basics/network-settings2.png" alt="Setting a network preference" />
+<p class="img-caption"><strong>Figure 1.</strong> Preferences activity.</p>
+
+<p>Here is <code>SettingsActivity</code>. Note that it implements
+{@link android.content.SharedPreferences.OnSharedPreferenceChangeListener OnSharedPreferenceChangeListener}.
+When a user changes a preference, it fires
+{@link android.content.SharedPreferences.OnSharedPreferenceChangeListener#onSharedPreferenceChanged onSharedPreferenceChanged()},
+which sets {@code refreshDisplay} to true. This causes the display to refresh when the user
+returns to the main activity:</p>
+
+<pre>public class SettingsActivity extends PreferenceActivity implements OnSharedPreferenceChangeListener {
+
+ &#64;Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ // Loads the XML preferences file
+ addPreferencesFromResource(R.xml.preferences);
+ }
+
+ &#64;Override
+ protected void onResume() {
+ super.onResume();
+
+ // Registers a listener whenever a key changes
+ getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
+ }
+
+ &#64;Override
+ protected void onPause() {
+ super.onPause();
+
+ // Unregisters the listener set in onResume().
+ // It's best practice to unregister listeners when your app isn't using them to cut down on
+ // unnecessary system overhead. You do this in onPause().
+ getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
+ }
+
+ // When the user changes the preferences selection,
+ // onSharedPreferenceChanged() restarts the main activity as a new
+ // task. Sets the the refreshDisplay flag to "true" to indicate that
+ // the main activity should update its display.
+ // The main activity queries the PreferenceManager to get the latest settings.
+
+ &#64;Override
+ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
+ // Sets refreshDisplay to true so that when the user returns to the main
+ // activity, the display refreshes to reflect the new settings.
+ NetworkActivity.refreshDisplay = true;
+ }
+}</pre>
+
+<h2 id="pref-change">Respond to Preference Changes</h2>
+
+<p>When the user changes preferences in the settings screen, it typically has
+consequences for the app's behavior. In this snippet, the app checks the
+preferences settings in {@code onStart()}. if there is a match between the setting and
+the device's network connection (for example, if the setting is {@code "Wi-Fi"} and the
+device has a Wi-Fi connection), the app downloads the feed and refreshes the
+display.</p>
+
+<pre>
+public class NetworkActivity extends Activity {
+ public static final String WIFI = "Wi-Fi";
+ public static final String ANY = "Any";
+ private static final String URL = "http://stackoverflow.com/feeds/tag?tagnames=android&sort=newest";
+
+ // Whether there is a Wi-Fi connection.
+ private static boolean wifiConnected = false;
+ // Whether there is a mobile connection.
+ private static boolean mobileConnected = false;
+ // Whether the display should be refreshed.
+ public static boolean refreshDisplay = true;
+
+ // The user's current network preference setting.
+ public static String sPref = null;
+
+ // The BroadcastReceiver that tracks network connectivity changes.
+ private NetworkReceiver receiver = new NetworkReceiver();
+
+ &#64;Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ // Registers BroadcastReceiver to track network connection changes.
+ IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
+ receiver = new NetworkReceiver();
+ this.registerReceiver(receiver, filter);
+ }
+
+ &#64;Override
+ public void onDestroy() {
+ super.onDestroy();
+ // Unregisters BroadcastReceiver when app is destroyed.
+ if (receiver != null) {
+ this.unregisterReceiver(receiver);
+ }
+ }
+
+ // Refreshes the display if the network connection and the
+ // pref settings allow it.
+
+ &#64;Override
+ public void onStart () {
+ super.onStart();
+
+ // Gets the user's network preference settings
+ SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
+
+ // Retrieves a string value for the preferences. The second parameter
+ // is the default value to use if a preference value is not found.
+ sPref = sharedPrefs.getString("listPref", "Wi-Fi");
+
+ updateConnectedFlags();
+
+ if(refreshDisplay){
+ loadPage();
+ }
+ }
+
+ // Checks the network connection and sets the wifiConnected and mobileConnected
+ // variables accordingly.
+ public void updateConnectedFlags() {
+ ConnectivityManager connMgr = (ConnectivityManager)
+ getSystemService(Context.CONNECTIVITY_SERVICE);
+
+ NetworkInfo activeInfo = connMgr.getActiveNetworkInfo();
+ if (activeInfo != null && activeInfo.isConnected()) {
+ wifiConnected = activeInfo.getType() == ConnectivityManager.TYPE_WIFI;
+ mobileConnected = activeInfo.getType() == ConnectivityManager.TYPE_MOBILE;
+ } else {
+ wifiConnected = false;
+ mobileConnected = false;
+ }
+ }
+
+ // Uses AsyncTask subclass to download the XML feed from stackoverflow.com.
+ public void loadPage() {
+ if (((sPref.equals(ANY)) && (wifiConnected || mobileConnected))
+ || ((sPref.equals(WIFI)) && (wifiConnected))) {
+ // AsyncTask subclass
+ new DownloadXmlTask().execute(URL);
+ } else {
+ showErrorPage();
+ }
+ }
+...
+
+}</pre>
+
+<h2 id="detect-changes">Detect Connection Changes</h2>
+
+<p>The final piece of the puzzle is the {@link
+android.content.BroadcastReceiver} subclass, <code>NetworkReceiver</code>. When
+the device's network connection changes, <code>NetworkReceiver</code> intercepts
+the action {@link android.net.ConnectivityManager#CONNECTIVITY_ACTION},
+determines what the network connection status is, and sets the flags
+<code>wifiConnected</code> and <code>mobileConnected</code> to true/false
+accordingly. The upshot is that the next time the user returns to the app, the
+app will only download the latest feed and update the display if
+<code>NetworkActivity.refreshDisplay</code> is set to <code>true</code>.</p>
+
+<p>Setting up a BroadcastReceiver that gets called unnecessarily can be a
+drain on system resources.
+The sample application registers the
+{@link android.content.BroadcastReceiver} {@code NetworkReceiver} in
+{@link android.app.Activity#onCreate(android.os.Bundle) onCreate()},
+and it unregisters it in
+{@link android.app.Activity#onDestroy onDestroy()}. This is more lightweight
+than declaring a {@code &lt;receiver&gt;} in the manifest. When you declare a
+{@code &lt;receiver&gt;} in the manifest, it can wake up your app at any time,
+even if you haven't run it for weeks. By registering and unregistering
+{@code NetworkReceiver} within the main activity, you ensure that the app won't
+be woken up after the user leaves the app.
+If you do declare a {@code &lt;receiver&gt;} in the manifest and you know exactly
+where you need it, you can use
+{@link android.content.pm.PackageManager#setComponentEnabledSetting setComponentEnabledSetting()}
+to enable and disable it as appropriate.</p>
+
+<p>Here is <code>NetworkReceiver</code>:</p>
+
+<pre>public class NetworkReceiver extends BroadcastReceiver {
+
+&#64;Override
+public void onReceive(Context context, Intent intent) {
+ ConnectivityManager conn = (ConnectivityManager)
+ context.getSystemService(Context.CONNECTIVITY_SERVICE);
+ NetworkInfo networkInfo = conn.getActiveNetworkInfo();
+
+ // Checks the user prefs and the network connection. Based on the result, decides whether
+ // to refresh the display or keep the current display.
+ // If the userpref is Wi-Fi only, checks to see if the device has a Wi-Fi connection.
+ if (WIFI.equals(sPref) && networkInfo != null && networkInfo.getType() == ConnectivityManager.TYPE_WIFI) {
+ // If device has its Wi-Fi connection, sets refreshDisplay
+ // to true. This causes the display to be refreshed when the user
+ // returns to the app.
+ refreshDisplay = true;
+ Toast.makeText(context, R.string.wifi_connected, Toast.LENGTH_SHORT).show();
+
+ // If the setting is ANY network and there is a network connection
+ // (which by process of elimination would be mobile), sets refreshDisplay to true.
+ } else if (ANY.equals(sPref) && networkInfo != null) {
+ refreshDisplay = true;
+
+ // Otherwise, the app can't download content--either because there is no network
+ // connection (mobile or Wi-Fi), or because the pref setting is WIFI, and there
+ // is no Wi-Fi connection.
+ // Sets refreshDisplay to false.
+ } else {
+ refreshDisplay = false;
+ Toast.makeText(context, R.string.lost_connection, Toast.LENGTH_SHORT).show();
+ }
+}</pre>
+
diff --git a/docs/html/training/basics/network-ops/xml.jd b/docs/html/training/basics/network-ops/xml.jd
new file mode 100644
index 000000000000..b148257ec7c3
--- /dev/null
+++ b/docs/html/training/basics/network-ops/xml.jd
@@ -0,0 +1,555 @@
+page.title=Parsing XML Data
+parent.title=Performing Network Operations
+parent.link=index.html
+
+trainingnavtop=true
+
+previous.title=Managing Network Usage
+previous.link=managing.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#choose">Choose a Parser</a></li>
+ <li><a href="#analyze">Analyze the Feed</a></li>
+ <li><a href="#instantiate">Instantiate the Parser</a></li>
+ <li><a href="#read">Read the Feed</a></li>
+ <li><a href="#parse">Parse XML</a></li>
+ <li><a href="#skip">Skip Tags You Don't Care About</a></li>
+ <li><a href="#consume">Consume XML Data</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}guide/webapps/index.html">Web Apps Overview</a></li>
+</ul>
+
+<h2>Try it out</h2>
+
+<div class="download-box">
+ <a href="{@docRoot}shareables/training/NetworkUsage.zip"
+class="button">Download the sample</a>
+ <p class="filename">NetworkUsage.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>Extensible Markup Language (XML) is a set of rules for encoding documents in
+machine-readable form. XML is a popular format for sharing data on the internet.
+Websites that frequently update their content, such as news sites or blogs,
+often provide an XML feed so that external programs can keep abreast of content
+changes. Uploading and parsing XML data is a common task for network-connected
+apps. This lesson explains how to parse XML documents and use their data.</p>
+
+<h2 id="choose">Choose a Parser</h2>
+
+<p>We recommend {@link org.xmlpull.v1.XmlPullParser}, which is an efficient and
+maintainable way to parse XML on Android. Historically Android has had two
+implementations of this interface:</p>
+
+<ul>
+ <li><a href="http://kxml.sourceforge.net/"><code>KXmlParser</code></a>
+ via {@link org.xmlpull.v1.XmlPullParserFactory#newPullParser XmlPullParserFactory.newPullParser()}.
+ </li>
+ <li><code>ExpatPullParser</code>, via
+ {@link android.util.Xml#newPullParser Xml.newPullParser()}.
+ </li>
+</ul>
+
+<p>Either choice is fine. The
+example in this section uses <code>ExpatPullParser</code>, via
+{@link android.util.Xml#newPullParser Xml.newPullParser()}. </p>
+
+<h2 id="analyze">Analyze the Feed</h2>
+
+<p>The first step in parsing a feed is to decide which fields you're interested in.
+The parser extracts data for those fields and ignores the rest.</p>
+
+<p>Here is an excerpt from the feed that's being parsed in the sample app. Each
+post to <a href="http://stackoverflow.com">StackOverflow.com</a> appears in the
+feed as an <code>entry</code> tag that contains several nested tags:</p>
+
+<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;feed xmlns=&quot;http://www.w3.org/2005/Atom&quot; xmlns:creativeCommons=&quot;http://backend.userland.com/creativeCommonsRssModule&quot; ...&quot;&gt;
+&lt;title type=&quot;text&quot;&gt;newest questions tagged android - Stack Overflow&lt;/title&gt;
+...
+ &lt;entry&gt;
+ ...
+ &lt;/entry&gt;
+ &lt;entry&gt;
+ &lt;id&gt;http://stackoverflow.com/q/9439999&lt;/id&gt;
+ &lt;re:rank scheme="http://stackoverflow.com"&gt;0&lt;/re:rank&gt;
+ &lt;title type="text"&gt;Where is my data file?&lt;/title&gt;
+ &lt;category scheme="http://stackoverflow.com/feeds/tag?tagnames=android&amp;sort=newest/tags" term="android"/&gt;
+ &lt;category scheme="http://stackoverflow.com/feeds/tag?tagnames=android&amp;sort=newest/tags" term="file"/&gt;
+ &lt;author&gt;
+ &lt;name&gt;cliff2310&lt;/name&gt;
+ &lt;uri&gt;http://stackoverflow.com/users/1128925&lt;/uri&gt;
+ &lt;/author&gt;
+ &lt;link rel="alternate" href="http://stackoverflow.com/questions/9439999/where-is-my-data-file" /&gt;
+ &lt;published&gt;2012-02-25T00:30:54Z&lt;/published&gt;
+ &lt;updated&gt;2012-02-25T00:30:54Z&lt;/updated&gt;
+ &lt;summary type="html"&gt;
+ &lt;p&gt;I have an Application that requires a data file...&lt;/p&gt;
+
+ &lt;/summary&gt;
+ &lt;/entry&gt;
+ &lt;entry&gt;
+ ...
+ &lt;/entry&gt;
+...
+&lt;/feed&gt;</pre>
+
+<p>The sample app
+extracts data for the <code>entry</code> tag and its nested tags
+<code>title</code>, <code>link</code>, and <code>summary</code>.</p>
+
+
+<h2 id="instantiate">Instantiate the Parser</h2>
+
+<p>The next step is to
+instantiate a parser and kick off the parsing process. In this snippet, a parser
+is initialized to not process namespaces, and to use the provided {@link
+java.io.InputStream} as its input. It starts the parsing process with a call to
+{@link org.xmlpull.v1.XmlPullParser#nextTag() nextTag()} and invokes the
+<code>readFeed()</code> method, which extracts and processes the data the app is
+interested in:</p>
+
+<pre>public class StackOverflowXmlParser {
+ // We don't use namespaces
+ private static final String ns = null;
+
+ public List<Entry> parse(InputStream in) throws XmlPullParserException, IOException {
+ try {
+ XmlPullParser parser = Xml.newPullParser();
+ parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false);
+ parser.setInput(in, null);
+ parser.nextTag();
+ return readFeed(parser);
+ } finally {
+ in.close();
+ }
+ }
+ ...
+}</pre>
+
+<h2 id="read">Read the Feed</h2>
+
+<p>The <code>readFeed()</code> method does the actual work of processing the
+feed. It looks for elements tagged "entry" as a starting point for recursively
+processing the feed. If a tag isn't an {@code entry} tag, it skips it. Once the whole
+feed has been recursively processed, <code>readFeed()</code> returns a {@link
+java.util.List} containing the entries (including nested data members) it
+extracted from the feed. This {@link java.util.List} is then returned by the
+parser.</p>
+
+<pre>
+private List<Entry> readFeed(XmlPullParser parser) throws XmlPullParserException, IOException {
+ List<Entry> entries = new ArrayList<Entry>();
+
+ parser.require(XmlPullParser.START_TAG, ns, "feed");
+ while (parser.next() != XmlPullParser.END_TAG) {
+ if (parser.getEventType() != XmlPullParser.START_TAG) {
+ continue;
+ }
+ String name = parser.getName();
+ // Starts by looking for the entry tag
+ if (name.equals("entry")) {
+ entries.add(readEntry(parser));
+ } else {
+ skip(parser);
+ }
+ }
+ return entries;
+}</pre>
+
+
+<h2 id="parse">Parse XML</h2>
+
+
+<p>The steps for parsing an XML feed are as follows:</p>
+<ol>
+
+ <li>As described in <a href="#analyze">Analyze the Feed</a>, identify the tags you want to include in your app. This
+example extracts data for the <code>entry</code> tag and its nested tags
+<code>title</code>, <code>link</code>, and <code>summary</code>.</li>
+
+<li>Create the following methods:</p>
+
+<ul>
+
+<li>A "read" method for each tag you're interested in. For example,
+<code>readEntry()</code>, <code>readTitle()</code>, and so on. The parser reads
+tags from the input stream. When it encounters a tag named <code>entry</code>,
+<code>title</code>,
+<code>link</code> or <code>summary</code>, it calls the appropriate method
+for that tag. Otherwise, it skips the tag.
+</li>
+
+<li>Methods to extract data for each different type of tag and to advance the
+parser to the next tag. For example:
+<ul>
+
+<li>For the <code>title</code> and <code>summary</code> tags, the parser calls
+<code>readText()</code>. This method extracts data for these tags by calling
+<code>parser.getText()</code>.</li>
+
+<li>For the <code>link</code> tag, the parser extracts data for links by first
+determining if the link is the kind
+it's interested in. Then it uses <code>parser.getAttributeValue()</code> to
+extract the link's value.</li>
+
+<li>For the <code>entry</code> tag, the parser calls <code>readEntry()</code>.
+This method parses the entry's nested tags and returns an <code>Entry</code>
+object with the data members <code>title</code>, <code>link</code>, and
+<code>summary</code>.</li>
+
+</ul>
+</li>
+<li>A helper <code>skip()</code> method that's recursive. For more discussion of this topic, see <a href="#skip">Skip Tags You Don't Care About</a>.</li>
+</ul>
+
+ </li>
+</ol>
+
+<p>This snippet shows how the parser parses entries, titles, links, and summaries.</p>
+<pre>public static class Entry {
+ public final String title;
+ public final String link;
+ public final String summary;
+
+ private Entry(String title, String summary, String link) {
+ this.title = title;
+ this.summary = summary;
+ this.link = link;
+ }
+}
+
+// Parses the contents of an entry. If it encounters a title, summary, or link tag, hands them off
+// to their respective &quot;read&quot; methods for processing. Otherwise, skips the tag.
+private Entry readEntry(XmlPullParser parser) throws XmlPullParserException, IOException {
+ parser.require(XmlPullParser.START_TAG, ns, "entry");
+ String title = null;
+ String summary = null;
+ String link = null;
+ while (parser.next() != XmlPullParser.END_TAG) {
+ if (parser.getEventType() != XmlPullParser.START_TAG) {
+ continue;
+ }
+ String name = parser.getName();
+ if (name.equals("title")) {
+ title = readTitle(parser);
+ } else if (name.equals("summary")) {
+ summary = readSummary(parser);
+ } else if (name.equals("link")) {
+ link = readLink(parser);
+ } else {
+ skip(parser);
+ }
+ }
+ return new Entry(title, summary, link);
+}
+
+// Processes title tags in the feed.
+private String readTitle(XmlPullParser parser) throws IOException, XmlPullParserException {
+ parser.require(XmlPullParser.START_TAG, ns, "title");
+ String title = readText(parser);
+ parser.require(XmlPullParser.END_TAG, ns, "title");
+ return title;
+}
+
+// Processes link tags in the feed.
+private String readLink(XmlPullParser parser) throws IOException, XmlPullParserException {
+ String link = "";
+ parser.require(XmlPullParser.START_TAG, ns, "link");
+ String tag = parser.getName();
+ String relType = parser.getAttributeValue(null, "rel");
+ if (tag.equals("link")) {
+ if (relType.equals("alternate")){
+ link = parser.getAttributeValue(null, "href");
+ parser.nextTag();
+ }
+ }
+ parser.require(XmlPullParser.END_TAG, ns, "link");
+ return link;
+}
+
+// Processes summary tags in the feed.
+private String readSummary(XmlPullParser parser) throws IOException, XmlPullParserException {
+ parser.require(XmlPullParser.START_TAG, ns, "summary");
+ String summary = readText(parser);
+ parser.require(XmlPullParser.END_TAG, ns, "summary");
+ return summary;
+}
+
+// For the tags title and summary, extracts their text values.
+private String readText(XmlPullParser parser) throws IOException, XmlPullParserException {
+ String result = "";
+ if (parser.next() == XmlPullParser.TEXT) {
+ result = parser.getText();
+ parser.nextTag();
+ }
+ return result;
+}
+ ...
+}</pre>
+
+<h2 id="skip">Skip Tags You Don't Care About</h2>
+
+<p>One of the steps in the XML parsing described above is for the parser to skip tags it's not interested in. Here is the parser's <code>skip()</code> method:</p>
+
+<pre>
+private void skip(XmlPullParser parser) throws XmlPullParserException, IOException {
+ if (parser.getEventType() != XmlPullParser.START_TAG) {
+ throw new IllegalStateException();
+ }
+ int depth = 1;
+ while (depth != 0) {
+ switch (parser.next()) {
+ case XmlPullParser.END_TAG:
+ depth--;
+ break;
+ case XmlPullParser.START_TAG:
+ depth++;
+ break;
+ }
+ }
+ }
+</pre>
+
+<p>This is how it works:</p>
+
+<ul>
+
+<li>It throws an exception if the current event isn't a
+<code>START_TAG</code>.</li>
+
+<li>It consumes the <code>START_TAG</code>, and all events up to and including
+the matching <code>END_TAG</code>.</li>
+
+<li>To make sure that it stops at the correct <code>END_TAG</code> and not at
+the first tag it encounters after the original <code>START_TAG</code>, it keeps
+track of the nesting depth.</li>
+
+</ul>
+
+<p>Thus if the current element has nested elements, the value of
+<code>depth</code> won't be 0 until the parser has consumed all events between
+the original <code>START_TAG</code> and its matching <code>END_TAG</code>. For
+example, consider how the parser skips the <code>&lt;author&gt;</code> element,
+which has 2 nested elements, <code>&lt;name&gt;</code> and
+<code>&lt;uri&gt;</code>:</p>
+
+<ul>
+
+<li>The first time through the <code>while</code> loop, the next tag the parser
+encounters after <code>&lt;author&gt;</code> is the <code>START_TAG</code> for
+<code>&lt;name&gt;</code>. The value for <code>depth</code> is incremented to
+2.</li>
+
+<li>The second time through the <code>while</code> loop, the next tag the parser
+encounters is the <code>END_TAG</code> <code>&lt;/name&gt;</code>. The value
+for <code>depth</code> is decremented to 1.</li>
+
+<li>The third time through the <code>while</code> loop, the next tag the parser
+encounters is the <code>START_TAG</code> <code>&lt;uri&gt;</code>. The value
+for <code>depth</code> is incremented to 2.</li>
+
+<li>The fourth time through the <code>while</code> loop, the next tag the parser
+encounters is the <code>END_TAG</code> <code>&lt;/uri&gt;</code>. The value for
+<code>depth</code> is decremented to 1.</li>
+
+<li>The fifth time and final time through the <code>while</code> loop, the next
+tag the parser encounters is the <code>END_TAG</code>
+<code>&lt;/author&gt;</code>. The value for <code>depth</code> is decremented to
+0, indicating that the <code>&lt;author&gt;</code> element has been successfully
+skipped.</li>
+
+</ul>
+
+<h2 id="consume">Consume XML Data</h2>
+
+<p>The example application fetches and parses the XML feed within an {@link
+android.os.AsyncTask}. This takes the processing off the main UI thread. When
+processing is complete, the app updates the UI in the main activity
+(<code>NetworkActivity</code>).</p>
+<p>In the excerpt shown below, the <code>loadPage()</code> method does the
+following:</p>
+
+<ul>
+
+ <li>Initializes a string variable with the URL for the XML feed.</li>
+
+ <li>If the user's settings and the network connection allow it, invokes
+<code>new DownloadXmlTask().execute(url)</code>. This instantiates a new
+<code>DownloadXmlTask</code> object ({@link android.os.AsyncTask} subclass) and
+runs its {@link android.os.AsyncTask#execute execute()} method, which downloads
+and parses the feed and returns a string result to be displayed in the UI.</li>
+
+</ul>
+<pre>
+public class NetworkActivity extends Activity {
+ public static final String WIFI = "Wi-Fi";
+ public static final String ANY = "Any";
+ private static final String URL = "http://stackoverflow.com/feeds/tag?tagnames=android&sort=newest";
+
+ // Whether there is a Wi-Fi connection.
+ private static boolean wifiConnected = false;
+ // Whether there is a mobile connection.
+ private static boolean mobileConnected = false;
+ // Whether the display should be refreshed.
+ public static boolean refreshDisplay = true;
+ public static String sPref = null;
+
+ ...
+
+ // Uses AsyncTask to download the XML feed from stackoverflow.com.
+ public void loadPage() {
+
+ if((sPref.equals(ANY)) && (wifiConnected || mobileConnected)) {
+ new DownloadXmlTask().execute(URL);
+ }
+ else if ((sPref.equals(WIFI)) && (wifiConnected)) {
+ new DownloadXmlTask().execute(URL);
+ } else {
+ // show error
+ }
+ }</pre>
+
+<p>The {@link android.os.AsyncTask} subclass shown below,
+<code>DownloadXmlTask</code>, implements the following {@link
+android.os.AsyncTask} methods:</p>
+
+ <ul>
+
+ <li>{@link android.os.AsyncTask#doInBackground doInBackground()} executes
+the method <code>loadXmlFromNetwork()</code>. It passes the feed URL as a
+parameter. The method <code>loadXmlFromNetwork()</code> fetches and processes
+the feed. When it finishes, it passes back a result string.</li>
+
+ <li>{@link android.os.AsyncTask#onPostExecute onPostExecute()} takes the
+returned string and displays it in the UI.</li>
+
+ </ul>
+
+<pre>
+// Implementation of AsyncTask used to download XML feed from stackoverflow.com.
+private class DownloadXmlTask extends AsyncTask&lt;String, Void, String&gt; {
+ &#64;Override
+ protected String doInBackground(String... urls) {
+ try {
+ return loadXmlFromNetwork(urls[0]);
+ } catch (IOException e) {
+ return getResources().getString(R.string.connection_error);
+ } catch (XmlPullParserException e) {
+ return getResources().getString(R.string.xml_error);
+ }
+ }
+
+ &#64;Override
+ protected void onPostExecute(String result) {
+ setContentView(R.layout.main);
+ // Displays the HTML string in the UI via a WebView
+ WebView myWebView = (WebView) findViewById(R.id.webview);
+ myWebView.loadData(result, "text/html", null);
+ }
+}</pre>
+
+ <p>Below is the method <code>loadXmlFromNetwork()</code> that is invoked from
+<code>DownloadXmlTask</code>. It does the following:</p>
+
+ <ol>
+
+ <li>Instantiates a <code>StackOverflowXmlParser</code>. It also creates variables for
+a {@link java.util.List} of <code>Entry</code> objects (<code>entries</code>), and
+<code>title</code>, <code>url</code>, and <code>summary</code>, to hold the
+values extracted from the XML feed for those fields.</li>
+
+ <li>Calls <code>downloadUrl()</code>, which fetches the feed and returns it as
+ an {@link java.io.InputStream}.</li>
+
+ <li>Uses <code>StackOverflowXmlParser</code> to parse the {@link java.io.InputStream}.
+ <code>StackOverflowXmlParser</code> populates a
+ {@link java.util.List} of <code>entries</code> with data from the feed.</li>
+
+ <li>Processes the <code>entries</code> {@link java.util.List},
+ and combines the feed data with HTML markup.</li>
+
+ <li>Returns an HTML string that is displayed in the main activity
+UI by the {@link android.os.AsyncTask} method {@link
+android.os.AsyncTask#onPostExecute onPostExecute()}.</li>
+
+</ol>
+
+<pre>
+// Uploads XML from stackoverflow.com, parses it, and combines it with
+// HTML markup. Returns HTML string.
+private String loadXmlFromNetwork(String urlString) throws XmlPullParserException, IOException {
+ InputStream stream = null;
+ // Instantiate the parser
+ StackOverflowXmlParser stackOverflowXmlParser = new StackOverflowXmlParser();
+ List&lt;Entry&gt; entries = null;
+ String title = null;
+ String url = null;
+ String summary = null;
+ Calendar rightNow = Calendar.getInstance();
+ DateFormat formatter = new SimpleDateFormat("MMM dd h:mmaa");
+
+ // Checks whether the user set the preference to include summary text
+ SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
+ boolean pref = sharedPrefs.getBoolean("summaryPref", false);
+
+ StringBuilder htmlString = new StringBuilder();
+ htmlString.append("&lt;h3&gt;" + getResources().getString(R.string.page_title) + "&lt;/h3&gt;");
+ htmlString.append("&lt;em&gt;" + getResources().getString(R.string.updated) + " " +
+ formatter.format(rightNow.getTime()) + "&lt;/em&gt;");
+
+ try {
+ stream = downloadUrl(urlString);
+ entries = stackOverflowXmlParser.parse(stream);
+ // Makes sure that the InputStream is closed after the app is
+ // finished using it.
+ } finally {
+ if (stream != null) {
+ stream.close();
+ }
+ }
+
+ // StackOverflowXmlParser returns a List (called "entries") of Entry objects.
+ // Each Entry object represents a single post in the XML feed.
+ // This section processes the entries list to combine each entry with HTML markup.
+ // Each entry is displayed in the UI as a link that optionally includes
+ // a text summary.
+ for (Entry entry : entries) {
+ htmlString.append("&lt;p&gt;&lt;a href='");
+ htmlString.append(entry.link);
+ htmlString.append("'&gt;" + entry.title + "&lt;/a&gt;&lt;/p&gt;");
+ // If the user set the preference to include summary text,
+ // adds it to the display.
+ if (pref) {
+ htmlString.append(entry.summary);
+ }
+ }
+ return htmlString.toString();
+}
+
+// Given a string representation of a URL, sets up a connection and gets
+// an input stream.
+private InputStream downloadUrl(String urlString) throws IOException {
+ URL url = new URL(urlString);
+ HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+ conn.setReadTimeout(10000 /* milliseconds */);
+ conn.setConnectTimeout(15000 /* milliseconds */);
+ conn.setRequestMethod("GET");
+ conn.setDoInput(true);
+ // Starts the query
+ conn.connect();
+ InputStream stream = conn.getInputStream();
+}</pre>
diff --git a/docs/html/training/basics/supporting-devices/languages.jd b/docs/html/training/basics/supporting-devices/languages.jd
index fcc95c2a7f94..d83fbca28995 100644
--- a/docs/html/training/basics/supporting-devices/languages.jd
+++ b/docs/html/training/basics/supporting-devices/languages.jd
@@ -97,6 +97,10 @@ locale currently set for the user's device.</p>
&lt;/resources>
</pre>
+<p class="note"><strong>Note:</strong> You can use the locale qualifier (or any
+configuration qualifer) on any resource type, such as if you want to provide
+localized versions of your bitmap drawable. For more information, see <a
+href="{@docRoot}guide/topics/resources/localization.html">Localization</a>.
<h2 id="UseString">Use the String Resources</h2>
diff --git a/docs/html/training/basics/supporting-devices/platforms.jd b/docs/html/training/basics/supporting-devices/platforms.jd
index 0d4e7d98303a..04872a342a9c 100644
--- a/docs/html/training/basics/supporting-devices/platforms.jd
+++ b/docs/html/training/basics/supporting-devices/platforms.jd
@@ -21,9 +21,9 @@ previous.link=screens.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/appendix/api-levels.html">Android API Levels</a></li>
+ <li><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">Android API Levels</a></li>
<li><a
-href="{@docRoot}sdk/compatibility-library.html">Android Support Library</a></li>
+href="{@docRoot}tools/extras/support-library.html">Android Support Library</a></li>
</ul>
</div>
</div>
@@ -34,7 +34,7 @@ lesson shows you how to take advantage of the latest APIs while continuing to su
versions as well.</p>
<p>The dashboard for <a
-href="http://developer.android.com/resources/dashboard/platform-versions.html">Platform Versions</a>
+href="http://developer.android.com/about/dashboards/index.html">Platform Versions</a>
is updated regularly to show the distribution of active
devices running each version of Android, based on the number of devices that visit the Google Play
Store. Generally, it’s a good practice to support about 90% of the active devices, while
@@ -42,7 +42,7 @@ targeting your app to the latest version.</p>
<p class="note"><strong>Tip:</strong> In order to provide the best features and
functionality across several Android versions, you should use the <a
-href="{@docRoot}sdk/compatibility-library.html">Android Support Library</a> in your app,
+href="{@docRoot}tools/extras/support-library.html">Android Support Library</a> in your app,
which allows you to use several recent platform APIs on older versions.</p>
diff --git a/docs/html/training/camera/index.jd b/docs/html/training/camera/index.jd
index d209c7e41186..282bed8d8b08 100644
--- a/docs/html/training/camera/index.jd
+++ b/docs/html/training/camera/index.jd
@@ -21,7 +21,7 @@ next.link=photobasics.html
<h2>You should also read</h2>
<ul>
<li><a href="{@docRoot}guide/topics/media/camera.html">Camera</a></li>
- <li><a href="{@docRoot}guide/topics/fundamentals/activities.html">Activities</a></li>
+ <li><a href="{@docRoot}guide/components/activities.html">Activities</a></li>
</ul>
diff --git a/docs/html/training/camera/photobasics.jd b/docs/html/training/camera/photobasics.jd
index 3420918c20a1..8fa6d67b0aa3 100644
--- a/docs/html/training/camera/photobasics.jd
+++ b/docs/html/training/camera/photobasics.jd
@@ -25,7 +25,7 @@ next.link=videobasics.html
<h2>You should also read</h2>
<ul>
<li><a href="{@docRoot}guide/topics/media/camera.html">Camera</a></li>
- <li><a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent
Filters</a></li>
</ul>
diff --git a/docs/html/training/camera/videobasics.jd b/docs/html/training/camera/videobasics.jd
index 5fe1a3a367fe..d011d09392b2 100644
--- a/docs/html/training/camera/videobasics.jd
+++ b/docs/html/training/camera/videobasics.jd
@@ -24,7 +24,7 @@ next.link=cameradirect.html
<h2>You should also read</h2>
<ul>
<li><a href="{@docRoot}guide/topics/media/camera.html">Camera</a></li>
- <li><a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent
Filters</a></li>
</ul>
diff --git a/docs/html/training/custom-views/create-view.jd b/docs/html/training/custom-views/create-view.jd
new file mode 100644
index 000000000000..b0bc8b478245
--- /dev/null
+++ b/docs/html/training/custom-views/create-view.jd
@@ -0,0 +1,281 @@
+page.title=Creating a View Class
+parent.title=Creating Custom Views
+parent.link=index.html
+
+trainingnavtop=true
+next.title=Custom Drawing
+next.link=custom-drawing.html
+
+@jd:body
+
+<div id="tb-wrapper">
+ <div id="tb">
+
+ <h2>This lesson teaches you to</h2>
+ <ol>
+ <li><a href="#subclassview">Subclass a View</a></li>
+ <li><a href="#customattr">Define Custom Attributes</a></li>
+ <li><a href="#applyattr">Apply Custom Attributes to a View</a></li>
+ <li><a href="#addprop">Add Properties and Events</a></li>
+ <li><a href="#accessibility">Design For Accessibility</a></li>
+ </ol>
+
+ <h2>You should also read</h2>
+ <ul>
+ <li><a href="{@docRoot}/guide/topics/ui/custom-components.html">Custom Components</a>
+ </li>
+ </ul>
+<h2>Try it out</h2>
+<div class="download-box">
+<a href="{@docRoot}shareables/training/CustomView.zip"
+class="button">Download the sample</a>
+<p class="filename">CustomView.zip</p>
+</div>
+ </div>
+</div>
+
+<p>A well-designed custom view is much like any other well-designed class. It encapsulates a
+specific set of
+functionality with an easy to use interface, it uses CPU and memory efficiently, and so forth. In
+addition to being a
+well-designed class, though, a custom view should:
+
+<ul>
+ <li>Conform to Android standards</li>
+ <li>Provide custom styleable attributes that work with Android XML layouts</li>
+ <li>Send accessibility events</li>
+ <li>Be compatible with multiple Android platforms.</li>
+</ul>
+
+<p>The Android framework provides a set of base classes and XML tags to help you create a view that
+ meets all of these
+ requirements. This lesson discusses how to use the Android framework to create the core
+ functionality of a view
+ class.</p>
+
+<h2 id="subclassview">Subclass a View</h2>
+
+<p>All of the view classes defined in the Android framework extend {@link android.view.View}. Your
+ custom view can also
+ extend {@link android.view.View View} directly, or you can save time by extending one of the
+ existing view
+ subclasses, such as {@link android.widget.Button}.</p>
+
+<p>To allow the <a href=”{@docRoot}guide/developing/tools/adt.html”>Android Developer Tools
+</a> to interact with your view, at a minimum you must provide a constructor that takes a
+{@link android.content.Context} and an {@link android.util.AttributeSet} object as parameters.
+This constructor allows the layout editor to create and edit an instance of your view.</p>
+
+<pre class="prettyprint">
+class PieChart extends View {
+ public PieChart(Context ctx, AttributeSet attrs) {
+ super(ctx, attrs);
+ }
+}
+</pre>
+
+<h2 id="customattr">Define Custom Attributes</h2>
+
+<p>To add a built-in {@link android.view.View View} to your user interface, you specify it in an XML element and
+control its
+appearance and behavior with element attributes. Well-written custom views can also be added and
+styled via XML. To
+enable this behavior in your custom view, you must:
+
+<ul>
+ <li>Define custom attributes for your view in a {@code
+ &lt;declare-styleable&gt;
+ } resource element
+ </li>
+ <li>Specify values for the attributes in your XML layout</li>
+ <li>Retrieve attribute values at runtime</li>
+ <li>Apply the retrieved attribute values to your view</li>
+</ul>
+
+<p>This section discusses how to define custom attributes and specify their values.
+ The next section deals with
+ retrieving and applying the values at runtime.</p>
+
+<p>To define custom attributes, add {@code
+ &lt;declare-styleable&gt;
+ } resources to your project. It's customary to put these resources into a {@code
+ res/values/attrs.xml} file. Here's
+ an example of an {@code attrs.xml} file:
+</p>
+
+<pre>
+&lt;resources>;
+ &ltdeclare-styleable name="PieChart">
+ &lt;attr name="showText" format="boolean" />
+ &lt;attr name="labelPosition" format="enum">
+ &lt;enum name="left" value="0"/>
+ &lt;enum name="right" value="1"/>
+ &lt;/attr>
+ &lt;/declare-styleable>
+&lt;/resources>
+</pre>
+
+<p>This code declares two custom attributes, {@code showText} and {@code labelPosition}, that belong
+ to a styleable
+ entity named {@code PieChart}. The name of the styleable entity is, by convention, the same name as the
+ name of the class
+ that defines the custom view. Although it's not strictly necessary to follow this convention,
+ many popular code
+ editors depend on this naming convention to provide statement completion.</p>
+
+<p>Once you define the custom attributes, you can use them in layout XML files just like built-in
+ attributes. The only
+ difference is that your custom attributes belong to a different namespace. Instead of belonging
+ to the {@code
+ http://schemas.android.com/apk/res/android} namespace, they belong to {@code
+ http://schemas.android.com/apk/res/[your package name]}. For example, here's how to use the
+ attributes defined for
+ {@code PieChart}:
+ <p>
+
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?>
+&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:custom="http://schemas.android.com/apk/res/com.example.customviews">
+ &lt;com.example.customviews.charting.PieChart
+ custom:showText="true"
+ custom:labelPosition="left" />
+&lt;/LinearLayout>
+</pre>
+
+ <p>In order to avoid having to repeat the long namespace URI, the sample uses an {@code
+ xmlns} directive. This
+ directive assigns the alias {@code custom} to the namespace {@code
+ http://schemas.android.com/apk/res/com.example.customviews}. You can choose any alias
+ you want for your
+ namespace.</p>
+
+ <p>Notice the name of the XML tag that adds the custom view to the layout. It is the fully
+ qualified name of the
+ custom view class. If your view class is an inner class, you must further qualify it with the name of the view's outer class.
+ further. For instance, the
+ {@code PieChart} class has an inner class called {@code PieView}. To use the custom attributes from this class, you would
+ use the tag {@code com.example.customviews.charting.PieChart$PieView}.</p>
+
+ <h2 id="applyattr">Apply Custom Attributes</h2>
+
+ <p>When a view is created from an XML layout, all of the attributes in the XML tag are read
+ from the resource
+ bundle and passed into the view's constructor as an {@link android.util.AttributeSet}.
+ Although it's
+ possible to read values from the {@link android.util.AttributeSet} directly, doing so
+ has some disadvantages:</p>
+
+ <ul>
+ <li>Resource references within attribute values are not resolved</li>
+ <li>Styles are not applied</li>
+ </ul>
+
+ <p>Instead, pass the {@link android.util.AttributeSet} to {@link
+ android.content.res.Resources.Theme#obtainStyledAttributes obtainStyledAttributes()}.
+ This method passes back a {@link android.content.res.TypedArray TypedArray} array of
+ values that have
+ already been dereferenced and styled.</p>
+
+ <p>The Android resource compiler does a lot of work for you to make calling {@link
+ android.content.res.Resources.Theme#obtainStyledAttributes obtainStyledAttributes()}
+ easier. For each {@code &lt;declare-styleable&gt;}
+ resource in the res directory, the generated R.java defines both an array of attribute
+ ids and a set of
+ constants that define the index for each attribute in the array. You use the predefined
+ constants to read
+ the attributes from the {@link android.content.res.TypedArray TypedArray}. Here's how
+ the {@code PieChart} class
+ reads its attributes:</p>
+
+<pre>
+public PieChart(Context ctx, AttributeSet attrs) {
+ super(ctx, attrs);
+ TypedArray a = context.getTheme().obtainStyledAttributes(
+ attrs,
+ R.styleable.PieChart,
+ 0, 0);
+
+ try {
+ mShowText = a.getBoolean(R.styleable.PieChart_showText, false);
+ mTextPos = a.getInteger(R.styleable.PieChart_labelPosition, 0);
+ } finally {
+ a.recycle();
+ }
+}
+</pre>
+
+ <p>Note that {@link android.content.res.TypedArray TypedArray} objects
+ are a shared resource
+ and must be recycled after use.</p>
+
+ <h2 id="addprop">Add Properties and Events</h2>
+
+ <p>Attributes are a powerful way of controlling the behavior and appearance of views, but
+ they can only be read
+ when the view is initialized. To provide dynamic behavior, expose a property getter and
+ setter pair for each
+ custom attribute. The following snippet shows how {@code PieChart} exposes a property
+ called {@code
+ showText}:</p>
+
+<pre>
+public boolean isShowText() {
+ return mShowText;
+}
+
+public void setShowText(boolean showText) {
+ mShowText = showText;
+ invalidate();
+ requestLayout();
+}
+</pre>
+
+ <p>Notice that {@code setShowText} calls {@link android.view.View#invalidate invalidate()}
+ and {@link android.view.View#requestLayout requestLayout()}. These calls are crucial
+ to ensure that the view behaves reliably. You have
+ to invalidate the view after any change to its properties that might change its
+ appearance, so that the
+ system knows that it needs to be redrawn. Likewise, you need to request a new layout if
+ a property changes
+ that might affect the size or shape of the view. Forgetting these method calls can cause
+ hard-to-find
+ bugs.</p>
+
+ <p>Custom views should also support event listeners to communicate important events. For
+ instance, {@code PieChart}
+ exposes a custom event called {@code OnCurrentItemChanged} to notify listeners that the
+ user has rotated the
+ pie chart to focus on a new pie slice.</p>
+
+ <p>It's easy to forget to expose properties and events, especially when you're the only user
+ of the custom view.
+ Taking some time to carefully define your view's interface reduces future maintenance
+ costs.
+ A good rule to follow is to always expose any property that affects the visible
+ appearance or behavior of
+ your custom view.
+
+ <h2 id="accessibility">Design For Accessibility</h2>
+
+ <p>Your custom view should support the widest range of users. This includes users with
+ disabilities that
+ prevent them from seeing or using a touchscreen. To support users with disabilities,
+ you should:</p>
+
+ <ul>
+ <li>Label your input fields using the {@code android:contentDescription} attribute
+ </li>
+ <li>Send accessibility events by calling {@link
+ android.view.accessibility.AccessibilityEventSource#sendAccessibilityEvent
+ sendAccessibilityEvent()} when
+ appropriate.
+ </li>
+ <li>
+ Support alternate controllers, such as D-pad and trackball</li>
+ </ul>
+
+ <p>For more information on creating accessible views, see
+ <a href=”{@docRoot}guide/topics/ui/accessibility/apps.html#custom-views”>
+ Making Applications Accessible</a> in the Android Developers Guide.
+ </p>
diff --git a/docs/html/training/custom-views/custom-drawing.jd b/docs/html/training/custom-views/custom-drawing.jd
new file mode 100644
index 000000000000..8280237167bb
--- /dev/null
+++ b/docs/html/training/custom-views/custom-drawing.jd
@@ -0,0 +1,284 @@
+page.title=Custom Drawing
+parent.title=Creating Custom Views
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Creating a View Class
+previous.link=create-view.html
+next.title=Making the View Interactive
+next.link=making-interactive.html
+
+@jd:body
+
+<div id="tb-wrapper">
+ <div id="tb">
+
+ <h2>This lesson teaches you to</h2>
+ <ol>
+ <li><a href="#ondraw">Override onDraw()</a></li>
+ <li><a href="#createobject">Create Drawing Objects</a></li>
+ <li><a href="#layoutevent">Handle Layout Events</a></li>
+ <li><a href="#draw">Draw!</a></li>
+ </ol>
+
+ <h2>You should also read</h2>
+ <ul>
+ <li><a href="{@docRoot}guide/topics/graphics/2d-graphics.html">
+ Canvas and Drawables</a></li>
+ </ul>
+<h2>Try it out</h2>
+<div class="download-box">
+<a href="{@docRoot}shareables/training/CustomView.zip"
+class="button">Download the sample</a>
+<p class="filename">CustomView.zip</p>
+</div>
+ </div>
+</div>
+
+<p>The most important part of a custom view is its appearance. Custom drawing can be easy or complex
+according to your
+application's needs. This lesson covers some of the most common operations.</p>
+
+<h2 id="overrideondraw">Override onDraw()</h2>
+
+<p>The most important step in drawing a custom view is to override the {@link
+android.view.View#onDraw(android.graphics.Canvas) onDraw()} method. The parameter to {@link
+android.view.View#onDraw(android.graphics.Canvas) onDraw()} is a {@link
+android.graphics.Canvas Canvas} object that the view can use to draw itself. The {@link
+android.graphics.Canvas Canvas}
+class defines methods for drawing text, lines, bitmaps, and many other graphics primitives. You can
+use these methods in
+{@link
+android.view.View#onDraw(android.graphics.Canvas) onDraw()} to create your custom user interface (UI).</p>
+
+<p>Before you can call any drawing methods, though, it's necessary to create a {@link
+android.graphics.Paint Paint}
+object. The next section discusses {@link android.graphics.Paint Paint} in more detail.</p>
+
+<h2 id="createobject">Create Drawing Objects</h2>
+
+<p>The {@link android.graphics} framework divides drawing into two areas:</p>
+
+<ul>
+<li><i>What</i> to draw, handled by {@link android.graphics.Canvas Canvas}</li>
+<li><i>How</i> to draw, handled by {@link android.graphics.Paint}.</li>
+</ul>
+
+<p>For instance, {@link android.graphics.Canvas Canvas} provides a method to draw a line, while
+{@link
+android.graphics.Paint Paint} provides methods to define that line's color. {@link
+android.graphics.Canvas Canvas} has a
+method to draw a rectangle, while {@link android.graphics.Paint Paint} defines whether to fill that
+rectangle with a
+color or leave it empty. Simply put, {@link android.graphics.Canvas Canvas} defines shapes that you
+can draw on the
+screen, while {@link android.graphics.Paint Paint} defines the color, style, font, and so forth of
+each shape you
+draw.</p>
+
+<p>So, before you draw anything, you need to create one or more {@link android.graphics.Paint Paint}
+objects. The {@code PieChart} example does this in a method called {@code init}, which is
+called from the
+constructor:</p>
+
+<pre>
+private void init() {
+ mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+ mTextPaint.setColor(mTextColor);
+ if (mTextHeight == 0) {
+ mTextHeight = mTextPaint.getTextSize();
+ } else {
+ mTextPaint.setTextSize(mTextHeight);
+ }
+
+ mPiePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+ mPiePaint.setStyle(Paint.Style.FILL);
+ mPiePaint.setTextSize(mTextHeight);
+
+ mShadowPaint = new Paint(0);
+ mShadowPaint.setColor(0xff101010);
+ mShadowPaint.setMaskFilter(new BlurMaskFilter(8, BlurMaskFilter.Blur.NORMAL));
+
+ ...
+</pre>
+
+
+<p>Creating objects ahead of time is an important optimization. Views are redrawn very frequently,
+and many drawing
+objects require expensive initialization. Creating drawing objects within your {@link
+android.view.View#onDraw(android.graphics.Canvas) onDraw()}
+method significantly
+reduces performance and can make your UI appear sluggish.</p>
+
+<h2 id="layouteevent">Handle Layout Events</h2>
+
+<p>In order to properly draw your custom view, you need to know what size it is. Complex custom
+views often need to
+perform multiple layout calculations depending on the size and shape of their area on screen. You
+should never make
+assumptions about the size of your view on the screen. Even if only one app uses your view, that app
+needs to handle
+different screen sizes, multiple screen densities, and various aspect ratios in both portrait and
+landscape mode.</p>
+
+<p>Although {@link android.view.View} has many methods for handling measurement, most of them do not
+need to be
+overridden. If your view doesn't need special control over its size, you only need to override one
+method: {@link
+android.view.View#onSizeChanged onSizeChanged()}.</p>
+
+<p>{@link
+android.view.View#onSizeChanged onSizeChanged()} is called when your view is first assigned a size,
+and again if the size of your view changes
+for any reason. Calculate positions, dimensions, and any other values related to your view's size in
+{@link
+android.view.View#onSizeChanged onSizeChanged()}, instead of recalculating them every time you draw.
+In the {@code PieChart} example, {@link
+android.view.View#onSizeChanged onSizeChanged()} is
+where the {@code PieChart} view calculates the bounding rectangle of the pie chart and the relative position
+of the text label
+and other visual elements.</p>
+
+<p>When your view is assigned a size, the layout manager assumes that the size includes all of the
+view's padding. You
+must handle the padding values when you calculate your view's size. Here's a snippet from {@code
+PieChart.onSizeChanged()}
+that shows how to do this:</p>
+
+<pre>
+ // Account for padding
+ float xpad = (float)(getPaddingLeft() + getPaddingRight());
+ float ypad = (float)(getPaddingTop() + getPaddingBottom());
+
+ // Account for the label
+ if (mShowText) xpad += mTextWidth;
+
+ float ww = (float)w - xpad;
+ float hh = (float)h - ypad;
+
+ // Figure out how big we can make the pie.
+ float diameter = Math.min(ww, hh);
+</pre>
+
+<p>If you need finer control over your view's layout parameters, implement {@link
+android.view.View#onMeasure onMeasure()}. This method's parameters are
+{@link android.view.View.MeasureSpec} values that tell you how big your view's
+parent wants your view to be, and whether that size is a hard maximum or just a suggestion. As an
+optimization, these
+values are stored as packed integers, and you use the static methods of
+{@link android.view.View.MeasureSpec} to
+unpack the information
+stored in each integer.
+
+<p>Here's an example implementation of {@link android.view.View#onMeasure onMeasure()}.
+ In this implementation, {@code PieChart}
+ attempts to make its area
+ big enough to make the pie as big as its label:</p>
+
+<pre>
+&#64;Override
+protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ // Try for a width based on our minimum
+ int minw = getPaddingLeft() + getPaddingRight() + getSuggestedMinimumWidth();
+ int w = resolveSizeAndState(minw, widthMeasureSpec, 1);
+
+ // Whatever the width ends up being, ask for a height that would let the pie
+ // get as big as it can
+ int minh = MeasureSpec.getSize(w) - (int)mTextWidth + getPaddingBottom() + getPaddingTop();
+ int h = resolveSizeAndState(MeasureSpec.getSize(w) - (int)mTextWidth, heightMeasureSpec, 0);
+
+ setMeasuredDimension(w, h);
+}
+</pre>
+
+<p>There are three important things to note in this code:</p>
+
+<ul>
+ <li>The calculations take into account the view's padding. As mentioned earlier, this is the
+ view's
+ responsibility.
+ </li>
+ <li>The helper method {@link android.view.View#resolveSizeAndState resolveSizeAndState()} is
+ used to create the
+ final width and height values. This helper returns an appropriate
+ {@link android.view.View.MeasureSpec} value
+ by comparing the view's desired size to the spec passed into
+ {@link android.view.View#onMeasure onMeasure()}.
+ </li>
+ <li>{@link android.view.View#onMeasure onMeasure()} has no return value.
+ Instead, the method communicates its results by
+ calling {@link
+ android.view.View#setMeasuredDimension setMeasuredDimension()}. Calling this method is
+ mandatory. If you omit
+ this call, the {@link android.view.View} class throws a runtime exception.
+ </li>
+</ul>
+
+<h2 id="draw">Draw!</h2>
+
+<p>Once you have your object creation and measuring code defined, you can implement {@link
+ android.view.View#onDraw(android.graphics.Canvas) onDraw()}. Every view
+ implements {@link
+ android.view.View#onDraw(android.graphics.Canvas) onDraw()}
+ differently, but there are some common operations that most views
+ share:</p>
+
+<ul>
+ <li>Draw text using {@link android.graphics.Canvas#drawText drawText()}. Specify the typeface by
+ calling {@link
+ android.graphics.Paint#setTypeface setTypeface()}, and the text color by calling {@link
+ android.graphics.Paint#setColor setColor()}.
+ </li>
+ <li>Draw primitive shapes using {@link android.graphics.Canvas#drawRect drawRect()}, {@link
+ android.graphics.Canvas#drawOval drawOval()}, and {@link android.graphics.Canvas#drawArc
+ drawArc()}. Change
+ whether the shapes are filled, outlined, or both by calling {@link
+ android.graphics.Paint#setStyle(android.graphics.Paint.Style) setStyle()}.
+ </li>
+ <li>Draw more complex shapes using the {@link android.graphics.Path} class.
+ Define a shape by adding lines and curves to a
+ {@link
+ android.graphics.Path} object, then draw the shape using {@link
+ android.graphics.Canvas#drawPath drawPath()}.
+ Just as with primitive shapes, paths can be outlined, filled, or both, depending on the
+ {@link android.graphics.Paint#setStyle
+ setStyle()}.
+ </li>
+ <li>
+ Define gradient fills by creating {@link android.graphics.LinearGradient} objects. Call {@link
+ android.graphics.Paint#setShader setShader()} to use your
+ {@link android.graphics.LinearGradient} on filled
+ shapes.
+ <li>Draw bitmaps using {@link android.graphics.Canvas#drawBitmap drawBitmap()}.</li>
+</ul>
+
+<p>For example, here's the code that draws {@code PieChart}. It uses a mix of text, lines, and shapes.</p>
+
+<pre>
+protected void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+
+ // Draw the shadow
+ canvas.drawOval(
+ mShadowBounds,
+ mShadowPaint
+ );
+
+ // Draw the label text
+ canvas.drawText(mData.get(mCurrentItem).mLabel, mTextX, mTextY, mTextPaint);
+
+ // Draw the pie slices
+ for (int i = 0; i &lt; mData.size(); ++i) {
+ Item it = mData.get(i);
+ mPiePaint.setShader(it.mShader);
+ canvas.drawArc(mBounds,
+ 360 - it.mEndAngle,
+ it.mEndAngle - it.mStartAngle,
+ true, mPiePaint);
+ }
+
+ // Draw the pointer
+ canvas.drawLine(mTextX, mPointerY, mPointerX, mPointerY, mTextPaint);
+ canvas.drawCircle(mPointerX, mPointerY, mPointerSize, mTextPaint);
+}
+</pre>
diff --git a/docs/html/training/custom-views/index.jd b/docs/html/training/custom-views/index.jd
new file mode 100644
index 000000000000..0661c053fc90
--- /dev/null
+++ b/docs/html/training/custom-views/index.jd
@@ -0,0 +1,79 @@
+page.title=Creating Custom Views
+
+trainingnavtop=true
+startpage=true
+next.title=Creating a View Class
+next.link=create-view.html
+
+@jd:body
+
+<div id="tb-wrapper">
+ <div id="tb">
+
+ <h2>Dependencies and prerequisites</h2>
+ <ul>
+ <li>Android 2.1 (API level 7) or higher</li>
+ </ul>
+
+ <h2>You should also read</h2>
+ <ul>
+ <li><a href="{@docRoot}/guide/topics/ui/custom-components.html">Custom Components</a>
+ </li>
+ <li><a href="{@docRoot}/guide/topics/ui/ui-events.html">Input Events</a></li>
+ <li><a href="{@docRoot}/guide/topics/graphics/prop-animation.html">Property
+ Animation</a></li>
+ <li><a href="{@docRoot}/guide/topics/graphics/hardware-accel.html">Hardware
+ Acceleration</a></li>
+ <li><a href="{@docRoot}guide/topics/ui/accessibility/index.html">
+ Accessibility</a> developer guide</li>
+ </ul>
+<h2>Try it out</h2>
+<div class="download-box">
+<a href="{@docRoot}shareables/training/CustomView.zip"
+class="button">Download the sample</a>
+<p class="filename">CustomView.zip</p>
+</div>
+ </div>
+</div>
+
+<p>
+The Android framework has a large set of {@link android.view.View} classes for
+interacting with the user and displaying various
+types of data. But
+sometimes your app has unique needs that aren’t covered by the built-in views. This class shows you
+how to create your
+own views that are robust and reusable.</p>
+
+<h2>Lessons</h2>
+
+<dl>
+<dt><b><a href="create-view.html">Creating a View Class</a></b></dt>
+<dd>Create a class that acts like a built-in view, with custom
+ attributes and support from the <a href="http://developer.android.com/sdk/eclipse-adt.html">ADT</a> layout editor.
+</dd>
+
+<dt><b><a href="custom-drawing.html">Custom Drawing</a></b></dt>
+<dd>Make your view visually distinctive using the Android graphics system.</dd>
+
+<dt><b><a href="making-interactive.html">Making the View Interactive</a></b></dt>
+<dd>Users expect a view to react smoothly and naturally to input gestures.
+ This lesson discusses how to use gesture detection, physics, and animation
+ to give your user interface a professional feel.
+</dd>
+
+<dt><b><a href="optimizing-view.html">Optimizing the View</a></b></dt>
+<dd>No matter how beautiful your UI is, users won't love it if it
+ doesn't run at a consistently high frame rate. Learn how to avoid common
+ performance problems, and how to use hardware acceleration to make your
+ custom drawings run faster.
+</dd>
+
+</dl>
+
+
+
+
+
+
+
+
diff --git a/docs/html/training/custom-views/making-interactive.jd b/docs/html/training/custom-views/making-interactive.jd
new file mode 100644
index 000000000000..4e9d53a5e773
--- /dev/null
+++ b/docs/html/training/custom-views/making-interactive.jd
@@ -0,0 +1,292 @@
+page.title=Making the View Interactive
+parent.title=Creating Custom Views
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Custom Drawing
+previous.link=custom-drawing.html
+next.title=Optmizing the View
+next.link=optimizing-view.html
+
+@jd:body
+
+<div id="tb-wrapper">
+ <div id="tb">
+
+ <h2>This lesson teaches you to</h2>
+ <ol>
+ <li><a href="#inputgesture">Handle Input Gestures</a></li>
+ <li><a href="#motion">Create Physically Plausible Motion</a></li>
+ <li><a href="#makesmooth">Make Your Transitions Smooth</a></li>
+ </ol>
+
+ <h2>You should also read</h2>
+ <ul>
+ <li><a href="{@docRoot}guide/topics/ui/ui-events.html">Input Events</a></li>
+ <li><a href="{@docRoot}guide/topics/graphics/prop-animation.html">Property Animation</a>
+ </li>
+ </ul>
+<h2>Try it out</h2>
+<div class="download-box">
+<a href="{@docRoot}shareables/training/CustomView.zip"
+class="button">Download the sample</a>
+<p class="filename">CustomView.zip</p>
+</div>
+ </div>
+</div>
+
+<p>Drawing a UI is only one part of creating a custom view. You also need to make your view respond
+to user input in a
+way that closely resembles the real-world action you're mimicking. Objects should always act in the
+same way that real
+objects do. For example, images should not immediately pop out of existence and reappear somewhere
+else, because objects
+in the real world don't do that. Instead, images should move from one place to another.</p>
+
+<p>Users also sense subtle behavior or feel in an interface, and react best to subtleties that
+mimic the real world.
+For example, when users fling a UI object, they should sense friction at the beginning that delays
+the motion, and then
+at the end sense momentum that carries the motion beyond the fling.</p>
+
+<p>This lesson demonstrates how to use features of the Android framework to add these real-world
+behaviors to your
+custom view.
+
+<h2 id="inputgesture">Handle Input Gestures</h2>
+
+<p>Like many other UI frameworks, Android supports an input event model. User actions are turned
+ into events that
+ trigger callbacks, and you can override the callbacks to customize how your application responds
+ to the user. The
+ most common input event in the Android system is <em>touch</em>, which triggers {@link
+ android.view.View#onTouchEvent(android.view.MotionEvent)}. Override this method to handle the
+ event:</p>
+
+<pre>
+ &#64Override
+ public boolean onTouchEvent(MotionEvent event) {
+ return super.onTouchEvent(event);
+ }
+</pre>
+
+<p>Touch events by themselves are not particularly useful. Modern touch UIs define interactions in
+ terms of gestures
+ such as tapping, pulling, pushing, flinging, and zooming. To convert raw touch events into
+ gestures, Android
+ provides {@link android.view.GestureDetector}.</p>
+
+<p>Construct a {@link android.view.GestureDetector} by passing in an instance of a class that
+ implements {@link
+ android.view.GestureDetector.OnGestureListener}. If you only want to process a few gestures, you
+ can extend {@link
+ android.view.GestureDetector.SimpleOnGestureListener} instead of implementing the {@link
+ android.view.GestureDetector.OnGestureListener}
+ interface. For instance, this code creates a class that extends {@link
+ android.view.GestureDetector.SimpleOnGestureListener} and overrides {@link
+ android.view.GestureDetector.SimpleOnGestureListener#onDown}.</p>
+
+<pre>
+class mListener extends GestureDetector.SimpleOnGestureListener {
+ &#64;Override
+ public boolean onDown(MotionEvent e) {
+ return true;
+ }
+}
+mDetector = new GestureDetector(PieChart.this.getContext(), new mListener());
+</pre>
+
+<p>Whether or not you use {@link
+ android.view.GestureDetector.SimpleOnGestureListener}, you must always implement an
+ {@link android.view.GestureDetector.OnGestureListener#onDown onDown()} method that
+ returns {@code true}. This step is necessary because all gestures begin with an
+ {@link android.view.GestureDetector.OnGestureListener#onDown onDown()} message. If
+ you return {@code
+ false} from {@link android.view.GestureDetector.OnGestureListener#onDown onDown()}, as
+ {@link android.view.GestureDetector.SimpleOnGestureListener} does, the system assumes that
+ you want to ignore the
+ rest of the gesture, and the other methods of
+ {@link android.view.GestureDetector.OnGestureListener} never get called. The
+ only time you should
+ return {@code false} from {@link android.view.GestureDetector.OnGestureListener#onDown onDown()}
+ is if you truly want to ignore an entire gesture.
+
+ Once you've implemented {@link android.view.GestureDetector.OnGestureListener}
+ and created an instance of {@link android.view.GestureDetector}, you can use
+ your {@link android.view.GestureDetector} to interpret the touch events you receive in {@link
+ android.view.GestureDetector#onTouchEvent onTouchEvent()}.</p>
+
+<pre>
+&#64;Override
+public boolean onTouchEvent(MotionEvent event) {
+ boolean result = mDetector.onTouchEvent(event);
+ if (!result) {
+ if (event.getAction() == MotionEvent.ACTION_UP) {
+ stopScrolling();
+ result = true;
+ }
+ }
+ return result;
+}
+</pre>
+
+<p>When you pass {@link android.view.GestureDetector#onTouchEvent onTouchEvent()} a touch event that
+ it doesn't
+ recognize as part of a gesture, it returns {@code false}. You can then run your own custom
+ gesture-detection
+ code.</p>
+
+<h2 id="motion">Create Physically Plausible Motion</h2>
+
+<p>Gestures are a powerful way to control touchscreen devices, but they can be counterintuitive and
+ difficult to
+ remember unless they produce physically plausible results. A good example of this is the <em>fling</em>
+ gesture, where the
+ user quickly moves a finger across the screen and then lifts it. This gesture makes sense if the UI
+ responds by moving
+ quickly in the direction of the fling, then slowing down, as if the user had pushed on a
+ flywheel and set it
+ spinning.</p>
+
+<p>However, simulating the feel of a flywheel isn't trivial. A lot of physics and math are required
+ to get a flywheel
+ model working correctly. Fortunately, Android provides helper classes to simulate this and other
+ behaviors. The
+ {@link android.widget.Scroller} class is the basis for handling flywheel-style <em>fling</em>
+ gestures.</p>
+
+<p>To start a fling, call {@link android.widget.Scroller#fling fling()} with the starting velocity
+ and the minimum and
+ maximum x and y values of the fling. For the velocity value, you can use the value computed for
+ you by {@link android.view.GestureDetector}.</p>
+
+<pre>
+&#64;Override
+public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
+ mScroller.fling(currentX, currentY, velocityX / SCALE, velocityY / SCALE, minX, minY, maxX, maxY);
+ postInvalidate();
+}
+</pre>
+
+<p class="note"><strong>Note:</strong> Although the velocity calculated by
+ {@link android.view.GestureDetector} is physically accurate,
+ many developers feel
+ that using this value makes the fling animation too fast. It's common to divide the x and y
+ velocity by a factor of
+ 4 to 8.</p>
+
+<p>The call to {@link android.widget.Scroller#fling fling()} sets up the physics model for the fling
+ gesture.
+ Afterwards, you need to update the {@link android.widget.Scroller Scroller} by calling {@link
+ android.widget.Scroller#computeScrollOffset Scroller.computeScrollOffset()} at regular
+ intervals. {@link
+ android.widget.Scroller#computeScrollOffset computeScrollOffset()} updates the {@link
+ android.widget.Scroller
+ Scroller} object's internal state by reading the current time and using the physics model to calculate
+ the x and y position
+ at that time. Call {@link android.widget.Scroller#getCurrX} and {@link
+ android.widget.Scroller#getCurrY} to
+ retrieve these values.</p>
+
+<p>Most views pass the {@link android.widget.Scroller Scroller} object's x and y position directly to
+ {@link
+ android.view.View#scrollTo scrollTo()}. The PieChart example is a little different: it
+ uses the current scroll
+ y position to set the rotational angle of the chart.</p>
+
+<pre>
+if (!mScroller.isFinished()) {
+ mScroller.computeScrollOffset();
+ setPieRotation(mScroller.getCurrY());
+}
+</pre>
+
+<p>The {@link android.widget.Scroller Scroller} class computes scroll positions for you, but it does
+ not automatically
+ apply those positions to your view. It's your responsibility to make sure you get and apply new
+ coordinates often
+ enough to make the scrolling animation look smooth. There are two ways to do this:</p>
+
+<ul>
+ <li>Call {@link android.view.View#postInvalidate() postInvalidate()} after calling
+ {@link android.widget.Scroller#fling(int, int, int, int, int, int, int, int) fling()},
+ in order to
+ force a redraw. This
+ technique requires that you compute scroll offsets in {@link android.view.View#onDraw onDraw()}
+ and call {@link android.view.View#postInvalidate() postInvalidate()} every
+ time the scroll offset changes.
+ </li>
+ <li>Set up a {@link android.animation.ValueAnimator} to animate for the duration of the fling,
+ and add a listener to process animation updates
+ by calling {@link android.animation.ValueAnimator#addUpdateListener addUpdateListener()}.
+ </li>
+</ul>
+
+<p>The PieChart example uses the second approach. This technique is slightly more complex to set up, but
+ it works more
+ closely with the animation system and doesn't require potentially unnecessary view
+ invalidation. The drawback is that {@link android.animation.ValueAnimator}
+ is not available prior to API level 11, so this technique cannot be used
+on devices running Android versions lower than 3.0.</p>
+
+<p class="note"><strong>Note:</strong> {@link android.animation.ValueAnimator} isn't available
+ prior to API level 11, but you can still use it in applications that
+target lower API levels. You just need to make sure to check the current API level
+at runtime, and omit the calls to the view animation system if the current level is less than 11.</p>
+
+<pre>
+ mScroller = new Scroller(getContext(), null, true);
+ mScrollAnimator = ValueAnimator.ofFloat(0,1);
+ mScrollAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ &#64;Override
+ public void onAnimationUpdate(ValueAnimator valueAnimator) {
+ if (!mScroller.isFinished()) {
+ mScroller.computeScrollOffset();
+ setPieRotation(mScroller.getCurrY());
+ } else {
+ mScrollAnimator.cancel();
+ onScrollFinished();
+ }
+ }
+ });
+</pre>
+
+<h2 id="makesmooth">Make Your Transitions Smooth</h2>
+
+<p>Users expect a modern UI to transition smoothly between states. UI elements fade in and out
+ instead of appearing and
+ disappearing. Motions begin and end smoothly instead of starting and stopping abruptly. The
+ Android <a
+ href="{@docRoot}guide/topics/graphics/prop-animation.html">property animation
+ framework</a>, introduced in
+ Android 3.0, makes smooth transitions easy.</p>
+
+<p>To use the animation system, whenever a property changes that will affect your view's appearance,
+ do not change the
+ property directly. Instead, use {@link android.animation.ValueAnimator} to make the change. In
+ the following
+ example, modifying the
+ currently selected pie slice in PieChart causes the entire chart to rotate so that the selection
+ pointer is centered
+ in the selected slice. {@link android.animation.ValueAnimator} changes the rotation over a
+ period of several
+ hundred milliseconds,
+ rather than immediately setting the new rotation value.</p>
+
+<pre>
+mAutoCenterAnimator = ObjectAnimator.ofInt(PieChart.this, "PieRotation", 0);
+mAutoCenterAnimator.setIntValues(targetAngle);
+mAutoCenterAnimator.setDuration(AUTOCENTER_ANIM_DURATION);
+mAutoCenterAnimator.start();
+</pre>
+
+<p>If the value you want to change is one of the base {@link android.view.View} properties, doing
+ the animation
+ is even easier,
+ because Views have a built-in {@link android.view.ViewPropertyAnimator} that is optimized for
+ simultaneous animation
+ of multiple properties. For example:</p>
+
+<pre>
+animate().rotation(targetAngle).setDuration(ANIM_DURATION).start();
+</pre>
diff --git a/docs/html/training/custom-views/optimizing-view.jd b/docs/html/training/custom-views/optimizing-view.jd
new file mode 100644
index 000000000000..1f489dd2db1b
--- /dev/null
+++ b/docs/html/training/custom-views/optimizing-view.jd
@@ -0,0 +1,176 @@
+page.title=Optimizing the View
+parent.title=Creating Custom Views
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Making the View Interactive
+previous.link=making-interactive.html
+
+@jd:body
+
+<div id="tb-wrapper">
+ <div id="tb">
+
+ <h2>This lesson teaches you to</h2>
+ <ol>
+ <li><a href="#less">Do Less, Less Frequently</a></li>
+ <li><a href="#accelerate">Use Hardware Acceleration</a></li>
+ </ol>
+
+ <h2>You should also read</h2>
+ <ul>
+ <li><a href=”{@docRoot}guide/topics/graphics/hardware-accel.html”>
+ Hardware Acceleration
+ </a>
+ </li>
+ </ul>
+<h2>Try it out</h2>
+<div class="download-box">
+<a href="{@docRoot}shareables/training/CustomView.zip"
+class="button">Download the sample</a>
+<p class="filename">CustomView.zip</p>
+</div>
+</div>
+ </div>
+
+
+<p>Now that you have a well-designed view that responds to gestures and transitions between states,
+you need to ensure
+that the view runs fast. To avoid a UI that feels sluggish or stutters during playback, you must
+ensure that your
+animations consistently run at 60 frames per second.</p>
+
+<h2 id="less">Do Less, Less Frequently</h2>
+
+<p>To speed up your view, eliminate unnecessary code from routines that are called frequently. Start
+by working on
+{@link android.view.View#onDraw onDraw()}, which will give you the biggest payback. In particular
+you should eliminate
+allocations in {@link android.view.View#onDraw onDraw()}, because allocations may lead to a garbage
+collection that
+would cause a stutter. Allocate objects during initialization, or between animations. Never make an
+allocation while an
+animation is running.</p>
+
+<p>In addition to making {@link android.view.View#onDraw onDraw()} leaner, you should also make sure
+it's called as
+infrequently as possible. Most calls to {@link android.view.View#onDraw onDraw()} are the result of
+a call to {@link
+android.view.View#invalidate() invalidate()}, so eliminate unnecessary calls to {@link
+android.view.View#invalidate()
+invalidate()}. When possible, call the four-parameter variant of {@link
+android.view.View#invalidate() invalidate()}
+rather than the version that takes no parameters. The no-parameter variant invalidates the entire
+view, while the
+four-parameter variant invalidates only a specified portion of the view. This approach allows draw calls to
+be more efficient and
+can eliminate unnecessary invalidation of views that fall outside the invalid rectangle.</p>
+
+<p>Another very expensive operation is traversing layouts. Any time a view calls {@link
+android.view.View#requestLayout()
+requestLayout()}, the Android UI system needs to traverse the entire view hierarchy to find out how
+big each view needs
+to be. If it finds conflicting measurements, it may need to traverse the hierarchy multiple times.
+UI designers
+sometimes create deep hierarchies of nested {@link android.view.ViewGroup ViewGroup} objects in
+order to get the UI to
+behave properly. These deep view hierarchies cause performance problems. Make your view hierarchies
+as shallow as
+possible.</p>
+
+<p>If you have a complex UI, you should consider writing a custom {@link android.view.ViewGroup
+ViewGroup} to perform
+its layout. Unlike the built-in views, your custom view can make application-specific assumptions
+about the size and
+shape of its children, and thus avoid traversing its children to calculate measurements. The
+PieChart example shows how
+to extend {@link android.view.ViewGroup ViewGroup} as part of a custom view. PieChart has child
+views, but it never
+measures them. Instead, it sets their sizes directly according to its own custom layout
+algorithm.</p>
+
+<h2 id="accelerate">Use Hardware Acceleration</h2>
+
+<p>As of Android 3.0, the Android 2D graphics system can be accelerated by the GPU (Graphics
+Processing Unit) hardware
+found in most newer Android devices. GPU hardware acceleration can result in a tremendous
+performance increase for many
+applications, but it isn't the right choice for every application. The Android framework
+gives you the ability to finely control which parts of your application are or are not
+hardware accelerated.</p>
+
+<p>See <a href="{@docRoot}guide/topics/graphics/hardware-accel.html">Hardware Acceleration</a>
+ in the Android Developers Guide for directions on how to enable acceleration at the
+ application, activity, or window level. Notice that in addition to the directions in
+ the developer guide, you must also set your application's target API to 11 or higher by
+ specifying {@code &lt;uses-sdk
+ android:targetSdkVersion="11"/&gt;} in your {@code AndroidManifest.xml} file.</p>
+
+<p>Once you've enabled hardware acceleration, you may or may not see a performance increase.
+Mobile GPUs are very good at certain tasks, such as scaling, rotating, and translating
+bitmapped images. They are not particularly good at other tasks, such as drawing lines or curves. To
+get the most out of GPU acceleration, you should maximize the number of operations that the GPU is
+good at, and minimize the number of operations that the GPU isn't good at.</p>
+
+<p>In the PieChart example, for instance, drawing the pie is relatively expensive. Redrawing the pie
+each time it's
+rotated causes the UI to feel sluggish. The solution is to place the pie chart into a child
+{@link android.view.View} and set that
+{@link android.view.View}'s
+<a href="{@docRoot}reference/android/view/View.html#setLayerType(int, android.graphics.Paint)">
+ layer type</a> to {@link android.view.View#LAYER_TYPE_HARDWARE}, so that the GPU can cache it as
+a static
+image. The sample
+defines the child view as an inner class of {@code PieChart}, which minimizes the amount of code
+changes that are needed
+to implement this solution.</p>
+
+<pre>
+ private class PieView extends View {
+
+ public PieView(Context context) {
+ super(context);
+ if (!isInEditMode()) {
+ setLayerType(View.LAYER_TYPE_HARDWARE, null);
+ }
+ }
+
+ &#64;Override
+ protected void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+
+ for (Item it : mData) {
+ mPiePaint.setShader(it.mShader);
+ canvas.drawArc(mBounds,
+ 360 - it.mEndAngle,
+ it.mEndAngle - it.mStartAngle,
+ true, mPiePaint);
+ }
+ }
+
+ &#64;Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ mBounds = new RectF(0, 0, w, h);
+ }
+
+ RectF mBounds;
+ }
+</pre>
+
+<p>After this code change, {@code PieChart.PieView.onDraw()} is called only when the view is first
+shown. During the rest
+of the application's lifetime, the pie chart is cached as an image, and redrawn at different
+rotation angles by the GPU.
+GPU hardware is particularly good at this sort of thing, and the performance difference is
+immediately noticeable.</p>
+
+<p>There is a tradeoff, though. Caching images as hardware layers consumes video memory, which is a
+limited resource.
+For this reason, the final version of {@code PieChart.PieView} only sets its layer type to
+{@link android.view.View#LAYER_TYPE_HARDWARE}
+while the user is actively scrolling. At all other times, it sets its layer type to
+{@link android.view.View#LAYER_TYPE_NONE}, which
+allows the GPU to stop caching the image.</p>
+
+<p>Finally, don't forget to profile your code. Techniques that improve performance on one view
+might negatively affect performance on another.</p>
diff --git a/docs/html/training/design-navigation/ancestral-temporal.jd b/docs/html/training/design-navigation/ancestral-temporal.jd
index ab6a64d2925a..33a75b2e213e 100644
--- a/docs/html/training/design-navigation/ancestral-temporal.jd
+++ b/docs/html/training/design-navigation/ancestral-temporal.jd
@@ -22,7 +22,7 @@ next.link=wireframing.html
<h2>You should also read</h2>
<ul>
<li><a href="{@docRoot}design/patterns/navigation.html">Android Design: Navigation</a></li>
- <li><a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a></li>
+ <li><a href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks and Back Stack</a></li>
</ul>
</div>
@@ -58,7 +58,7 @@ the Email app from the People (or Contacts) app.</p>
<p>Applications generally don't have to worry about managing the <em>Back</em> button themselves;
-the system handles <a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">tasks and
+the system handles <a href="{@docRoot}guide/components/tasks-and-back-stack.html">tasks and
the <em>back stack</em></a>, or the list of previous screens, automatically. The <em>Back</em>
button by default simply traverses this list of screens, removing the current screen from the list
upon being pressed.</p>
diff --git a/docs/html/training/design-navigation/wireframing.jd b/docs/html/training/design-navigation/wireframing.jd
index 6deceb1b4653..42f892df1f61 100644
--- a/docs/html/training/design-navigation/wireframing.jd
+++ b/docs/html/training/design-navigation/wireframing.jd
@@ -78,7 +78,7 @@ previous.link=ancestral-temporal.html
<li>What's the learning curve? Professional vector illustration tools may have a steep learning curve, while tools designed for wireframing may offer a smaller set of features that are more relevant to the task.</li>
</ul>
-<p>Lastly, the XML Layout Editor that comes with the <a href="{@docRoot}guide/developing/tools/adt.html">Android Development Tools (ADT)</a> plugin for Eclipse can often be used for prototyping. However, you should be careful to focus more on the high-level layout and less on visual design details at this point.</p>
+<p>Lastly, the XML Layout Editor that comes with the <a href="{@docRoot}tools/help/adt.html">Android Development Tools (ADT)</a> plugin for Eclipse can often be used for prototyping. However, you should be careful to focus more on the high-level layout and less on visual design details at this point.</p>
<h2 id="wireframe-digital">Create Digital Wireframes</h2>
@@ -120,6 +120,6 @@ previous.link=ancestral-temporal.html
<ul>
<li><a href="{@docRoot}guide/topics/ui/index.html">Developer's Guide: User Interface</a>: learn how to implement your user interface designs using the Android SDK.</li>
<li><a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a>: implement tabs, up navigation, on-screen actions, etc.
- <li><a href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a>: implement re-usable, multi-pane layouts
- <li><a href="{@docRoot}sdk/compatibility-library.html">Support Library</a>: implement horizontal paging (swipe views) using <code>ViewPager</code></li>
+ <li><a href="{@docRoot}guide/components/fragments.html">Fragments</a>: implement re-usable, multi-pane layouts
+ <li><a href="{@docRoot}tools/extras/support-library.html">Support Library</a>: implement horizontal paging (swipe views) using <code>ViewPager</code></li>
</ul>
diff --git a/docs/html/training/displaying-bitmaps/index.jd b/docs/html/training/displaying-bitmaps/index.jd
index 6755c24495ae..78371ad64fa0 100644
--- a/docs/html/training/displaying-bitmaps/index.jd
+++ b/docs/html/training/displaying-bitmaps/index.jd
@@ -13,7 +13,7 @@ next.link=load-bitmap.html
<h2>Dependencies and prerequisites</h2>
<ul>
<li>Android 2.1 (API Level 7) or higher</li>
- <li><a href="{@docRoot}sdk/compatibility-library.html">Support Library</a></li>
+ <li><a href="{@docRoot}tools/extras/support-library.html">Support Library</a></li>
</ul>
<h2>Try it out</h2>
diff --git a/docs/html/training/displaying-bitmaps/process-bitmap.jd b/docs/html/training/displaying-bitmaps/process-bitmap.jd
index c1450b4a8850..d1e346c86ad5 100644
--- a/docs/html/training/displaying-bitmaps/process-bitmap.jd
+++ b/docs/html/training/displaying-bitmaps/process-bitmap.jd
@@ -21,7 +21,7 @@ previous.link=load-bitmap.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/practices/design/responsiveness.html">Designing for Responsiveness</a></li>
+ <li><a href="{@docRoot}guide/practices/responsiveness.html">Designing for Responsiveness</a></li>
<li><a
href="http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html">Multithreading
for Performance</a></li>
@@ -45,7 +45,7 @@ disk or a network location (or really any source other than memory). The time th
load is unpredictable and depends on a variety of factors (speed of reading from disk or network,
size of image, power of CPU, etc.). If one of these tasks blocks the UI thread, the system flags
your application as non-responsive and the user has the option of closing it (see <a
-href="{@docRoot}guide/practices/design/responsiveness.html">Designing for Responsiveness</a> for
+href="{@docRoot}guide/practices/responsiveness.html">Designing for Responsiveness</a> for
more information).</p>
<p>This lesson walks you through processing bitmaps in a background thread using
diff --git a/docs/html/training/efficient-downloads/efficient-network-access.jd b/docs/html/training/efficient-downloads/efficient-network-access.jd
index 0efad7d2adbc..1d3a8a59c681 100644
--- a/docs/html/training/efficient-downloads/efficient-network-access.jd
+++ b/docs/html/training/efficient-downloads/efficient-network-access.jd
@@ -142,7 +142,7 @@ The wireless radio needs to become active in order to transmit the termination /
<h2 id="DDMSNetworkTraffic">Use the DDMS Network Traffic Tool to Identify Areas of Concern</h2>
-<p>The Android <a href="{@docRoot}guide/developing/debugging/ddms.html">DDMS (Dalvik Debug Monitor Server)</a> includes a Detailed Network Usage tab that makes it possible to track when your application is making network requests. Using this tool, you can monitor how and when your app transfers data and optimize the underlying code appropriately.</p>
+<p>The Android <a href="{@docRoot}tools/debugging/ddms.html">DDMS (Dalvik Debug Monitor Server)</a> includes a Detailed Network Usage tab that makes it possible to track when your application is making network requests. Using this tool, you can monitor how and when your app transfers data and optimize the underlying code appropriately.</p>
<p>Figure 3 shows a pattern of transferring small amounts of data roughly 15 seconds apart, suggesting that efficiency could be dramatically improved by prefetching each request or bundling the uploads.</p>
diff --git a/docs/html/training/graphics/opengl/draw.jd b/docs/html/training/graphics/opengl/draw.jd
new file mode 100644
index 000000000000..156ff704ac8f
--- /dev/null
+++ b/docs/html/training/graphics/opengl/draw.jd
@@ -0,0 +1,195 @@
+page.title=Drawing Shapes
+parent.title=Displaying Graphics with OpenGL ES
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Defining Shapes
+previous.link=environment.html
+next.title=Applying Projection and Camera Views
+next.link=projection.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#initialize">Initialize Shapes</a></li>
+ <li><a href="#draw">Draw a Shape</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL</a></li>
+</ul>
+
+<div class="download-box">
+ <a href="{@docRoot}shareables/training/OpenGLES.zip"
+class="button">Download the sample</a>
+ <p class="filename">OpenGLES.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>After you define shapes to be drawn with OpenGL, you probably want to draw them. Drawing shapes
+with the OpenGL ES 2.0 takes a bit more code than you might imagine, because the API provides a
+great deal of control over the graphics rendering pipeline.</p>
+
+<p>This lesson explains how to draw the shapes you defined in the previous lesson using the OpenGL
+ES 2.0 API.</p>
+
+
+<h2 id="initialize">Initialize Shapes</h2>
+
+<p>Before you do any drawing, you must initialize and load the shapes you plan to draw. Unless the
+structure (the original coordinates) of the shapes you use in your program change during the course
+of execution, you should initialize them in the {@link
+android.opengl.GLSurfaceView.Renderer#onSurfaceCreated onSurfaceCreated()} method of your renderer
+for memory and processing efficiency.</p>
+
+<pre>
+public void onSurfaceCreated(GL10 unused, EGLConfig config) {
+ ...
+
+ // initialize a triangle
+ mTriangle = new Triangle();
+ // initialize a square
+ mSquare = new Square();
+}
+</pre>
+
+
+<h2 id="draw">Draw a Shape</h2>
+
+<p>Drawing a defined shape using OpenGL ES 2.0 requires a significant amount of code, because you
+must provide a lot of details to the graphics rendering pipeline. Specifically, you must define the
+following:</p>
+
+<ul>
+ <li><em>Vertex Shader</em> - OpenGL ES graphics code for rendering the vertices of a shape.</li>
+ <li><em>Fragment Shader</em> - OpenGL ES code for rendering the face of a shape with colors or
+textures.</li>
+ <li><em>Program</em> - An OpenGL ES object that contains the shaders you want to use for drawing
+one or more shapes.</li>
+</ul>
+
+<p>You need at least one vertex shader to draw a shape and one fragment shader to color that shape.
+These shaders must be complied and then added to an OpenGL ES program, which is then used to draw
+the shape. Here is an example of how to define basic shaders you can use to draw a shape:</p>
+
+<pre>
+private final String vertexShaderCode =
+ "attribute vec4 vPosition;" +
+ "void main() {" +
+ " gl_Position = vPosition;" +
+ "}";
+
+private final String fragmentShaderCode =
+ "precision mediump float;" +
+ "uniform vec4 vColor;" +
+ "void main() {" +
+ " gl_FragColor = vColor;" +
+ "}";
+</pre>
+
+<p>Shaders contain OpenGL Shading Language (GLSL) code that must be compiled prior to using it in
+the OpenGL ES environment. To compile this code, create a utility method in your renderer class:</p>
+
+<pre>
+public static int loadShader(int type, String shaderCode){
+
+ // create a vertex shader type (GLES20.GL_VERTEX_SHADER)
+ // or a fragment shader type (GLES20.GL_FRAGMENT_SHADER)
+ int shader = GLES20.glCreateShader(type);
+
+ // add the source code to the shader and compile it
+ GLES20.glShaderSource(shader, shaderCode);
+ GLES20.glCompileShader(shader);
+
+ return shader;
+}
+</pre>
+
+<p>In order to draw your shape, you must compile the shader code, add them to a OpenGL ES program
+object and then link the program. Do this in your drawn object’s constructor, so it is only done
+once.</p>
+
+<p class="note"><strong>Note:</strong> Compiling OpenGL ES shaders and linking programs is expensive
+in terms of CPU cycles and processing time, so you should avoid doing this more than once. If you do
+not know the content of your shaders at runtime, you should build your code such that they only
+get created once and then cached for later use.</p>
+
+<pre>
+public Triangle() {
+ ...
+
+ int vertexShader = loadShader(GLES20.GL_VERTEX_SHADER, vertexShaderCode);
+ int fragmentShader = loadShader(GLES20.GL_FRAGMENT_SHADER, fragmentShaderCode);
+
+ mProgram = GLES20.glCreateProgram(); // create empty OpenGL ES Program
+ GLES20.glAttachShader(mProgram, vertexShader); // add the vertex shader to program
+ GLES20.glAttachShader(mProgram, fragmentShader); // add the fragment shader to program
+ GLES20.glLinkProgram(mProgram); // creates OpenGL ES program executables
+}
+</pre>
+
+<p>At this point, you are ready to add the actual calls that draw your shape. Drawing shapes with
+OpenGL ES requires that you specify several parameters to tell the rendering pipeline what you want
+to draw and how to draw it. Since drawing options can vary by shape, it's a good idea to have your
+shape classes contain their own drawing logic.</p>
+
+<p>Create a {@code draw()} method for drawing the shape. This code sets the position and
+color values to the shape’s vertex shader and fragment shader, and then executes the drawing
+function.</p>
+
+<pre>
+public void draw() {
+ // Add program to OpenGL ES environment
+ GLES20.glUseProgram(mProgram);
+
+ // get handle to vertex shader's vPosition member
+ mPositionHandle = GLES20.glGetAttribLocation(mProgram, "vPosition");
+
+ // Enable a handle to the triangle vertices
+ GLES20.glEnableVertexAttribArray(mPositionHandle);
+
+ // Prepare the triangle coordinate data
+ GLES20.glVertexAttribPointer(mPositionHandle, COORDS_PER_VERTEX,
+ GLES20.GL_FLOAT, false,
+ vertexStride, vertexBuffer);
+
+ // get handle to fragment shader's vColor member
+ mColorHandle = GLES20.glGetUniformLocation(mProgram, "vColor");
+
+ // Set color for drawing the triangle
+ GLES20.glUniform4fv(mColorHandle, 1, color, 0);
+
+ // Draw the triangle
+ GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, vertexCount);
+
+ // Disable vertex array
+ GLES20.glDisableVertexAttribArray(mPositionHandle);
+}
+</pre>
+
+<p>Once you have all this code in place, drawing this object just requires a call to the
+{@code draw()} method from within your renderer’s {@link
+android.opengl.GLSurfaceView.Renderer#onDrawFrame onDrawFrame()} method. When you run the
+application, it should look something like this:</p>
+
+<img src="{@docRoot}images/opengl/ogl-triangle.png">
+<p class="img-caption">
+<strong>Figure 1.</strong> Triangle drawn without a projection or camera view.</p>
+
+<p>There are a few problems with this code example. First of all, it is not going to impress your
+friends. Secondly, the triangle is a bit squashed and changes shape when you change the screen
+orientation of the device. The reason the shape is skewed is due to the fact that the object’s
+vertices have not been corrected for the proportions of the screen area where the {@link
+android.opengl.GLSurfaceView} is displayed. You can fix that problem using a projection and camera
+view in the next lesson.</p>
+
+<p>Lastly, the triangle is stationary, which is a bit boring. In the <a href="motion.html">Adding
+Motion</a> lesson, you make this shape rotate and make more interesting use of the OpenGL ES
+graphics pipeline.</p> \ No newline at end of file
diff --git a/docs/html/training/graphics/opengl/environment.jd b/docs/html/training/graphics/opengl/environment.jd
new file mode 100644
index 000000000000..e1e2c8aca6b6
--- /dev/null
+++ b/docs/html/training/graphics/opengl/environment.jd
@@ -0,0 +1,223 @@
+page.title=Building an OpenGL ES Environment
+parent.title=Displaying Graphics with OpenGL ES
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Displaying Graphics with OpenGL ES
+previous.link=index.html
+next.title=Defining Shapes
+next.link=shapes.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#manifest">Declare OpenGL ES Use in the Manifest</a></li>
+ <li><a href="#activity">Create an Activity for OpenGL ES Graphics</a></li>
+ <li><a href="#glsurfaceview">Build a GLSurfaceView Object</a></li>
+ <li><a href="#renderer">Build a Renderer Class</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL</a></li>
+</ul>
+
+<h2>Try it out</h2>
+
+<div class="download-box">
+ <a href="{@docRoot}shareables/training/OpenGLES.zip"
+class="button">Download the sample</a>
+ <p class="filename">OpenGLES.zip</p>
+</div>
+
+</div>
+</div>
+
+
+<p>In order to draw graphics with OpenGL ES in your Android application, you must create a
+view container for them. One of the more straight-forward ways to do this is to implement both a
+{@link android.opengl.GLSurfaceView} and a {@link android.opengl.GLSurfaceView.Renderer}. A {@link
+android.opengl.GLSurfaceView} is a view container for graphics drawn with OpenGL and {@link
+android.opengl.GLSurfaceView.Renderer} controls what is drawn within that view. For more information
+about these classes, see the <a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL ES</a>
+developer guide.</p>
+
+<p>{@link android.opengl.GLSurfaceView} is just one way to incorporate OpenGL ES graphics into your
+application. For a full-screen or near-full screen graphics view, it is a reasonable choice.
+Developers who want to incorporate OpenGL ES graphics in a small portion of their layouts should
+take a look at {@link android.view.TextureView}. For real, do-it-yourself developers, it is also
+possible to build up an OpenGL ES view using {@link android.view.SurfaceView}, but this requires
+writing quite a bit of additional code.</p>
+
+<p>This lesson explains how to complete a minimal implementation of {@link
+android.opengl.GLSurfaceView} and {@link android.opengl.GLSurfaceView.Renderer} in a simple
+application activity.</p>
+
+
+<h2 id="manifest">Declare OpenGL ES Use in the Manifest</h2>
+
+<p>In order for your application to use the OpenGL ES 2.0 API, you must add the following
+declaration to your manifest:</p>
+
+<pre>
+&lt;uses-feature android:glEsVersion="0x00020000" android:required="true" /&gt;
+</pre>
+
+<p>If your application uses texture compression, you must also declare which compression formats
+you support so that devices that do not support theses formats do not try to run your
+application:</p>
+
+<pre>
+&lt;supports-gl-texture android:name="GL_OES_compressed_ETC1_RGB8_texture" /&gt;
+&lt;supports-gl-texture android:name="GL_OES_compressed_paletted_texture" /&gt;
+</pre>
+
+<p>For more information about texture compression formats, see the
+<a href="{@docRoot}guide/topics/graphics/opengl.html#textures">OpenGL</a> developer guide.</p>
+
+
+<h2 id="activity">Create an Activity for OpenGL ES Graphics</h2>
+
+<p>Android applications that use OpenGL ES have activities just like any other application that has
+a user interface. The main difference from other applications is what you put in the layout for your
+activity. While in many applications you might use {@link android.widget.TextView}, {@link
+android.widget.Button} and {@link android.widget.ListView}, in an app that uses OpenGL ES, you can
+also add a {@link android.opengl.GLSurfaceView}.</p>
+
+<p>The following code example shows a minimal implementation of an activity that uses a
+{@link android.opengl.GLSurfaceView} as its primary view:</p>
+
+<pre>
+public class OpenGLES20 extends Activity {
+
+ private GLSurfaceView mGLView;
+
+ &#64;Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ // Create a GLSurfaceView instance and set it
+ // as the ContentView for this Activity.
+ mGLView = new MyGLSurfaceView(this);
+ setContentView(mGLView);
+ }
+}
+</pre>
+
+<p class="note"><strong>Note:</strong> OpenGL ES 2.0 requires Android 2.2 (API Level 8) or higher,
+so make sure your Android project targets that API or higher.</p>
+
+
+<h2 id="glsurfaceview">Build a GLSurfaceView Object</h2>
+
+<p>A {@link android.opengl.GLSurfaceView} is a specialized view where you can draw OpenGL ES
+graphics.
+It does not do much by itself. The actual drawing of objects is controlled in the {@link
+android.opengl.GLSurfaceView.Renderer} that you set on this view. In fact, the code for this object
+is so thin, you may be tempted to skip extending it and just create an unmodified {@link
+android.opengl.GLSurfaceView} instance, but don’t do that. You need to extend this class in
+order to capture touch events, which is covered in the <a href="#touch.html">Responding to Touch
+Events</a> lesson.</p>
+
+<p>The essential code for a {@link android.opengl.GLSurfaceView} is minimal, so for a quick
+implementation, it is common to
+just create an inner class in the activity that uses it:</p>
+
+<pre>
+class MyGLSurfaceView extends GLSurfaceView {
+
+ public MyGLSurfaceView(Context context){
+ super(context);
+
+ // Set the Renderer for drawing on the GLSurfaceView
+ setRenderer(new MyRenderer());
+ }
+}
+</pre>
+
+<p>When using OpenGL ES 2.0, you must add another call to your {@link android.opengl.GLSurfaceView}
+constructor, specifying that you want to use the 2.0 API:</p>
+
+<pre>
+// Create an OpenGL ES 2.0 context
+setEGLContextClientVersion(2);
+</pre>
+
+<p class="note"><strong>Note:</strong> If you are using the OpenGL ES 2.0 API, make sure you declare
+this in your application manifest. For more information, see <a href="#manifest">Declare OpenGL ES
+Use
+in the Manifest</a>.</p>
+
+<p>One other optional addition to your {@link android.opengl.GLSurfaceView} implementation is to set
+the render mode to only draw the view when there is a change to your drawing data using the
+{@link android.opengl.GLSurfaceView#RENDERMODE_WHEN_DIRTY GLSurfaceView.RENDERMODE_WHEN_DIRTY}
+setting:</p>
+
+<pre>
+// Render the view only when there is a change in the drawing data
+setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
+</pre>
+
+<p>This setting prevents the {@link android.opengl.GLSurfaceView} frame from being redrawn until you
+call {@link android.opengl.GLSurfaceView#requestRender requestRender()}, which is more
+efficient for this sample app.</p>
+
+
+<h2 id="renderer">Build a Renderer Class</h2>
+
+<p>The implementation of the {@link android.opengl.GLSurfaceView.Renderer} class, or renderer,
+within an application that uses OpenGL ES is where things start to get interesting. This class
+controls
+what gets drawn on the {@link android.opengl.GLSurfaceView} with which it is associated. There are
+three methods in a renderer that are called by the Android system in order to figure out what and
+how to draw on a {@link android.opengl.GLSurfaceView}:</p>
+
+<ul>
+ <li>{@link android.opengl.GLSurfaceView.Renderer#onSurfaceCreated onSurfaceCreated()} -
+Called once to set up the view's OpenGL ES environment.</li>
+ <li>{@link android.opengl.GLSurfaceView.Renderer#onDrawFrame onDrawFrame()} - Called for each
+redraw of the view.</li>
+ <li>{@link android.opengl.GLSurfaceView.Renderer#onSurfaceChanged onSurfaceChanged()} - Called if
+the geometry of the view changes, for example when the device's screen orientation changes.
+ </li>
+</ul>
+
+<p>Here is a very basic implementation of an OpenGL ES renderer, that does nothing more than draw a
+gray background in the {@link android.opengl.GLSurfaceView}:</p>
+
+<pre>
+public class MyGL20Renderer implements GLSurfaceView.Renderer {
+
+ public void onSurfaceCreated(GL10 unused, EGLConfig config) {
+ // Set the background frame color
+ GLES20.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
+ }
+
+ public void onDrawFrame(GL10 unused) {
+ // Redraw background color
+ GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
+ }
+
+ public void onSurfaceChanged(GL10 unused, int width, int height) {
+ GLES20.glViewport(0, 0, width, height);
+ }
+}
+</pre>
+
+<p>That’s all there is to it! The code examples above create a simple Android application that
+displays a gray screen using OpenGL. While this code does not do anything very interesting, by
+creating these classes, you have laid the foundation you need to start drawing graphic elements with
+OpenGL.</p>
+
+<p class="note"><strong>Note:</strong> You may wonder why these methods have a {@link
+javax.microedition.khronos.opengles.GL10} parameter, when you are using the OpengGL ES 2.0 APIs.
+These method signatures are simply reused for the 2.0 APIs to keep the Android framework code
+simpler.</p>
+
+<p>If you are familiar with the OpenGL ES APIs, you should now be able to set up a OpenGL ES
+environment in your app and start drawing graphics. However, if you need a bit more help getting
+started with OpenGL, head on to the next lessons for a few more hints.</p>
diff --git a/docs/html/training/graphics/opengl/index.jd b/docs/html/training/graphics/opengl/index.jd
new file mode 100644
index 000000000000..23a734acb473
--- /dev/null
+++ b/docs/html/training/graphics/opengl/index.jd
@@ -0,0 +1,75 @@
+page.title=Displaying Graphics with OpenGL ES
+trainingnavtop=true
+next.title=Building an OpenGL ES Environment
+next.link=environment.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>Dependencies and prerequisites</h2>
+<ul>
+ <li>Android 2.2 (API Level 8) or higher</li>
+ <li>Experience building an <a href="{@docRoot}training/basics/firstapp/index.html">Android
+app</a></li>
+</ul>
+
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL</a></li>
+</ul>
+
+<h2>Try it out</h2>
+
+<div class="download-box">
+ <a href="{@docRoot}shareables/training/OpenGLES.zip"
+class="button">Download the sample</a>
+ <p class="filename">OpenGLES.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>The Android framework provides plenty of standard tools for creating attractive, functional
+graphical user interfaces. However, if you want more control of what your application draws on
+screen, or are venturing into three dimensional graphics, you need to use a different tool. The
+OpenGL ES APIs provided by the Android framework offers a set of tools for displaying high-end,
+animated graphics that are limited only by your imagination and can also benefit from the
+acceleration of graphics processing units (GPUs) provided on many Android devices.</p>
+
+<p>This class walks you through the basics of developing applications that use OpenGL, including
+setup, drawing objects, moving drawn elements and responding to touch input.</p>
+
+<p>The example code in this class uses the OpenGL ES 2.0 APIs, which is the recommended API version
+to use with current Android devices. For more information about versions of OpenGL ES, see the <a
+href="{@docRoot}guide/topics/graphics/opengl.html#choosing-version">OpenGL</a>
+developer guide.</p>
+
+<p class="note"><strong>Note:</strong> Be careful not to mix OpenGL ES 1.x API calls with OpenGL
+ES 2.0 methods! The two APIs are not interchangeable and trying to use them together only results in
+frustration and sadness.</p>
+
+
+<h2>Lessons</h2>
+
+<dl>
+ <dt><b><a href="environment.html">Building an OpenGL ES Environment</a></b></dt>
+ <dd>Learn how to set up an Android application to be able to draw OpenGL graphics.</dd>
+
+ <dt><b><a href="shapes.html">Defining Shapes</a></b></dt>
+ <dd>Learn how to define shapes and why you need to know about faces and winding.</dd>
+
+ <dt><b><a href="draw.html">Drawing Shapes</a></b></dt>
+ <dd>Learn how to draw OpenGL shapes in your application.</dd>
+
+ <dt><b><a href="projection.html">Applying Projection and Camera Views</a></b></dt>
+ <dd>Learn how to use projection and camera views to get a new perspective on your drawn
+objects.</dd>
+
+ <dt><b><a href="motion.html">Adding Motion</a></b></dt>
+ <dd>Learn how to do basic movement and animation of drawn objects with OpenGL.</dd>
+
+ <dt><b><a href="touch.html">Responding to Touch Events</a></b></dt>
+ <dd>Learn how to do basic interaction with OpenGL graphics.</dd>
+</dl>
diff --git a/docs/html/training/graphics/opengl/motion.jd b/docs/html/training/graphics/opengl/motion.jd
new file mode 100644
index 000000000000..688823560e8d
--- /dev/null
+++ b/docs/html/training/graphics/opengl/motion.jd
@@ -0,0 +1,92 @@
+page.title=Adding Motion
+parent.title=Displaying Graphics with OpenGL ES
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Applying Projection and Camera Views
+previous.link=projection.html
+next.title=Responding to Touch Events
+next.link=touch.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#rotate-gl1">Rotate a Shape</a></li>
+ <li><a href="#cont-render">Enable Continuous Rendering</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL</a></li>
+</ul>
+
+<div class="download-box">
+ <a href="http://developer.android.com/shareables/training/OpenGLES.zip"
+class="button">Download the sample</a>
+ <p class="filename">OpenGLES.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>Drawing objects on screen is a pretty basic feature of OpenGL, but you can do this with other
+Android graphics framwork classes, including {@link android.graphics.Canvas} and
+{@link android.graphics.drawable.Drawable} objects. OpenGL ES provides additional capabilities for
+moving and transforming drawn objects in three dimensions or in other unique ways to create
+compelling user experiences.</p>
+
+<p>In this lesson, you take another step forward into using OpenGL ES by learning how to add motion
+to a shape with rotation.</p>
+
+
+<h2 id="rotate">Rotate a Shape</h2>
+
+<p>Rotating a drawing object with OpenGL ES 2.0 is relatively simple. You create another
+transformation matrix (a rotation matrix) and then combine it with your projection and
+camera view tranformation matrices:</p>
+
+<pre>
+private float[] mRotationMatrix = new float[16];
+public void onDrawFrame(GL10 gl) {
+ ...
+ // Create a rotation transformation for the triangle
+ long time = SystemClock.uptimeMillis() % 4000L;
+ float angle = 0.090f * ((int) time);
+ Matrix.setRotateM(mRotationMatrix, 0, mAngle, 0, 0, -1.0f);
+
+ // Combine the rotation matrix with the projection and camera view
+ Matrix.multiplyMM(mMVPMatrix, 0, mRotationMatrix, 0, mMVPMatrix, 0);
+
+ // Draw triangle
+ mTriangle.draw(mMVPMatrix);
+}
+</pre>
+
+<p>If your triangle does not rotate after making these changes, make sure you have commented out the
+{@link android.opengl.GLSurfaceView#RENDERMODE_WHEN_DIRTY GLSurfaceView.RENDERMODE_WHEN_DIRTY}
+setting, as described in the next section.</p>
+
+
+<h2 id="cont-render">Enable Continuous Rendering</h2>
+
+<p>If you have diligently followed along with the example code in this class to this point, make
+sure you comment out the line that sets the render mode only draw when dirty, otherwise OpenGL
+rotates the shape only one increment and then waits for a call to {@link
+android.opengl.GLSurfaceView#requestRender requestRender()} from the {@link
+android.opengl.GLSurfaceView} container:</p>
+
+<pre>
+public MyGLSurfaceView(Context context) {
+ ...
+ // Render the view only when there is a change in the drawing data
+ //setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY); // comment out for auto-rotation
+}
+</pre>
+
+<p>Unless you have objects changing without any user interaction, it’s usually a good idea have this
+flag turned on. Be ready to uncomment this code, because the next lesson makes this call applicable
+once again.</p>
diff --git a/docs/html/training/graphics/opengl/projection.jd b/docs/html/training/graphics/opengl/projection.jd
new file mode 100644
index 000000000000..2a91093d8909
--- /dev/null
+++ b/docs/html/training/graphics/opengl/projection.jd
@@ -0,0 +1,152 @@
+page.title=Applying Projection and Camera Views
+parent.title=Displaying Graphics with OpenGL ES
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Drawing Shapes
+previous.link=draw.html
+next.title=Applying Projection and Camera Views
+next.link=projection.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#projection">Define a Projection</a></li>
+ <li><a href="#camera-view">Define a Camera View</a></li>
+ <li><a href="#transform">Apply Projection and Camera Transformations</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL</a></li>
+</ul>
+
+<div class="download-box">
+ <a href="{@docRoot}shareables/training/OpenGLES.zip"
+class="button">Download the sample</a>
+ <p class="filename">OpenGLES.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>In the OpenGL ES environment, projection and camera views allow you to display drawn objects in a
+way that more closely resembles how you see physical objects with your eyes. This simulation of
+physical viewing is done with mathematical transformations of drawn object coordinates:</p>
+
+<ul>
+ <li><em>Projection</em> - This transformation adjusts the coordinates of drawn objects based on
+the width and height of the {@link android.opengl.GLSurfaceView} where they are displayed. Without
+this calculation, objects drawn by OpenGL ES are skewed by the unequal proportions of the view
+window. A projection transformation typically only has to be calculated when the proportions of the
+OpenGL view are established or changed in the {@link
+android.opengl.GLSurfaceView.Renderer#onSurfaceChanged
+onSurfaceChanged()} method of your renderer. For more information about OpenGL ES projections and
+coordinate mapping, see <a
+href="{@docRoot}guide/topics/graphics/opengl.html#coordinate-mapping">Mapping Coordinates for Drawn
+Objects</a>.</li>
+ <li><em>Camera View</em> - This transformation adjusts the coordinates of drawn objects based on a
+virtual camera position. It’s important to note that OpenGL ES does not define an actual camera
+object, but instead provides utility methods that simulate a camera by transforming the display of
+drawn objects. A camera view transformation might be calculated only once when you establish your
+{@link android.opengl.GLSurfaceView}, or might change dynamically based on user actions or your
+application’s function.</li>
+</ul>
+
+<p>This lesson describes how to create a projection and camera view and apply it to shapes drawn in
+your {@link android.opengl.GLSurfaceView}.</p>
+
+
+<h2 id="projection">Define a Projection</h2>
+
+<p>The data for a projection transformation is calculated in the {@link
+android.opengl.GLSurfaceView.Renderer#onSurfaceChanged onSurfaceChanged()}
+method of your {@link android.opengl.GLSurfaceView.Renderer} class. The following example code
+takes the height and width of the {@link android.opengl.GLSurfaceView} and uses it to populate a
+projection transformation {@link android.opengl.Matrix} using the {@link
+android.opengl.Matrix#frustumM Matrix.frustumM()} method:</p>
+
+<pre>
+&#64;Override
+public void onSurfaceChanged(GL10 unused, int width, int height) {
+ GLES20.glViewport(0, 0, width, height);
+
+ float ratio = (float) width / height;
+
+ // this projection matrix is applied to object coordinates
+ // in the onDrawFrame() method
+ Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);
+}
+</pre>
+
+<p>This code populates a projection matrix, {@code mProjMatrix} which you can then combine with a
+camera view transformation in the {@link android.opengl.GLSurfaceView.Renderer#onDrawFrame
+onDrawFrame()} method, which is shown in the next section.</p>
+
+<p class="note"><strong>Note:</strong> Just applying a projection transformation to your
+drawing objects typically results in a very empty display. In general, you must also apply a camera
+view transformation in order for anything to show up on screen.</p>
+
+
+<h2 id="camera-view">Define a Camera View</h2>
+
+<p>Complete the process of transforming your drawn objects by adding a camera view transformation as
+part of the drawing process. In the following example code, the camera view transformation is
+calculated using the {@link android.opengl.Matrix#setLookAtM Matrix.setLookAtM()} method and then
+combined with the previously calculated projection matrix. The combined transformation matrices
+are then passed to the drawn shape.</p>
+
+<pre>
+&#64;Override
+public void onDrawFrame(GL10 unused) {
+ ...
+
+ // Set the camera position (View matrix)
+ Matrix.setLookAtM(mVMatrix, 0, 0, 0, -3, 0f, 0f, 0f, 0f, 1.0f, 0.0f);
+
+ // Calculate the projection and view transformation
+ Matrix.multiplyMM(mMVPMatrix, 0, mProjMatrix, 0, mVMatrix, 0);
+
+ // Draw shape
+ mTriangle.draw(mMVPMatrix);
+}
+</pre>
+
+
+<h2 id="#transform">Apply Projection and Camera Transformations</h2>
+
+<p>In order to use the combined projection and camera view transformation matrix shown in the
+previews sections, modify the {@code draw()} method of your graphic objects to accept the combined
+transformation matrix and apply it to the shape:</p>
+
+<pre>
+public void draw(float[] mvpMatrix) { // pass in the calculated transformation matrix
+ ...
+
+ // get handle to shape's transformation matrix
+ mMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uMVPMatrix");
+
+ // Apply the projection and view transformation
+ GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mvpMatrix, 0);
+
+ // Draw the triangle
+ GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, vertexCount);
+ ...
+}
+</pre>
+
+<p>Once you have correctly calulated and applied the projection and camera view transformations,
+your graphic objects are drawn in correct proportions and should look like this:</p>
+
+
+<img src="{@docRoot}images/opengl/ogl-triangle-projected.png">
+<p class="img-caption">
+<strong>Figure 1.</strong> Triangle drawn with a projection and camera view applied.</p>
+
+
+<p>Now that you have an application that displays your shapes in correct proportions, it's time to
+add motion to your shapes.</p>
diff --git a/docs/html/training/graphics/opengl/shapes.jd b/docs/html/training/graphics/opengl/shapes.jd
new file mode 100644
index 000000000000..98381cc6de4b
--- /dev/null
+++ b/docs/html/training/graphics/opengl/shapes.jd
@@ -0,0 +1,153 @@
+page.title=Defining Shapes
+parent.title=Displaying Graphics with OpenGL ES
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Building an OpenGL ES Environment
+previous.link=environment.html
+next.title=Drawing Shapes
+next.link=draw.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#triangle">Define a Triangle</a></li>
+ <li><a href="#square">Define a Square</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL</a></li>
+</ul>
+
+<div class="download-box">
+ <a href="{@docRoot}shareables/training/OpenGLES.zip"
+class="button">Download the sample</a>
+ <p class="filename">OpenGLES.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>Being able to define shapes to be drawn in the context of an OpenGL ES view is the first step in
+creating your high-end graphics masterpiece. Drawing with OpenGL ES can be a little tricky without
+knowing a few basic things about how OpenGL ES expects you to define graphic objects.</p>
+
+<p>This lesson explains the OpenGL ES coordinate system relative to an Android device screen, the
+basics of defining a shape, shape faces, as well as defining a triangle and a square.</p>
+
+
+<h2 id="triangle">Define a Triangle</h2>
+
+<p>OpenGL ES allows you to define drawn objects using coordinates in three-dimensional space. So,
+before you can draw a triangle, you must define its coordinates. In OpenGL, the typical way to do
+this is to define a vertex array of floating point numbers for the coordinates. For maximum
+efficiency, you write these coordinates into a {@link java.nio.ByteBuffer}, that is passed into the
+OpenGL ES graphics pipeline for processing.</p>
+
+<pre>
+class Triangle {
+
+ private FloatBuffer vertexBuffer;
+
+ // number of coordinates per vertex in this array
+ static final int COORDS_PER_VERTEX = 3;
+ static float triangleCoords[] = { // in counterclockwise order:
+ 0.0f, 0.622008459f, 0.0f, // top
+ -0.5f, -0.311004243f, 0.0f, // bottom left
+ 0.5f, -0.311004243f, 0.0f // bottom right
+ };
+
+ // Set color with red, green, blue and alpha (opacity) values
+ float color[] = { 0.63671875f, 0.76953125f, 0.22265625f, 1.0f };
+
+ public Triangle() {
+ // initialize vertex byte buffer for shape coordinates
+ ByteBuffer bb = ByteBuffer.allocateDirect(
+ // (number of coordinate values * 4 bytes per float)
+ triangleCoords.length * 4);
+ // use the device hardware's native byte order
+ bb.order(ByteOrder.nativeOrder());
+
+ // create a floating point buffer from the ByteBuffer
+ vertexBuffer = bb.asFloatBuffer();
+ // add the coordinates to the FloatBuffer
+ vertexBuffer.put(triangleCoords);
+ // set the buffer to read the first coordinate
+ vertexBuffer.position(0);
+ }
+}
+</pre>
+
+<p>By default, OpenGL ES assumes a coordinate system where [0,0,0] (X,Y,Z) specifies the center of
+the {@link android.opengl.GLSurfaceView} frame, [1,1,0] is the top right corner of the frame and
+[-1,-1,0] is bottom left corner of the frame. For an illustration of this coordinate system, see the
+<a href="{@docRoot}guide/topics/graphics/opengl.html#coordinate-mapping">OpenGL ES</a> developer
+guide.</p>
+
+<p>Note that the coordinates of this shape are defined in a counterclockwise order. The drawing
+order is important because it defines which side is the front face of the shape, which you typically
+want to have drawn, and the back face, which you can choose to not draw using the OpenGL ES cull
+face feature. For more information about faces and culling, see the <a
+href="{@docRoot}guide/topics/graphics/opengl.html#faces-winding">OpenGL ES</a> developer guide.</p>
+
+
+<h2 id="square">Define a Square</h2>
+
+<p>Defining triangles is pretty easy in OpenGL, but what if you want to get a just a little more
+complex? Say, a square? There are a number of ways to do this, but a typical path to drawing such a
+shape in OpenGL ES is to use two triangles drawn together:</p>
+
+<img src="{@docRoot}images/opengl/ccw-square.png">
+<p class="img-caption">
+ <strong>Figure 1.</strong> Drawing a square using two triangles.</p>
+
+<p>Again, you should define the vertices in a counterclockwise order for both triangles that
+represent this shape, and put the values in a {@link java.nio.ByteBuffer}. In order to avoid
+defining the two coordinates shared by each triangle twice, use a drawing list to tell the
+OpenGL ES graphics pipeline how to draw these vertices. Here’s the code for this shape:</p>
+
+<pre>
+class Square {
+
+ private FloatBuffer vertexBuffer;
+ private ShortBuffer drawListBuffer;
+
+ // number of coordinates per vertex in this array
+ static final int COORDS_PER_VERTEX = 3;
+ static float squareCoords[] = { -0.5f, 0.5f, 0.0f, // top left
+ -0.5f, -0.5f, 0.0f, // bottom left
+ 0.5f, -0.5f, 0.0f, // bottom right
+ 0.5f, 0.5f, 0.0f }; // top right
+
+ private short drawOrder[] = { 0, 1, 2, 0, 2, 3 }; // order to draw vertices
+
+ public Square() {
+ // initialize vertex byte buffer for shape coordinates
+ ByteBuffer bb = ByteBuffer.allocateDirect(
+ // (# of coordinate values * 4 bytes per float)
+ squareCoords.length * 4);
+ bb.order(ByteOrder.nativeOrder());
+ vertexBuffer = bb.asFloatBuffer();
+ vertexBuffer.put(squareCoords);
+ vertexBuffer.position(0);
+
+ // initialize byte buffer for the draw list
+ ByteBuffer dlb = ByteBuffer.allocateDirect(
+ // (# of coordinate values * 2 bytes per short)
+ drawOrder.length * 2);
+ dlb.order(ByteOrder.nativeOrder());
+ drawListBuffer = dlb.asShortBuffer();
+ drawListBuffer.put(drawOrder);
+ drawListBuffer.position(0);
+ }
+}
+</pre>
+
+<p>This example gives you a peek at what it takes to create more complex shapes with OpenGL. In
+general, you use collections of triangles to draw objects. In the next lesson, you learn how to draw
+these shapes on screen.</p>
diff --git a/docs/html/training/graphics/opengl/touch.jd b/docs/html/training/graphics/opengl/touch.jd
new file mode 100644
index 000000000000..c058a5963ee3
--- /dev/null
+++ b/docs/html/training/graphics/opengl/touch.jd
@@ -0,0 +1,145 @@
+page.title= Responding to Touch Events
+parent.title=Displaying Graphics with OpenGL ES
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Adding Motion
+previous.link=motion.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#listener">Setup a Touch Listener</a></li>
+ <li><a href="#angle">Expose the Rotation Angle</a></li>
+ <li><a href="#rotate">Apply Rotation</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL</a></li>
+</ul>
+
+<div class="download-box">
+ <a href="http://developer.android.com/shareables/training/OpenGLES.zip"
+class="button">Download the sample</a>
+ <p class="filename">OpenGLES.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>Making objects move according to a preset program like the rotating triangle is useful for
+getting some attention, but what if you want to have users interact with your OpenGL ES graphics?
+The key to making your OpenGL ES application touch interactive is expanding your implementation of
+{@link android.opengl.GLSurfaceView} to override the {@link
+android.opengl.GLSurfaceView#onTouchEvent onTouchEvent()} to listen for touch events.</p>
+
+<p>This lesson shows you how to listen for touch events to let users rotate an OpenGL ES object.</p>
+
+
+<h2 id="listener">Setup a Touch Listener</h2>
+
+<p>In order to make your OpenGL ES application respond to touch events, you must implement the
+{@link android.opengl.GLSurfaceView#onTouchEvent onTouchEvent()} method in your
+{@link android.opengl.GLSurfaceView} class. The example implementation below shows how to listen for
+{@link android.view.MotionEvent#ACTION_MOVE MotionEvent.ACTION_MOVE} events and translate them to
+an angle of rotation for a shape.</p>
+
+<pre>
+&#64;Override
+public boolean onTouchEvent(MotionEvent e) {
+ // MotionEvent reports input details from the touch screen
+ // and other input controls. In this case, you are only
+ // interested in events where the touch position changed.
+
+ float x = e.getX();
+ float y = e.getY();
+
+ switch (e.getAction()) {
+ case MotionEvent.ACTION_MOVE:
+
+ float dx = x - mPreviousX;
+ float dy = y - mPreviousY;
+
+ // reverse direction of rotation above the mid-line
+ if (y &gt; getHeight() / 2) {
+ dx = dx * -1 ;
+ }
+
+ // reverse direction of rotation to left of the mid-line
+ if (x &lt; getWidth() / 2) {
+ dy = dy * -1 ;
+ }
+
+ mRenderer.mAngle += (dx + dy) * TOUCH_SCALE_FACTOR; // = 180.0f / 320
+ requestRender();
+ }
+
+ mPreviousX = x;
+ mPreviousY = y;
+ return true;
+}
+</pre>
+
+<p>Notice that after calculating the rotation angle, this method calls {@link
+android.opengl.GLSurfaceView#requestRender requestRender()} to tell the
+renderer that it is time to render the frame. This approach is the most efficient in this example
+because the frame does not need to be redrawn unless there is a change in the rotation. However, it
+does not have any impact on efficiency unless you also request that the renderer only redraw when
+the data changes using the {@link android.opengl.GLSurfaceView#setRenderMode setRenderMode()}
+method, so make sure this line is uncommented in the renderer:</p>
+
+<pre>
+public MyGLSurfaceView(Context context) {
+ ...
+ // Render the view only when there is a change in the drawing data
+ <strong>setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);</strong>
+}
+</pre>
+
+<h2 id="angle">Expose the Rotation Angle</h2>
+
+<p>The example code above requires that you expose the rotation angle through your renderer by
+adding a public member. Since the renderer code is running on a separate thread from the main user
+interface thread of your application, you must declare this public variable as {@code volatile}.
+Here is the code to do that:</p>
+
+<pre>
+public class MyGLRenderer implements GLSurfaceView.Renderer {
+ ...
+ public volatile float mAngle;
+</pre>
+
+
+<h2 id="rotate">Apply Rotation</h2>
+
+<p>To apply the rotation generated by touch input, comment out the code that generates an angle and
+add {@code mAngle}, which contains the touch input generated angle:</p>
+
+<pre>
+public void onDrawFrame(GL10 gl) {
+ ...
+ // Create a rotation for the triangle
+ // long time = SystemClock.uptimeMillis() % 4000L;
+ // float angle = 0.090f * ((int) time);
+ <strong>Matrix.setRotateM(mRotationMatrix, 0, mAngle, 0, 0, -1.0f);</strong>
+
+ // Combine the rotation matrix with the projection and camera view
+ Matrix.multiplyMM(mMVPMatrix, 0, mRotationMatrix, 0, mMVPMatrix, 0);
+
+ // Draw triangle
+ mTriangle.draw(mMVPMatrix);
+}
+</pre>
+
+<p>When you have completed the steps described above, run the program and drag your finger over the
+screen to rotate the triangle:</p>
+
+<img src="{@docRoot}images/opengl/ogl-triangle-touch.png">
+<p class="img-caption">
+<strong>Figure 1.</strong> Triangle being rotated with touch input (circle shows touch
+location).</p>
diff --git a/docs/html/training/id-auth/index.jd b/docs/html/training/id-auth/index.jd
index 361e6cfa0da0..140545c74e92 100644
--- a/docs/html/training/id-auth/index.jd
+++ b/docs/html/training/id-auth/index.jd
@@ -14,7 +14,7 @@ next.link=identify.html
<h2>Requirements and prerequisites</h2>
<ul>
<li>Android 2.0 (API level 5) or higher</li>
- <li>Experience with <a href="{@docRoot}guide/topics/fundamentals/services.html">Services</a></li>
+ <li>Experience with <a href="{@docRoot}guide/components/services.html">Services</a></li>
<li>Experience with <a href="http://oauth.net/2/">OAuth 2.0</a></li>
</ul>
diff --git a/docs/html/training/implementing-navigation/ancestral.jd b/docs/html/training/implementing-navigation/ancestral.jd
index 495b45dc71dd..ac35e642ed17 100644
--- a/docs/html/training/implementing-navigation/ancestral.jd
+++ b/docs/html/training/implementing-navigation/ancestral.jd
@@ -22,7 +22,7 @@ next.link=temporal.html
<h2>You should also read</h2>
<ul>
<li><a href="{@docRoot}training/design-navigation/ancestral-temporal.html">Providing Ancestral and Temporal Navigation</a></li>
- <li><a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a></li>
+ <li><a href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks and Back Stack</a></li>
<li><a href="{@docRoot}design/patterns/navigation.html">Android Design: Navigation</a></li>
</ul>
@@ -87,7 +87,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
<p>When the current activity belongs to a task from a different application&mdash;for example if it was reached via an intent from another application&mdash;pressing <em>Up</em> should create a new task for the application with a synthesized back stack. This approach is described in <a href="{@docRoot}design/patterns/navigation.html">Android Design: Navigation</a> and the {@link android.support.v4.app.TaskStackBuilder} class reference.</p>
-<p>The {@link android.support.v4.app.NavUtils} and {@link android.support.v4.app.TaskStackBuilder} classes in the <a href="{@docRoot}sdk/compatibility-library.html">Android Support Package</a> provide helpers for implementing this behavior correctly. An example usage of these two helper classes is below:</p>
+<p>The {@link android.support.v4.app.NavUtils} and {@link android.support.v4.app.TaskStackBuilder} classes in the <a href="{@docRoot}tools/extras/support-library.html">Android Support Package</a> provide helpers for implementing this behavior correctly. An example usage of these two helper classes is below:</p>
<pre>
{@literal @}Override
diff --git a/docs/html/training/implementing-navigation/index.jd b/docs/html/training/implementing-navigation/index.jd
index da61c8162025..ebb4995ef91a 100644
--- a/docs/html/training/implementing-navigation/index.jd
+++ b/docs/html/training/implementing-navigation/index.jd
@@ -15,7 +15,7 @@ next.link=lateral.html
<ul>
<li>API level 14</li>
<li>Understanding of fragments and Android layouts</li>
- <li><a href="{@docRoot}sdk/compatibility-library.html">The Android Support Package</a></li>
+ <li><a href="{@docRoot}tools/extras/support-library.html">The Android Support Package</a></li>
<li><a href="{@docRoot}training/design-navigation/index.html">Designing Effective Navigation</a></li>
</ul>
@@ -23,7 +23,7 @@ next.link=lateral.html
<ul>
<li><a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a></li>
- <li><a href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a></li>
+ <li><a href="{@docRoot}guide/components/fragments.html">Fragments</a></li>
<li><a href="{@docRoot}training/multiscreen/index.html">Designing for Multiple Screens</a></li>
</ul>
diff --git a/docs/html/training/implementing-navigation/lateral.jd b/docs/html/training/implementing-navigation/lateral.jd
index d9ba5c9cb9bd..76acf03b051f 100644
--- a/docs/html/training/implementing-navigation/lateral.jd
+++ b/docs/html/training/implementing-navigation/lateral.jd
@@ -119,7 +119,7 @@ public void onCreate(Bundle savedInstanceState) {
<h2 id="horizontal-paging">Implement Horizontal Paging (Swipe Views)</h2>
-<p>Horizontal paging, or swipe views, allow users to <a href="{@docRoot}design/patterns/swipe-views">swipe</a> horizontally on the current screen to navigate to adjacent screens. This pattern can be implemented using the {@link android.support.v4.view.ViewPager} widget, currently available as part of the <a href="{@docRoot}sdk/compatibility-library.html">Android Support Package</a>. For navigating between sibling screens representing a fixed number of sections, it's best to provide the {@link android.support.v4.view.ViewPager} with a {@link android.support.v4.app.FragmentPagerAdapter}. For horizontal paging across collections of objects, it's best to use a {@link android.support.v4.app.FragmentStatePagerAdapter}, which destroys fragments as the user navigates to other pages, minimizing memory usage.</p>
+<p>Horizontal paging, or swipe views, allow users to <a href="{@docRoot}design/patterns/swipe-views">swipe</a> horizontally on the current screen to navigate to adjacent screens. This pattern can be implemented using the {@link android.support.v4.view.ViewPager} widget, currently available as part of the <a href="{@docRoot}tools/extras/support-library.html">Android Support Package</a>. For navigating between sibling screens representing a fixed number of sections, it's best to provide the {@link android.support.v4.view.ViewPager} with a {@link android.support.v4.app.FragmentPagerAdapter}. For horizontal paging across collections of objects, it's best to use a {@link android.support.v4.app.FragmentStatePagerAdapter}, which destroys fragments as the user navigates to other pages, minimizing memory usage.</p>
<p>Below is an example of using a {@link android.support.v4.view.ViewPager} to swipe across a collection of objects.</p>
diff --git a/docs/html/training/implementing-navigation/temporal.jd b/docs/html/training/implementing-navigation/temporal.jd
index f36991fb0ebd..1c41732fd530 100644
--- a/docs/html/training/implementing-navigation/temporal.jd
+++ b/docs/html/training/implementing-navigation/temporal.jd
@@ -22,7 +22,7 @@ next.link=descendant.html
<h2>You should also read</h2>
<ul>
<li><a href="{@docRoot}training/design-navigation/ancestral-temporal.html">Providing Ancestral and Temporal Navigation</a></li>
- <li><a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a></li>
+ <li><a href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks and Back Stack</a></li>
<li><a href="{@docRoot}design/patterns/navigation.html">Android Design: Navigation</a></li>
</ul>
@@ -32,7 +32,7 @@ next.link=descendant.html
<p><em>Temporal navigation</em> is navigation to previously visited screens. Users can visit previous screens by pressing the device <em>Back</em> button. This user interface pattern is described further in <a href="{@docRoot}training/design-navigation/ancestral-temporal.html">Providing Ancestral and Temporal Navigation</a> in <em>Designing Effective Navigation</em> and in <a href="{@docRoot}design/patterns/navigation.html">Android Design: Navigation</a>.</p>
-<p>Android handles basic <em>Back</em> navigation for you (see <a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a> for details on this behavior). This lesson discusses a number of cases where applications should provide specialized logic for the <em>Back</em> button.</p>
+<p>Android handles basic <em>Back</em> navigation for you (see <a href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks and Back Stack</a> for details on this behavior). This lesson discusses a number of cases where applications should provide specialized logic for the <em>Back</em> button.</p>
<h2 id="back-fragments">Implement <em>Back</em> Navigation with Fragments</h2>
diff --git a/docs/html/training/improving-layouts/optimizing-layout.jd b/docs/html/training/improving-layouts/optimizing-layout.jd
index 0eaf199b132e..520ce5677ae3 100644
--- a/docs/html/training/improving-layouts/optimizing-layout.jd
+++ b/docs/html/training/improving-layouts/optimizing-layout.jd
@@ -44,8 +44,8 @@ is inflated repeatedly, such as when used in a {@link android.widget.ListView} o
android.widget.GridView}.</p>
<p>In this lesson you'll learn to use <a
-href="{@docRoot}guide/developing/tools/hierarchy-viewer.html">Hierarchy Viewer</a> and <a
-href="{@docRoot}guide/developing/tools/layoutopt.html">Layoutopt</a> to examine and optimize your
+href="{@docRoot}tools/help/hierarchy-viewer.html">Hierarchy Viewer</a> and <a
+href="{@docRoot}tools/help/layoutopt.html">Layoutopt</a> to examine and optimize your
layout.</p>
@@ -53,7 +53,7 @@ layout.</p>
<h2 id="Inspect">Inspect Your Layout</h2>
<p>The Android SDK tools include a tool called <a
-href="{@docRoot}guide/developing/tools/hierarchy-viewer.html">Hierarchy Viewer</a> that allows
+href="{@docRoot}tools/help/hierarchy-viewer.html">Hierarchy Viewer</a> that allows
you to analyze your layout while your application is running. Using this tool helps you discover
bottlenecks in the layout performance.</p>
diff --git a/docs/html/training/index.jd b/docs/html/training/index.jd
index 8bf32bbb5d48..3c67af9dba2c 100644
--- a/docs/html/training/index.jd
+++ b/docs/html/training/index.jd
@@ -1,18 +1,14 @@
-page.title=Orientation to Android Training
+page.title=Android Training
page.metaDescription=Android Training provides a collection of classes that aim to help you build great apps for Android. Each class explains the steps required to solve a problem or implement a feature using code snippets and sample code for you to use in your apps.
@jd:body
-<div class="figure" style="width:450px;margin-top:-30px">
- <img src="{@docRoot}images/training/training-prof.png" alt="" />
-</div>
-
<p>Welcome to Android Training. Here you'll find a collection of classes that aim to help you
build great apps for Android, using best practices in a variety of framework topics.</p>
<p>Each class explains the steps required to solve a problem or implement a feature using code
snippets and sample code for you to use in your apps.</p>
-<p>What you see now is just the beginning. We plan to add many more classes, expand and refine
-existing classes, and build Training Courses that help you enhance your apps using
-objective-oriented collections of classes.</p>
+<p>This first section is focused on teaching you the bare essentials. If you're a new developer
+on Android, you should walk through each of these classes, beginning with
+<a href="{@docRoot}training/basics/firstapp/index.html">Building Your First App</a>.</p></a>
diff --git a/docs/html/training/managing-audio/index.jd b/docs/html/training/managing-audio/index.jd
index 3aa2d8809e88..0f7bbfdd0d8e 100644
--- a/docs/html/training/managing-audio/index.jd
+++ b/docs/html/training/managing-audio/index.jd
@@ -19,7 +19,7 @@ Playback</a></li>
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/fundamentals/services.html">Services</a></li>
+ <li><a href="{@docRoot}guide/components/services.html">Services</a></li>
</ul>
</div>
diff --git a/docs/html/training/monitoring-device-state/battery-monitoring.jd b/docs/html/training/monitoring-device-state/battery-monitoring.jd
index 6e25df82356e..c963a18624fc 100644
--- a/docs/html/training/monitoring-device-state/battery-monitoring.jd
+++ b/docs/html/training/monitoring-device-state/battery-monitoring.jd
@@ -21,7 +21,7 @@ next.link=docking-monitoring.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a>
</ul>
</div>
diff --git a/docs/html/training/monitoring-device-state/connectivity-monitoring.jd b/docs/html/training/monitoring-device-state/connectivity-monitoring.jd
index 98ba63cc6b6c..11a05e18f8c3 100644
--- a/docs/html/training/monitoring-device-state/connectivity-monitoring.jd
+++ b/docs/html/training/monitoring-device-state/connectivity-monitoring.jd
@@ -24,7 +24,7 @@ next.link=manifest-receivers.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a>
</ul>
</div>
diff --git a/docs/html/training/monitoring-device-state/docking-monitoring.jd b/docs/html/training/monitoring-device-state/docking-monitoring.jd
index 82d655e6d0ef..3787a554ce04 100644
--- a/docs/html/training/monitoring-device-state/docking-monitoring.jd
+++ b/docs/html/training/monitoring-device-state/docking-monitoring.jd
@@ -23,7 +23,7 @@ next.link=connectivity-monitoring.html
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a>
</ul>
</div>
diff --git a/docs/html/training/monitoring-device-state/index.jd b/docs/html/training/monitoring-device-state/index.jd
index 61f7176c3f21..585b669ac7bf 100644
--- a/docs/html/training/monitoring-device-state/index.jd
+++ b/docs/html/training/monitoring-device-state/index.jd
@@ -13,12 +13,12 @@ next.link=battery-monitoring.html
<h2>Dependencies and prerequisites</h2>
<ul>
<li>Android 2.0 (API level 5) or higher</li>
- <li>Experience with <a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a></li>
+ <li>Experience with <a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a></li>
</ul>
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/fundamentals/services.html">Services</a>
+ <li><a href="{@docRoot}guide/components/services.html">Services</a>
</ul>
</div>
diff --git a/docs/html/training/monitoring-device-state/manifest-receivers.jd b/docs/html/training/monitoring-device-state/manifest-receivers.jd
index 0b79ce6f36ce..d4aeed353a87 100644
--- a/docs/html/training/monitoring-device-state/manifest-receivers.jd
+++ b/docs/html/training/monitoring-device-state/manifest-receivers.jd
@@ -21,7 +21,7 @@ Efficiency</a></li>
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a>
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a>
</ul>
</div>
diff --git a/docs/html/training/multiple-apks/api.jd b/docs/html/training/multiple-apks/api.jd
index 3492245cec19..1a2593ae29c0 100644
--- a/docs/html/training/multiple-apks/api.jd
+++ b/docs/html/training/multiple-apks/api.jd
@@ -33,7 +33,7 @@ next.link=screensize.html
<!-- other docs (NOT javadocs) -->
<h2>You should also read</h2>
<ul>
- <li><a href="http://developer.android.com/guide/market/publishing/multiple-apks.html">Multiple APK
+ <li><a href="http://developer.android.com/guide/google/play/publishing/multiple-apks.html">Multiple APK
Support</a></li>
<li><a
href="http://android-developers.blogspot.com/2010/07/how-to-have-your-cupcake-and-eat-it-too.html">
@@ -57,7 +57,7 @@ necessary to make maintaining a multiple APK codebase as painless as possible.</
platform, naturally you want your application to take advantage of new features on new devices,
without sacrificing backwards compatibility. It may seem at the outset as though multiple APK
support is the best solution, but this often isn’t the case. The <a
-href="{@docRoot}guide/market/publishing/multiple-apks.html#ApiLevelOptions">Using Single APK
+href="{@docRoot}guide/google/play/publishing/multiple-apks.html#ApiLevelOptions">Using Single APK
Instead</a> section of the multiple APK developer guide includes some useful information on how to
accomplish this with a single APK, including use of our support library. You can also learn how to
write code that runs only at certain API levels in a single APK, without resorting to
@@ -85,7 +85,7 @@ application.</p>
<p>Start off by creating a simple chart to quickly determine how many APKs you need, and what API
range each APK covers. For handy reference, the <a
-href="{@docRoot}resources/dashboard/platform-versions.html">Platform Versions</a> page of the
+href="{@docRoot}about/dashboards/index.html">Platform Versions</a> page of the
Android Developer website provides data about the relative number of active devices running a given
version of the Android platform. Also, although it sounds easy at first, keeping track of which set
of API levels each APK is going to target gets difficult rather quickly, especially if there’s going
@@ -153,10 +153,10 @@ include library projects are beyond the scope of this lesson, you can get up to
their creation at the following links:</p>
<ul>
<li><a
-href="{@docRoot}guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject">Setting up
+href="{@docRoot}tools/projects/projects-eclipse.html#SettingUpLibraryProject">Setting up
a library project (Eclipse)</a></li>
<li><a
-href="{@docRoot}guide/developing/projects/projects-cmdline.html#SettingUpLibraryProject">Setting up
+href="{@docRoot}tools/projects/projects-cmdline.html#SettingUpLibraryProject">Setting up
a library project (Command line)</a></li>
</ul>
@@ -279,7 +279,7 @@ green &#8805; blue. Therefore we can effectively collapse the chart to look lik
<p>
Now, let’s further assume that the Red APK has some requirement on it that the other two don’t.
-<a href="{@docRoot}guide/appendix/market-filters.html">Filters on Google Play</a> page of
+<a href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a> page of
the Android Developer guide has a whole list of possible culprits. For the
sake of example, let’s assume that red requires a front-facing camera. In fact, the entire point of
the red APK is to combine the front-facing camera with sweet new functionality that was added in API
@@ -296,7 +296,7 @@ APK that supported that particular API level.</p>
<p> In order to keep all your APKs on separate "tracks", it’s important to have a good version code
scheme. The recommended one can be found on the <a
-href="{@docRoot}guide/market/publishing/multiple-apks.html#VersionCodes">Version Codes</a> area of
+href="{@docRoot}guide/google/play/publishing/multiple-apks.html#VersionCodes">Version Codes</a> area of
our developer guide. Since the example set of APKs is only dealing with one of 3 possible
dimensions, it would be sufficient to separate each APK by 1000, set the first couple digits to the
minSdkVersion for that particular APK, and increment from there. This might look like:</p>
diff --git a/docs/html/training/multiple-apks/index.jd b/docs/html/training/multiple-apks/index.jd
index d92c1064f68c..1f2fee85c7a9 100644
--- a/docs/html/training/multiple-apks/index.jd
+++ b/docs/html/training/multiple-apks/index.jd
@@ -23,7 +23,7 @@ account</li>
<!-- related docs (NOT javadocs) -->
<h2>You should also read</h2>
<ul>
- <li><a href="http://developer.android.com/guide/market/publishing/multiple-apks.html">Multiple APK
+ <li><a href="http://developer.android.com/guide/google/play/publishing/multiple-apks.html">Multiple APK
Support</a></li>
</ul>
diff --git a/docs/html/training/multiple-apks/multiple.jd b/docs/html/training/multiple-apks/multiple.jd
index b30068fd0c39..25938da569df 100644
--- a/docs/html/training/multiple-apks/multiple.jd
+++ b/docs/html/training/multiple-apks/multiple.jd
@@ -33,7 +33,7 @@ previous.link=texture.html
<!-- other docs (NOT javadocs) -->
<h2>You should also read</h2>
<ul>
- <li><a href="http://developer.android.com/guide/market/publishing/multiple-apks.html">Multiple APK
+ <li><a href="http://developer.android.com/guide/google/play/publishing/multiple-apks.html">Multiple APK
Support</a></li>
</ul>
@@ -54,7 +54,7 @@ devices, naturally you want your application look its best on each individual de
take advantage of the space of large screens but still work on small ones, to use new Android API
features or visual textures available on cutting edge devices but not abandon older ones. It may
seem at the outset as though multiple APK support is the best solution, but this often isn’t the
-case. The <a href="{@docRoot}guide/market/publishing/multiple-apks.html#ApiLevelOptions">Using
+case. The <a href="{@docRoot}guide/google/play/publishing/multiple-apks.html#ApiLevelOptions">Using
Single APK Instead</a> section of the multiple APK guide includes some useful information on how to
accomplish all of this with a single APK, including use of our <a
href="http://android-developers.blogspot.com/2011/03/fragments-for-all.html">support library</a>,
@@ -182,10 +182,10 @@ include library projects are beyond the scope of this lesson, you can get up to
their creation at the following links:</p>
<ul>
<li><a
-href="{@docRoot}guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject">Setting up
+href="{@docRoot}tools/projects/projects-eclipse.html#SettingUpLibraryProject">Setting up
a library project (Eclipse)</a></li>
<li><a
-href="{@docRoot}guide/developing/projects/projects-cmdline.html#SettingUpLibraryProject">Setting up
+href="{@docRoot}tools/projects/projects-cmdline.html#SettingUpLibraryProject">Setting up
a library project (Command line)</a></li>
</ul>
@@ -329,7 +329,7 @@ preference as follows:</p>
Purple &#8805; Red &#8805; Green &#8805; Blue
</p><p>
Why allow all the overlap? Let’s pretend that the Purple APK has some requirement on it that the
-other two don’t. The <a href="{@docRoot}guide/appendix/market-filters.html">Filters on Google Play</a> page
+other two don’t. The <a href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a> page
of the Android Developer guide has a whole list of possible culprits. For the sake of example,
let’s assume that Purple requires a front-facing camera. In fact, the entire point of Purple is to
use entertaining things with the front-facing camera! But, it turns out, not all API 11+ devices
@@ -345,7 +345,7 @@ API level.</p>
<p> In order to keep all your APKs on separate "tracks", it’s important to have a good version code
scheme. The recommended one can be found on the <a
-href="{@docRoot}guide/market/publishing/multiple-apks.html#VersionCodes">Version Codes</a> area of
+href="{@docRoot}guide/google/play/publishing/multiple-apks.html#VersionCodes">Version Codes</a> area of
our developer guide. It’s worth reading the whole section, but the basic gist is for this set of
APKs, we’d use two digits to represent the minSDK, two to represent the min/max screen size, and 3
to represent the build number. That way, when the device upgraded to a new version of Android,
diff --git a/docs/html/training/multiple-apks/screensize.jd b/docs/html/training/multiple-apks/screensize.jd
index ac679a739885..ea793db89ee3 100644
--- a/docs/html/training/multiple-apks/screensize.jd
+++ b/docs/html/training/multiple-apks/screensize.jd
@@ -34,7 +34,7 @@ next.link=texture.html
<!-- other docs (NOT javadocs) -->
<h2>You should also read</h2>
<ul>
- <li><a href="http://developer.android.com/guide/market/publishing/multiple-apks.html">Multiple APK
+ <li><a href="http://developer.android.com/guide/google/play/publishing/multiple-apks.html">Multiple APK
Support</a></li>
<li><a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a></li>
</ul>
@@ -56,7 +56,7 @@ make maintaining a multiple APK codebase as painless as possible.</p>
naturally you want your application to take advantage of all the available space on larger devices,
without sacrificing compatibility or usability on the smaller screens. It may seem at the outset as
though multiple APK support is the best solution, but this often isn’t the case. The <a
-href="{@docRoot}guide/market/publishing/multiple-apks.html#ApiLevelOptions">Using Single APK
+href="{@docRoot}guide/google/play/publishing/multiple-apks.html#ApiLevelOptions">Using Single APK
Instead</a> section of the multiple APK developer guide includes some useful information on how to
accomplish this with a single APK, including use of our support library. You should also read the
guide to <a href="{@docRoot}guide/practices/screens_support.html">supporting multiple screens</a>,
@@ -130,10 +130,10 @@ include library projects are beyond the scope of this lesson, you can get up to
their creation at the following links:</p>
<ul>
<li><a
-href="{@docRoot}guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject">Setting up
+href="{@docRoot}tools/projects/projects-eclipse.html#SettingUpLibraryProject">Setting up
a library project (Eclipse)</a></li>
<li><a
-href="{@docRoot}guide/developing/projects/projects-cmdline.html#SettingUpLibraryProject">Setting up
+href="{@docRoot}tools/projects/projects-cmdline.html#SettingUpLibraryProject">Setting up
a library project (Command line)</a></li>
</ul>
@@ -227,7 +227,7 @@ each APK such that red &#8805; green &#8805; blue, the chart effectively collaps
</table>
<p>
Now, let’s further assume that the Red APK has some requirement on it that the other two don’t. The
-<a href="{@docRoot}guide/appendix/market-filters.html">Filters on Google Play</a> page of the Android
+<a href="{@docRoot}guide/google/play/filters.html">Filters on Google Play</a> page of the Android
Developer guide has a whole list of possible culprits. For the sake of example, let’s assume that
red requires a front-facing camera. In fact, the entire point of the red APK is to use the extra
available screen space to do entertaining things with that front-facing camera. But, it turns out,
@@ -243,7 +243,7 @@ size.</p>
<p> In order to keep all your APKs on separate "tracks", it’s important to have a good version code
scheme. The recommended one can be found on the <a
-href="{@docRoot}guide/market/publishing/multiple-apks.html#VersionCodes">Version Codes</a> area of
+href="{@docRoot}guide/google/play/publishing/multiple-apks.html#VersionCodes">Version Codes</a> area of
our developer guide. Since the example set of APKs is only dealing with one of 3 possible
dimensions, it would be sufficient to separate each APK by 1000 and increment from there. This
might look like:</p>
diff --git a/docs/html/training/multiple-apks/texture.jd b/docs/html/training/multiple-apks/texture.jd
index 497d6b89365e..70ad1e05767f 100644
--- a/docs/html/training/multiple-apks/texture.jd
+++ b/docs/html/training/multiple-apks/texture.jd
@@ -33,7 +33,7 @@ next.link=multiple.html
<!-- other docs (NOT javadocs) -->
<h2>You should also read</h2>
<ul>
- <li><a href="http://developer.android.com/guide/market/publishing/multiple-apks.html">Multiple APK
+ <li><a href="http://developer.android.com/guide/google/play/publishing/multiple-apks.html">Multiple APK
Support</a></li>
</ul>
@@ -49,10 +49,10 @@ Support</a></li>
devices, naturally you want your application look its best on each individual device, regardless of
the fact they don’t all support the same set of GL textures. It may seem at the outset as though
multiple APK support is the best solution, but this often isn’t the case. The <a
-href="{@docRoot}guide/market/publishing/multiple-apks.html#ApiLevelOptions">Using Single APK
+href="{@docRoot}guide/google/play/publishing/multiple-apks.html#ApiLevelOptions">Using Single APK
Instead</a> section of the multiple APK developer guide includes some useful information on how to
accomplish this with a single APK, including how to <a
-href="{@docRoot}guide/market/publishing/multiple-apks.html#TextureOptions">detect supported texture
+href="{@docRoot}guide/google/play/publishing/multiple-apks.html#TextureOptions">detect supported texture
formats at runtime</a>. Depending on your situation, it might be easier to bundle all formats with
your application, and simply pick which one to use at runtime.</p>
@@ -113,10 +113,10 @@ include library projects are beyond the scope of this lesson, you can get up to
their creation at the following links:</p>
<ul>
<li><a
-href="{@docRoot}guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject">Setting up
+href="{@docRoot}tools/projects/projects-eclipse.html#SettingUpLibraryProject">Setting up
a library project (Eclipse)</a></li>
<li><a
-href="{@docRoot}guide/developing/projects/projects-cmdline.html#SettingUpLibraryProject">Setting up
+href="{@docRoot}tools/projects/projects-cmdline.html#SettingUpLibraryProject">Setting up
a library project (Command line)</a></li>
</ul>
diff --git a/docs/html/training/multiscreen/index.jd b/docs/html/training/multiscreen/index.jd
index a986cef18804..23f6564160dd 100644
--- a/docs/html/training/multiscreen/index.jd
+++ b/docs/html/training/multiscreen/index.jd
@@ -15,12 +15,12 @@ next.link=screensizes.html
<ul>
<li>Android 1.6 or higher (2.1+ for the sample app)</li>
<li>Basic knowledge of <a
-href="http://developer.android.com/guide/topics/fundamentals/activities.html">Activities</a> and
-<a href="http://developer.android.com/guide/topics/fundamentals/fragments.html">Fragments</a></li>
+href="http://developer.android.com/guide/components/activities.html">Activities</a> and
+<a href="http://developer.android.com/guide/components/fragments.html">Fragments</a></li>
<li>Experience building an Android <a
href="http://developer.android.com/guide/topics/ui/index.html"> User Interface</a></li>
<li>Several features require the use of the <a
-href="{@docRoot}sdk/compatibility-library.html">support library</a></li>
+href="{@docRoot}tools/extras/support-library.html">support library</a></li>
</ul>
<h2>You should also read</h2>
@@ -59,7 +59,7 @@ optimizing for multiple screens. You can download the sample (to the right) and
of reusable code for your own application.</p>
<p class="note"><strong>Note:</strong> This class and the associated sample use the <a
-href="{@docRoot}sdk/compatibility-library.html">support library</a> in order to use the {@link
+href="{@docRoot}tools/extras/support-library.html">support library</a> in order to use the {@link
android.app.Fragment} APIs on versions lower than Android 3.0. You must download and add the
library to your application in order to use all APIs in this class.</p>
diff --git a/docs/html/training/multiscreen/screensizes.jd b/docs/html/training/multiscreen/screensizes.jd
index bf19b082d36e..a34c3d526042 100644
--- a/docs/html/training/multiscreen/screensizes.jd
+++ b/docs/html/training/multiscreen/screensizes.jd
@@ -348,7 +348,7 @@ you can start with a regular image (figure 4, shown with in 4x zoom for clarity)
<p class="img-caption"><strong>Figure 4.</strong> <code>button.png</code></p>
<p>And then run it through the <ode
-href="{@docRoot}guide/developing/tools/draw9patch.html"><code>draw9patch</code></a> utility of the
+href="{@docRoot}tools/help/draw9patch.html"><code>draw9patch</code></a> utility of the
SDK (which is located in the <code>tools/</code> directory), in which you can mark the areas that
should be stretched by drawing pixels along the left and top borders. You can also mark the area
that should hold the content by drawing pixels along the right and bottom borders, resulting in
diff --git a/docs/html/training/sharing/index.jd b/docs/html/training/sharing/index.jd
index 9ee5e29ac7f3..c2e8dbc83223 100644
--- a/docs/html/training/sharing/index.jd
+++ b/docs/html/training/sharing/index.jd
@@ -14,7 +14,7 @@ next.link=send.html
<h2>Dependencies and prerequisites</h2>
<ul>
<li>Android 1.0 or higher (greater requirements where noted)</li>
- <li>Experience with <a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and
+ <li>Experience with <a href="{@docRoot}guide/components/intents-filters.html">Intents and
Intent Filters</a></li>
</ul>
diff --git a/docs/html/training/sharing/receive.jd b/docs/html/training/sharing/receive.jd
index 9c932b107d44..7ec3defc9c4b 100644
--- a/docs/html/training/sharing/receive.jd
+++ b/docs/html/training/sharing/receive.jd
@@ -23,7 +23,7 @@ next.link=shareaction.html
<!-- other docs (NOT javadocs) -->
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Intents and
Intent Filters</a></li>
</ul>
@@ -48,7 +48,7 @@ the <a href="{@docRoot}training/sharing/send.html">Send Content to Other Apps Us
lesson, you create intent filters in order to be able to receive intents with this action. You
define an intent filter in your manifest, using the
<code><a
-href="{@docRoot}guide/topics/intents/intents-filters.html#ifs">&lt;intent-filter&gt;</a></code>
+href="{@docRoot}guide/components/intents-filters.html#ifs">&lt;intent-filter&gt;</a></code>
element. For example, if your application handles receiving text content, a single image of any
type, or multiple images of any type, your manifest would look like:</p>
@@ -73,7 +73,7 @@ type, or multiple images of any type, your manifest would look like:</p>
</pre>
<p class="note"><strong>Note:</strong> For more information on intent filters and intent resolution
-please read <a href="{@docRoot}guide/topics/intents/intents-filters.html#ifs">Intents and Intent
+please read <a href="{@docRoot}guide/components/intents-filters.html#ifs">Intents and Intent
Filters</a></p>
<p>When another application tries to share any of these things by constructing an intent and passing
diff --git a/docs/html/training/sharing/send.jd b/docs/html/training/sharing/send.jd
index afb0e3487a1f..741c01792232 100644
--- a/docs/html/training/sharing/send.jd
+++ b/docs/html/training/sharing/send.jd
@@ -22,7 +22,7 @@ next.link=receive.html
<!-- other docs (NOT javadocs) -->
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and
+ <li><a href="{@docRoot}guide/components/intents-filters.html">Intents and
Intent Filters</a></li>
</ul>
diff --git a/docs/html/resources/resources_toc.cs b/docs/html/training/training_toc.cs
index 9752d994b318..77a68371a885 100644
--- a/docs/html/resources/resources_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -1,19 +1,20 @@
-<ul>
- <li>
- <span class="heading">
- <span class="en">Basic Training</span>
- </span>
+<ul id="nav">
+
+
+ <li class="nav-section">
+ <div class="nav-section-header">
+ <a href="<?cs var:toroot ?>training/index.html">
+ <span class="en">Get Started</span>
+ </a>
+ </div>
+
<ul>
-
- <li><a href="<?cs var:toroot ?>training/index.html">
- <span class="en">Orientation</span>
+ <li class="nav-section">
+ <div class="nav-section-header">
+ <a href="<?cs var:toroot ?>training/basics/firstapp/index.html">
+ <span class="en">Building Your First App</span>
</a>
- </li>
-
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/basics/firstapp/index.html">
- <span class="en">Building Your First App<span class="new">&nbsp;new!</span></span>
- </a></div>
+ </div>
<ul>
<li><a href="<?cs var:toroot ?>training/basics/firstapp/creating-project.html">
<span class="en">Creating an Android Project</span>
@@ -34,9 +35,9 @@
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/index.html">
- <span class="en">Managing the Activity Lifecycle<span class="new">&nbsp;new!</span></span>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/index.html">
+ <span class="en">Managing the Activity Lifecycle</span>
</a></div>
<ul>
<li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/starting.html">
@@ -58,9 +59,9 @@
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/basics/supporting-devices/index.html">
- <span class="en">Supporting Different Devices<span class="new">&nbsp;new!</span></span>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/basics/supporting-devices/index.html">
+ <span class="en">Supporting Different Devices</span>
</a></div>
<ul>
<li><a href="<?cs var:toroot ?>training/basics/supporting-devices/languages.html">
@@ -78,9 +79,9 @@
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/basics/fragments/index.html">
- <span class="en">Building a Dynamic UI with Fragments<span class="new">&nbsp;new!</span></span>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/basics/fragments/index.html">
+ <span class="en">Building a Dynamic UI with Fragments</span>
</a></div>
<ul>
<li><a href="<?cs var:toroot ?>training/basics/fragments/support-lib.html">
@@ -102,9 +103,9 @@
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/basics/intents/index.html">
- <span class="en">Interacting with Other Apps<span class="new">&nbsp;new!</span></span>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/basics/intents/index.html">
+ <span class="en">Interacting with Other Apps</span>
</a></div>
<ul>
<li><a href="<?cs var:toroot ?>training/basics/intents/sending.html">
@@ -122,9 +123,20 @@
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/basics/location/index.html">
- <span class="en">Making Your App Location Aware<span class="new">&nbsp;new!</span></span>
+
+ </ul>
+ </li><!-- end basic training -->
+ <li class="nav-section">
+ <div class="nav-section-header">
+ <a href="<?cs var:toroot ?>training/advanced.html">
+ <span class="en">Advanced Training</span>
+ </a>
+ </div>
+ <ul>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/basics/location/index.html">
+ <span class="en">Making Your App Location Aware</span>
</a></div>
<ul>
<li><a href="<?cs var:toroot ?>training/basics/location/locationmanager.html">
@@ -141,39 +153,109 @@
</li>
</ul>
</li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/basics/network-ops/index.html">
+ <span class="en">Performing Network Operations</span>
+ </a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>training/basics/network-ops/connecting.html">
+ <span class="en">Connecting to the Network</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/basics/network-ops/managing.html">
+ <span class="en">Managing Network Usage</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/basics/network-ops/xml.html">
+ <span class="en">Parsing XML Data</span>
+ </a>
+ </li>
+ </ul>
+ </li>
- </ul>
- </li>
-
-
- <li>
- <span class="heading">
- <span class="en">Advanced Training</span>
- </span>
- <ul>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/efficient-downloads/index.html">
+ <span class="en">Transferring Data Without Draining the Battery</span>
+ </a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>training/efficient-downloads/efficient-network-access.html">
+ <span class="en">Optimizing Downloads for Efficient Network Access</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/efficient-downloads/regular_updates.html">
+ <span class="en">Minimizing the Effect of Regular Updates</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/efficient-downloads/redundant_redundant.html">
+ <span class="en">Redundant Downloads are Redundant</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/efficient-downloads/connectivity_patterns.html">
+ <span class="en">Modifying Patterns Based on the Connectivity Type</span>
+ </a>
+ </li>
+ </ul>
+ </li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/multiscreen/index.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/cloudsync/index.html">
+ <span class="en">Syncing to the Cloud</span>
+ </a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>training/cloudsync/aesync.html">
+ <span class="en">Syncing with App Engine</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/cloudsync/backupapi.html">
+ <span class="en">Using the Backup API</span>
+ </a>
+ </li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/multiscreen/index.html">
<span class="en">Designing for Multiple Screens</span>
+ <span class="es">Cómo diseñar aplicaciones para varias pantallas</span>
+ <span class="ja">複数画面のデザイン</span>
+ <span class="ko">Designing for Multiple Screens</span>
+ <span class="ru">Designing for Multiple Screens</span>
+ <span class="zh-CN">针对多种屏幕进行设计</span>
</a></div>
<ul>
<li><a href="<?cs var:toroot ?>training/multiscreen/screensizes.html">
<span class="en">Supporting Different Screen Sizes</span>
+ <span class="es">Cómo admitir varios tamaños de pantalla</span>
+ <span class="ja">さまざまな画面サイズのサポート</span>
+ <span class="ko">다양한 화면 크기 지원</span>
+ <span class="ru">Supporting Different Screen Sizes</span>
+ <span class="zh-CN">支持各种屏幕尺寸</span>
</a>
</li>
<li><a href="<?cs var:toroot ?>training/multiscreen/screendensities.html">
<span class="en">Supporting Different Screen Densities</span>
+ <span class="es">Cómo admitir varias densidades de pantalla</span>
+ <span class="ja">さまざまな画面密度のサポート</span>
+ <span class="ko">Supporting Different Screen Densities</span>
+ <span class="ru">Supporting Different Screen Densities</span>
+ <span class="zh-CN">支持各种屏幕密度</span>
</a>
</li>
<li><a href="<?cs var:toroot ?>training/multiscreen/adaptui.html">
<span class="en">Implementing Adaptive UI Flows</span>
+ <span class="es">Cómo implementar interfaces de usuario adaptables</span>
+ <span class="ja">順応性のある UI フローの実装</span>
+ <span class="ko">Implementing Adaptive UI Flows</span>
+ <span class="ru">Implementing Adaptive UI Flows</span>
+ <span class="zh-CN">实施自适应用户界面流程</span>
</a>
</li>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/improving-layouts/index.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/improving-layouts/index.html">
<span class="en">Improving Layout Performance</span>
</a></div>
<ul>
@@ -196,13 +278,13 @@
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/managing-audio/index.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/managing-audio/index.html">
<span class="en">Managing Audio Playback</span>
</a></div>
<ul>
<li><a href="<?cs var:toroot ?>training/managing-audio/volume-playback.html">
- <span class="en">Controlling Your App’s Volume and Playback</span>
+ <span class="en">Controlling Your App?s Volume and Playback</span>
</a>
</li>
<li><a href="<?cs var:toroot ?>training/managing-audio/audio-focus.html">
@@ -216,75 +298,82 @@
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/monitoring-device-state/index.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/monitoring-device-state/index.html">
<span class="en">Optimizing Battery Life</span>
+ <span class="es">Cómo optimizar la duración de la batería</span>
+ <span class="ja">電池消費量の最適化</span>
+ <span class="ko">Optimizing Battery Life</span>
+ <span class="ru">Optimizing Battery Life</span>
+ <span class="zh-CN">优化电池使用时间</span>
</a></div>
<ul>
<li><a href="<?cs var:toroot ?>training/monitoring-device-state/battery-monitoring.html">
<span class="en">Monitoring the Battery Level and Charging State</span>
+ <span class="es">Cómo controlar el nivel de batería y el estado de carga</span>
+ <span class="ja">電池残量と充電状態の監視</span>
+ <span class="ko">Monitoring the Battery Level and Charging State</span>
+ <span class="ru">Monitoring the Battery Level and Charging State</span>
+ <span class="zh-CN">监控电池电量和充电状态</span>
</a>
</li>
<li><a href="<?cs var:toroot ?>training/monitoring-device-state/docking-monitoring.html">
<span class="en">Determining and Monitoring the Docking State and Type</span>
+ <span class="es">Cómo determinar y controlar el tipo de conector y el estado de la conexión</span>
+ <span class="ja">ホルダーの装着状態とタイプの特定と監視</span>
+ <span class="ko">Determining and Monitoring the Docking State and Type</span>
+ <span class="ru">Determining and Monitoring the Docking State and Type</span>
+ <span class="zh-CN">确定和监控基座对接状态和类型</span>
</a>
</li>
<li><a href="<?cs var:toroot ?>training/monitoring-device-state/connectivity-monitoring.html">
<span class="en">Determining and Monitoring the Connectivity Status</span>
+ <span class="es">Cómo determinar y controlar el estado de la conectividad</span>
+ <span class="ja">接続状態の特定と監視</span>
+ <span class="ko">Determining and Monitoring the Connectivity Status</span>
+ <span class="ru">Determining and Monitoring the Connectivity Status</span>
+ <span class="zh-CN">确定和监控网络连接状态</span>
</a>
</li>
<li><a href="<?cs var:toroot ?>training/monitoring-device-state/manifest-receivers.html">
<span class="en">Manipulating Broadcast Receivers On Demand</span>
+ <span class="es">Cómo manipular los receptores de emisión bajo demanda</span>
+ <span class="ja">オンデマンドでのブロードキャスト レシーバ操作</span>
+ <span class="ko">Manipulating Broadcast Receivers On Demand</span>
+ <span class="ru">Manipulating Broadcast Receivers On Demand</span>
+ <span class="zh-CN">根据需要操作广播接收器</span>
</a>
</li>
</ul>
</li>
-
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/efficient-downloads/index.html">
- <span class="en">Transferring Data Without Draining the Battery<span
-class="new">&nbsp;new!</span></span>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/custom-views/index.html">
+ <span class="en">Creating Custom Views</span>
</a></div>
<ul>
- <li><a href="<?cs var:toroot ?>training/efficient-downloads/efficient-network-access.html">
- <span class="en">Optimizing Downloads for Efficient Network Access</span>
- </a>
- </li>
- <li><a href="<?cs var:toroot ?>training/efficient-downloads/regular_updates.html">
- <span class="en">Minimizing the Effect of Regular Updates</span>
- </a>
- </li>
- <li><a href="<?cs var:toroot ?>training/efficient-downloads/redundant_redundant.html">
- <span class="en">Redundant Downloads are Redundant</span>
+ <li><a href="<?cs var:toroot ?>training/custom-views/create-view.html">
+ <span class="en">Creating a Custom View Class</span>
</a>
</li>
- <li><a href="<?cs var:toroot ?>training/efficient-downloads/connectivity_patterns.html">
- <span class="en">Modifying Patterns Based on the Connectivity Type</span>
+ <li><a href="<?cs var:toroot ?>training/custom-views/custom-drawing.html">
+ <span class="en">Implementing Custom Drawing</span>
</a>
</li>
- </ul>
- </li>
-
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/cloudsync/index.html">
- <span class="en">Syncing to the Cloud<span class="new">&nbsp;new!</span></span>
- </a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>training/cloudsync/aesync.html">
- <span class="en">Syncing with App Engine</span>
+ <li><a href="<?cs var:toroot ?>training/custom-views/making-interactive.html">
+ <span class="en">Making the View Interactive</span>
</a>
</li>
- <li><a href="<?cs var:toroot ?>training/cloudsync/backupapi.html">
- <span class="en">Using the Backup API</span>
+ <li><a href="<?cs var:toroot ?>training/custom-views/optimizing-view.html">
+ <span class="en">Optimizing the View</span>
</a>
</li>
</ul>
</li>
-
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/search/index.html">
- <span class="en">Adding Search Functionality<span class="new">&nbsp;new!</span></span>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/search/index.html">
+ <span class="en">Adding Search Functionality</span>
</a>
</div>
<ul>
@@ -303,8 +392,8 @@ class="new">&nbsp;new!</span></span>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/id-auth/index.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/id-auth/index.html">
<span class="en">Remembering Users</span>
</a></div>
<ul>
@@ -323,8 +412,8 @@ class="new">&nbsp;new!</span></span>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/sharing/index.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/sharing/index.html">
<span class="en">Sharing Content</span>
</a></div>
<ul>
@@ -343,8 +432,8 @@ class="new">&nbsp;new!</span></span>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/camera/index.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/camera/index.html">
<span class="en">Capturing Photos</span>
</a></div>
<ul>
@@ -363,8 +452,8 @@ class="new">&nbsp;new!</span></span>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/multiple-apks/index.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/multiple-apks/index.html">
<span class="en">Maintaining Multiple APKs</span>
</a></div>
<ul>
@@ -387,9 +476,9 @@ class="new">&nbsp;new!</span></span>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/backward-compatible-ui/index.html">
- <span class="en">Creating Backward-Compatible UIs<span class="new">&nbsp;new!</span></span>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/backward-compatible-ui/index.html">
+ <span class="en">Creating Backward-Compatible UIs</span>
</a></div>
<ul>
<li><a href="<?cs var:toroot ?>training/backward-compatible-ui/abstracting.html">
@@ -411,8 +500,8 @@ class="new">&nbsp;new!</span></span>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/enterprise/index.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/enterprise/index.html">
<span class="en">Developing for Enterprise</span>
</a></div>
<ul>
@@ -423,8 +512,8 @@ class="new">&nbsp;new!</span></span>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/monetization/index.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/monetization/index.html">
<span class="en">Monetizing Your App</span>
</a></div>
<ul>
@@ -435,8 +524,8 @@ class="new">&nbsp;new!</span></span>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/design-navigation/index.html">
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/design-navigation/index.html">
<span class="en">Designing Effective Navigation</span>
</a></div>
<ul>
@@ -463,9 +552,9 @@ class="new">&nbsp;new!</span></span>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/implementing-navigation/index.html">
- <span class="en">Implementing Effective Navigation<span class="new">&nbsp;new!</span></span>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/implementing-navigation/index.html">
+ <span class="en">Implementing Effective Navigation</span>
</a></div>
<ul>
<li><a href="<?cs var:toroot ?>training/implementing-navigation/lateral.html">
@@ -487,9 +576,9 @@ class="new">&nbsp;new!</span></span>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/tv/index.html">
- <span class="en">Designing for TV<span class="new">&nbsp;new!</span></span>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/tv/index.html">
+ <span class="en">Designing for TV</span>
</a>
</div>
<ul>
@@ -508,9 +597,9 @@ class="new">&nbsp;new!</span></span>
</ul>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/displaying-bitmaps/index.html">
- <span class="en">Displaying Bitmaps Efficiently<span class="new">&nbsp;new!</span></span>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/displaying-bitmaps/index.html">
+ <span class="en">Displaying Bitmaps Efficiently</span>
</a>
</div>
<ul>
@@ -533,9 +622,9 @@ class="new">&nbsp;new!</span></span>
</li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>training/accessibility/index.html">
- <span class="en">Implementing Accessibility<span class="new">&nbsp;new!</span></span>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>training/accessibility/index.html">
+ <span class="en">Implementing Accessibility</span>
</a></div>
<ul>
<li><a href="<?cs var:toroot ?>training/accessibility/accessible-app.html">
@@ -549,135 +638,44 @@ class="new">&nbsp;new!</span></span>
</ul>
</li>
- </ul>
- </li>
-
-
-
- <li>
- <span class="heading">
- <span class="en">Technical Resources</span>
- </span>
- <ul>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>resources/browser.html?tag=sample">
- <span class="en">Sample Code</span>
- <span class="de" style="display:none">Beispielcode</span>
- <span class="es" style="display:none">Código de ejemplo</span>
- <span class="fr" style="display:none">Exemple de code</span>
- <span class="it" style="display:none">Codice di esempio</span>
- <span class="ja" style="display:none">サンプル コード</span>
- <span class="zh-CN" style="display:none"></span>
- <span class="zh-TW" style="display:none"></span>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot
+?>training/graphics/opengl/index.html">
+ <span class="en">Displaying Graphics with OpenGL ES</span>
</a></div>
- <ul id="devdoc-nav-sample-list">
- <li><a href="<?cs var:toroot ?>resources/samples/get.html">
- <span class="en">Getting the Samples</span>
- </a></li>
- </ul>
- </li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>resources/browser.html?tag=article">
- <span class="en">Articles</span>
- </a></div>
- <ul id="devdoc-nav-article-list">
- </ul>
- </li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>resources/browser.html?tag=tutorial">
- <span class="en">Tutorials</span>
- <span class="de" style="display:none">Lernprogramme</span>
- <span class="es" style="display:none">Tutoriales</span>
- <span class="fr" style="display:none">Didacticiels</span>
- <span class="it" style="display:none">Esercitazioni</span>
- <span class="ja" style="display:none">チュートリアル</span>
- <span class="zh-CN" style="display:none"></span>
- <span class="zh-TW" style="display:none"></span>
- </a></div>
- <ul id="devdoc-nav-tutorial-list">
- </ul>
- </li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>resources/topics.html">
- <span class="en">Topics</span>
- </a></div>
- <ul id="devdoc-nav-topic-list">
+ <ul>
+ <li><a href="<?cs var:toroot ?>training/graphics/opengl/environment.html">
+ <span class="en">Building an OpenGL ES Environment</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/graphics/opengl/shapes.html">
+ <span class="en">Defining Shapes</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/graphics/opengl/draw.html">
+ <span class="en">Drawing Shapes</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/graphics/opengl/projection.html">
+ <span class="en">Applying Projection and Camera Views</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/graphics/opengl/motion.html">
+ <span class="en">Adding Motion</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/graphics/opengl/touch.html">
+ <span class="en">Responding to Touch Events</span>
+ </a>
+ </li>
</ul>
</li>
- </ul>
- </li>
- <li>
- <span class="heading">
- <span class="en">Community</span>
- <span style="display:none" class="de"></span>
- <span style="display:none" class="es">Comunidad</span>
- <span style="display:none" class="fr">Communauté</span>
- <span style="display:none" class="it"></span>
- <span style="display:none" class="ja">コミュニティ</span>
- <span style="display:none" class="zh-CN">社区</span>
- <span style="display:none" class="zh-TW">社群</span>
- </span>
- <ul>
- <li><a href="<?cs var:toroot ?>resources/community-groups.html">
- <span class="en">Developer Forums</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/community-more.html">
- <span class="en">IRC, G+, Twitter</span>
- </a></li>
- </ul>
- </li>
-<?cs
- if:android.whichdoc == "online" ?>
- <li>
- <span class="heading">
- <span class="en">Device Dashboard</span>
- </span>
- <ul>
- <li><a href="<?cs var:toroot ?>resources/dashboard/platform-versions.html">
- <span class="en">Platform Versions</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/dashboard/screens.html">
- <span class="en">Screen Sizes &amp; Densities</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/dashboard/opengl.html">
- <span class="en">OpenGL ES Versions</span>
- </a></li>
- </ul>
- </li><?cs
- /if
-?>
- <li>
- <span class="heading">
- <span class="en">More</span>
- </span>
- <ul>
- <li><a href="<?cs var:toroot ?>resources/faq/commontasks.html">
- <span class="en">Common Tasks </span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/faq/troubleshooting.html">
- <span class="en">Troubleshooting Tips</span>
- </a></li>
- <li class="toggle-list">
- <div><a href="<?cs var:toroot ?>resources/faq/index.html">
- <span class="en">FAQs</span>
- </a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>resources/faq/framework.html">
- <span class="en">App Framework FAQ</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/faq/licensingandoss.html">
- <span class="en">Licensing FAQ</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/faq/security.html">
- <span class="en">Security FAQ</span>
- </a></li>
- </ul>
- </li>
+
</ul>
</li>
-</ul>
+</ul><!-- nav -->
<script type="text/javascript">
<!--
diff --git a/docs/html/training/tv/optimizing-layouts-tv.jd b/docs/html/training/tv/optimizing-layouts-tv.jd
index 49c278c47213..a6db05212fd1 100644
--- a/docs/html/training/tv/optimizing-layouts-tv.jd
+++ b/docs/html/training/tv/optimizing-layouts-tv.jd
@@ -50,7 +50,7 @@ TV screens are always in landscape orientation. Follow these tips to build lands
<ul>
<li>Put on-screen navigational controls on the left or right side of the screen and save the
vertical space for content.</li>
- <li>Create UIs that are divided into sections, by using <a href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a>
+ <li>Create UIs that are divided into sections, by using <a href="{@docRoot}guide/components/fragments.html">Fragments</a>
and use view groups like {@link android.widget.GridView} instead
of {@link android.widget.ListView} to make better use of the
horizontal screen space.</li>
@@ -157,7 +157,7 @@ UI quality).
</p>
<p>
-To get the best scaling results for images, provide them as <a href="{@docRoot}guide/developing/tools/draw9patch.html">
+To get the best scaling results for images, provide them as <a href="{@docRoot}tools/help/draw9patch.html">
9-patch image</a> elements if possible.
If you provide low quality or small images in your layouts, they will appear pixelated, fuzzy, or grainy. This
is not a good experience for the user. Instead, use high-quality images.
diff --git a/docs/html/videos/index.jd b/docs/html/videos/index.jd
deleted file mode 100644
index 7f5df784a6a9..000000000000
--- a/docs/html/videos/index.jd
+++ /dev/null
@@ -1,355 +0,0 @@
-videos=true
-page.title=Videos
-@jd:body
-
-<script src="http://swfobject.googlecode.com/svn/trunk/swfobject/swfobject.js" type="text/javascript"></script>
-<script src="{@docRoot}assets/jquery-history.js" type="text/javascript"></script>
-<script type="text/javascript">
-// for debugging in FF, so other browsers ignore the console commands.
-var console;
-if (!console) console = { 'log': function() {} };
-
-/* This 'playlist' object defines the playlist IDs for each tab.
- * Each name inside 'playlist' corresponds to class names for the tab that the playlists belong to (eg: "googleioTab" and "googleioBox" divs).
- * Each string in 'ids' is the ID of a YouTube playlist that belongs in the corresponding tab.
- */
-var playlists = {
- 'googleio' : {
- 'ids': ["734A052F802C96B9"]
- },
- 'about' : {
- 'ids': ["D7C64411AF40DEA5","611F8C5DBF49CEC6"]
- },
- 'developertips' : {
- 'ids': ["43E15866EF0033A2"]
- },
- 'developersandbox' : {
- 'ids': ["77426907BBAD558E"]
- }
-};
-
-/* Some playlists include the title in the description meta-data, so we need to account for this when building the thumbnail lists, so we don't show the title twice
- * This string is read via indexOf(), so multiple IDs need only be comma-separated in this string.
- */
-var playlistsWithTitleInDescription = "734A052F802C96B9";
-
-/* This 'featured' object defines the Feature Videos list.
- * Each playlist ID is paired with a custom video description.
- */
-var featured = {
-// Android Development Tools
- 'Oq05KqjXTvs' : "The team behind the Android Development Tools demonstrate several powerful features for app development, including new capabilities in the Eclipse layout editor.",
-// Android UIs for phones and tablets
- 'WGIU2JX1U5Y' : "This talk from the Android UI team explains several design patterns that the team recommends you use when designing your application for screens of all sizes.",
-// Android Protips
- 'twmuBbC_oB8' : "In this talk, you'll learn how to create a well polished app that abides by several key virtues, using advanced development techniques and some lesser known APIs."
-};
-
-/* When an event on the browser history occurs (back, forward, load),
- * load the video found in the URL hash
- */
-$(window).history(function(e, hash) {
- if (location.href.indexOf("#v=") != -1) {
- videoId = location.href.split("#v=");
- clickVideo(videoId[1]); // click the link with a matching class
- }
-});
-
-/* Load a video into the player box.
- * @param id The YouTube video ID
- * @param title The video title to display in the player box (character escaped)
- * @param autoplay Whether to automatically play the video
- */
-function loadVideo(id, title, autoplay) {
- if($("." + id).hasClass("noplay")) {
- //console.log("noplay");
- autoplay = false;
- $("." + id).removeClass("noplay");
- }
- swfobject.embedSWF('http://www.youtube.com/v/' + id + '&rel=1&border=0&fs=1&autoplay=' +
- (autoplay?1:0), 'player', '500', '334', '9.0.0', false, false, {allowfullscreen: 'true'});
- $("#videoPlayerTitle").html("<h2>" + unescape(title) + "</h2>");
-
- $.history.add('v=' + id); // add the current video to the browser history
- document.getElementById("doc-content").scrollTop = 0; // scroll the window to the top
-}
-
-/* Draw all videos from a playlist into a 'videoPreviews' list
- * @param data The feed data returned from the youtube request
- */
-function renderPlaylist(data) {
- var MAX_DESC_LENGTH = 390; // the length at which we will trim the description
- var feed = data.feed;
- var entries = feed.entry || [];
- var playlistId = feed.yt$playlistId.$t;
-
- var ul = $('<ul class="videoPreviews" />');
-
- // Loop through each entry (each video) and add it to the 'videoPreviews' list
- for (var i = 0; i < entries.length; i++) {
- var entry = entries[i];
-
- var title = entry.title.$t;
- var id = entry.media$group.yt$videoid.$t;
- var thumbUrl = entry.media$group.media$thumbnail[0].url;
- var fullDescription = entry.media$group.media$description.$t;
- var playerUrl = entry.media$group.media$content[0].url;
-
- // Check whether this playlist includes the video title inside the description meta-data, so we can remove it
- if (playlistsWithTitleInDescription.indexOf(playlistId) != -1) {
- var lines = fullDescription.split("\n");
- // If the first line includes the first 17 chars from the title, let's use the title from the description instead (because it's a more complete title)
- // This accounts for, literally, "Google I/O 2009 -", which is (so far) the min AND max for properly identifying a title in the only playlist with titles in the description
- if (lines[0].indexOf(title.slice(0,16)) != -1) {
- h3Title = "<h3>" + lines[0] + "</h3>";
- if (lines[2].length < 30) lines = lines.slice(3); // also, if the second line is very short (the speaker name), slice it out too
- else lines = lines.slice(1); // otherwise, slice after the first line
- }
- fullDescription = lines.join("");
- }
-
- var shortDescription = fullDescription.substr(0, MAX_DESC_LENGTH);
- shortDescription += shortDescription.length == MAX_DESC_LENGTH ? "..." : ""; // add ellipsis if we've chopped the description
-
- var img = $('<img src="' + thumbUrl + '" width="120" height="90"/>');
- var a = $('<a class="' + id + '" href="#" onclick="loadVideo(\'' + id + '\',\'' + escape(title) + '\',true); return setSelected(this);" />');
- var pShortDescription = $('<p class="short">' + shortDescription + '</p>');
- var pFullDescription = $('<p class="full">' + fullDescription + '</p>');
- var h3Title = "<h3>" + title + "</h3>";
- var pToggle = "<p class='toggle'><a href='#' onclick='return toggleDescription(this)'><span class='more'>more</span><span class='less'>less</span></a></p>";
- var li = $('<li/>');
-
- li.append(a);
- a.append(img).append(h3Title).append(pShortDescription);
-
- // Add the full description and "more/less" toggle, if necessary
- if (fullDescription.length > MAX_DESC_LENGTH) {
- a.append(pFullDescription);
- li.append(pToggle);
- }
-
- ul.append(li);
- }
-
- // Now add the 'videoPreviews' list to the page, and be sure we put it in the right tab
- // This is the part that allows us to put multiple playlists in one tab
- for (var x in playlists) {
- var ids = playlists[x].ids;
- for (var i in ids) {
- if (ids[i] == playlistId) {
- $("#"+x+"Box").append(ul);
- break;
- }
- }
- }
-}
-
-/* Draw a featured video into the existing 'videoPreviews' list
- * @param data The video data returned from the youtube request
- */
-function renderFeatured(data) {
- var MAX_TITLE_LENGTH = 48;
- var entry = data.entry || [];
- var id = entry.media$group.yt$videoid.$t;
- var description = featured[id];
- var title = entry.title.$t;
- var thumbUrl = entry.media$group.media$thumbnail[0].url;
- var playerUrl = entry.media$group.media$content[0].url;
-
- var ellipsis = title.length > MAX_TITLE_LENGTH ? "..." : "";
-
- var h3Title = "<h3>"+ title.substr(0,MAX_TITLE_LENGTH) + ellipsis + "</h3>";
- var img = $('<img src="' + thumbUrl + '" width="120" height="90"/>');
- var p = $('<p>' + description + '</p>');
- var a = $('<a class="' + id + '" href="#" onclick="loadVideo(\'' + id + '\',\'' + title + '\',true); return setSelected(this);" />');
- var li = $("<li/>");
-
- a.append(h3Title).append(img).append(p);
- li.append(a);
-
- $("#mainBodyRight .videoPreviews").append(li);
-}
-
-/* Request the playlist feeds from YouTube */
-function showPlaylists() {
- for (var x in playlists) {
- var ids = playlists[x].ids;
- for (var i in ids) {
- var script = "<script type='text/javascript' src='http://gdata.youtube.com/feeds/api/playlists/"
- + ids[i] +
- "?v=2&alt=json-in-script&max-results=50&callback=renderPlaylist'><\/script>";
- $("body").append(script);
- }
- }
-}
-
-/* Request the featured videos from YouTube */
-function showFeatured() {
- for (var id in featured) {
- var script = "<script type='text/javascript' src='http://gdata.youtube.com/feeds/api/videos/"
- + id +
- "?v=2&alt=json-in-script&callback=renderFeatured'><\/script>";
- $("body").append(script);
- }
-}
-
-/* Reveal a tab (playlist) box
- * @param name The name of the tab
- */
-function showBox(name) {
- $("#"+name+"Box").addClass("selected").siblings().removeClass("selected");
- $("#"+name+"Tab").addClass("selected").siblings().removeClass("selected");
- return false;
-}
-
-/* Highlight a video thumbnail, including all duplicates that there may be
- * @param link The link <a> object that was clicked
- */
-function setSelected(link) {
- var videoId = $(link).attr("class");
- if (videoId.indexOf("selected") != -1) { // this means this video is already selected and playing, so bail out
- return false;
- }
- $(".videoPreviews .selected").removeClass("selected");
- $("a." + videoId).addClass("selected").each( function (i) {
- if ($(this).is(":hidden")) {
- var boxName = $(this).parent().parent().parent().attr("id").split("Box");
- $("#"+boxName[0]+"Tab a").click();
- }
- });
- return false;
-}
-
-/* Reveal and hide the long/short descriptions for a video in the playlist
- * @param link The link <a> object that was clicked
- */
-function toggleDescription(link) {
- var aToggle = $(link);
- $("span", aToggle).toggle();
- var aDescription = $(">a", aToggle.parent().parent());
- $("p.short", aDescription).toggle();
- $("p.full", aDescription).toggle();
- if ($("span.less", aToggle).is(":visible")) {
- aDescription.css("height", "auto");
- } else {
- aDescription.css("height", "90px");
- }
- return false;
-}
-
-/* Add actions to the page onload event so that we load a video right away */
-addLoadEvent(function () {
- // if there's a video url in the hash, click that video
- if (location.href.indexOf("#v=") != -1) {
- var videoId = location.href.split("#v=");
- clickVideo(videoId[1]);
- } else { // otherwise, click the default video
- clickDefaultVideo();
- }
-});
-
-
-var clickVideoAttempts = 0; // Used with clickVideo()
-
-/* Click a video in order to load it and select it
- * @param videoId The ID of the video to click
- */
-function clickVideo(videoId) {
- if (!isAlphaNumeric(videoId)) {
- clickDefaultVideo();
- return;
- }
-
- if ($("." + videoId).length != 0) { // if we find the video, click it and return
- $("." + videoId).addClass("noplay"); // add class to indicate we should NOT autoplay (class removed by loadVideo)
- $("." + videoId + ":first").click();
- return;
- } else { // if we don't find it, increment clickVideoAttempts
- console.log("video NOT found: " + videoId);
- clickVideoAttempts++;
- }
-
- // if we don't find it after 20 attempts (2 seconds), click the first feature video
- if (clickVideoAttempts > 10) {
- console.log("video never found, clicking default...");
- clickVideoAttempts = 0;
- clickDefaultVideo();
- } else { // try again after 100 milliseconds
- setTimeout('clickVideo("' + videoId + '")', 100);
- }
-}
-
-/* returns true if the provided text is alphanumeric, false otherwise
- TODO: move this to the dev site js library */
-function isAlphaNumeric(text){
- var regex=/^[0-9A-Za-z]+$/; //^[a-zA-z]+$/
- if(regex.test(text)){
- return true;
- } else {
- console.log("Bogus video ID");
- return false;
- }
-}
-
-/* Click the default video that should be loaded on page load (the first video in the featured list) */
-function clickDefaultVideo() {
- if ($("#mainBodyRight .videoPreviews a:first").length != 0) {
- var videoId = $("#mainBodyRight .videoPreviews a:first").attr("class");
- $("." + videoId).addClass("noplay"); // add class to indicate we should NOT autoplay (class removed by loadVideo)
- $("." + videoId + ":first").click();
- return;
- } else { // if we don't find it, increment clickVideoAttempts
- console.log("default video NOT found");
- clickVideoAttempts++;
- }
-
- // if we don't find it after 50 attempts (5 seconds), just fail
- if (clickVideoAttempts > 50) {
- console.log("default video never found...");
- } else { // try again after 100 milliseconds
- setTimeout('clickDefaultVideo()', 100);
- }
-}
-</script>
-
- <div id="mainBodyFixed">
-
- <div id="mainBodyLeft" class="videoPlayer" >
- <div id="videoPlayerBox">
- <div id="videoBorder">
- <div id="videoPlayerTitle"></div>
- <div id="objectWrapper">
- <object id="player"></object>
- </div>
- </div>
- </div>
- </div><!-- end mainBodyLeft -->
-
- <div id="mainBodyRight" class="videoPlayer">
- <h2>Featured Videos</h2>
- <ul class="videoPreviews"></ul>
- </div><!-- end mainBodyRight -->
-
- <ul id="videoTabs">
- <li id="aboutTab" class="selected"><a onclick="return showBox('about');" href="#">About the Platform</a></li>
- <li id="developertipsTab"><a onclick="return showBox('developertips');" href="#">Developer Tips</a></li>
- <li id="googleioTab"><a onclick="return showBox('googleio');" href="#">Google I/O Sessions</a></li>
- <li id="developersandboxTab"><a onclick="return showBox('developersandbox');" href="#">Developer Sandbox</a></li>
- </ul>
-
- <div id="videos">
- <div id="aboutBox" class="selected"></div>
- <div id="developertipsBox"></div>
- <div id="googleioBox"></div>
- <div id="developersandboxBox"></div>
- </div>
-
- </div><!-- end mainBodyFixed -->
-
-<script type="text/javascript">
-// Initialization actions
-showFeatured(); // load featured videos
-showPlaylists(); // load playlists
-</script>
-
-