[Android] android:layout_weight 属性的工作原理

该属性告知 LinearLayout 如何安排子组件的布局:

  • 水平方向的 LinearLayout,查看 layou_width 和 layout_weight以决定子组件的宽度。
  • 垂直方向的 LinearLayout,查看 layou_height 和 layout_weight以决定子组件的高度。
原文地址:https://www.cnblogs.com/fphuang/p/8453350.html