diff --git a/docs/html/guide/developing/tools/adt.html b/docs/html/guide/developing/tools/adt.html deleted file mode 100644 index 5ba2ef5be7457..0000000000000 --- a/docs/html/guide/developing/tools/adt.html +++ /dev/null @@ -1,10 +0,0 @@ - - - -Redirecting... - - -

You should be redirected. Please click here.

- - \ No newline at end of file diff --git a/docs/html/guide/developing/tools/adt.jd b/docs/html/guide/developing/tools/adt.jd new file mode 100644 index 0000000000000..e48a5ae5b230e --- /dev/null +++ b/docs/html/guide/developing/tools/adt.jd @@ -0,0 +1,528 @@ +page.title=Android Developer Tools +@jd:body + +
+
+

In this document

+ +
    +
  1. SDK Tools Integration
  2. + +
  3. Code Editors +
      +
    1. Resource linking enhancements
    2. +
    +
  4. + +
  5. Graphical Layout Editor +
      +
    1. Canvas and outline view
    2. +
    3. Palette
    4. +
    5. Configuration chooser
    6. +
    +
  6. + +
  7. Layout Factoring Support
  8. + +
+ +

Related videos

+ +
    +
  1. Android Developer Tools + Google I/O Session +
  2. +
+ +

See also

+ +
    +
  1. Android Tools change blog
  2. +
+
+
+ +

ADT (Android Developer Tools) is a plugin for Eclipse that provides a suite of + tools that are integrated with the Eclipse IDE. It offers you access to many features that help + you develop Android applications quickly. ADT + provides GUI access to many of the command line SDK tools as well as a UI design tool for rapid + prototyping, designing, and building of your application's user interface.

+ +

Because ADT is a plugin for Eclipse, you get the functionality of a well-established IDE, + along with Android-specific features that are bundled with ADT. The following + describes important features of Eclipse and ADT:

+ +
+
Integrated Android project creation, building, packaging, installation, and + debugging
+ +
ADT integrates many development workflow tasks into Eclipse, making it easy for you to + rapidly develop and test your Android applications.
+ +
SDK Tools integration
+ +
Many of the SDK tools are integrated into Eclipse's menus, + perspectives, or as a part of background processes ran by ADT.
+ +
Java programming language and XML editors
+ +
The Java programming language editor contains common IDE features such as compile time + syntax checking, auto-completion, and integrated documentation for the Android framework APIs. + ADT also provides custom XML editors that let you + edit Android-specific XML files in a form-based UI. A graphical layout editor lets you design + user interfaces with a drag and drop interface.
+ +
Integrated documentation for Android framework APIs
+
You can access documentation by hovering over classes, methods, or variables.
+
+ +

You can find the most up-to-date and more detailed information about changes and new features +on the Recent Changes page at the Android Tools +Project site.

+ +

SDK Tools Integration

+ + + +

Many of the tools that you can start or run from the command line are integrated into ADT. + They include:

+ + + +

Code Editors

+ +

In addition to Eclipse's standard editor features, ADT provides custom XML editors to help + you create and edit Android manifests, resources, menus, and layouts in a form-based or graphical + mode. Double-clicking on an XML file in Eclipse's package explorer opens the + appropriate XML editor. + +

+ +

Note: You can edit Android-specific XML files (such as a layout +or manifest) in both a graphical mode and also an XML markup mode. You can switch between +these modes with the pair of tabs at the bottom of each custom XML editor.

+ +

In addition, some special file types that don't have custom editors, such as drawables, animations, + and color files offer editing enhancements such as XML tag completion.

+ +

ADT provides the following custom, form-based XML editors:

+ +
+ +
Graphical Layout Editor
+ +
Edit and design your XML layout files with a drag and drop interface. The layout editor + renders your interface as well, offering you a preview as you design your layouts. This editor + is invoked when you open an XML file with a view declared (usually declared in + res/layout. For more information, see Graphical Layout + Editor.
+ +
Android Manifest Editor
+ +
Edit Android manifests with a simple graphical interface. This editor is invoked + when you open an AndroidManifest.xml file.
+ +
Menu Editor
+ +
Edit menu groups and items with a simple graphical interface. This editor is + invoked when you open an XML file with a <menu> declared (usually located in + the res/menu folder).
+ +
Resources Editor
+ +
Edit resources with a simple graphical interface. This editor is invoked when + you open an XML file with a <resources> tag declared.
+ +
XML Resources Editor
+ +
Edit XML resources with a simple graphical interface. This editor is invoked + when you open an XML file.
+
+ + +

Resource linking enhancements

+

In addition to the normal code editing features of Eclipse, ADT provides enhancements to the Android + development experience that allow you to quickly jump to declarations of various types of resources such + as strings or layout files. You can access these enhancements by holding down the control key and + clicking on the following items: + +

+ +

Graphical Layout Editor

+ +

ADT provides many features to allow you to design and build your application's user interface. + Many of these features are in the graphical layout editor, which you can access by opening one of + your application's XML layout files in Eclipse. +

+ +

The graphical layout editor is the main screen that you use to visually design and build your + UI. It is split up into the following parts:

+ +
+
Canvas
+ +
In the middle of the editor is the canvas. It provides the rendered view of your + layout and supports dragging and dropping of UI widgets + directly from the palette. You can select the platform version used to render the items in + the canvas. Each platform version has its own look and feel, which might be the similar to or + radically different from another platform version. The canvas renders the appropriate look + and feel for the currently selected platform version. + This platform version does not need to be the same as the version that your + application targets. + +

The canvas also provides + context-sensitive actions in the layout actions bar, such as adjusting layout margins and +orientation. + The layout actions bar displays available actions depending on the selected UI element in the + canvas.

+
+ +
Outline
+ +
On the right side of the editor is the outline view. It displays a hierarchical + view of your layout where you can do things such as reorder of views. The outline + view exposes similar functionality as the canvas but displays your layout in an ordered + list instead of a rendered preview.
+ +
Palette
+ +
On the left side of the editor is the palette. It provides a set of widgets that + you can drag onto the canvas. The palette shows rendered previews of the + widgets for easy lookup of desired UI widgets.
+ +
Configuration Chooser
+ +
At the top of the editor is the configuration chooser. + It provides options to change a layout's rendering mode or screen type.
+
+ + graphical layout editor screenshot + +

Figure 1. Graphical layout editor

+ +

Canvas and outline view

+ + + +

The canvas is the area where you can drag and drop UI widgets from the palette to design your + layout. The canvas offers a rendered preview of your layout depending on factors such as the + selected platform version, screen orientation, and currently selected theme that you specify in + the configuration chooser. You can also drag and drop + items into the outline view, which displays your layout in a hierarchical list. The outline view + exposes much of the same functionality as the canvas but offers another method of organization + that is beneficial for ordering and quickly selecting items. When you right-click a specific item + in the canvas or outline view, you can access a context-sensitive menu that lets you modify the + following attributes of the layout or view:

+ +
+
View and layout properties
+ +
+ When you right-click a view or layout in the canvas or outline view, it brings up a + context-sensitive menu that lets you set things such as: + + +
+ +
Animation preview and creation
+ +
+ If your layout or view is animated, you can preview the animation directly in the canvas + (when you select Android 3.0 or later as the platform version in the configuration chooser). + Right-click an item in the canvas and select Play Animation. If + animation is not associated with item, an option is available in the menu to create one. + +

View the segment on the animation features for more + information.

+
+ +
Extract as Include
+ +
You can extract parts of a current layout into its own layout file, + which you can then include in any layout with a single line of XML. See Layout Refactoring Support for more information.
+
+ +

Other canvas features

+ +

The canvas has additional features not available in the outline view:

+ + + + screenshot of the canvas + +

Figure 2. Canvas portion of the layout editor showing + a rendered preview of an application

+ + screenshot of the outline view + +

Figure 3. Outline view showing current layout's structure

+ +

Palette

+ + + +

The palette contains the UI widgets that you can drag and drop onto the canvas and add to your + layout. The pallete categorizes the widgets and shows rendered previews + for easier lookup. The main features of the palette include:

+ + + palette screenshot + +

Figure 4. Palette showing available UI widgets

+ +

Configuration chooser

+ + + + +

The configuration chooser allows you to create and configure different configurations of + a layout for different situations, such as one for landscape and one for portrait mode. You can + set the following options for each configuration of a layout: +

+ + + + + +

Figure 5. Configuration chooser

+ +

Layout Refactoring Support

+ + + +

In both the graphical and XML layout editor, there are many features that help you quickly + refactor your layouts. The following list describes the major refactoring support:

+ +
+ +
Change layout
+
This lets you change the layout on the fly and re-renders the canvas for you. + You can apply this refactoring to any layout and the layout is converted to the new type if + possible. In many cases, the opening and closing tags of the layout's XML element are changed + along with things such as ID attributes and their references. However, for some supported + types, ADT attempts to preserve the layout, such as changing a {@link + android.widget.LinearLayout} to a {@link android.widget.RelativeLayout}.
+ +
Change widget
+
This lets you select one or more widgets and converts them to a new widget type. In + addition to changing the element name, it also removes any + attributes that are not supported by the new widget type and adds in any mandatory attributes + required by the new widget type. If the current ID of a widget includes the + current widget type in its ID (such as a <Button> widget named + "button1"), then the ID is changed to match the new widget type and all + references are updated.
+ +
Extract as include
+
This lets you extract views inside of an existing layout into their own separate layout + file. An include tag that points to the newly created layout file is inserted + into the existing layout file. Right-click the view or layout and select Extract as + Include....
+ +
Extract string
+
Extract strings from either XML or Java files into their own separate resource file.
+ +
Extract style
+
Extract style-related attributes from a layout and define them in a new + styles.xml file. You can select multiple views and this refactoring extracts all + of the same styles into one style and assigns that style to all the views that use it.
+ +
Wrap-in container
+
This lets you select one or more sibling elements and wrap them in a new container. This + can be applied to the root element as well, in which case the namespace declaration attributes + will be transferred to the new root. This refactoring also transfers layout_ + attribute references to the new root, For example, suppose you have a {@link android.widget.RelativeLayout}. + If other widgets have layout constraints pointing to your widget, wrapping the widget causes + these constraints to point to the parent instead.
+ +
Quick Assistant
+
Provides refactoring suggestions depending on the current context. Press + Ctrl-1 (or Cmd-1 on + Mac) in an editor, and Eclipse provides a list of possible refactorings depending on the + context. The Quick Assistant provides fast access to all of the above refactorings, where applicable. + For example, if you are editing an XML value and decide you want to extract it out + as a string, place the text cursor in the string and press Ctrl-1 to see the refactoring context + menu.
+
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs index a647cd39fd770..68c9a91619748 100644 --- a/docs/html/guide/guide_toc.cs +++ b/docs/html/guide/guide_toc.cs @@ -569,6 +569,7 @@