我正在显示一个带有如下行的 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 换行到多行?