1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- 3 ** 4 ** Copyright 2007, The Android Open Source Project 5 ** 6 ** Licensed under the Apache License, Version 2.0 (the "License"); 7 ** you may not use this file except in compliance with the License. 8 ** You may obtain a copy of the License at 9 ** 10 ** http://www.apache.org/licenses/LICENSE-2.0 11 ** 12 ** Unless required by applicable law or agreed to in writing, software 13 ** distributed under the License is distributed on an "AS IS" BASIS, 14 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 ** See the License for the specific language governing permissions and 16 ** limitations under the License. 17 */ 18 --> 19 20 <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" 21 android:layout_width="match_parent" 22 android:layout_height="wrap_content"> 23 24 <TableRow> 25 <TextView android:id="@+id/a" 26 android:text="@string/table_layout_a" 27 android:background="#FFFF0000" 28 android:padding="3dip" /> 29 <TextView android:id="@+id/b" 30 android:text="@string/table_layout_b" 31 android:background="#FF00FF00" 32 android:padding="3dip" /> 33 <TextView android:id="@+id/c" 34 android:text="@string/table_layout_c" 35 android:background="#FF0000FF" 36 android:padding="3dip" /> 37 </TableRow> 38 39 <TableRow> 40 <TextView android:id="@+id/spanThenCell" 41 android:text="@string/table_layout_d" 42 android:layout_span="2" 43 android:gravity="center_horizontal" 44 android:background="#FF0000FF" 45 android:padding="3dip" /> 46 <TextView 47 android:text="@string/table_layout_e" 48 android:background="#FF00FF00" 49 android:padding="3dip" /> 50 </TableRow> 51 52 <TableRow> 53 <TextView 54 android:text="@string/table_layout_f" 55 android:background="#FFFF00FF" 56 android:padding="3dip" /> 57 <TextView 58 android:text="@string/table_layout_g" 59 android:background="#FF00FF00" 60 android:padding="3dip" /> 61 <TextView 62 android:text="@string/table_layout_h" 63 android:background="#FFFF0000" 64 android:padding="3dip" /> 65 </TableRow> 66 67 <TableRow> 68 <TextView 69 android:text="@string/table_layout_a" 70 android:background="#FF00FF00" 71 android:padding="3dip" /> 72 <TextView android:id="@+id/cellThenSpan" 73 android:text="@string/table_layout_b" 74 android:layout_span="2" 75 android:gravity="center_horizontal" 76 android:background="#FF0000FF" 77 android:padding="3dip" /> 78 </TableRow> 79 80 <TableRow> 81 <TextView android:id="@+id/span" 82 android:text="@string/table_layout_g" 83 android:layout_span="3" 84 android:gravity="center_horizontal" 85 android:background="#FFC0C0C0" 86 android:padding="3dip" /> 87 </TableRow> 88 </TableLayout> 89