Hierarchy Viewer hierarchyviewer

The Hierarchy Viewer tool helps you optimize the user interface. It displays a tree view of the elements in the user interface and a wireframe view of the user interface. It also enables you to select elements in the tree view and inspect the properties of the user interface elements.

For example, to display the Hierarchy Viewer tool for the sample application, run the emulator and run the sample application we created. Next, run the command hierarchyviewer on a command line. This displays a user interface with a list of devices and a list of windows. Select the device listed for the emulator and to see a list of active windows. Select the window named com.sam-ples/com.samples/HelloAndroidGeek, which is the interface for the sample application we created. Click the button Load View Hierarchy. This displays a layout view window, as shown in Figure 11.22.

FIGURE 11.22_

Hierarchy Viewer.

FIGURE 11.22_

Hierarchy Viewer.

The Hierarchy Viewer tool also has a pixel-perfect view that you can toggle. You can use this to display the device window and a magnified view of the device window. The Hierarchy Viewer also enables you to see an image on top of the view, to design a user interface based on an image mockup.

0 0

Post a comment