在xml中将两个要占屏幕一半的控件都加上android:layout_weight="1";

注意:weight只能用在LinearLayout布局中。

在LinearLayout布局中weight数值越大显示的优先权就越低。

相关文章:

  • 2021-09-01
  • 2022-02-01
  • 2021-10-27
  • 2022-01-29
猜你喜欢
  • 2021-06-05
  • 2022-12-23
  • 2021-11-06
  • 2021-11-17
  • 2022-12-23
相关资源
相似解决方案