From b984c93c99768fc2a6a2a8eaac257e23cbd6a611 Mon Sep 17 00:00:00 2001 From: Joe Fernandez Date: Wed, 18 Nov 2015 18:53:39 -0800 Subject: [PATCH] docs: Tools docs reorganization, round 1b b/25522909 Change-Id: I54d51eeedf122648026bd013cfceac3f32629b7e --- docs/html/sdk/installing/create-project.jd | 22 +- .../tools/debugging/debugging-devtools.jd | 77 ----- docs/html/tools/debugging/debugging-log.jd | 69 +++-- .../debugging/debugging-projects-cmdline.jd | 78 ----- docs/html/tools/help/index.jd | 30 +- docs/html/tools/studio/code-tools.jd | 28 ++ docs/html/tools/studio/index.jd | 19 +- docs/html/tools/studio/ui-tools.jd | 32 ++ docs/html/tools/tools_toc.cs | 289 +++++++++++------- 9 files changed, 293 insertions(+), 351 deletions(-) delete mode 100644 docs/html/tools/debugging/debugging-devtools.jd delete mode 100644 docs/html/tools/debugging/debugging-projects-cmdline.jd create mode 100644 docs/html/tools/studio/code-tools.jd create mode 100644 docs/html/tools/studio/ui-tools.jd diff --git a/docs/html/sdk/installing/create-project.jd b/docs/html/sdk/installing/create-project.jd index 68fd57250d171..fe14c612f9814 100644 --- a/docs/html/sdk/installing/create-project.jd +++ b/docs/html/sdk/installing/create-project.jd @@ -1,4 +1,4 @@ -page.title=Managing Projects from Android Studio +page.title=Managing Projects with Android Studio @jd:body @@ -8,13 +8,6 @@ page.title=Managing Projects from Android Studio
  1. Creating an Android Project
  2. -
      -
    1. Create a New Project
    2. -
    3. Select Form Factors and API Level
    4. -
    5. Add an Activity
    6. -
    7. Configure Your App
    8. -
    9. Develop Your App
    10. -
  3. Creating an Android Module
  4. @@ -359,10 +352,6 @@ Android project view:

    per resource type. - - -

    Use the Android Project View

    -

    The Android project view is enabled by default and shows all the build files at the top level of the project hierarchy under Gradle Scripts. The project module appears as a folder at the top level of the project hierarchy and contains these three elements @@ -386,12 +375,3 @@ from this representation and maintains the traditional project structure.

       

    Figure 10: Android and Traditional project view

    - - - - - - - - - diff --git a/docs/html/tools/debugging/debugging-devtools.jd b/docs/html/tools/debugging/debugging-devtools.jd deleted file mode 100644 index 3a051200422b6..0000000000000 --- a/docs/html/tools/debugging/debugging-devtools.jd +++ /dev/null @@ -1,77 +0,0 @@ -page.title=Using the Dev Tools App -parent.title=Debugging -parent.link=index.html -@jd:body - -

    The Dev Tools application is installed by default on all system images included with the SDK, - so you can use it with the Android Emulator. With the Dev Tools application, you can enable a - number of settings on your device that will make it easier to test and debug your applications.

    - -

    The Dev Tools application relies on a number of permissions that are not available for - third party applications. If you'd like to install the Dev Tools application - on a real development device, you'd have to build a system image for that device and sign - the Dev Tools application with the same key as used for the system image.

    - -

    To get started, launch the Dev Tools application and select Development Settings. This will - open the Development Settings page with the following options (among others):

    - -
    -
    Debug app
    - -
    - Lets you select the application to debug. You do not need to set this to attach a debugger, - but setting this value has two effects: - -
      -
    • It will prevent Android from throwing an error if you pause on a breakpoint for a long - time while debugging.
    • - -
    • It will enable you to select the Wait for Debugger option to pause application - startup until your debugger attaches (described next).
    • -
    -
    - -
    Wait for debugger
    - -
    Blocks the selected application from loading until a debugger attaches. This way you can - set a breakpoint in {@link android.app.Activity#onCreate onCreate()}, - which is important to debug the startup process of an Activity. - When you change this option, any currently running instances of the selected application will - be killed. In order to check this box, you must have selected a debug application as described - in the previous option. You can do the same thing by adding {@link - android.os.Debug#waitForDebugger()} to your code.
    - -
    Show screen updates
    - -
    Flashes a momentary pink rectangle on any screen sections that are being redrawn. This is - very useful for discovering unnecessary screen drawing.
    - -
    Immediately destroy activities
    - -
    Tells the system to destroy an activity as soon as it is stopped (as if Android had to - reclaim memory).  This is very useful for testing the {@link - android.app.Activity#onSaveInstanceState} / {@link - android.app.Activity#onCreate(android.os.Bundle)} code path, which would otherwise be difficult - to force. Choosing this option will probably reveal a number of problems in your application - due to not saving state. For more information about saving an activity's state, see the - Activities -document.
    - -
    Show CPU usage
    - -
    Displays CPU meters at the top of the screen, showing how much the CPU is being used. The - top red bar shows overall CPU usage, and the green bar underneath it shows the CPU time spent - in compositing the screen. -

    Note: You cannot turn this feature off once it is on, without - restarting the emulator.

    - -
    Show background
    - -
    Displays a background pattern when no activity screens are visible. This typically does not - happen, but can happen during debugging.
    -
    - -

    These settings will be remembered across emulator restarts.

    - - - diff --git a/docs/html/tools/debugging/debugging-log.jd b/docs/html/tools/debugging/debugging-log.jd index d2baaf26ce84c..42b307c54cdf6 100644 --- a/docs/html/tools/debugging/debugging-log.jd +++ b/docs/html/tools/debugging/debugging-log.jd @@ -1,6 +1,5 @@ page.title=Reading and Writing Logs -parent.title=Debugging -parent.link=index.html + @jd:body
    @@ -8,8 +7,6 @@ parent.link=index.html

    In this document

      -
    1. The Log class
    2. -
    3. Starting LogCat
    4. Filtering Log Output
    5. @@ -20,7 +17,7 @@ parent.link=index.html
    6. Viewing stdout and stderr
    7. -
    8. Debugging Web Pages
    9. +
    10. Logging from Code
    @@ -31,31 +28,6 @@ parent.link=index.html {@link android.util.Log} class. You can run LogCat through ADB or from DDMS, which allows you to read the messages in real time.

    -

    The Log class

    - -

    {@link android.util.Log} is a logging class that you can utilize in your code to print out - messages to the LogCat. Common logging methods include:

    - - For example: -
    -Log.i("MyActivity", "MyClass.getView() — get item number " + position);
    -
    - -

    The LogCat will then output something like:

    -
    -I/MyActivity( 1557): MyClass.getView() — get item number 1
    -
    -

    Using LogCat

    You can use LogCat from within DDMS or call it on an ADB shell. For more information on how to @@ -301,8 +273,35 @@ $ adb shell start setting as a default on the emulator/device instance, you can add an entry to /data/local.prop on the device.

    -

    Debugging Web Apps

    -

    - If you're developing a web application for Android, you can debug your JavaScript using the console JavaScript APIs, - which output messages to LogCat. For more information, see - Debugging Web Apps.

    +

    Logging from Code

    + +

    The {@link android.util.Log} class allows you to create log entries in your code that display + in the LogCat tool. Common logging methods include:

    + + + +

    For example, using the following call:

    + +
    +Log.i("MyActivity", "MyClass.getView() — get item number " + position);
    +
    + +

    The LogCat outputs something like:

    +
    +I/MyActivity( 1557): MyClass.getView() — get item number 1
    +
    diff --git a/docs/html/tools/debugging/debugging-projects-cmdline.jd b/docs/html/tools/debugging/debugging-projects-cmdline.jd deleted file mode 100644 index 032d6ce6f9baa..0000000000000 --- a/docs/html/tools/debugging/debugging-projects-cmdline.jd +++ /dev/null @@ -1,78 +0,0 @@ -page.title=Debugging from Other IDEs -parent.title=Debugging -parent.link=index.html -@jd:body - - - - -

    If you are not using Android Studio to develop, you can still take advantage of all the tools that - the Android SDK provides for debugging. A basic debugging environment consists of:

    - - - -

    You need to obtain a JDWP-compliant Java debugger to properly debug your application. - Most Java IDEs will already have one included, or you can use a command line debugger, - such as JDB, if you are using a simple text editor to develop applications.

    - -

    Starting a debugging environment

    -

    A Java Debugger assists you in finding problems with - your code by letting you set breakpoints, step through execution of your application, and examine - variable values. Since you are not using Android Studio, you have to manually start up the debugging - environment yourself by running a few tools that are provided in the Android SDK. To begin - debugging your application, follow these general steps:

    - -
      -
    1. Load an AVD with the Android emulator or connect a device to your computer.
    2. - -
    3. Start DDMS from the sdk /tools directory. This also starts ADB if it is - not already started. You should see your device appear in DDMS.
    4. - -
    5. Install and run your .apk file on the device or emulator. In DDMS, you should - see your application running under the device that you installed it to.
    6. - -
    7. Attach your debugger to the debugging port 8700, or to the specific port shown for the - application in DDMS.
    8. -
    - -

    Configuring Your IDE to Attach to the Debugging Port

    - -

    DDMS assigns a specific debugging port to every virtual machine that it finds on the - emulator. You must either attach your IDE to that port (listed on the Info tab for that VM), or - you can use a default port 8700 to connect to whatever application is currently selected on the - list of discovered virtual machines.

    - -

    Your IDE should attach to your application running on the emulator, showing you its threads - and allowing you to suspend them, inspect their state, and set breakpoints. If you selected "Wait - for debugger" in the Development settings panel the application will run when Android Studio connects, - so you will need to set any breakpoints you want before connecting.

    - -

    Changing either the application being debugged or the "Wait for debugger" option causes the - system to kill the selected application if it is currently running. You can use this to kill your - application if it is in a bad state by simply going to the settings and toggling the - checkbox.

    - - - - - - - diff --git a/docs/html/tools/help/index.jd b/docs/html/tools/help/index.jd index e7b9111191970..411f908463ba5 100755 --- a/docs/html/tools/help/index.jd +++ b/docs/html/tools/help/index.jd @@ -43,10 +43,6 @@ avd) the emulator (emulator), and the Dalvik Debug Monitor S
    android
    Lets you manage AVDs, projects, and the installed components of the SDK.
    -
    Deep Link and App Indexing API Support
    -
    Helps you add deep links, app indexing, and search functionality to your apps. - These features can make it easier to find content in an installed app, drive more traffic to your - app, discover which app content is used most, and attract new users.
    Hierarchy Viewer (hierarchyviewer)
    Provides a visual representation of the layout's View hierarchy with performance information @@ -63,8 +59,6 @@ avd) the emulator (emulator), and the Dalvik Debug Monitor S
    sqlite3
    Lets you access the SQLite data files created and used by Android applications.
    -
    Translations Editor
    -
    Lets you view and update all your string resource translations in one convenient place.
    @@ -85,9 +79,8 @@ avd) the emulator (emulator), and the Dalvik Debug Monitor S
    ADB Shell Commands
    Learn the commands available for advanced command-line operations.
    -
    Dalvik Debug Monitor -Server (ddms)
    -
    Lets you debug Android applications.
    +
    Dalvik Debug Monitor Server (ddms)
    +
    Lets you debug Android apps.
    Device Monitor
    Android Device Monitor is a stand-alone tool that provides a graphical user interface for @@ -112,6 +105,11 @@ you can view the file in a profiling tool of your choice.
    traceview
    Provides a graphical viewer for execution logs saved by your application.
    +
    Tracer for OpenGL ES
    +
    Allows you to capture OpenGL ES + commands and frame-by-frame images to help you understand how your app is executing + graphics commands.
    + @@ -142,24 +140,10 @@ files after they have been signed. WYSIWYG editor. It also previews stretched versions of the image, and highlights the area in which content is allowed. -
    Image Asset Studio
    -
    Helps you to generate custom icons for your Android applications from existing images, cliparts, or text. - It generates a set of icons at the appropriate resolution for each generalized screen density that your app - supports.
    - -
    Vector Asset Studio
    - -
    Helps you add material icons and import Scalable Vector Graphic (SVG) files into your - Android Studio project as a drawable resource.
    -
    etc1tool
    A command line utility that lets you encode PNG images to the ETC1 compression standard and decode ETC1 compressed images back to PNG.
    -
    Tracer for OpenGL ES
    -
    Allows you to capture OpenGL ES commands and frame by frame images to help you understand - how your graphics commands are being executed.
    - diff --git a/docs/html/tools/studio/code-tools.jd b/docs/html/tools/studio/code-tools.jd new file mode 100644 index 0000000000000..4033bfcb28d81 --- /dev/null +++ b/docs/html/tools/studio/code-tools.jd @@ -0,0 +1,28 @@ +page.title=Android Studio Code Tools + +@jd:body + +

    + Android Studio provides a number of coding features to assist with writing and building your + app. These tools help you write code faster and improve quality. +

    + +
    +
    Lint
    +
    The Lint tool is a static code analysis tool that checks your Android + project source files for potential bugs and optimization improvements.
    + +
    Code Annotations
    +
    Annotations help you improve code readability and improve code inspector output, + by allowing you to more clearly define method parameter requirements. +
    + +
    Deep Link and App Indexing
    +
    These features help you add deep links, app indexing, and search functionality to your + apps. These features can make it easier to find content in an installed app, drive more + traffic to your app, discover which app content users view the most, and attract new users. +
    + +
    + + diff --git a/docs/html/tools/studio/index.jd b/docs/html/tools/studio/index.jd index 1c0fe996044f4..5c05363ef229f 100644 --- a/docs/html/tools/studio/index.jd +++ b/docs/html/tools/studio/index.jd @@ -43,7 +43,6 @@ Android Studio offers:

  5. And much more
  6. -

    If you're new to Android Studio or the IntelliJ IDEA interface, this page provides an introduction to some key Android Studio features.

    @@ -235,19 +234,9 @@ calls related to those actions to optimize your app's performance and memory use

    Figure 6. Allocation tracker.

    -

    Perform the following steps to track and analyze allocations:

    -
      -
    1. Click the Start/Stop Allocation Tracking icon - () in the - Memory Monitor. Android Studio starts tracking memory allocations.
    2. -
    3. Perform the tasks whose mallocs you want to track.
    4. -
    5. Click the Start/Stop Allocation Tracking icon again. Android Studio stops tracking mallocs - and saves the data to a file named Allocation-yyyy.mm.dd-hh.mm.ss.alloc. The - resulting file appears in the Captures tab.
    6. -
    7. Double-click the file to open it in the allocation viewer. -

      The allocation viewer allows you to view and analyze the allocations your app made while - running.

    8. -
    +

    For information about tracking and analyzing allocations, see + Memory Monitor. +

    Data file access

    @@ -359,7 +348,7 @@ Studio. Android Studio validates the configured annotations during code inspecti Library dependency.
  7. In the Choose Library Dependency dialog, select support-annotations and click Ok.
  8. -
+

The build.gradle file is updated with the support-annotations dependency.

diff --git a/docs/html/tools/studio/ui-tools.jd b/docs/html/tools/studio/ui-tools.jd new file mode 100644 index 0000000000000..2d25de66c3743 --- /dev/null +++ b/docs/html/tools/studio/ui-tools.jd @@ -0,0 +1,32 @@ +page.title=Android Studio User Interface Tools + +@jd:body + +

+ Android Studio provides a number of user interface tools to assist you with creating layouts, + implementing style themes, and building graphic or text resources for your app. +

+ +
+ +
Layout Editor
+
Drag and drop user interface elements to build layouts for your app. +
+ +
Theme Editor
+
Build re-usable user interface styles for layouts and widgets in your app. +
+ +
Translations Editor
+
View and update all your string resource translations in one convenient place. +
+ +
Vector Asset Studio
+
Add material icons and import Scalable Vector Graphic (SVG) files into your + Android Studio project as a drawable resource.
+ +
Image Asset Studio
+
Generate custom icons for your Android applications from existing images, + clipart, or text.
+ +
diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs index 14af176a470a0..9f575d41ed6fb 100644 --- a/docs/html/tools/tools_toc.cs +++ b/docs/html/tools/tools_toc.cs @@ -13,33 +13,6 @@ - - - - - + - + +
  • + Tips and Tricks
  • + + + + + + + + -
  • - Traceview + +
  • -
  • - Systrace + +
  • +