I have a TextView
in Android
that shows the information that it's retrieved from a database so I don't know how much lines will be used for show the information.
This is my TextView
:
<TextView
android:id="@+id/lblInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:inputType="textMultiLine"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="15sp" />
And what I tried it's to put the property android:inputType="textMultiLine"
but it gives to me an advice:
Attribute
android:inputType
should not be used with<TextView>
: Change element type to<EditText>
?
I searched on Internet but in all answers they know the maximum lines that they need, so they use the property android:maxLines="the maximum of lines they want"
or android:lines="the total of lines that the TextView has"
but I don't want that because I don't know how much lines I will have in my TextView
.
How can I make a TextView
with an undefined number of lines?
Thanks in advance!