diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java index 042c75e25e7a2..d8c5a53771a7a 100644 --- a/core/java/android/provider/Telephony.java +++ b/core/java/android/provider/Telephony.java @@ -1669,6 +1669,8 @@ public final class Telephony { public static final String NUMERIC = "numeric"; + public static final String AUTH_TYPE = "authtype"; + public static final String TYPE = "type"; public static final String CURRENT = "current"; diff --git a/docs/html/guide/developing/tools/index.jd b/docs/html/guide/developing/tools/index.jd index 91b430ff771a3..6e9fde1fb0f40 100644 --- a/docs/html/guide/developing/tools/index.jd +++ b/docs/html/guide/developing/tools/index.jd @@ -30,6 +30,11 @@ applications on the emulator.

The Hierarchy Viewer tool allows you to debug and optimize your user interface. It provides a visual representation of your layout's hierarchy of Views and a magnified inspector of the current display with a pixel grid, so you can get your layout just right. +
+ +
layoutopt
+
This tool lets you quickly analyze your application's layouts for +efficiency.
Draw 9-patch
diff --git a/docs/html/guide/developing/tools/layoutopt.jd b/docs/html/guide/developing/tools/layoutopt.jd new file mode 100644 index 0000000000000..72a110d256c5c --- /dev/null +++ b/docs/html/guide/developing/tools/layoutopt.jd @@ -0,0 +1,62 @@ +page.title=layoutopt +@jd:body + +

layoutopt is a command-line tool that helps you optimize the +layouts and layout hierarchies of your applications. You can run it against your +layout files or resource directories to quickly check for inefficiencies or +other types of problems that could be affecting the performance of your +application.

+ +

To run the tool, open a terminal and launch layoutopt +<resources> from your SDK tools/ directory. In the +command, supply a list of uncompiled resource xml files or directories that you +want to analyze.

+ +

When run, the tool loads the specified XML files and analyzes their layout +structures and hierarchies according to a set of predefined rules. If it detects +issues, it outputs information about the issues, giving filename, line numbers, +description of issue, and for some types of issues a suggested resolution.

+ +

Here's an example of the output:

+ +
$ layoutopt samples/
+samples/compound.xml
+   7:23 The root-level <FrameLayout/> can be replaced with <merge/>
+   11:21 This LinearLayout layout or its FrameLayout parent is useless
+samples/simple.xml
+   7:7 The root-level <FrameLayout/> can be replaced with <merge/>
+samples/too_deep.xml
+   -1:-1 This layout has too many nested layouts: 13 levels, it should have <= 10!
+   20:81 This LinearLayout layout or its LinearLayout parent is useless
+   24:79 This LinearLayout layout or its LinearLayout parent is useless
+   28:77 This LinearLayout layout or its LinearLayout parent is useless
+   32:75 This LinearLayout layout or its LinearLayout parent is useless
+   36:73 This LinearLayout layout or its LinearLayout parent is useless
+   40:71 This LinearLayout layout or its LinearLayout parent is useless
+   44:69 This LinearLayout layout or its LinearLayout parent is useless
+   48:67 This LinearLayout layout or its LinearLayout parent is useless
+   52:65 This LinearLayout layout or its LinearLayout parent is useless
+   56:63 This LinearLayout layout or its LinearLayout parent is useless
+samples/too_many.xml
+   7:413 The root-level <FrameLayout/> can be replaced with <merge/>
+   -1:-1 This layout has too many views: 81 views, it should have <= 80!
+samples/useless.xml
+   7:19 The root-level <FrameLayout/> can be replaced with <merge/>
+   11:17 This LinearLayout layout or its FrameLayout parent is useless
+ +

The layoutopt tool is available in SDK Tools, Revision 3 or +later. If you do not have SDK Tools 3 or later installed in your SDK, you can +download it from the Android SDK repository site using the Android SDK and AVD +Manager. For information, see Adding SDK Components.

+ +

Usage

+ +

To run layoutopt against a given list of layout resources:

+ +
layoutopt <list of xml files or directories>
+ +

For example:

+ +
$ layoutopt res/layout-land
+
$ layoutopt res/layout/main.xml res/layout-land/main.xml
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs index e2acc4f330d78..5215202680a22 100644 --- a/docs/html/guide/guide_toc.cs +++ b/docs/html/guide/guide_toc.cs @@ -255,6 +255,7 @@
  • Draw 9-Patch
  • Emulator
  • Hierarchy Viewer
  • +
  • layoutopt
  • mksdcard
  • Monkey
  • sqlite3
  • diff --git a/docs/html/guide/topics/ui/declaring-layout.jd b/docs/html/guide/topics/ui/declaring-layout.jd index 7ef22a6be2419..80ad7b8680883 100644 --- a/docs/html/guide/topics/ui/declaring-layout.jd +++ b/docs/html/guide/topics/ui/declaring-layout.jd @@ -25,6 +25,7 @@ parent.link=index.html
  • Size, Padding and Margins
  • Example Layout
  • + @@ -41,14 +42,17 @@ application can create View and ViewGroup objects (and manipulate their properti

    The Android framework gives you the flexibility to use either or both of these methods for 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.

    The advantage to declaring your UI in XML is that it enables you to better separate the presentation of your application from the code that controls its behavior. Your UI descriptions are 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, different device screen sizes, and different languages. Additionally, declaring the layout in XML makes it easier to visualize the structure of your UI, so it's easier to debug problems. As such, this document focuses on teaching you how to declare your layout in XML. If you're diff --git a/docs/html/guide/tutorials/localization/index.jd b/docs/html/guide/tutorials/localization/index.jd index eeade34e0eb49..8a60814593a55 100755 --- a/docs/html/guide/tutorials/localization/index.jd +++ b/docs/html/guide/tutorials/localization/index.jd @@ -539,8 +539,10 @@ height="158" style="margin-left:15px">

    using custom locale

    -

    For a list of supported locales in a specific Android platform, see the -associated notes in the "SDK" tab, under "Downloadable SDK Components."

    +

    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, Android 2.0 locales.

    Run the application for each of the expected locales, plus one unexpected locale. Here are some of the results you should see:

    diff --git a/docs/html/index.jd b/docs/html/index.jd index dc8bf2fe51790..9d349ca27f585 100644 --- a/docs/html/index.jd +++ b/docs/html/index.jd @@ -20,7 +20,7 @@ home=true -
    +
    @@ -46,8 +46,8 @@ home=true

    Download

    -

    The Android SDK has the tools, sample code, and docs you need to create great apps.

    -

    Learn more »

    +

    The Android SDK the tools, sample code, and docs you need to create great apps.

    +

    Learn more »

    @@ -79,7 +79,7 @@ home=true

    Watch

    - +

    More Android videos »

    @@ -120,24 +120,25 @@ home=true 'sdk': { 'layout':"imgLeft", 'icon':"sdk-small.png", - 'name':"Android 1.6 SDK", - 'img':"donut-android.png", - 'title':"Android 1.6 SDK", - 'desc': "

    The Android 1.6 SDK is now available, with new APIs and updated tools!

    " - + "

    For more about the Android 1.6 platform, read the highlights" - + "." - + " Also keep an eye on the Blog" - + " for posts about some of the new developer technologies in Android 1.6.

    " - + "

    Download the Android 1.6 SDK »

    " + 'name':"Android 2.0", + 'img':"eclair-android.png", + 'title':"Android 2.0 has arrived!", + 'desc': "

    Android 2.0 includes exciting new features and APIs. " + + "For information about what's included in the new platform, read " + + "the Android 2.0 version notes.

    " + + "

    If you have the Android 1.6 SDK, you can update your environment " + + "by installing the Android 2.0 platform and updated tools as " + + "SDK components. Otherwise, " + + "download a new Android SDK.

    " }, - 'io': { + 'devphone': { 'layout':"imgLeft", - 'icon':"io-small.png", - 'name':"Google I/O", - 'img':"io-large.png", - 'title':"Google I/O Developer Conference", - 'desc': "

    The Google I/O developer conference took place May 27-28 in San Francisco. If you missed the conference, you can experience the Android sessions by viewing YouTube videos.

    See the sessions from Google I/O »

    " + 'icon':"devphone-small.png", + 'name':"Dev Phone 1", + 'img':"devphone-large.png", + 'title':"Android Dev Phone 1", + 'desc': "

    Run and debug your Android applications directly on this device. Modify and rebuild the Android operating system, and flash it onto the phone. The Android Dev Phone 1 is carrier independent, and available for purchase by any developer registered with Android Market.

    Learn more about the Android Dev Phone 1 »

    " }, 'mapskey': { @@ -149,13 +150,13 @@ home=true 'desc':"

    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.

    Learn more »

    " }, - 'devphone': { + 'io': { 'layout':"imgLeft", - 'icon':"devphone-small.png", - 'name':"Dev Phone 1", - 'img':"devphone-large.png", - 'title':"Android Dev Phone 1", - 'desc': "

    Run and debug your Android applications directly on this device. Modify and rebuild the Android operating system, and flash it onto the phone. The Android Dev Phone 1 is carrier independent, and available for purchase by any developer registered with Android Market.

    Learn more about the Android Dev Phone 1 »

    " + 'icon':"io-small.png", + 'name':"Google I/O", + 'img':"io-large.png", + 'title':"Google I/O Developer Conference", + 'desc': "

    The Google I/O developer conference took place May 27-28 in San Francisco. If you missed the conference, you can experience the Android sessions by viewing YouTube videos.

    See the sessions from Google I/O »

    " } } diff --git a/docs/html/intl/ja/index.jd b/docs/html/intl/ja/index.jd index 3ed2357992350..8096247e4e1b0 100644 --- a/docs/html/intl/ja/index.jd +++ b/docs/html/intl/ja/index.jd @@ -45,7 +45,7 @@ home=true

    ダウンロード

    Android SDK には、優れたアプリケーションの作成に必要となるツール、サンプル コード、ドキュメントが含まれています。

    -

    詳細 »

    +

    詳細 »

    @@ -118,10 +118,10 @@ home=true 'sdk': { 'layout':"imgLeft", 'icon':"sdk-small.png", - 'name':"SDK 1.6 r1", - 'img':"donut-android.png", - 'title':"Android 1.6 SDK", - 'desc': "

    Android 1.6 SDK の最新バージョンが公開されました。このリリースには Android 1.6 用の API、最新版デベロッパーツール、複数プラットフォーム(バージョン)サポート、そして Google API のアドオンが含まれています。

    Android 1.6 SDK をダウンロード »

    " + 'name':"Android 2.0", + 'img':"eclair-android.png", + 'title':"Android 2.0", + 'desc': "

    Android 2.0 の最新バージョンが公開されました。このリリースには Android 2.0 用の API、最新版デベロッパーツール、複数プラットフォーム(バージョン)サポート、そして Google API のアドオンが含まれています。

    Android SDK をダウンロード »

    " }, 'io': { diff --git a/docs/html/sdk/RELEASENOTES.jd b/docs/html/sdk/RELEASENOTES.jd index 552b69957b297..bca89f610b7c8 100644 --- a/docs/html/sdk/RELEASENOTES.jd +++ b/docs/html/sdk/RELEASENOTES.jd @@ -2,10 +2,10 @@ page.title=SDK Release Notes @jd:body

    This document provides version-specific information about Android SDK -releases. For the latest known issues, please ensure that you're viewing this +releases.

    Android SDK

    @@ -27,15 +27,16 @@ keep your development environment up-to-date.

    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 incudes the -Android SDK and AVD Manager tool. To develop against Android 2.0, for example, -you could just download the Android 2.0 platform into your existing SDK.

    +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, +for example, you could just download the Android 2.0 platform into your existing +SDK.

    -

    Release notes for Android platforms that are downloadable into the SDK are +

    Release notes for Android platforms and other SDK components are now available from the "SDK" tab, under "Downloadable SDK Components."