android:layout_weight

Specifies how much of the extra space in the layout to be allocated to the View.

LinearLayout supports assigning a weight to individual children. This attribute assigns an "importance" value to a view, and allows it to expand to fill any "remaining space" in the parent view. Default weight is zero.

注意加粗的词。

具体看这篇博文: http://www.cnblogs.com/angeldevil/archive/2012/04/08/2437747.html


你可能感兴趣的:(android)