• Android五大布局标签和属性总结


    1.LinearLayout
    orention  水平和垂直
    weight     切割闲置空间
    水平布局 切割宽度
    垂直布局 切割的高度


    切割的时候 指定的高度或者宽度不能用fill_parent/match_parent

    2.Tablayout
    <TabRow> </TabRow> 一行
    <TabRow> </TabRow>
    缺陷  第一行的列级关系 会影响以下全部的列
    3.RelativeLayout
    view间的关系
    CenterInParent  true
    alignparentxxxx true  有没有贴到父亲的位置
    centerVertical  垂直剧中
    centerHorzital  水平剧中

    --------------------------------
    aboveof    @view  再谁的上面
    belowof    @view 在谁的以下
    toleftof   @viw 在谁的左边

    torightof @view 在谁的右边

    alignxxxx @view 和谁在xxxx的边界上齐平


    4.FrameLayout(层叠布局)
    Fragment(碎片)
    layout_gravity  相对于父容器
    gravity 相对于自己
    属性有top、bottom、left、right


    5、AbsoluteLayout(绝对布局)
    layout_x    某个view  x坐标
    layout_y    某个view  y坐标

    **********************************************************888



    TextView 文字组件
    text 显示的文字
    textSize 文字大小
    textColor 文字颜色
    background 背景颜色


    EditText 文本输入框
    hint 提示文字


    LinearLayout 线性布局
    TableLayout 表格布局
    RelativeLayout 相对布局


    layout_width view宽度的方式
    layout_height view高度的方式
    match_parent 匹配父组件
    wrap_content 包括内容


    layout_weight 权重


    orientation 布局方向
    horizontal 水平
    vertical 垂直


    layout_margin 四周外边距
    layout_marginTop 上边外边距
    layout_marginBottom 下边外边距
    layout_marginLeft 左边外边距
    layout_marginRight 右边外边距


    layout_padding 四周内边距
    paddingTop 上边内边距
    paddingBottom 下边内边距
    paddingLeft 左边内边距
    paddingRight 右边内边距

    layout_above 在哪个view之上
    layout_below 在哪个view之下
    layout_toLeftOf 在哪个view之左
    layout_toRightOf 在哪个view之右


    layout_alignTop 和某个view的上边对齐
    layout_alignBottom 和某个view的下边对齐
    layout_alignLeft 和某个view的左边对齐
    layout_alignRight 和某个view的右边对齐


    layout_alignParentTop 是否紧贴父组件上边
    layout_alignParentBottom 是否紧贴父组件下边
    layout_alignParentLeft 是否紧贴父组件左边
    layout_alignParentRight 是否紧贴父组件右边


    layout_centerInParent 是否在父组件的中心
    layout_centerHorizontal 是否水平居中
    layout_centerVertical 是否垂直居中






    TableRow 表格布局里面的一行
    gravity 内容居中
  • 相关阅读:
    elasticsearch文档
    swagger 接口文档
    IOS Pod install 443
    Celery 中文文档
    orm 不设置外建进行跨表查询
    There is no current event loop in thread
    django 中文文档
    MJRefresh 下拉刷新 上拉加载
    beeline导出hive数据
    什么是数据湖_二(转载)
  • 原文地址:https://www.cnblogs.com/gcczhongduan/p/5328791.html
Copyright © 2020-2023  润新知