Use HierchyViewer and androidui optimization tools for Android UI Optimization
Recently, I am studying app performance optimization. First, View optimization. To optimize the code, I need to know where optimization is needed. Here is a brief introduction to the use of HierchyViewer. First, connect to the device, Open the interface to be optimized, and then Open the Eclipse Window-> Open Perspective-> others-> hierarchyviewer,
Next, select a layout and click the three-color icon above, so that you can clearly see the layout Painting time, and you can also know which layout to optimize. Red indicates the location to be optimized.
As for how to optimize it, let's talk about the experience of this period of time:
1. Try not to use weight
2. RelativeLayout saves time than LinearLayout
3. Use include, merge, and viewstub.
4. Do not set too many layout layers.