• 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" />
    ***************************************************************

  • 相关阅读:
    Android消息推送完美方案[转]
    这一路走来
    【深入比较ThreadLocal模式与synchronized关键字】
    前端闭包 解决异步执行问题
    微信小程序在wxml双大括号中执行复杂运算
    腾讯云对象存储使用
    CSS中的flex布局
    docker基础学习笔记
    redis学习笔记
    微信小程序页面栈管理
  • 原文地址:https://www.cnblogs.com/dty602511/p/14702189.html
Copyright © 2020-2023  润新知