Android开发

Android一共有六大布局

  1.线性布局:LinearLayout

  常用属性:layout_width:布局宽度通常不直接写数字的,用wrap_content(组件的实际大小),fill_parent或者match_parent填满父容器

       layout_height:布局高度,用wrap_content(组件的实际大小)fill_parent或者match_parent填满父容器

       orientation:布局组件的排列方式,有horizontal,vertical(竖直,默认)两种方式

       background:为该组件设置一个背景图片,可以是颜色

       weight(权重)用来等比例的划分区域,按比例划分0,1,2分别表示占比为其中的一份

  2.相对布局

  3.表格布局

  4.帧布局

  5.网格布局

  6.绝对布局

原文地址:https://www.cnblogs.com/hahabengbeng/p/10725143.html