TextView on android displays only two lines in the text in any orientation

if the text is longer than the width of the text, after the second line, it cuts it and adds "..." to the end. It does not matter for orientation, it will display more text to the end of the second line, here is the XML text:

<TextView android:id="@+id/ContentViewerDescription" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:ellipsize="end" android:maxLines="20" android:textColor="#999999" android:layout_marginTop="10px" android:layout_marginLeft="10px"/> 
+6
java android textview
source share
1 answer

change to android:layout_height="wrap_content" and remove android:ellipsize="end"

+6
source share

All Articles