Layout View

The Layout View offers a look at the View layout and properties. It has three views:

• Tree View: a hierarchy diagram of the Views, on the left.

• Properties View: a list of the selected View's properties, on the top-right.

• Wire-frame View: a wire-frame drawing of the layout, on the bottom-right.

Select a node in the Tree View to display the properties of that element in the Properties View. When a node is selected, the Wire-frame View also indicates the bounds of the element with a red rectangle. Double click a node in the tree (or select it, and click Display View) to open a new window with a rendering of that element.

The Layout View includes a couple other helpful features for debugging your layout: Invalidate and Request Layout. These buttons execute the respective View calls, invalidated) andrequestLayoutQ, on the View element currently selected in the tree. Calling these methods on any View can be very useful when simultaneously running a debugger on your application.

The Tree View can be resized by adjusting the zoom slider, below the diagram. The number of View elements in the window is also given here. You should look for ways to minimize the number of Views. The fewer View elements there are in a window, the faster it will perform.

If you interact with the device and change the focused View, the diagram will not automatically refresh. You must reload the Layout View by clicking Load View Hierarchy.

Was this article helpful?

0 0

Post a comment