UI debugging when the programmer is a headache problem: sometimes 1DP, 2dp problems, get speechless (Android development deep Experience)
Here is a common debugging tool in the actual development process, can be accurate to each view in the absolute position of the screen (accurate to the specific PX), with such a tool, you can well find the problem in the UI.
In fact, in the Ddms view, use the Dump view UI hierarchy for Automator:
It's easy to find it, too.
1, Android Studio (everyone agreed to), click on the small robot above
2, select the Ddms view, find the phone, select, Dump view UI hierarchy for Automator right next to the camera logo, yes, that's it, there's a little robot on the phone screen.
3. The current screen of the phone corresponds to the current debug page, select the page element, on the right is the reality of the View information (type coordinate ID 、。。。 )
PS: This method is very practical for the novice, has solved a few problems.
Picture belongs to the test picture
Android UI Debugging Common Tool (Dump view UI hierarchy for Automator)