zoukankan      html  css  js  c++  java
  • 线性布局LinearLayout

    线性布局LinearLayout

     

    1.认识LinearLayout

     六大布局(线性布局LinearLayout、表格布局TableLayout、相对布局RelativeLayout、
    层布局FrameLayout、绝对布局AbsoluteLayout、网格布局GridLayout。)之一,

    具有垂直方向与水平方向的布局方式,开发时使用较多

    2.LinearLayout常用属性

      android:layout_gravity:指定该子元素在LinearLayout中的对齐方式。

      android:layout_weight:指定该子元素在LinearLayout中所占的权重。

      android:orientation:属性设置线性布局的方向,将值设置为horizontal表示行,设置为vertical表示列,默认为horizontal。

      android:layout_width:设置LinearLayout 的宽度。

      android:layout_height:设置LinearLayout 的高度。

    3.LinearLayout源码

    进入Android studio初始XML文件

    使用线性布局 只用将其原始代码xmls之前的代码替换成LinearLayout即可

      

      

  • 相关阅读:
    while循环
    No.四
    No. three
    第二章吧
    第二次写博客
    我人生的第一个程序,相当于哥伦布发现新大路。
    orale命令6 rman备份
    oracle 命令4 热备份
    oracle命令3 冷备份
    oracle命令2 和一致性关闭、非一致性关闭
  • 原文地址:https://www.cnblogs.com/srwk/p/11650198.html
Copyright © 2011-2022 走看看