Android Studio 3.1.3, design view is always empty

后端 未结 7 1217
刺人心
刺人心 2021-02-02 10:56

I\'m new to android development and I have this problem with my Android Studio 3.1.3 demo project or any project that I create.

Even though that I can drag and drop diff

7条回答
  •  别那么骄傲
    2021-02-02 11:00

    Your layout has problem with the CheckBox widget. It has no constraint. tools:layout_editor_absoluteX and tools:layout_editor_absoluteY are only affect on design mode, but not in real running app.

    Note: Don't drag/drop the widget on design view, it will generate many weird properties that not gonna work in all case, like the two properties you got. Do it in the code instead. If you want the CheckBox to be in center, do like this:

    
    

    This will remove the error icon at the CheckBox, then a refresh may help.

提交回复
热议问题