I am trying to change the text that is currently shown in the TextView for my app, but everytime i change the text it is not shown fully but rather gets cut off.
I want to show the text on multiple lines and not on single line
The full line should be be displayed and the textview should resize itself as i am using the wrap content property for the Textview
Here is the image of the textview
<code><TextView
android:id="@+id/et1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text"
android:layout_margin="40dp"
android:padding="20dp"
android:background="@color/black"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv"
app:layout_constraintBottom_toTopOf="@+id/button"
android:singleLine="false"
android:maxWidth="300dp"
/>
</code>
<code><TextView
android:id="@+id/et1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text"
android:layout_margin="40dp"
android:padding="20dp"
android:background="@color/black"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv"
app:layout_constraintBottom_toTopOf="@+id/button"
android:singleLine="false"
android:maxWidth="300dp"
/>
</code>
<TextView
android:id="@+id/et1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text"
android:layout_margin="40dp"
android:padding="20dp"
android:background="@color/black"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv"
app:layout_constraintBottom_toTopOf="@+id/button"
android:singleLine="false"
android:maxWidth="300dp"
/>