0.7.1 |
Required for users of the Android 0.9 SDK beta. 18 Aug 2008 |
diff --git a/docs/html/sdk/android-2.0.jd b/docs/html/sdk/android-2.0.jd
index 57283e5..9dadf8b 100644
--- a/docs/html/sdk/android-2.0.jd
+++ b/docs/html/sdk/android-2.0.jd
@@ -205,6 +205,7 @@ element in your application's manifest.
For more information about how to use API Level, see the API Levels document.
+
API changes summary
Bluetooth
@@ -263,6 +264,62 @@ href="{@docRoot}guide/appendix/api-levels.html">API Levels document.
New Intent APIs that broadcast the docking state of the device and allow applications to launch special activities when the device is placed in a desktop or car dock.
+Key events executed on key-up
+
+Android 2.0 is designed to run on devices that use virtual keys for HOME,
+MENU, BACK, and SEARCH, rather than physical keys. To support the best user
+experience on those devices, the Android platform now executes these buttons at
+key-up, for a key-down/key-up pair, rather than key-down. This helps prevent
+accidental button events and lets the user press the button area and then drag
+out of it without generating an event.
+
+This change in behavior should only affect your application if it is
+intercepting button events and taking an action on key-down, rather than on
+key-up. Especially if your application is intercepting the BACK key, you should
+make sure that your application is handling the key events properly.
+
+In general, intercepting the BACK key in an application is not recommended,
+however, if your application is doing so and it invokes some action on
+key-down, rather than key-up, you should modify your code.
+
+If your application will use APIs introduced in Android 2.0 (API Level 5),
+you can take advantage of new APIs for managing key-event pairs:
+
+
+- If you are intercepting the BACK key in an activity or dialog, just
+implement the new {@link android.app.Activity#onBackPressed()} method.
+- If you are intercepting the BACK key in a view, you should track the key
+event on key-down (through the new {@link android.view.KeyEvent#startTracking}
+method), then invoke the action at key up. Here's a pattern you can use:
+
+
public boolean onKeyDown(int keyCode, KeyEvent event) {
+ if (keyCode == KeyEvent.KEYCODE_BACK
+ && event.getRepeatCount() == 0) {
+ event.startTracking();
+ return true;
+ }
+ return super.onKeyDown(keyCode, event);
+ }
+
+ public boolean onKeyUp(int keyCode, KeyEvent event) {
+ if (keyCode == KeyEvent.KEYCODE_BACK && event.isTracking()
+ && !event.isCanceled()) {
+ // *** DO ACTION HERE ***
+ return true;
+ }
+ return super.onKeyUp(keyCode, event);
+ }
+
+
+
+If you want to update a legacy application so that its handling of the BACK
+key works properly for both Android 2.0 and older platform versions, you
+can use an approach similar to that shown above. Your code can catch the
+target button event on key-down, set a flag to track the key event, and
+then also catch the event on key-up, executing the desired action if the tracking
+flag is set. You'll also want to watch for focus changes and clear the tracking
+flag when gaining/losing focus.
+
API differences report
For a detailed view of API changes in Android {@sdkPlatformVersion} (API Level {@sdkPlatformApiLevel}), as compared to
diff --git a/docs/html/sdk/eclipse-adt.jd b/docs/html/sdk/eclipse-adt.jd
index 84d37e0..7d9efdb 100644
--- a/docs/html/sdk/eclipse-adt.jd
+++ b/docs/html/sdk/eclipse-adt.jd
@@ -1,4 +1,4 @@
-page.title=Installing and Updating the ADT Plugin
+page.title=Installing and Updating ADT
sdk.preview=0
@jd:body
@@ -23,21 +23,23 @@ sdk.preview=0
Android offers a custom plugin for the Eclipse IDE, called Android
Development Tools (ADT), that is designed to give you a powerful,
-integrated environment in which to build Android applications. It
-extends the capabilites of Eclipse to let you quickly set up new Android
+integrated environment in which to build Android applications.
+
+ADT extends the capabilites of Eclipse to let you quickly set up new Android
projects, create an application UI, add components based on the Android
-Framework API, debug your applications using the Android SDK tools, and even export
-signed (or unsigned) APKs in order to distribute your application.
+Framework API, debug your applications using the Android SDK tools, and even
+export signed (or unsigned) APKs in order to distribute your application.
In general, using Eclipse with ADT is a highly recommended approach to
-Android development and is the fastest way to get started.
-
-
To install and update the ADT Plugin, you can take advantage of the Eclipse
-remote update feature. By setting up a remote update site, you can
-easily download, install, and check for ADT updates. Alternatively, you
-can download the latest ADT to your development
-computer as a local site archive. The sections below provide nstructions
-for both methods.
+Android development and is the fastest way to get started. If you use Eclipse,
+the ADT plugin gives you an incredible boost in developing Android
+applications.
+
+To install and update the ADT Plugin, you can take advantage of the Eclipse
+remote update feature. By setting up a remote update site, you can easily
+download, install, and check for ADT updates. Alternatively, you can download
+the latest ADT to your development computer as a local site archive. The
+sections below provide instructions for both methods.
Prepare for Installation
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index 8b918e4..f467492 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -3,70 +3,87 @@ sdk.redirect=0
sdk.version=2.0
sdk.date=October 2009
-sdk.win_download=android-sdk-windows_r1.zip
-sdk.win_bytes=
-sdk.win_checksum=
+sdk.win_download=android-sdk_r3-windows.zip
+sdk.win_bytes=23070805
+sdk.win_checksum=bd7b57d5df37bd55ea101e76b24260a8
-sdk.mac_download=android-sdk-mac_x86_r1.zip
-sdk.mac_bytes=
-sdk.mac_checksum=
+sdk.mac_download=android-sdk_r3-mac.zip
+sdk.mac_bytes=19653431
+sdk.mac_checksum=f6674bf45e5e36811eea7e584f0c1d67
-sdk.linux_download=android-sdk-linux_x86_r1.tgz
-sdk.linux_bytes=
-sdk.linux_checksum=
+sdk.linux_download=android-sdk_r3-linux.tgz
+sdk.linux_bytes=15986291
+sdk.linux_checksum=3e1534e7fc15d154ff81616f0dc1545c
@jd:body
-For important information about this SDK release, please review the
-Release Notes.
-
-
The Android SDK has changed! If you've worked with the Android SDK before, you will notice several important differences:
+
Quick Start
-
-- The SDK downloadable package includes only the latest version of the Android SDK Tools.
-- 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.
-- The new approach is modular — you can install only the components you need and update any or all components without affecting your development environment.
-- 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.
-
-
-
If you are currently using the Android 1.6 SDK, you do not need to install the new SDK, since your existing SDK incudes the Android SDK and AVD Manager tool. To develop against Android 2.0, for example, you could just download the updated SDK Tools (Revision 3) and the Android 2.0 platform into your existing SDK.
-
-
-Quick Start
-
-The steps below provide an overview of how to get started with the Android SDK. For detailed instructions, start with the Installing guide.
+The steps below provide an overview of how to get started with the Android
+SDK. For detailed instructions, start with the Installing guide.
0. Prepare your development computer
-Read the System Requirements document and make sure that your development computer meets the hardware and software requirements for the Android SDK. Install any additional software needed before downloading the Android SDK. In particular, if you plan to develop Android applications in the Eclipse IDE using the ADT Plugin (see below), make sure that you have the correct version of Eclipse installed.
+
Read the System Requirements
+document and make sure that your development computer meets the hardware and
+software requirements for the Android SDK. Install any additional software
+needed before downloading the Android SDK. In particular, if you plan to develop
+Android applications in the Eclipse IDE using the ADT Plugin (see below), make
+sure that you have the correct version of Eclipse installed.
1. Download and install the SDK starter package
-Select a starter package from the table at the top of this page and download it to your development computer. To install the SDK, simply unpack the starter package to a safe location and then add the location to your PATH.
+Select a starter package from the table at the top of this page and download
+it to your development computer. To install the SDK, simply unpack the starter
+package to a safe location and then add the location to your PATH.
2. Install the ADT Plugin for Eclipse
-If you are developing in Eclipse, set up a remote update site and install the Android Development Tools (ADT) plugin.
-
-For detailed instructions, see Installing and Updating ADT.
+If you are developing in Eclipse, set up a remote update site and install the
+Android Development Tools (ADT) plugin. For detailed instructions, see Installing and Updating ADT.
3. Add Android platforms to your SDK
-Use the Android SDK and AVD Manager, included in the SDK starter package, to add one or more Android platforms (for example, Android 1.6 or Android 2.0) to your SDK. In most cases, you will want to download multiple platforms, so that you can build your application on the lowest version you want to support, but test against higher versions that you intend the application to run on. Information about each platform is available at left, under "Downloadable SDK Components."
-
-For more information about how to add platforms and other SDK components, see Adding SDK Components.
+Use the Android SDK and AVD Manager, included in the SDK starter package, to
+add one or more Android platforms (for example, Android 1.6 or Android 2.0) to
+your SDK. In most cases, you will want to download multiple platforms, so that
+you can build your application on the lowest version you want to support, but
+test against higher versions that you intend the application to run on.
+Information about each platform is available at left, under "Downloadable SDK
+Components."
+
+To launch the Android SDK and AVD Manager on Windows, execute SDK
+Setup.exe
, at the root of the SDK directory. On Mac OS X or Linux,
+execute the android
tool in the <sdk>/tools/
+folder. For more information about how to add platforms and other components,
+see Adding SDK Components.
+
4. Get the latest documentation
-If you develop while offline, use the Android SDK and AVD Manager to download the latest documentation package. The documentation covers all versions of the API and lets you filter out those versions that your application won't support. Once installed, the documentation is also available to you directly from the Eclipse IDE.
+If you develop while offline, use the Android SDK and AVD Manager to download
+the latest documentation package. The documentation covers all versions of the
+API and lets you filter out those versions that your application won't support.
+Once installed, the documentation is also available to you directly from the
+Eclipse IDE.
5. Download other SDK components
-You can use the Android SDK and AVD Manager to download other SDK components, such as the SDK add-ons. An SDK add-on provides a development environment for an Android external library or a customized Android system image. For example, the Google APIs Add-On lets you develop an application that takes advantage of the Google Maps external library.
+You can use the Android SDK and AVD Manager to download other SDK components,
+such as the SDK add-ons. An SDK add-on provides a development environment for an
+Android external library or a customized Android system image. For example, the
+Google APIs Add-On lets you develop an application that takes advantage of the
+Google Maps external library.
6. Get started with an application project
-Once you've set up your SDK, the next step is to start a new application project or move existing applications into the new SDK.
+Once you've set up your SDK, the next step is to start a new application
+project or move existing applications into the new SDK.
-If you are new to Android, you can use the Hello World tutorial to get started quickly. Welcome!
\ No newline at end of file
+If you are new to Android, you can use the Hello World tutorial to
+get started quickly. Next
+Steps offers other suggestions of how to begin. Welcome!
diff --git a/docs/html/sdk/installing.jd b/docs/html/sdk/installing.jd
index 3a44cda..66c6bdc 100644
--- a/docs/html/sdk/installing.jd
+++ b/docs/html/sdk/installing.jd
@@ -36,10 +36,10 @@ this page.
Updating?
If you are currently using the Android 1.6 SDK, you do not necessarily need
-to install the new SDK, since your existing SDK incudes the Android SDK and AVD
-Manager tool. To develop against the new Android 2.0 platform, for example, you
-could just download the updated SDK Tools (Revision 3) and the Android 2.0
-platform into your existing SDK.
+to install the new SDK, since your existing SDK already includes the Android SDK
+and AVD Manager tool. To develop against the new Android 2.0 platform, for
+example, you could just download the updated SDK Tools (Revision 3) and the
+Android 2.0 platform into your existing SDK.
If you are using Android 1.5 SDK or older, you should install the new SDK as
described in this document and move your application projects to the new
@@ -125,14 +125,34 @@ information about how to install ADT, see
install Eclipse or ADT, instead, you can directly use the SDK tools to build and
debug your application.
+
Add Android Platforms and Other Components
-Once you've downloaded and installed the SDK, you need to install SDK
-components in it. The SDK starter package includes a tool called Android SDK and
-AVD Manager that helps you see what SDK components are available and then install
-them into your SDK environment. The Adding SDK Components document
-provides step-by-step instructions.
+
+
+
The Android SDK and AVD Manager tool is pre-installed in
+your SDK. Using the tool is a key part of performing the initial setup of your
+SDK, as well as keeping it up-to-date with the latest platforms, tools, and
+other components.
+
+
For full instructions on how to use the tool, see
+Adding SDK
+Components.
+
+
+
+The Android SDK uses a modular structure that separates the major parts of
+the SDK — platforms, add-ons, tools, and the API documentation —
+into a set of separately installable components. The SDK components are
+available to you for individual download, as needed, from the Android SDK
+repository site.
+
+The Android SDK starter package includes only a single component: the latest
+version of the SDK Tools. Included in that component is a tool called Android
+SDK and AVD Manager that you can use to download other components from the SDK
+repository site. The tool provides a graphical UI that lets you browse the
+repository, select new or updated components for download, and then install them
+in your SDK.
There are several types of SDK components available:
@@ -163,17 +183,22 @@ multiversion documentation for the Android framework API.
-To develop any application, even if you are following the To develop any Android application, even if you are following the Hello World tutorial, you
must download at least one Android platform into your SDK.
-Typically, you will want to download multiple platforms, including the version
-that you want to develop against and all other higher platforms. By downloading
-multiple platforms, you can test the forward-compatibility of your application
-by running it on different platforms in the Android emulator.
-
-For more information about adding components and additional repository sites,
-see the Adding SDK Components.
-
+Typically, you will want to download multiple platforms, so that you can build
+your application on the lowest version you want to support, but test against
+higher versions that you intend the application to run on. You can test your
+applications on different platforms by running in an
+Android Virtual Device (AVD) on the Android emulator.
+
+For step-by-step instructions on how to use the Android SDK and AVD Manager
+to add components, see the Adding
+SDK Components document.
+
+For release notes and other detailed information about individual SDK
+components, see the documents listed under "Downloadable SDK Components" in
+the navigation at left.
Explore the SDK
diff --git a/docs/html/sdk/sdk_toc.cs b/docs/html/sdk/sdk_toc.cs
index 8b55aad..900b067 100644
--- a/docs/html/sdk/sdk_toc.cs
+++ b/docs/html/sdk/sdk_toc.cs
@@ -101,7 +101,10 @@
- ADT Notes
+
+
diff --git a/docs/html/sdk/tools-notes.jd b/docs/html/sdk/tools-notes.jd
index abb9c96..b8337b0 100644
--- a/docs/html/sdk/tools-notes.jd
+++ b/docs/html/sdk/tools-notes.jd
@@ -5,16 +5,17 @@ page.title=SDK Tools Notes
includes the complete set of development and debugging tools for the Android
SDK.
-To install SDK Tools in your SDK environment (and replace the
-existing tools), use the Android SDK and AVD Manager. For more information, see
-Adding SDK Components.
-
This document provides version-specific information about SDK Tools
-releases. To keep up to date on new releases, make sure that you view this page
+releases. To keep up-to-date on new releases, make sure that you view this page
at http://developer.
android.com/sdk/tools-notes.html.
+To install SDK Tools in your SDK environment (and replace the
+existing tools), use the Android SDK and AVD Manager. For more information, see
+Adding SDK Components.
+
+
SDK Tools, Revision 3
SDK Tools 3 provides several new features for developers and includes
@@ -57,6 +58,13 @@ properties of your AVDs.
between SDK add-ons and platforms.
+
Layoutopt, a new tool for optimizing layouts
-
+The SDK Tools 3 package includes layoutopt
, a new command-line
+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 layoutopt.
+
--
cgit v1.1