this view is not constrained. It

作者: 阴天吃鱼 | 来源:发表于2018-10-30 14:55 被阅读44次

此视图不受约束,它只有设计时位置,所以在运行时它会跳到(0,0)。

解决方法:
  • 我的AndroidStudio版本是3.1.4


    image.png
  • 低版本解决方法:
    Constraint Layout” —> “Infer Constraints”

上述是解决随意拖动控件无约束的情况,大多情况下个人建议添加上约束较好。


image.png

相关文章

网友评论

    本文标题:this view is not constrained. It

    本文链接:https://www.haomeiwen.com/subject/reegtqtx.html