我们很高兴地宣布 ConstraintLayout 2.0 beta 6 发布了。
它可以从 Google 的 maven 仓库中获取:
dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta6'
}
或者也可以使用 android.support 包:
dependencies {
implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta6'
}
文档:
- https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintLayout
- https://developer.android.com/reference/androidx/constraintlayout/motion/widget/MotionLayout
代码示例: https://github.com/android/views-widgets-samples/tree/master/ConstraintLayoutExamples
Bug 修复
以下是在 beta 6 中修复的问题列表。需要特别关注的是 MotionLayout 中的组可见性处理和派生约束问题。
MotionLayout constraintsets don't correctly read match width/height defaults | 156539907 |
ImageFilterView & ImageFilterButton fail to set round | 156420202 |
Views in ConstraintLayout not honoring "match constraints" (0dp) when used with ViewPager2 | 147202197 |
NoSuchMethodError: getLayoutDirection() | 147871163 |
[MotionLayout] ANR | 156047801 |
Group visibility + single view visibility | 73186245 |
Group Visibility Does Not Support View.INVISIBLE | 79307158 |
ConstraintLayout sometimes ignores visibility changes | 154533618 |
ConstraintLayout Group visibility not updated | 117485026 |
ConstraintLayout Group - Changing visibility when using INVISIBLE doesn't work correctly | 130524019 |
ConstraitLayout Group | 143163408 |
版权声明
禁止一切形式的转载-禁止商用-禁止衍生 申请授权