【发布时间】:2012-01-05 14:22:48
【问题描述】:
此代码有效,但我需要调整标题字段和剩余表格的大小。如何调整列的大小?
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/table_hsv"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TableLayout
android:id="@+id/table_header"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:stretchColumns="1" >
<TableRow
android:id="@+id/table_header_row"
android:background="@color/listcolor" >
</TableRow>
<ScrollView
android:id="@+id/table_sv"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TableLayout
android:id="@+id/table_data"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="1" >
</TableLayout>
</ScrollView>
</TableLayout>
</HorizontalScrollView>
谢谢
【问题讨论】:
-
我不确定您想做什么,以及您目前拥有什么。您能给我们提供更多信息吗?
-
我需要显示表格,标题应该是固定的。标题的宽度应与数据的字段宽度一致。
-
很抱歉,我找到了问题的解决方案。 github.com/StylingAndroid/ScrollingTable
标签: android android-layout tablelayout