


Hierarchy Viewer displays a multipane user interface. The layout hierarchy of the activity screen is shown in the Tree View pane. I highlighted the W2A activity object identified by its ca.javajeff.w2a package name, then clicked Hierarchy View to activate the Hierarchy Viewer tool. Underneath the highlighted device line is a list of currently visible subclass objects. The Devices tab shows all accessible devices, which happens to be the emulated Nexus 4 device in this example. The Devices tab appears when DDMS is selected. Figure 1 shows the resulting screen.įigure 1. I then launched Android Device Monitor from Android Studio. You might remember from Part 1 that I used Android Studio to launch my W2A example app in the Nexus 4 emulator. If you prefer to run the tool from Android Studio, choose Tools > Android > Android Device Monitor. To launch Android Device Monitor from your command line, execute the monitor program in your Android SDK's tools directory. This tool can help you debug your application and profile its performance.

A trace shows where time and CPU cycles are being spent, displaying what each thread and process is doing at any given time.
