如何解决如何换行换行?
| 我以前见过\\ n在论坛上使用过,但是我认为那是仅以编程方式在Java中使用的... \'\\ n \'实际上也可以在xml中使用!!!希望这可以帮助.....<TableRow android:id=\"@+id/originDesc\" android:layout_width=\"fill_parent\"
android:layout_height=\"wrap_content\" android:layout_marginRight=\"15px\"
>
<TextView android:id=\"@+id/widget36\"
android:layout_width=\"wrap_content\" android:layout_height=\"wrap_content\"
android:text=\"The Bullmastiff was developed in England by gamekeepers for
protection against poachers. The foundation breeding of the
modern pure-bred was 60 per cent Mastiff and 40 per cent Bulldog.
It is a guard and companion dog,and should be loyal,obedient,and thus suitable for training.\"
android:textSize=\"10sp\">
</TextView>
</TableRow>
我有这个Textview(请参见下文),它会自动换行,而不会自动换行,但是,该文本从屏幕的右侧延伸,即使水平翻转,线条也明显延伸了很多,即时通讯预计到那时仍会多行显示,但仍会超出屏幕右侧一半的位置。
有谁知道我可以预防这种情况?我一直尝试将rinkleColumn = \“ 1 \”一直保持到30,而没有任何变化,在此之上我尝试了一些其他方法。
解决方法
我的理解是,尝试解决您的问题,考虑您的Textlook而不是整个UI。
您可以使用android:layout_width = \“ fill_parent \”来填充屏幕的宽度,并在左侧,右侧,顶部和底部获得所需的空间。您可以使用android:paddingTop,android:paddingLeft,android:paddingRight,android:paddingBottom对于常见间距,您可以使用android:padding,请不要忘记查看您的表格行属性。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。