在Android上使用TextView编写段落 [英] Write a paragraph using textview on Android
本文介绍了在Android上使用TextView编写段落的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想写一个段落作为我的移动应用程序的一部分.我该怎么办?
I want to write a paragraph as part of my mobile application. How do I go about it?
推荐答案
使用\ n换行.
示例:
TextView t = findViewById(R.id.text);
t.setText("This is the first line\nThis is the second line\nThird line...");
这篇关于在Android上使用TextView编写段落的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文