我有一个 TextView
,它应该有 4 行长。
First line text should be "YES"
Second Line ="No"
Third Line = "true"
Fourth line + "false"
如何使用单个 TextView
完成此操作?
最佳答案
尝试以下多行 TextView。
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:maxLines="4"
android:singleLine="false"
android:text="YES\nNo\ntrue\nfalse" />
您可以尝试 \n
在下一行设置文本。
关于android - 创建多行 TextView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10815093/