Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Constraint layout doesn't resize

$
0
0

I have an edit text that changes height, minimum 50dp and max 100dp. The edit text changes its height but the constraint layout its in doesnt. Causing the text to go off the layout. How do I make the constraint layout change its height when the edit text changes its height?Text goes out of layout

        android:id="@+id/constraintLayout4"        android:layout_width="match_parent"        android:layout_height="wrap_content"        app:layout_constraintBottom_toBottomOf="parent"        app:layout_constraintEnd_toEndOf="parent"        app:layout_constraintHeight_min=""        app:layout_constraintStart_toStartOf="parent"><ImageView            android:id="@+id/imageView23"            android:layout_width="40dp"            android:layout_height="40dp"            android:src="@drawable/profilepic"            app:layout_constraintBottom_toBottomOf="parent"            app:layout_constraintStart_toStartOf="parent" /><EditText            android:id="@+id/editTextTextMultiLine"            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_marginStart="40dp"            android:layout_marginEnd="40dp"            android:ems="10"            android:hint="Add a comment..."            android:inputType="textMultiLine"            android:maxHeight="100dp"            android:minHeight="50dp"            android:scrollbars="vertical"            app:layout_constraintEnd_toStartOf="@+id/imageView24"            app:layout_constraintStart_toEndOf="@+id/imageView23"            app:layout_constraintTop_toTopOf="parent" /><ImageView            android:id="@+id/imageView24"            android:layout_width="40dp"            android:layout_height="40dp"            android:src="@drawable/send_24px"            app:layout_constraintBottom_toBottomOf="parent"            app:layout_constraintEnd_toEndOf="parent" /></androidx.constraintlayout.widget.ConstraintLayout>````I tried changing the min and max height of constraint layout, using app:layout_constraintHeight_min and max but no difference

Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>