From 0d1b0814be24f501395bf175fba8691117f782d5 Mon Sep 17 00:00:00 2001
From: Dirk Dougherty
Platform Version | API Level | |
---|---|---|
Android 2.2 | 8 | |
Android 2.1 | 7 | |
Android 2.0.1 | 6 | |
Android 2.0 | 5 |
Table -1. Summary of device screens supported by Android.
+
As shown above, the various screen configurations are arranged around a -baseline screen — HVGA (320x480) resolution on a 3.2" screen — which -is assigned a size of "normal" and a density of "medium". The HVGA screen is -used as the baseline because all applications written against Android 1.5 or -earlier are (by definition) written for the HVGA screen used on the T-Mobile G1 -and similar devices.
+baseline screen that is assigned a size of "normal" and a density of +"medium". The HVGA screen is used as the baseline because all applications +written against Android 1.5 or earlier are (by definition) written for the HVGA +screen used on the T-Mobile G1 and similar devices.However, note that applications written for the baseline HVGA screen may need +
However, note that applications written for the baseline screen may need minor adjustments before they display properly on smaller screens such as QVGA. With the reduced screen area of small screens, there may be tradeoffs in design, content, and function that you, as the application developer, need to consider. @@ -557,7 +564,7 @@ support:
largeScreens="false"
, your application can
still be installed by users of devices with large screens. When run on a device
with a large screen, this attribute value causes the platform to run the
-application in compatibility mode, rendering it in a baseline HVGA screen area
+application in compatibility mode, rendering it in a baseline screen area
(normal size, medium density) reserved on the larger screen. See
Screen-Compatibility Examples for an
illustration of what an application looks like when displayed in compatibility
@@ -803,7 +810,7 @@ that you use in your code. The sections below provide more information.
In some cases, you will need to express dimensions in dip
and
then convert them to pixels. Imagine an application in which a scroll gesture is
recognized after the user's finger has moved by at least 16 pixels. On a
-baseline HVGA screen, the user will have to move his finger by 16 pixels / 160
+baseline screen, the user will have to move his finger by 16 pixels / 160
dpi = 1/10th of an inch (or 2.5 mm) before the gesture is recognized. On a
device with a high (240) density display, the user will move his finger by only
16 pixels / 240 dpi = 1/15th of an inch (or 1.7 mm.) The distance is much
diff --git a/docs/html/guide/practices/ui_guidelines/icon_design.jd b/docs/html/guide/practices/ui_guidelines/icon_design.jd
index 3f00b5c..51ccfaf 100644
--- a/docs/html/guide/practices/ui_guidelines/icon_design.jd
+++ b/docs/html/guide/practices/ui_guidelines/icon_design.jd
@@ -681,7 +681,7 @@ effects, which are shown below, are used to create depth.
![]() |
-White r 0 | g 0 | b 0 Used for outer glow and bevel highlight. |
+White r 255 | g 255 | b 255 Used for outer glow and bevel highlight. |
![]() |
-Black r 255 | g 255 | b 255 Used for inner shadow and bevel shadow. |
+Black r 0 | g 0 | b 0 Used for inner shadow and bevel shadow. |
![]() |
-White r 0 | g 0 | b 0 Used for details within the icons and bevel highlight. |
+White r 255 | g 255 | b 255 Used for details within the icons and bevel highlight. |
![]() |
+![]() |
Grey gradient 1: r 169 | g 169 | b 169 2: r 126 | g 126 | b 126 Used for disabled details within the icon. |
![]() |
+![]() |
Fill gradient 1: 1 r 105 | g 105 | b 105 2: r 10 | g 10 | b 10 Used as color fill. |
![]() |
-Black r 255 | g 255 | b 255 Used for bevel shadow. |
+Black r 0 | g 0 | b 0 Used for bevel shadow. |
![]() |
-White r 0 | g 0 | b 0 Used for highlights on edges. |
+White r 255 | g 255 | b 255 Used for highlights on edges. |
![]() |
-Black r 255 | g 255 | b 255 Used as base color in shadows. |
+Black r 0 | g 0 | b 0 Used as base color in shadows. |
![]() |
-White r 0 | g 0 | b 0 Used for outer glow and bevel highlight. |
+White r 255 | g 255 | b 255 Used for outer glow and bevel highlight. |
![]() |
-Black r 255 | g 255 | b 255 Used for inner shadow and bevel shadow. |
+Black r 0 | g 0 | b 0 Used for inner shadow and bevel shadow. |
![]() |
-White r 0 | g 0 | b 0 Used for details within the icons and bevel highlight. |
+White r 255 | g 255 | b 255 Used for details within the icons and bevel highlight. |
![]() |
+![]() |
Grey gradient 1: r 169 | g 169 | b 169 2: r 126 | g 126 | b 126 Used for disabled details within the icon. |
![]() |
+![]() |
Fill gradient 1: 1 r 105 | g 105 | b 105 2: r 10 | g 10 | b 10 Used as color fill. |
![]() |
-Black r 255 | g 255 | b 255 Used for bevel shadow. |
+Black r 0 | g 0 | b 0 Used for bevel shadow. |
-<sdk>/samples/<platform-version>/
+<sdk>/samples/android-<level>/
You can easily create new Android projects with the downloaded samples, modify them @@ -49,7 +49,7 @@ if you'd like, and then run them on an emulator or device.
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 <sdk>/samples/<platform>/ApiDemos
+the <sdk>/samples/android-<level>/ApiDemos
directory (the samples
directory for the platform version you are
using).
android
tool, by executing this command:
-android update project -s -n API Demos -t <target_ID> -p <path>samples/<platforms>/ApiDemos/ +android update project -s -n API Demos -t <target_ID> -p <path>samples/android-<level>/ApiDemos/
To learn more about creating and editing run configurations in Eclipse, refer to - Developing In Eclipse, + Developing In Eclipse, with ADT.
The Eclipse ADT will automatically create a new run configuration for your project -and the Android Emulator will automatically launch. Once the emulator is booted up, -your application will appear after a moment. You should now see something like this:
+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:
<SDK_path>/samples/android-8/SpinnerTest/src/com/android/examples/spinner/test/SpinnerActivityTest.java
- to the directory workspace/SpinnerActivityTest/src/com/android/examples/spinner/test/
.
+ Copy the file <SDK_path>/samples/android-8/SpinnerTest/src/com/android/example/spinner/test/SpinnerActivityTest.java
+ to the directory workspace/SpinnerActivityTest/src/com/android/example/spinner/test/
.
New platforms are automatically saved into the
-<sdk>/platforms/
directory of your SDK;
-new add-ons are saved in the <sdk>/add-ons/
-directory; and new documentation is saved in the existing
-<sdk>/docs/
directory (old docs are replaced).
<sdk>/platforms/
directory of your SDK;
+new add-ons are saved in the <sdk>/add-ons/
+directory; samples are saved in the
+<sdk>/samples/android-<level>/
;
+and new documentation is saved in the existing
+<sdk>/docs/
directory (old docs are replaced).
Requires SDK Tools r6 or higher.
+Requires SDK Tools r6 or higher.
+Requires SDK Tools r6 or higher.
++API Level: {@sdkPlatformApiLevel}
+ +Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release +deployable to Android-powered handsets starting in {@sdkPlatformDeployableDate}. +This release includes user features, developer features, API changes, and bug +fixes. For information on developer features and API changes, see the +Framework API section.
+ +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.
+ +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 Adding SDK +Components. If you are new to Android, download the SDK Starter Package +first.
+ + +For a list of new user features and platform highlights, see the Android +2.2 Platform Highlights document.
+ +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.
+ + + + +Requires SDK Tools r6 or higher.
+The system image included in the downloadable platform provides these +built-in applications:
+ +
+
|
+
+
|
+
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 language_country/region locale +descriptor).
+ +
+
|
+
+ |
+
Localized UI strings match the locales that are accessible +through Settings.
+ +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:
+ +For more information about how to develop an application that displays +and functions properly on all Android-powered devices, see Supporting Multiple +Screens.
+ +The sections below provide information about changes made to the application +framework API provided by the Android {@sdkPlatformVersion} platform.
+ + +The Android {@sdkPlatformVersion} platform delivers an updated version of +the framework API. The Android {@sdkPlatformVersion} API +is assigned an integer identifier — +{@sdkPlatformApiLevel} — that is +stored in the system itself. This identifier, called the "API Level", allows the +system to correctly determine whether an application is compatible with +the system, prior to installing the application.
+ +To use APIs introduced in Android {@sdkPlatformVersion} in your
+application, you need to set the proper value, "{@sdkPlatformApiLevel}", in the
+android:minSdkVersion
attributes of the <uses-sdk>
+element in your application's manifest.
For more information about how to use API Level, see the API Levels document.
+ + +The sections below summarize the changes to the application framework and its APIs.
+ +The Android platform now allows applications to request installation onto the +device's external storage media (such as the SD card), as an alternative to +installation onto the device's internal memory.
+ +Application developers can express the preferred installation location for
+their applications by means of a new attribute of <manifest>
+in the manifest file,
+android:installLocation
. The attribute supports three values:
+"internalOnly"
, "preferExternal"
, and
+"auto"
. At install time, the system checks the value of
+android:installLocation
and installs the application
+.apk
according to the preferred location, if possible. If the
+application has requested external installation, the system installs it into a
+private, encrypted partition in the external media. Once an application .apk is
+installed externally, the system lets the user change the storage location of
+the .apk and move it onto the device's internal memory if needed (and vice
+versa), through Manage Applications in the user settings.
By default, the system installs all applications onto the device's internal
+memory, except for those that explicitly request external installation. This
+means that the system will always install legacy applications onto internal
+memory, since they do not have access to the
+android:installLocation
attribute. However, it is possible to
+configure and compile a legacy application such that it is installed internally
+on older versions of the platform and externally on Android 2.2 and later
+platforms, if necessary.
Note that requesting installation onto the device's external media is not +suitable for all applications, particularly because the external media may be +removable and unmounting/remounting may disrupt the user experience and system +settings.
+ +For more information about setting a preferred install location for your +application, including a discussion of what types of applications should and +should not request external installation, please read the App Install Location +document.
+ +The platform now provides a generalized backup manager facility that +applications can use to backup and restore user data, to ensure that users can +maintain their data when switching devices or reinstalling the application. The +backup manager handles the work of transporting the application data to and from +the backup storage area in the cloud. The backup manager can store any type of +data, from arbitrary data to files, and manages backup and restore operations +in an atomic manner.
+ +Any application can use the backup manager to save and restore data. To do +so, the application instantiates a {@link android.app.backup.BackupManager} and +uses its methods to trigger a new backup or restore operation. The application +must also create a subclass of {@link android.app.backup.BackupAgent} and +implement its methods to handle calls from the backup manager to get data for +backup and provide data to restore +({@link android.app.backup.BackupAgent#onBackup(android.os.ParcelFileDescriptor, android.app.backup.BackupDataOutput, android.os.ParcelFileDescriptor) onBackup()} +and {@link android.app.backup.BackupAgent#onRestore(android.app.backup.BackupDataInput, int, android.os.ParcelFileDescriptor) onRestore()}). +A simple implementation of a BackupAgent useful for backing up preferences +and files is available by using {@link android.app.backup.BackupAgentHelper}. +For more information, see Data Backup.
+ +New device policy management APIs allow developers to write "device administrator" applications that can control security features of the device, such as the minimum password strength, data wipe, and so on. Users can select the administrators that are enabled on their devices. For more information, see the {@link android.app.admin android.app.admin} classees.
+ +fill_parent
is renamed to match_parent
. This affects both XML and Java code (see {@link android.view.ViewGroup.LayoutParams}). Note that the platform will continue to honor uses of fill_parent
in legacy applications. android:installLocation
attribute of the <manifest>
element. Specifies the default install location defined by an application.android:backupAgent
attribute of the
+<application>
element. Specifies the component name of the
+BackupAgent subclass provided by the application to handle backup/restore
+operations, if any.android:restoreAnyVersion
attribute of the
+<application>
element. Boolean value that indicates whether
+the application is prepared to attempt a restore of any backed-up dataset, even
+if the backup is apparently from a newer version of the application than is
+currently installed on the device.android:vmSafeMode
attribute of the <application>
element. Boolean value that specifies whether to disable JIT compiler optimizations when running the application.android.permission.BIND_DEVICE_ADMIN
— Any device administration broadcast receiver must require this permission, to ensure that only the system can interact with it.android.permission.KILL_BACKGROUND_PROCESSES
— Allows an application to call {@link android.app.ActivityManager#killBackgroundProcesses(String)}.
+android.permission.BIND_WALLPAPER
— Any {@link android.service.wallpaper.WallpaperService} must require this permission, to ensure that only the system can interact with it.android.permission.SET_TIME
— Allows an application to set the system time.For a detailed view of all API changes in Android {@sdkPlatformVersion} (API +Level {@sdkPlatformApiLevel}), see the API +Differences Report.
+ diff --git a/docs/html/sdk/eclipse-adt.jd b/docs/html/sdk/eclipse-adt.jd index d3e0a10..57eac1f 100644 --- a/docs/html/sdk/eclipse-adt.jd +++ b/docs/html/sdk/eclipse-adt.jd @@ -81,6 +81,9 @@ padding: .25em 1em; .toggleable a { text-decoration:none; } +.toggleme a { + text-decoration:underline; +} .toggleable.closed .toggleme { display:none; } @@ -89,6 +92,31 @@ padding: .25em 1em; } +The ADT Plugin now supports the use of library projects during +development, a capability that lets you store shared Android application +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 Developing +in Eclipse with ADT document.
+If you are not developing in Eclipse, SDK Tools r6 provides the equivalent library +project support through the Ant build system.
+If you are developing in Eclipse with ADT, note that SDK Tools r6 is +designed for use with ADT 0.9.7 and later. After installing SDK Tools r6, we +highly recommend updating your ADT Plugin to 0.9.7.
+The SDK Tools now support the use of library projects during +development, a capability that lets you store shared Android application +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 Developing +in Other IDEs document.
+If you are developing in Eclipse, ADT 0.9.7 +provides the equivalent library project support.
+