1.xml
1 <?xml version="1.0" encoding="utf-8"?> 2 <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="fill_parent" 4 android:layout_height="fill_parent" 5 android:stretchColumns="0"> 6 <TableRow> 7 <TextView 8 android:text="@string/row1_column1" 9 android:background="#aa0000" 10 android:padding="3dip" /> 11 <TextView 12 android:text="@string/row1_column1" 13 android:padding="3dip" 14 android:gravity="center_horizontal" 15 android:background="#00aa00" 16 ></TextView> 17 <TextView 18 android:text="@string/row1_column2" 19 android:gravity="right" 20 android:background="#0000aa" 21 android:padding="3dip" /> 22 </TableRow> 23 24 <TableRow> 25 <TextView 26 android:text="@string/row2_column1" 27 android:padding="3dip" /> 28 <TextView 29 android:text="@string/row2_column2" 30 android:gravity="right" 31 android:padding="3dip" /> 32 </TableRow> 33 </TableLayout>