Use of the Android Layout Optimizer tool Hierarchy Viewer

Source: Internet
Author: User



There have been a lot of articles on how the Hierarchy Viewer is used, and here is a step-by-step demonstration of how to use it, Ddna's "Android Tool" ignored UI Viewer: Hierarchy Viewer and Zhang Xingye's Android UI Optimization-The use of the Hierarchyviewer tool is great.


Hierarchy Viewer has two uses, one is used to analyze the current page view level, but also can analyze the layout of time statistics (measrue, Layout, Draw) The specific time required, this article is mainly concerned about the statistical function of the layout time.

The following is a page layout on an Android 2.3.7 phone, and clicking on a node will show the exact time it takes (Measrue, Layout, Draw):


Found that there is a problem, each of the above is shown n/A, need to click on the re-statistics click "Profile Node", because there is no connection to the phone so this button is a gray image is only a demonstration under the "Profile Node" location



Here is the final effect, you can see the execution of Measue, Layout, Draw


Problems that occur after the phone is connected [hierarchyviewer]unable to get View server version from device ******
[Hierarchyviewer] Unable to get View server protocol version from device ******
[Viewserverdevice] Unable to debug device: ******
[Hierarchyviewer] Unable to get the focused window from device ******

How to turn on Viewserver on the root phone so that hierachyviewer can connect
Resolving view hierarchy Cannot start


Reference Android layout Tricks #1Optimizing layout hierarchiesandroid Performance Optimization Series---improving layout performance (i)

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.