我在我的布局中使用了androidx.constraintlayout.widget.ConstraintLayout,但是它没有显示链条,而且我也无法拖动任何小部件。我只是输入我想要使用的约束条件。
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="112dp"/>
这是一个androidx ConstraintLayout 的示例截图: androidx.constraintlayout.widget.ConstraintLayout
但是当我尝试切换回android.support.constraint.ConstraintLayout时,我看不到它。
<android.support.constraint.ConstraintLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="112dp"/>
这是支持约束布局的示例截图: android.support.constraint.ConstraintLayout
这是一个bug还是其他什么问题吗?
编辑:
目前我的解决方案是从以下方式进行切换:
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
但是这并不能解决我的问题,因为我不想使用支持。