Sometimes you need to show a lot of information in a small space,
for example in TableLayout, you can to make a vertical and horizontal scrolling.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | android:layout_width = "fill_parent" android:layout_height = "wrap_content" > < HorizontalScrollView android:layout_width = "wrap_content" android:layout_height = "fill_parent" > < TableLayout android:id = "@+id/amortization" android:layout_width = "wrap_content" android:layout_height = "wrap_content" > < TableRow android:background = "#3366FF" > < TextView android:text = "@string/tableRow_1" android:background = "#FFFFFF" android:padding = "3dip" /> < TextView android:text = "@string/hello_world_1" android:padding = "3dip" /> < TextView android:text = "@string/hello_world_2" android:padding = "3dip" /> < TextView android:text = "@string/hello_world_3" android:padding = "3dip" /> < TextView android:text = "@string/hello_world_4" android:padding = "3dip" /> < TextView android:text = "@string/hello_world_5" android:padding = "3dip" /> < TextView android:text = "@string/hello_world_6" android:padding = "3dip" /> < TextView android:text = "@string/hello_world_7" android:padding = "3dip" /> < TextView android:text = "@string/hello_world_8" android:padding = "3dip" /> < TextView android:text = "@string/hello_world_9" android:padding = "3dip" /> </ TableRow > </ TableLayout > </ HorizontalScrollView > </ ScrollView > |
you can download this code: download code