我之前在论坛上看到过 \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(见下文),我放在里面的文本会自动换行等等,但是,即使翻转水平,文本仍然延伸到屏幕的右侧,显然,行的长度很长,我期望在那一点上仍然是多行的,但仍然延伸了部分单词超出了屏幕的右侧。
有人知道我如何防止这种情况吗?我已经尝试了shrinkColumn="1",一直尝试到30,但没有任何变化,我还尝试了其他几件事情。