2012-01-04 3 views
1

このコードは機能しますが、ヘッダーフィールドと残りのテーブルのサイズを調整する必要があります。どのように列のサイズを調整することが可能ですか?動きのないテーブルのヘッダー行を作成するには?

<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> 

おかげ

+0

私はあなたが何をしたいのか、あなたは現在何を持っているのか分かりません。あなたに私たちに何か情報をくれますか? –

+0

私はテーブルを表示する必要があります、タイトルは固定する必要があります。タイトルの幅は、データのフィールド幅と一致する必要があります。 –

+0

申し訳ありませんが、問題の解決が見つかりました。 https://github.com/StylingAndroid/ScrollingTable –

答えて

関連する問題