Android TableLayout的使用

TableLayout经常用的属性是:

  1.android:collapseColumns:以第0行为序,隐藏指定的列:把android:collapseColumns=0,2 意思是把第0和第2列隐藏
   2.android:shrinkColumns:以第0行为序,自动延伸指定的列填充可用部分:当LayoutRow里面的控件还没有布满布局时,shrinkColumns不起作用,设置了shrinkColumns=0,1,2,布局完全没有改变,因为LayoutRow里面还剩足够的空间。当LayoutRow布满控件时,设置了shrinkColumns=2,则控件自动向垂直方向填充空间
   3.android:stretchColumns:以第0行为序,尽量把指定的列填充空白部分:设置stretchColumns=1,则结果如下图,第1列被尽量填充(Button02与TextView02同时向右填充,直到TextView03被压挤到最后边)。

你可能感兴趣的:(android)