ConstraintLayout 是新标准吗?
Is the ConstraintLayout the new standard?
我的问题是关于 ConstraintLayout
,因为自从 Android Studio 2.3,当我想创建一个新的 Layout
时,默认Layout
在我的 xml 文件中是 ConstraintLayout
.
ConstraintLayout
是新标准吗?
其他布局(LinearLayout
、GridLayout
、RelativeLayout
、...)呢?他们会贬值吗?我必须使用转换工具转换所有布局吗?
最佳做法是什么?尽可能使用 ConstraintLayout
?
这有点令人困惑,因为我不喜欢使用可视化编辑器,而且 ConstraintLayout
使用代码编辑器很难做到。
when I want to create a new Layout, the default Layout in my xml file is the ConstraintLayout
是否创建 ConstraintLayout
完全取决于您使用的模板。
Is the ConstraintLayout the new standard ?
许多 Android Studio 2.3 模板都使用它。这些模板只是一些开发人员作为起点使用的示例。这些模板在旧版本的 Android Studio 上有所不同,很可能在未来会再次发生变化。
What about the others layouts (LinearLayout, GridLayout, RelativeLayout,...) ? Will they be depreciated ?
这不太可能。
Do I have to Convert all my layout using the converting tool ?
没有
What is the best practice? Use as much as possible the ConstraintLayout ?
使用适合您的方法。考虑将 ConstraintLayout
作为候选人,但不要觉得有义务使用它。在您确定布局性能至关重要的特定位置(例如,滚动列表),如果您确定现有方法性能不佳,请考虑测试 ConstraintLayout
以查看它是否有帮助(可能会或可能不会) .另请注意 ConstraintLayout
本身并不能处理所有情况——例如,我还没有看到使用 ConstraintLayout
实现 TableLayout
结构(具有自动列大小调整)的有效方法。
我的问题是关于 ConstraintLayout
,因为自从 Android Studio 2.3,当我想创建一个新的 Layout
时,默认Layout
在我的 xml 文件中是 ConstraintLayout
.
ConstraintLayout
是新标准吗?
其他布局(LinearLayout
、GridLayout
、RelativeLayout
、...)呢?他们会贬值吗?我必须使用转换工具转换所有布局吗?
最佳做法是什么?尽可能使用 ConstraintLayout
?
这有点令人困惑,因为我不喜欢使用可视化编辑器,而且 ConstraintLayout
使用代码编辑器很难做到。
when I want to create a new Layout, the default Layout in my xml file is the ConstraintLayout
是否创建 ConstraintLayout
完全取决于您使用的模板。
Is the ConstraintLayout the new standard ?
许多 Android Studio 2.3 模板都使用它。这些模板只是一些开发人员作为起点使用的示例。这些模板在旧版本的 Android Studio 上有所不同,很可能在未来会再次发生变化。
What about the others layouts (LinearLayout, GridLayout, RelativeLayout,...) ? Will they be depreciated ?
这不太可能。
Do I have to Convert all my layout using the converting tool ?
没有
What is the best practice? Use as much as possible the ConstraintLayout ?
使用适合您的方法。考虑将 ConstraintLayout
作为候选人,但不要觉得有义务使用它。在您确定布局性能至关重要的特定位置(例如,滚动列表),如果您确定现有方法性能不佳,请考虑测试 ConstraintLayout
以查看它是否有帮助(可能会或可能不会) .另请注意 ConstraintLayout
本身并不能处理所有情况——例如,我还没有看到使用 ConstraintLayout
实现 TableLayout
结构(具有自动列大小调整)的有效方法。