zoukankan      html  css  js  c++  java
  • Android布局方式

    1. LinearLayout(线性布局)

        android:orientation="vertical"
        android:layout_width="wrap_content" //控件宽度
        android:layout_height="fill_content"> //控件高度
        注意:"vertical":垂直布局 horizontal:水平布局

     
        wrap_content:宽度/高度和内容的宽度/高度相同
        fill_content:宽度/高度是整个父组件的宽度/高度
        android:layout_weight ; //可以指定每个控件所占的比例

    2. FrameLayout(帆布局)
        叠加效果
    3. Relativelayout(相对布局)
        android:layout_below //在某个组件的下面
        android:layout_toLeftOr //在某个组件的左边
        android:layout_toRightOf //在某个组件的右边
        android:layout_alignTop //在某个组件上对齐
        android:layout_alignBotton //在某个组件下对齐
        android:layout_alignLeft //在某个组件左对齐
        android:layout_alignRight //在某个组件右对齐

    4. TableLayout (表格布局)
        注意:表跟布局的组件要放在TableRow中


    5. AbsoluteLayout (绝对布局)
        android:layout_x x轴坐标值
        android:layout_y y轴坐标值

  • 相关阅读:
    Oracle FGA审计记录的清理步骤
    UVa11488-Hyper Prefix Sets(trie树)
    配置Log4j(非常具体)
    poj1190生日蛋糕
    zju1610Count the Colors
    【例9.3】求最长不下降序列
    P1364 医院设置
    P1629 邮递员送信
    P1476 休息中的小呆
    P1330 封锁阳光大学
  • 原文地址:https://www.cnblogs.com/alhy/p/6877369.html
Copyright © 2011-2022 走看看