【问题标题】:Linear Layout Constraints added automatically when switching tabs切换选项卡时自动添加线性布局约束
【发布时间】:2017-11-03 10:46:46
【问题描述】:

DesignText 选项卡之间切换选项卡时,Android Studio 不断更改我的约束。

在更改为Design 标签之前:

 <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal">....

切换到Design后又回到Text

 <LinearLayout
    android:layout_width="395dp"
    android:layout_height="587dp"
    android:orientation="horizontal"
    tools:layout_editor_absoluteY="8dp"
    tools:layout_editor_absoluteX="8dp">...

必须是我缺少的按钮。如何防止它发生?

【问题讨论】:

  • 可能是您从设计面板添加了任何影响您的布局的小部件。
  • 不,没有添加小部件。新的空活动。仅添加了 TextView 或 ImageView 的线性布局

标签: android xml android-layout android-studio android-linearlayout


【解决方案1】:

这似乎是 Android Studio 中的一个错误。

一旦我升级到3.0.1,问题似乎就自行解决了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多