如何缩进在Android的一个TextView的文本? [英] How to indent text in a textview in android?

查看:502
本文介绍了如何缩进在Android的一个TextView的文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试着去让文字更容易通过单独段落阅读。我试着在字符串资源的文本之前添加空格,但它不工作。我想知道是否有可能增加属性为TextView的,或在字符串资源本身。

Im trying to make the text much easier to read by making seperate paragraphs. I've tried adding spaces before the text in the string resource but it doesn't work. Im wondering if it's possible to add attribute to textview, or in the string resource itself.

感谢罗布

推荐答案

您可以使用的\ t选项卡\ n作为newline.it工作是肯定的。 写这个属性你的TextView在XML

you can use \t for tab \n for newline.it works for sure. and write this attribute to your textview in your xml

android:singleLine="false"

有关TextView中的多个属性来看看这里

For more attributes of Textview take a look here

这篇关于如何缩进在Android的一个TextView的文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆