LinearLayout:水平布局
1.android:orientation

Should the layout be a column or a row? Use “horizontal” for a row, “vertical” for a column. The default is horizontal.
垂直布局还是水平布局

2.等间距布局
水平等间距
LinearLayout
分别从左往右
1.layout_width=”0dp”layout_height=”match_parent”layout_weight=”1”
2.layout_width=”0dp”layout_height=”match_parent”layout_weight=”2”
3.layout_width=”0dp”layout_height=”match_parent”layout_weight=”1”

首先确定是水平等距离还是垂直等距离,然后设置宽或高为0dp,然后设置layout_weight.
layout_weight如果不设置,默认是0,是这个view的默认大小

相关文章:

  • 2021-06-07
  • 2021-09-24
  • 2021-12-13
  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-30
  • 2021-10-01
  • 2021-09-20
  • 2021-05-27
相关资源
相似解决方案