我使用下面的TextView
来显示其中的一些数据:
<TextView android:id="@+id/notificationText"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:textSize="18sp"
android:inputType="textMultiLine"
android:maxLines="2"
android:layout_paddingRight="20dip"
android:textColor="#ffffff"/>
我想将文本换行到下一行。我该怎么做呢?
发布于 2010-11-11 17:05:24
您必须在xml中设置android:scrollHorizontally="false"
。
发布于 2017-02-22 14:59:30
发布于 2016-09-01 00:40:16
您也可以尝试
android:inputType="textMultiLine"
在您的XML中。这对我很有效。
https://stackoverflow.com/questions/4152726
复制相似问题