When using Constraintlayout, an exception was found:
This view isn't constrained Vertically:at runtime it'll jump to the left unless you add a vertical constraint less ... (CTRL+F1)
The layout editor allows widgets anywhere on the canvas, and it records the current position with Designtime attributes (such as Layout_editor_absolutex.) These attributes is not applied at runtime, so if you push your layout on a device, the widgets could appear in a different Location than shown in the editor. To fix this, make sure a widget have both horizontal and vertical constraints by dragging from the edge connections.
I carefully checked the constraints, there is no problem, but show me the lack of constraints, compiled will be all the control heap in the upper left corner, I chose to ignore the exception, but the exception did not ignore me, the compiled effect is similar to farmelayout did not add the same effect of location constraints, and then find Baidu, Found the solution:
1. Switch XML to design and try to
2. Select Constraintlayout Right-click to select Infer in constraint layout Constraints
But I opened the Androidstudio view and examined it carefully, but I didn't find the hint on the diagram above:
At last I examined it carefully and finally let me find:
Solve the problem. Reference:
http://blog.csdn.net/u010296640/article/details/72922165