<ScrollView android:layout_width="0dp" android:layout_height="wrap_content" android:id="@+id/ScrollViewContact" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintBottom_toTopOf="@+id/imageChat" app:layout_constraintTop_toBottomOf="@+id/textAddContact" android:layout_marginTop="10dp" > <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:orientation="vertical" android:id="@+id/LinearLayoutContact" > </LinearLayout> </ScrollView> 

ScrollView depends on the code between imageChat and textAddContact When an application is running, ScrollView goes beyond the scope specified by the following app:layout_constraintBottom_toTopOf="@+id/imageChat" app:layout_constraintTop_toBottomOf="@+id/textAddContact" code app:layout_constraintBottom_toTopOf="@+id/imageChat" app:layout_constraintTop_toBottomOf="@+id/textAddContact" Why ScrollView goes beyond the permission her space?

    1 answer 1

     <ScrollView android:layout_width="0dp" android:layout_height="0dp" android:id="@+id/ScrollViewContact" app:layout_constraintHeight_default="wrap" app:layout_constraintWidth_default="spread" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toBottomOf="@id/imageAddContact" app:layout_constraintBottom_toTopOf="@id/imageChat" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:id="@+id/LinearLayoutContact" > </LinearLayout> </ScrollView> 

    The question was decided to write the correct code for the ConstraintLayout container in which the ScrollView is located, so that the element does not exit in height, you must specify hieght = 0dp You must add an app:layout_constraintHeight_default="wrap"