Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/218.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 约束布局包裹高度退出工作_Android - Fatal编程技术网

Android 约束布局包裹高度退出工作

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

我在一个RecyclerView中有一个ConstraintLayout,它的高度有wrap_内容,它工作得非常好。突然之间,约束约束不再包裹高度。我正在使用androidx.core:core-ktx:1.2.1和androidx.constraintLayout:2.0.1。我没有更改任何相关代码或样式。有什么想法吗

<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提供实际高度修复了此问题