Changes

Jump to: navigation, search
Using the Hierarchy Viewer
The hierarchy viewer can only be used to inspect applications that are either running within an Android emulator, or on a device running a development version of Android. To run the tool on the LayoutSample application created in this chapter, launch the application on an Android Virtual Device emulator and wait until it has loaded and is visible on the emulator display. Once running, select the Tools -> Android -> Monitor (DDMS included) menu option. In the DDMS window, click on the Hierarchy View tab located in the top right hand corner of the window.
When the Hierarchy Viewer appears, it will consist of a number of different panels. The left hand panel, illustrated in Figure 14-3, lists all the activities windows currently running active on the device or emulatorsuch as the navigation bar, status bar and launcher. The activity window listed in bold is the current foreground activitywindow, which should, in this case, be LayoutSampleActivity.
Selecting the activity layout sample window will cause the hierarchy to load into the Tree View panel as shown in Figure 14 -4 (note that there may be a short delay between selection of the activity window and the hierarchy diagram appearing):
Figure 14-8
 
== Summary ==

Navigation menu