Android 约束布局包裹高度退出工作
我在一个RecyclerView中有一个ConstraintLayout,它的高度有wrap_内容,它工作得非常好。突然之间,约束约束不再包裹高度。我正在使用androidx.core:core-ktx:1.2.1和androidx.constraintLayout:2.0.1。我没有更改任何相关代码或样式。有什么想法吗Android 约束布局包裹高度退出工作,android,Android,我在一个RecyclerView中有一个ConstraintLayout,它的高度有wrap_内容,它工作得非常好。突然之间,约束约束不再包裹高度。我正在使用androidx.core:core-ktx:1.2.1和androidx.constraintLayout:2.0.1。我没有更改任何相关代码或样式。有什么想法吗 <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/layout&q
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout"
android:layout_height="wrap_content"
android:layout_width="match_parent"">
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/note"
android:textColor="?android:attr/textColorPrimary"
android:scrollHorizontally="false"
android:inputType="textMultiLine"
android:background="android:color/transparent"
android:gravity="start|center_vertical"
app:layout_constraintStart_toEndOf="@+id/some_item"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_default="percent"
app:layout_constraintWidth_percent="1"/>
</androidx.constraintlayout.widget.ConstraintLayout>
跟进此问题。我发现了问题。我有一个带有包裹高度的ImageView。删除wrap_内容并为此ImageView提供实际高度修复了此问题