如何在Android TextView中将文字换行到下一行? [英] How to wrap text to next line in an Android TextView?
本文介绍了如何在Android TextView中将文字换行到下一行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用以下 TextView
在其中显示一些数据:
I am using following TextView
to display some data in it:
<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"/>
我想将文本换行到下一行。我该怎么做?
I want to wrap text to next line. How can I do this?
推荐答案
您必须设置 android:scrollHorizontally = false
在您的xml中。
you must set android:scrollHorizontally="false"
in your xml.
这篇关于如何在Android TextView中将文字换行到下一行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文