我正在展示一个TableLayout,其中行如下:
<?xml version="1.0" encoding="utf-8"?>
<TableRow
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/one"
android:layout_marginLeft="10dip"
android:textColor="#B0171F" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/one"
android:id="@+id/two"
android:layout_marginLeft="10dip"
android:ellipsize="none"
android:singleLine="false"
android:scrollHorizontally="false"
android:maxLines="10"
android:textColor="@android:color/black" />
</RelativeLayout>
</TableRow>
我已经尽我所能地查找和想到一切方法来使文本换行成多行,但却无济于事:文本总是被强制限制在一行上,超出了屏幕范围。也许这与我在一个TableRow内工作有关,据我所知,在此网站上还没有提及过这一点。那么,我该如何强制我的第二个TextView进行换行呢?
TextView
将采用其设置的任何属性。您能否发布正在发生的屏幕截图?您使用的开发工具版本是什么? - Aman Alam