When debugging an Android application it’s important to look at the structure of the UI. There are tools that help you visualize the UI. Inside this article I will be explaining two tools:
Hierarchy Viewer
Layoutopt
Hierarchy Viewer
The Hierarchy Viewer application provides a visual representation of the layout’s View hierarchy (the Layout View) and a magnified inspector of the display (the Pixel Perfect View). So lets run the tool.
Connect your device or launch an emulator
From a terminal, launch hierarchyviewer from your SDK /tools directory.
In the window that opens, you’ll see a list of Devices. When a device is selected, a list of currently active Windows is displayed on the right. The focused window is the window currently in the foreground, and also the default window loaded if you do not select another.
Select the window that you’d like to inspect and click Load View Hierarchy. The Layout View will be loaded. You can then load the Pixel Perfect View by clicking the second icon at the bottom-left of the window.
Read more: Blog
0 comments:
Post a Comment