Vil*_*usK 15 android android-studio android-constraintlayout android-layout-editor
我正在使用android.support.constraint.ConstraintLayout布局简单卡片的内容视图.
我每次都会在以下情况下随机更改XML:
Design选项卡Preview打开一个窗格时(在这种情况下,在我的更改期间更改会发生更改).随机变化包括:
layout_marginEnd)tools:layout_editor_absoluteX值问题:
请看一下这个文件diff,它是在切换到Design选项卡时自动生成的:

PS.:我的Android Studio版本是2.2.3; 我在macOS Sierra上运行它.
正如所建议的,在制作之后layout_height="match_parent",我不经常修改,但是当我在Layout Design'er中编辑布局时,我的XML仍然搞砸了:
这次我想layout_marginTop通过设计UI 进行设置(所选行是我想要添加的),但我还得到了其他不需要的更改:
layout_marginStart 删除;app:layout_constraintBottom_toBottomOf引用的ID有一个前缀"+"符号,这意味着,这些ID是新声明的,所以当我使用Goto declaration功能时,我将不得不从列表中选择它 - 而不是所需的行为.tools:layout_editor_absoluteX得到补充.我可以忽略它,但仍然 - 不是我想要发生的事情.正如@JoeyJubb提到的,使用layout_height="match_parent"解决了这个问题。至少XML没有被修改。虽然,有时预览生成不正确。
| 归档时间: |
|
| 查看次数: |
2877 次 |
| 最近记录: |