1.为了防止TableLayout里面的控件超出显示屏幕的宽度
加上下面这句话,使得它可以伸缩
android:shrinkColumns="1"
2.TableLayout(不用TableRow)每一个控件成为一行,用TableRow,一个TableRow里面所有的控件自成一行
3.在使用TableRow的时候需要注意,每一个TableRow的每一个控件都和所在的列里面最长width最大的那个对齐,并且每一行的每一个控件都相互对齐
比如:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent"android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.example.administrator.radiogrouppractice.MainActivity">
<TableLayout
android:layout_width=