2011-12-07 36 views

答えて

2

このような何か試してください:あなたのTextViewとすべてに一定の幅が動作するはず設定し

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" android:layout_height="fill_parent" 
    android:orientation="vertical"> 
    <TableLayout android:layout_width="fill_parent" 
     android:layout_height="wrap_content" android:stretchColumns="*" 
     android:id="@+id/tableLayout1"> 
     <TableRow android:id="@+id/tableRow1" android:layout_width="fill_parent" 
      android:layout_height="wrap_content"> 
      <TextView android:text="test1" android:layout_width="fill_parent" 
       android:layout_height="wrap_content" android:layout_weight="0" /> 
      <TextView android:layout_weight="1" 
       android:text="test2 very long text that needs to be wrapped properly using layout_weight property and ignoring singleline since that is set by default..." 
       android:layout_width="fill_parent" android:layout_height="wrap_content" /> 
     </TableRow>  
    </TableLayout> 
</LinearLayout> 
関連する問題