zoukankan      html  css  js  c++  java
  • 1月8日 布局1

    LinearLayout线性布局
    常用属性
    1.android:id
    ( 创建id----android:id="@+id/11_1")
    2.android:layout_width 宽度 单位:dp
    3.android:layout_height 高度 单位:dp
    修改字体单位为sp
    4.android:background 背景
    5.android:layout_margin 外边距 单位:dp
    6.android:layout_padding 内边距 单位:dp
    (不单独设置就是上下左右都一致,可以单独设置,比如paddingLeft<Right><Top><Bottom>只设置了左<右><上><下>侧的边距)
    7.android:orientation 方向
    (v竖直 h横)
    8.<View />匹配的的副空间是上一级
    9.android:layout_margin=""模块对于模块的距离,可以加上下左右
    10.android:gravity=""表示排列属性方式
    11.android:layout_weight=""权重占比
    wrap_content:是layout_width和layout_height的属性值之一,表示和自身内容一样的长度。

    match_parent:是layout_width和layout_height的属性值之一,表示和父组件一样的长度。

    *********************************************
    <TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="体温"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toTopOf="parent" />
    ***************************************************************

  • 相关阅读:
    AndroidStudio gradle配置
    Git中pull对比fetch和merge
    Knockout.js随手记(7)
    Knockout.js随手记(6)
    MVC自动绑定整数数组
    Knockout.js随手记(5)
    ASP.NET4.5Web API及非同步程序开发系列(3)
    Knockout.js随手记(4)
    ASP.NET4.5Web API及非同步程序开发系列(2)
    ASP.NET4.5Web API及非同步程序开发系列(1)
  • 原文地址:https://www.cnblogs.com/dty602511/p/14702189.html
Copyright © 2011-2022 走看看