Android UI optimizer--using the Hierarchyviewer tool
Source: Internet
Author: User
<span id="Label3"></p><p><p><br class="Apple-interchange-newline">To get to the point, our article will mention why use hierarchyviewer, how to use hierarchyviewer, the latter content will be a bit more.</p></p><p><p></p></p>Why use Hierarchyviewer<p><p>Unreasonable layouts can slow down the performance of our application ui, and hierarchyviewer can intuitively get <span lang="EN-US">information about the UI layout design structure and various properties visually, helping us optimize the layout design. Hierarchyviewer is one of the tools of our optimizer, which is a very useful tool for android, which helps us to better view and design the user interface <span lang="EN-US">(ui) and is definitely a tool for UI Inspection. </span></span></p></p><p><p></p></p>How to use Hierarchyviewer<p><p><span lang="EN-US"><span lang="EN-US">Hierarchy Viewer is a tool released with the Android SDK, located on Android sdk/tools/hierarchyviewer.bat (the Windows operating system, shown on Mac as hierarchyviewer), <span lang="EN-US">It's also super easy to use, and this tool gives you a detailed understanding of the control layout of the current interface and the properties of a control (name, id, height, and so on).<br></span></span></span></p></p><p><p><span lang="EN-US">1) connect the device real machine or simulator (the real machine may not be able to connect, I use 2.3, connected, did not read the content);</span></p></p><p><p><span lang="EN-US">2) start the app you want to Watch.</span></p></p><p><p><span lang="EN-US">3) Open hierarchyviewer, Click the Hierarchyviewer file. After the connection, for example, this figure is obtained in the official Document.</span></p></p><p><p></p></p><p><p></p></p><p><p></p></p><p><p>4) Double-click on the top, such as the <focused window>, This is the current window, after loading will show the current interface Hierarchy.</p></p><p><p></p></p><p><p></p></p><p><p></p></p><p><p>5) look at the hierarchy chart, this diagram is a bit large and can be dragged. The View Hierarchy window shows all the view objects of the activity, and a view can be selected to see the details of the view, preferably the show Extras option in the Tool.</p></p><p><p></p></p><p><p></p></p><p><p></p></p><p><p>6) observe a single view and select a single view to appear as shown in the Graphic. Here you will see the time-consuming measure, Layout, draw.</p></p><p><p></p></p><p><p></p></p><p><p></p></p><p><p>The View Hierarcy can also help you identify low-performance portions of Rendering. A red or yellow dot in the view node represents a slower view Object. As you step through the application, you can determine whether a view is slow or slow in a particular environment.</p></p><p><p>Note that low performance does not necessarily indicate a problem, especially as a viewgroup object, the more child nodes of view, the more complex the structure, the worse the Performance.</p></p><p><p>The View Hierarchy window can also help you find performance Issues. Just look at the performance metrics (color dots) of each view node, and you can see which of the slowest view objects are measured (layout or drawing), so you can quickly determine which problem to prioritize.</p></p><p><p></p></p><p><p></p></p>/*** @author Zhang Xingye * http://blog.csdn.net/xyz_lmn* iOS starter group: 83702688* Android Development Advanced Group: 241395671* my Sina weibo:<strong><strong>@ Zhang Xingye tbow</strong></strong>*/<p><p></p></p><p><p></p></p><p><p>Reference:</p></p><p><p></p></p><p><p>Android UI optimizer--using the Hierarchyviewer tool</p></p></span>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service