This view is not constrained vertically: at runtime it will jump to the left unless you add a vertic
16lz
2021-01-23
Android studio 使用约束布局(ConstraintLayout)报错:
This view is not constrained vertically: at runtime it will jump to the left unless you add a vertical constraint less… (Ctrl+F1)
The layout editor allows you to place widgets anywhere on the canvas, and it records the current position with designtime attributes (such as layout_editor_absoluteX.) These attributes are not applied at runtime, so if you push your layout on a device, the widgets may appear in a different location than shown in the editor. To fix this, make sure a widget has both horizontal and vertical constraints by dragging from the edge connections.
解决方案:
1.切换xml到design试图下
2.选中ConstraintLayout右键选择Constraint Layout中的Infer Constraints
更多相关文章
- Android常用布局颜色值大全
- android checkbox 或RadioButton, textView居左居右布局
- Android实用图片显示控件photoview
- 水平布局linerlayout
- android原生分享图片失败的问题
- Android TextView带背景图片和自定义边框
- Android 简单的图片查看器源码实现
- 【android】launcher图标自动生成、点9图片在线编辑工具
- Imageview图片圆形显示