【发布时间】:2013-01-10 23:24:16
【问题描述】:
我正在尝试在TableLayout 中创建一个TableRow:
_____________________________________
| ___________________ ____________ |
| |TEXTVIEW 1 | |TEXTVIEW 2 | |
| | | |___________| |
| | | ___________ |
| | | |TEXTVIEW 3 | |
| |___________________| |___________| |
|_____________________________________|
希望这是有道理的。我正在尝试将 3 个TextViews 放入一个TableRow。第一列将包含多行和宽 TextView,而第二列将包含 2 个单行短 TextViews,它们将相互堆叠。
这可能吗?如果没有,我将如何实现这一目标?下面是我已经启动的xml代码。
<TableLayout
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_height="fill_parent"
android:layout_width="fill_parent" >
<TableRow
android:id="@+id/row1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/question"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textStyle="bold"
android:textSize="8sp" />
<TextView
android:id="@+id/timer"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textStyle="bold"
android:textSize="8sp" />
<TextView
android:id="@+id/points"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textStyle="bold"
android:textSize="8sp" />
</TableRow>
</TableLayout>
【问题讨论】:
标签: android xml textview tablelayout tablerow