In this document, you will learn about Android Developer Tools (ADT), a plugin for Eclipse that offers a comprehensive suite of tools to help you develop Android applications quickly and efficiently. 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 your application's user interface.

As ADT is a plugin for Eclipse, you can benefit from the well-established IDE's functionality, along with Android-specific features that are bundled with it. This document describes some important features of both Eclipse and ADT.

One of the key benefits of using ADT is its ability to integrate Android project creation, building, packaging, installation, and debugging directly into Eclipse. By doing so, ADT simplifies these workflow tasks, enabling you to rapidly develop and test your Android applications without having to navigate through multiple tools or processes.

Another important feature of ADT is its integration with the SDK Tools. With ADT, you have access to a range of command line tools that are essential for working with the Android SDK, such as the Android SDK Manager, Android SDK Build-Tools, and Android SDK Platform-Tools. These tools allow you to perform various tasks related to app development, including managing dependencies, compiling code, and testing apps on different devices.

In addition to these features, ADT also provides a UI design tool that makes it easy to create and edit your app's user interface. The tool includes a drag-and-drop interface designer and an asset editor that allows you to add images, icons, and other visual elements to your app. This feature can significantly speed up the app development process by reducing the amount of time required to create and customize the user interface.

To summarize, ADT is a powerful plugin for Eclipse that provides a comprehensive suite of tools to help you develop Android applications quickly and efficiently. Its key features include integrated Android project creation and debugging, SDK Tools integration, and a UI design tool for rapid prototyping and designing. By using ADT alongside Eclipse and the Android SDK, you can streamline your development workflow and focus on writing high-quality code for your app.

SDK tools are integrated into Eclipse's menus, perspectives, or as a part of background processes that run by ADT. Java programming language and XML editors are some of the key features provided by ADT. The Java programming language editor contains common IDE features such as compile time syntax checking, auto-completion, and integrated documentation for Android framework APIs. Additionally, ADT provides custom XML editors that allow you to edit Android-specific XML files in a form-based UI. A graphical layout editor enables you to design user interfaces with a drag and drop interface.

ADT also offers integrated documentation for Android framework APIs. You can access this information by hovering over classes, methods, or variables. If you need more detailed information about changes and new features, look no further than the recent changes page on the Android Tools Project site.

One of the most useful aspects of ADT is its ability to integrate with third-party SDK tools. For example, if you need help designing icons, ADT includes tools that can help streamline the process. With these tools, you can easily create custom icons without having to leave Eclipse or spend time learning additional software. Overall, ADT provides developers with everything they need to develop high-quality applications for Android devices.

The Android Asset Studio is a web-based tool that enables you to generate icons from existing images, clipart, or text. It also produces icons with different DPIs for various screen sizes and types.

Many of the tools that can be launched or executed through the command line are integrated into ADT. They encompass:

Code Editors

In addition to Eclipse's standard editor features, ADT provides custom XML editors that facilitate creating and editing 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.

Google I/O Session Video

For more information, view the segment on the XML editors.

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

In addition to providing custom editors for specific file types, such as drawables, animations, and color files, ADT offers XML tag completion for these special files. It also comes with a selection of form-based XML editors, including those for the AndroidManifest.xml and menu resources.

ADT provides resource linking enhancements that make it easier to navigate and access declarations of various types of resources in your codebase. By holding down the control key and clicking on specific items, such as R.id.button1, R.java, public static final int Button01=0x7f050000"@string:foo"@layout/bar"@drawable/icon"@android"@android:string/ok"android.R.string.id, you can quickly jump to these elements within your code.

Furthermore, ADT includes a graphical layout editor that enables you to design and edit layouts visually, making it easier to create and modify user interface elements. This feature allows you to experiment with different layout options before committing them into your codebase.

Overall, ADT's customization options and enhancements provide a more comprehensive Android development experience, allowing developers to work efficiently and effectively on their projects.

DT 提供了许多功能,以便您设计和构建应用程序的用户界面。其中许多功能位于图形布局编辑器中,您可以通过在 Eclipse 中打开应用程序的 XML 布局文件之一来访问它。

图形布局编辑器是您用于视觉设计和构建 UI 的主要屏幕。它分为以下几个部分:

Canvas

编辑器的中间部分是画布。它提供了您的布局的渲染视图,并支持从调色板直接拖放 UI 小部件。您可以选择用于渲染画布上的项目的平台版本。每个平台版本都有其自己的外观和感觉,这可能与另一个平台版本相似或完全不同。画布为当前选定的平台版本呈现适当的外观和感觉。

此平台版本不需要与您的应用程序目标的版本相同。

The graphical layout editor is designed to provide a visual representation of the user interface design. It consists of several components, including the canvas, palette, configuration chooser, and outline view. Each component serves a specific purpose in creating and editing the layout.

The canvas is the main workspace where users can design their user interface. It provides an intuitive drag-and-drop interface for arranging UI elements such as buttons, text boxes, and menus. Users can also adjust layout margins and orientation using context-sensitive actions in the layout actions bar that are displayed when needed.

The outline view is located on the right side of the editor and displays a hierarchical view of the layout. It enables users to reorder views and see how they will be rendered in the browser. The outline view provides similar functionality to the canvas but displays the layout in an ordered list instead of a rendered preview.

The palette is situated on the left side of the editor and provides a collection of widgets that users can drag onto the canvas. The palette shows rendered previews of the widgets, making it easy for users to find and select desired UI elements.

Configuration chooser is located at the top of the editor and enables users to change the layout's rendering mode or screen type. It provides options to customize the layout according to specific requirements or device characteristics.

In summary, the graphical layout editor allows users to create and edit user interface designs visually. By leveraging its various components such as canvas, palette, configuration chooser, and outline view, users can easily arrange UI elements, preview their designs, and customize them according to their needs.

The canvas, which is a designated area within the Google I/O Session where users can drag and drop UI widgets from the palette to design their layouts, provides a rendered preview of the resulting layout. This preview is based on various factors such as selected platform version, screen orientation, and theme, which are specified by the user in the configuration chooser. In addition to the canvas, an outline view also displays the layout in a hierarchical list. This view functions similarly to the canvas but offers a different organizational method that is beneficial for ordering and quickly selecting items.

When users right-click on a specific item in either the canvas or outline view, they are presented with a context-sensitive menu that allows them to modify various attributes of the layout or view. These include view and layout properties, among others. For more information about these features, please refer to the video segment provided on the canvas and outline view, along with the layout actions bar.

When you right-click a view or layout in the canvas or outline view, a context-sensitive menu appears that lets you set various properties. For example, you can set the ID of the view or layout, its text, its layout width and height, properties such as alpha or clickable, animation previews, and creation.

If your layout or view is animated, you can directly preview the animation in the canvas (if you select Android 3.0 or later as the platform version in the configuration chooser). To do this, simply right-click an item in the canvas and select "Play Animation". If the animation is not associated with an item, an option is available in the menu to create one. You can view more information about segmented animations by clicking on "View the segment on the animation" features.

Another useful feature of the canvas is that you can extract parts of a current layout into its own layout file, which you can then include in any other layout with just a single line of XML code. This is known as Layout Refactoring Support.

Overall, these features make it easy to customize your views and layouts using the canvas and outline view editor.

The canvas, in addition to its features found in the outline view, also has a number of capabilities unique to this mode. One notable feature is the use of a layout actions bar for editing views: This toolbar provides a range of context-sensitive options for adjusting how a particular view is arranged within your user interface.

The specific actions you can take will depend on which view is currently selected and its relationship to any parent layouts it may have. Some common tasks that can be accomplished are to toggle between different fill modes for the view, as well as specifying exact margins. For instance, if you select a view within a group in the canvas, you'll see actions related specifically to that group, such as options to switch between horizontal and vertical layout, and toggles to control whether each child of the group is aligned along its text baseline.

Other useful actions can be performed by using the toolbar at the top of the screen. These include actions for adjusting individual layout attributes of child views, like whether they should stretch out to match the width and height of their parent, or setting the child's layout gravity with a dropdown menu. There's even a button to open up a margin editor, where you can adjust margins around the child view, and a layout weight editor for controlling how much space each child view takes up relative to other views in the layout.

Editing a nested layout in its current context allows you to edit the included layout within the layout that includes it. This feature is particularly useful when working with complex layouts that require multiple sub-layouts for proper functionality.

When you drag and drop a UI widget onto the canvas, ruler markers appear on the screen to show you the approximate location of the widget based on the type of layout you are using. These markers can help you ensure that your widget is positioned correctly within the layout. Layouts can be previewed in real time as accurately as possible based on the platform version you are using. This feature provides you with an opportunity to view and test your layout animations before they are deployed.

One significant advantage of this feature is that it enables you to render layouts according to the platform version. This means that the system and action bars will also be rendered appropriately, resulting in a more accurate representation of your application's appearance and functionality. Additionally, fragments can be rendered in the same screen as the layout that includes them.

In summary, editing a nested layout in its current context allows you to edit and preview your application's layouts in real-time based on the platform version. This feature ensures that your layouts are rendered accurately and provide a better overall user experience for your application.

Google I/O Session Video provides a palette that allows you to drag and drop UI widgets onto the canvas and add them to your layout. The palette categorizes the widgets and displays rendered previews for easier lookup. The main features of the palette include different modes of rendered previews, such as icons only, icons and text, tiny previews, small previews, and previews rendered in real size. Previews are only available for layouts rendered with the latest revisions of Android 2.1 (API Level 7) or later.

Additionally, custom views in your project or library projects can be added under the custom views category. You can arrange the UI widgets alphabetically or by category. The configuration chooser is also included in the palette, which can be viewed on the configuration chooser section for more information.

The Configuration Chooser is a powerful tool that allows you to create and configure multiple layout configurations for different situations, such as one for landscape mode and another for portrait mode. It provides a range of options that you can set for each configuration, including the following:

1. Screen Type Combo Box: This feature offers predefined screen settings for common device configurations. You can also create your own custom settings by selecting "Custom..." from this combo box.

2. Screen Orientation Combo Box: This option allows you to choose between portrait or landscape orientation for your screen. This setting is important to ensure that your app displays correctly in both modes.

3. Theme Combo Box: The theme combo box offers a selection of predefined themes or a custom theme that you have created specifically for your app. This allows you to customize the visual appearance of your app based on your preferences.

4. Platform Combo Box: This combo box determines which platform version will be used to render your canvas and palette, as well as display appropriate themes. By selecting the appropriate platform version, you can ensure that your app functions properly on all supported devices.

5. Custom Layout Combo Boxes: These combo boxes allow you to select different versions of the same layout depending on the device's current state. For example, you can create a new version of a layout with the "Create" button if your app needs to adapt to certain conditions, such as changing time of day or dock positions.

In summary, the Configuration Chooser provides a comprehensive set of options for managing different layout configurations in your app. Whether you need to support different screen orientations, platforms, or themes, this feature makes it easy to customize the look and feel of your app to meet user needs and preferences. By utilizing this powerful tool, you can enhance the usability and performance of your app across a wide range of devices and platforms.

Sure, here is the refactored version of your content:

Refactoring Features in Google I/O Session Video

If you want to learn more about the important features of refactoring, you can check out this segment from the Google I/O 2018 session video. During this session, the developers discussed various refactoring techniques that can help you improve your codebase and make it more maintainable.

In both the graphical and XML layout editor, there are several features that facilitate refactoring. These include:

- The ability to quickly rename elements in your layout

- Automatic indentation and formatting of your code

- The ability to extract and reuse common parts of your layout

- The option to merge or split elements in your layout

These features make it easier for developers to work with their codebase and keep it organized. If you're interested in learning more about refactoring, be sure to check out this segment from the Google I/O session video.