layout_weight/weightSum详解

在开发Android程序时,经常用到layout_weight和weightSum,也能熟练的运用,但是一直没有做系统的归纳,因此虽然做了很久的Android开发,但是总感觉和高手的差距还是很大!为了缩小和高手之间的距离,我决定从点点滴滴抓起,后面将自己遇到的每一个问题都做一个归纳总结,一来,下次再遇到同样的问题可以分分钟搞定;二来,希望可以帮到更多地像我一样健忘的朋友!
Google开发者平台是这么描述layout_weight属性的:
Indicates how much of the extra space in the LinearLayout will be allocated to the view associated with these LayoutParams. Specify 0 if the view should not be stretched. Otherwise the extra pixels will be pro-rated among all views whose weight is greater than 0.
大意是:

你可能感兴趣的:(android,weight,weightSum)