Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61c29c29 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change Ieeb0b251 into eclair-sdk

* changes:
  doc change: incorporate comments on SDK docs and structure.
parents f4520f3e eeb0b251
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -383,8 +383,8 @@ framework_docs_SDK_PREVIEW:=0
## Latest ADT version identifiers, for reference from published docs
framework_docs_ADT_VERSION:=0.9.4
framework_docs_ADT_DOWNLOAD:=ADT-0.9.4.zip
framework_docs_ADT_BYTES:=0
framework_docs_ADT_CHECKSUM:=0
framework_docs_ADT_BYTES:=3367536
framework_docs_ADT_CHECKSUM:=4cdecd72b3e28022d8a55891f13e7d43

framework_docs_LOCAL_DROIDDOC_OPTIONS += \
		-hdf sdk.version $(framework_docs_SDK_VERSION) \
+2 −1
Original line number Diff line number Diff line
@@ -119,7 +119,8 @@ 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 those in the minimum API Level.</li>
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.</li>
</ul>
+38 −28
Original line number Diff line number Diff line
@@ -61,9 +61,7 @@ earlier, you should read this document and consider how you may need to adapt
your application for proper display on new devices that offer different screens
and that are running Android 1.6 or later. In most cases, only minor adjustments
are needed, however you should make sure to <a href="#testing">test your
application</a> on all of the new screens supported in Android 1.6. 

<!--See <a href="#migrating">Migrating</a> for strategies e you can continue using the previous API level and use target API level, or you can just compile. --></p>
application</a> on all supported screens. </p>

<p>In particular, if you have an existing application that you would like to
make available for users of devices with small screens (such as QVGA), please
@@ -73,7 +71,11 @@ information about how to do that. </p>

<h2 id="overview">Overview of Screens Support</h2>

<p>The sections below provide an overview of the Android platform's support for multiple screens, including an introduction to terms and concepts used in this document and in the API, a summary of the screen configurations that the platform supports, and an overview of the API and underlying screen-compatibility features.</p>
<p>The sections below provide an overview of the Android platform's support for
multiple screens, including an introduction to terms and concepts used in this
document and in the API, a summary of the screen configurations that the
platform supports, and an overview of the API and underlying
screen-compatibility features.</p>


<h3>Terms and Concepts</h3>
@@ -462,7 +464,7 @@ pixels</a> for more information. </p>

<h3 id="attrs">Manifest attributes for screens support</h3>

<p> Android 1.6 introduces a new manifest element, 
<p> Android 1.6 introduced a new manifest element, 
<a href="{@docRoot}guide/topics/manifest/supports-screens-element.html"><code>&lt;supports-screens&gt;</code></a>,
whose attributes you can use to control the
display of your application on different classes of device screens, as listed
@@ -631,8 +633,8 @@ appropriate attributes to <code>false</code>.

<h3 id="qualifiers">Resource directory qualifiers for screen size and density</h3>

<p>Android 1.6 supports new resource directory qualifiers for selecting
resources based on the characteristics of the screen on which your application
<p>Android supports resource directory qualifiers for controlling the selection
of resources based on the characteristics of the screen on which your application
is running. You can use these qualifiers to provide size- and density-specific
resources in your application. For more information about the generalized sizes
and densities that correspond to the qualifiers, see <a href="#range">Table
@@ -693,14 +695,14 @@ to the baseline screen configuration.</td>
</tr>
<tr>
<td>Platform version</td>
<td><code>v4</code></td>
<td>Resources that are for use only on Android 1.6 (API Level 4) or higher
platform versions. If your application is designed to run on both Android 1.5
(or lower) and Android 1.6 (and higher), you can use this qualifier to tag
resources that should be excluded when your application is running on Android
1.5 or earlier. Using this qualifier is necessary in some cases, if the older
platform is inadvertently loading resources from an Android 1.6 resources
directory. </td>
<td><nobr><code>v&lt;api-level&gt;</code></nobr></td>
<td>Resources that are for use only on a specific API Level or higher. For
example, if your application is designed to run on both Android 1.5 (API Level
3) and Android 1.6 (API Level 4 and higher), you can use the <code>-v4</code>
qualifier to tag any resources that should be excluded when your application is
running on Android 1.5 (API Level 3). Using the version qualifier is necessary
in some cases, if the older platform is inadvertently loading resources from a
directory containing resources for a newer platform. </td>
</tr>
</table>

@@ -975,8 +977,8 @@ Here's how to do that:</p>
<code>android:minSdkVersion</code> attribute as it is. You <em>do not</em> need
to increment the value of the attribute to support new devices and multiple
screens. </li>
  <li>Extend compatibility for Android 1.6 devices by adding a new attribute
&mdash; <code>android:targetSdkVersion</code> &mdash; to the
  <li>Extend compatibility for Android 1.6 (and higher) devices by adding 
a new attribute &mdash; <code>android:targetSdkVersion</code> &mdash; to the
<code>uses-sdk</code> element. Set the value of the attribute to
"<code>4</code>". This allows your application to "inherit" the platform's
multiple screens support, even though it is technically using an earlier version
@@ -988,11 +990,12 @@ later, this is where you will add them.</li>
the Android 1.6 (API Level 4) library, rather than against the Android 1.5 (or
earlier) library. You will not be able to compile your application against the
older platform because of the new manifest attribute. </li>
  <li>Set up AVDs for testing your application on Android 1.6. Create AVDs that
use the screen sizes and densities that you want to support. When you create the
AVDs, make sure to select the Android 1.6 platform as the system image to run.
For more information, see <a href="#testing">How to Test Your Application on
Multiple Screens</a>, below.</li>
  <li>Set up AVDs for testing your application on Android 1.6 and higher
releases. Create AVDs that use the screen sizes and densities that you want to
support. When you create the AVDs, make sure to select the Android 1.6 or higher
platform as the system image to run. For more information, see <a
href="#testing">How to Test Your Application on Multiple Screens</a>,
below.</li>
  <li>Set up AVDs for testing your application on Android 1.5 (or earlier
platform). You need AVDs running the older platforms you are targeting, so that
you can test for compatibility and ensure that there are no functional
@@ -1018,10 +1021,11 @@ qualifiers</a>. Qualifiers must be arranged in a proscribed order. See
<a href="{@docRoot}guide/topics/resources/resources-i18n.html#AlternateResources">
Alternate Resources</a> for more information. </li>
    <li>Note that if you add size- or density-specific resource directories
tagged with any of the Android 1.6 qualifiers listed in this document, you
should make sure to also tag those directories with the <code>v4</code>
qualifier. This ensures that those resources will be ignored when the
application is run on Android 1.5 or lower platform versions.</p></li>
tagged with any of the resource qualifiers listed in this document, you should
make sure to also tag those directories with the <code>v&lt;api-level&gt;</code>
qualifier (for example, <code>-v4</code>). This ensures that those resources
will be ignored when the application is run on Android 1.5 or lower platform
versions.</p></li>
    </ul>
  </li>
  <li>If your application does not offer support (such as custom layouts) for
@@ -1074,13 +1078,19 @@ the defaults. For general information about working with AVDs, see
<a href="{@docRoot}guide/developing/tools/avd.html">Android Virtual
Devices</a>.</p>

<p>The Android 1.6 SDK includes these emulator skins, which represent the
primary screen configurations that your should test:</p>
<p>The Android 1.6 and higher platforms in the SDK include these emulator skins,
which represent the primary screen configurations that your should test:</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>
+2 −3
Original line number Diff line number Diff line
@@ -539,9 +539,8 @@ height="158" style="margin-left:15px"></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 supported locales, see the 
<a href="{@docRoot}sdk/android-{@sdkCurrentVersion}.html">Android
Version Notes</a>.</p>
<p>For a list of supported locales in a specific Android platform, see the 
associated notes in the "SDK" tab, under "Downloadable SDK Components."</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>
+7 −6
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ compatibility.</p>
<h2 id="InstallingComponents">Installing SDK Components</h2>

<p>Use the Android SDK and AVD Manager to install new SDK components. 
To launch the SDK and AVD Manager in one of these ways:</p>
You can launch the SDK and AVD Manager in one of these ways:</p>
<ul>
  <li>Execute the {@code android}</a> tool command with no options. If you
haven't used the tool before, change to the <code>&lt;sdk&gt;/tools</code>
@@ -95,12 +95,13 @@ you do not have.</p>

<h3 id="AddingSites">Adding New Sites</h3>

<p>By default, <strong>Available Components</strong> only shows 
the default repository for platforms, the Google APIs
Add-On, and other SDK components. You can add additional sites that host
Android SDK add-ons, then download the SDK add-ons from them.</p>	
<p>By default, <strong>Available Components</strong> only shows the default
repository site, which offers platforms, SDK tools, documentation, the 
Google APIs Add-on, and other components. 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 may offer additional
<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. </p>

Loading