如果文本长于 textview 的宽度,则在第二行之后,它会将其剪切并在其末尾添加“...”。方向无关紧要,它只会显示更多文本,直到第二行结束,这里是 textview XML:
<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"/>
最佳答案
更改为 android:layout_height="wrap_content"
并删除 android:ellipsize="end"
关于java - Android 上的 TextView 在任一方向上仅显示两行文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3121664/