我在布局中使用的是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"/>
Run Code Online (Sandbox Code Playgroud)
这是androidx约束布局的示例屏幕截图: 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"/>
Run Code Online (Sandbox Code Playgroud)
这是支持constraintLayout的示例屏幕截图: android.support.constraint.ConstraintLayout
这是错误还是什么?
我当前的解决方案是从:
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
Run Code Online (Sandbox Code Playgroud)
至
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
Run Code Online (Sandbox Code Playgroud)
但这不能解决我的问题,因为我不想使用支持。
android android-constraintlayout constraint-layout-chains androidx