Android--- Layout

2023-11-04

Linear Layout

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:gravity="center">

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="North"
        android:layout_marginBottom="100dp">

    </Button>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="25dp"
            android:text="WES">

        </Button>

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="50dp"
            android:layout_marginEnd="50dp"
            android:text="Center">

        </Button>

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="East">

        </Button>

    </LinearLayout>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="South"
        android:layout_marginTop="100dp">

    </Button>

</LinearLayout>

在这里插入图片描述

Relative Layout

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center">

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text = "NORTH"
        android:layout_centerHorizontal="true"
        android:layout_alignParentTop="true"
        android:layout_marginTop="100dp"
        android:id="@+id/north">

    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toStartOf="@+id/center"
        android:layout_marginTop="30dp"
        android:layout_below="@+id/north"
        android:text="NW">

    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toEndOf="@+id/center"
        android:layout_marginTop="30dp"
        android:layout_below="@+id/north"
        android:text="NE">
    </Button>


    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_alignParentStart="true"
        android:layout_marginStart="20dp"
        android:text="WEST"
        android:id="@+id/west">

    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:text="CENTER"
        android:id="@+id/center">

    </Button>

    <Button
        android:id="@+id/east"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:layout_centerVertical="true"
        android:layout_marginEnd="20dp"
        android:text="EAST">

    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toStartOf="@+id/center"
        android:layout_above="@+id/south"
        android:layout_marginBottom="30dp"
        android:text="SW">

    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toEndOf="@+id/center"
        android:layout_above="@+id/south"
        android:layout_marginBottom="30dp"
        android:text="SE">

    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="100dp"
        android:text = "SOUTH"
        android:id="@+id/south">

    </Button>




</RelativeLayout>

在这里插入图片描述

Table Layout

<?xml version="1.0" encoding="utf-8"?>
<TableLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_column="3"
    android:layout_gravity="center">

    <TableRow
        android:id="@+id/tr1"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <Button
            android:id="@+id/north_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_column="1"
            android:text="North" />
    </TableRow>

    <TableRow
        android:id="@+id/tr2"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <Button
            android:id="@+id/west_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_column="0"
            android:text="WEST" />

        <Button
            android:id="@+id/center_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_column="1"
            android:text="CENTER" />

        <Button
            android:id="@+id/east_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_column="2"
            android:text="EAST" />
    </TableRow>

    <TableRow
        android:id="@+id/t3"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <Button
            android:id="@+id/south_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_column="1"
            android:text="SOUTH" />
    </TableRow>

</TableLayout>

在这里插入图片描述

Grid Layout

<?xml version="1.0" encoding="utf-8"?>
<GridLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:columnCount="3"
    android:rowCount="3">


    <Button
        android:id="@+id/north_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_row="0"
        android:layout_column="1"
        android:layout_rowWeight="1"
        android:layout_columnWeight="1"
        android:text="north" />

    <Button
        android:id="@+id/west_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_row="1"
        android:layout_column="0"
        android:layout_rowWeight="1"
        android:layout_columnWeight="1"
        android:text="west" />

    <Button
        android:id="@+id/center_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_row="1"
        android:layout_column="1"
        android:layout_rowWeight="1"
        android:layout_columnWeight="1"
        android:text="center" />

    <Button
        android:id="@+id/east_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_row="1"
        android:layout_column="2"
        android:layout_rowWeight="1"
        android:layout_columnWeight="1"
        android:text="east" />

    <Button
        android:id="@+id/south_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_row="2"
        android:layout_column="1"
        android:layout_rowWeight="1"
        android:layout_columnWeight="1"
        android:text="south" />

</GridLayout>

在这里插入图片描述

Frame Layout

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"

    android:id="@+id/framelayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/worldmap"
    android:scaleType="centerCrop">

    <ImageView
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_marginTop="30dp"
        android:background="@drawable/scu_copy"
        android:layout_gravity="center_horizontal">
    </ImageView>

</FrameLayout>

在这里插入图片描述

Constraint Layout

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <androidx.constraintlayout.widget.Guideline
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_begin="0dp"
        android:id="@+id/TopGuideline">
    </androidx.constraintlayout.widget.Guideline>

    <androidx.constraintlayout.widget.Guideline
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_end="0dp"
        android:id="@+id/bottomGuideline">
    </androidx.constraintlayout.widget.Guideline>


    <androidx.constraintlayout.widget.Guideline
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_begin="0dp"
        android:id="@+id/leftGuideline">
    </androidx.constraintlayout.widget.Guideline>

    <androidx.constraintlayout.widget.Guideline
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:orientation="vertical"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintGuide_end="0dp"
        android:id="@+id/rightGuideline">
    </androidx.constraintlayout.widget.Guideline>


    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toTopOf="@+id/center"
        app:layout_constraintTop_toBottomOf="@+id/TopGuideline"
        app:layout_constraintStart_toStartOf="@+id/center"
        android:text="north">
    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintStart_toStartOf="@+id/leftGuideline"
        app:layout_constraintEnd_toStartOf="@+id/center"
        app:layout_constraintTop_toBottomOf="@+id/TopGuideline"
        app:layout_constraintBottom_toTopOf="@+id/bottomGuideline"
        android:text="West">
    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toTopOf="@+id/bottomGuideline"
        app:layout_constraintTop_toBottomOf="@+id/TopGuideline"
        app:layout_constraintStart_toEndOf="@+id/leftGuideline"
        app:layout_constraintEnd_toStartOf="@+id/rightGuideline"
        android:id="@+id/center"
        android:text="center">
    </Button>


    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toStartOf="@+id/rightGuideline"
        app:layout_constraintStart_toEndOf="@+id/center"
        app:layout_constraintTop_toBottomOf="@+id/TopGuideline"
        app:layout_constraintBottom_toTopOf="@+id/bottomGuideline"
        android:text="East">
    </Button>


    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toTopOf="@+id/bottomGuideline"
        app:layout_constraintTop_toBottomOf="@+id/center"
        app:layout_constraintStart_toStartOf="@+id/center"
        android:text="south">
    </Button>




</androidx.constraintlayout.widget.ConstraintLayout>

在这里插入图片描述

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <androidx.constraintlayout.widget.Guideline
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_begin="0dp"
        android:id="@+id/TopGuideline">
    </androidx.constraintlayout.widget.Guideline>

    <androidx.constraintlayout.widget.Guideline
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_end="0dp"
        android:id="@+id/bottomGuideline">
    </androidx.constraintlayout.widget.Guideline>


    <androidx.constraintlayout.widget.Guideline
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_begin="0dp"
        android:id="@+id/leftGuideline">
    </androidx.constraintlayout.widget.Guideline>

    <androidx.constraintlayout.widget.Guideline
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:orientation="vertical"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintGuide_end="0dp"
        android:id="@+id/rightGuideline">
    </androidx.constraintlayout.widget.Guideline>



    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toTopOf="@+id/bottomGuideline"
        app:layout_constraintTop_toBottomOf="@+id/TopGuideline"
        app:layout_constraintStart_toEndOf="@+id/leftGuideline"
        app:layout_constraintEnd_toStartOf="@+id/rightGuideline"
        android:id="@+id/center"
        android:text="center">
    </Button>


    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintCircle="@+id/center"
        app:layout_constraintCircleAngle="0"
        app:layout_constraintCircleRadius="150dp"
        android:text="North">
    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintCircle="@+id/center"
        app:layout_constraintCircleAngle="-45"
        app:layout_constraintCircleRadius="150dp"
        android:text="NE">
    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintCircle="@+id/center"
        app:layout_constraintCircleAngle="-90"
        app:layout_constraintCircleRadius="150dp"
        android:text="East">
    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintCircle="@+id/center"
        app:layout_constraintCircleAngle="-135"
        app:layout_constraintCircleRadius="150dp"
        android:text="SE">
    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintCircle="@+id/center"
        app:layout_constraintCircleAngle="-180"
        app:layout_constraintCircleRadius="150dp"
        android:text="South">
    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintCircle="@+id/center"
        app:layout_constraintCircleAngle="-225"
        app:layout_constraintCircleRadius="150dp"
        android:text="SW">
    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintCircle="@+id/center"
        app:layout_constraintCircleAngle="-270"
        app:layout_constraintCircleRadius="150dp"
        android:text="West">
    </Button>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintCircle="@+id/center"
        app:layout_constraintCircleAngle="-315"
        app:layout_constraintCircleRadius="150dp"
        android:text="NW">
    </Button>



</androidx.constraintlayout.widget.ConstraintLayout>

在这里插入图片描述

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Android--- Layout 的相关文章

  • Android 纹理仅显示纯色

    我正在尝试在四边形上显示单个纹理 我有一个可用的 VertexObject 它可以很好地绘制一个正方形 或任何几何对象 现在我尝试扩展它来处理纹理 但纹理不起作用 我只看到一种纯色的四边形 坐标数据位于 arrayList 中 the ve
  • android中listview显示数据库中的数据

    我是安卓新手 我想知道如何在列表视图中显示数据库中的数据 它不会向数据库添加数据 我只是显示我们存储在数据库中的任何内容 请帮助我实现这一目标 提前致谢 使用这些课程可能会对您有所帮助 用于数据库创建 package com example
  • 如何使用应用程序接口将蓝牙套接字传递给另一个活动

    因此 根据我收集的信息 套接字连接既不可序列化 也不可分割 但我需要将蓝牙连接传递给另一个活动 我不想作为中间人编写服务 所以请不要将此作为解决方案发布 我听说有一种方法可以使用自定义应用程序接口来传递这些类型的对象 但我一生都找不到这样的
  • 容器中的 JVM 计算处理器错误?

    最近我又做了一些研究 偶然发现了这一点 在向 OpenJDK 团队抱怨之前 我想看看是否有其他人观察到这一点 或者不同意我的结论 因此 众所周知 JVM 长期以来忽略了应用于 cgroup 的内存限制 众所周知 现在从 Java 8 更新某
  • 如何在 Eclipse 中使用其他外部 jar 依赖项创建不可运行/不可执行的 jar

    我无法通过 Eclipse 导出向导创建普通的 jar 不可运行 不可执行 它仅创建 jar 文件 但不会导出依赖的 jar 从而在从其他类调用导出的 jar 的方法时出现错误 请帮助 非常感谢 kurellajunior的建议 它是通过使
  • 如何将 Observable>> 转换为 Observable>

    我陷入了如何将以下可观察类型转换 转换为我的目标类型的困境 我有以下类型的可观察值 Observable
  • 当您在数组列表上调用remove(object o)时,它如何比较对象?

    当您在 java 中的数组列表上调用remove object o 时 它如何比较对象以找到要删除的正确对象 它使用指针吗 或者它使用 Comparable 接口来比较对象吗 ArrayList remove 依赖于对象的实现Equal方法
  • 带有 OpenId 提供程序的 Java Spring 安全性

    我有一个 spring MVC 应用程序 另一个客户端应用程序想要使用 open id connect 访问我的 spring 应用程序 如何在服务器端实现开放ID提供商 请帮忙 MITREid 连接 OpenID Connect Java
  • 创建正则表达式匹配数组

    在Java中 我试图将所有正则表达式匹配返回到一个数组 但似乎您只能检查模式是否匹配某些内容 布尔值 如何使用正则表达式匹配来形成与给定字符串中的正则表达式匹配的所有字符串的数组 4城堡的回答 https stackoverflow com
  • 改变for循环的顺序?

    我遇到一种情况 我需要根据用户输入以不同的顺序循环遍历 xyz 坐标 所以我是 3D 空间中的一个区域 然后是一组像这样的 for 循环 for int x 0 x lt build getWidth x for int y 0 y lt
  • 由于“进程崩溃”,仪器运行失败。

    我想运行以下测试 package com xxx yyy import android content Context import androidx test InstrumentationRegistry import androidx
  • 剪切评级栏中的图像

    我制作了自己的评级栏 花朵图像有 4 种尺寸 xdpi hdpi 等 从 24px24px 到 64x64px
  • Android 地理围栏无法正常工作(未调用 IntentService)

    这是我的代码 安卓清单
  • 使用 secp256r1 曲线和 SHA256 算法生成 ECDSA 签名 - BouncyCastle

    我正在尝试使用带有 secp256r1 曲线 P256 的 ECDSA 和用于消息哈希的 SHA256 算法生成签名 我也在使用 Bouncy Castle 库 下面的代码 public class MyTest param args pu
  • 如何初始化静态地图?

    你会如何初始化静态Map在Java中 方法一 静态初始化方法二 实例初始化 匿名子类 或者 还有其他方法吗 各自的优点和缺点是什么 这是说明这两种方法的示例 import java util HashMap import java util
  • Java中的回调接口是什么?

    SetObserver 接口的代码片段取自有效的Java 避免过度同步第67条 public interface SetObserver
  • 如何用表达式语言获取布尔属性?

    如果我有一堂这样的课 class Person private int age public int getAge return age public boolean isAdult return age gt 19 我可以得到age像这样
  • 摩尔斯电码 至 英语

    我现在的问题是让 摩尔斯电码转英语 正常工作 将英语转换为莫尔斯电码的第一部分工作正常 我知道以前已经有人问过这个问题 但我不知道我做错了什么 我知道我需要在某个地方进行拆分 但我只是不确定将其放在代码中的何处 现在 莫尔斯电码到英语的部分
  • 如何正确编写AttributeSet的XML?

    我想创建一个面板适用于 Android 平台的其他小部件 http code google com p android misc widgets 在运行时 XmlPullParser parser getResources getXml R
  • 为什么应该首选 Java 类的接口?

    PMD https pmd github io 将举报以下违规行为 ArrayList list new ArrayList 违规行为是 避免使用 ArrayList 等实现类型 而是使用接口 以下行将纠正违规行为 List list ne

随机推荐

  • 加密货币:我们为何而战?

    在 加密货币 领域中肆虐的冲突是无止境的 这些激烈的争论冲突涉及到各个方面 参与各方也几乎不去尝试达成双方都能接受的妥协让步 有趣的是 站在这些争议焦点的对立面往往是同一群人 从加密货币极繁主义和财富的分配 到治理和共识算法等等 这些争议的
  • Ubuntu/linux 下安装jdk和eclipse,超详细教程

    1 首先下载jdk和eclipse jdk官方下载网址 http www oracle com technetwork java javase downloads index html 官方有时候下的很慢很慢 百度网盘现成的jdk8 htt
  • 保研之路——中山大学数据科学与计算机学院直硕夏令营

    中山大学数据科学与计算机学院直硕夏令营 个人情况 高校复试参与情况 中山大学数据科学与计算机学院直硕 7 14 7 20 结语 嗯 抱着不白花这么多路费住宿费的初衷准备写一个保研经验贴 希望学弟学妹少花点钱吧orz 我的战术大概是只要学校给
  • stm32实用篇4: stm32数据类型长度

    由于经常会忘记stm32的数据类型长度 测试一下 DEBUG INFO stm32数据类型长度 DEBUG INFO char d byte sizeof char DEBUG INFO short d byte sizeof short
  • 算法:归并排序和快排的区别

    一 二者比较 归并排序和快排的相同点 1 利用分治思想 2 具体实现都用递归 归并排序和快排的不同点 1 先分解再合并 归并排序先递归分解到最小粒度 然后从小粒度开始合并排序 自下而上的合并排序 2 边分解边排序 快速排序每次分解都实现整体
  • Educoder_web实训作业——写在最后

    今天终于把最后一章的web发了出来 这也是我第一次完整的将一个实训作业写成一个专栏推送 其实 这不是我第一次做关卡答案的文章了 上个学期Java实训的时候 由于当时自身也有很多题不是特别清楚 就上网搜了一下 没想到发现网上面已经有人开始再发
  • MFC中OnTimer定时器用法

    一 单个定时器用法 定时器工作主要流程 设置定时器SetTimer 时间到后调用OnTimer函数 关闭定时器KillTimer 可以在程序初始化用SetTimer函数弄成多个线程类似 并行进行多个函数功能 1 1 SetTimer H n
  • Python实现排队论——多坑位仿真(未使用仿真库,纯手写仿真)

    Python实现排队论 多坑位厕所 在一次偶然机会 接触到运筹学的排队论问题 于是简单尝试了一下硬撸代码 纯手打仿真 没有使用仿真库 建议大家可以学习Simpy库 用以仿真 一 案例 主要是基于 蒙特卡罗思想 求解 单坑位 排队等待时间问题
  • 动手做一个简单的智能小车

    动手做一个简单的智能小车 来到CNDN一年了 看到了许多大佬的杰出作品 也该写点什么来回馈给大家了前不久接触了单片机 想提前进行实践一下所以有想法做一个实体出来 想来想去难的怕自己搞不定 但是还好找到了志同道合的王同学 一起搞一个智能小车
  • 数据结构与算法课程笔记(十)

    实验十 图的存储结构与遍历 一 实验目的 二 实验环境 三 实验内容 一 实验目的 掌握图的邻接矩阵表示方法 理解基于邻接矩阵的深度优先 广度优先遍历方法的实现 掌握图的邻接表表示方法 理解基于邻接表的深度优先 广度优先遍历方法的实现 二
  • Java Socket 之 NIO

    对于 TCP 或 UDP 的服务器 如何实现并发处理客户端 最直观的想法就是为每个到来的请求 创建一个单独的线程来处理 但是这种方式未免太浪费资源了 那可以使用线程池来管理线程 这样可以节约资源 以 TCP 服务器举例 首先需要定义一个需要
  • C++ 穷举法

    今天我们来了解一下C 语言中 解决问题的一个较为常用的方法 穷举法 我们先来了解一下它的基本原理 再来做一些题目巩固一下 穷举又叫枚举 就是先确立一个范围 再把这个范围里的数 一个一个的带入题目中尝试 如果符合题目中的所有条件 那么这道题就
  • 读取Linux中I2C数据——c程序

    关于在Linux下读取I2C数据 该程序主要是在树莓派中读取AMG8833传感器中的64个温度数据 借鉴了一些网上的方法 然后参考芯片的数据手册 数据的存储格式 本芯片是2个字节存放一个数据 include
  • 搭建云原生环境

    1 安装准备工作 确保所有被安装服务器时区和时间一致 时间不一致会影响 Elasticsearch 和 Skywalking 等信息无法采集的情况出现 在各个服务器上安装时间同步命令工具 yum install ntp y 使用 ntpda
  • AJAX--XMLHttpRequest的方法

    AJAX XMLHttpRequest XMLHttpRequest是浏览器内置的一个构造函数 作用是 基于new出来的XMLsHttpRequest实例对象 可以发起Ajax的请求 axios中的axios get axios post
  • CSS Grid布局:合并单元格布局

    CSS Grid布局 网格单元格布局 一文中通过一些简单的实例介绍了如何给容器定义网格 并且怎么使用网格线或者网格区域来实现单元格这样的简单的布局 在文章结尾之处也提到过 这样的单元格如同表格一样 仅仅一个个独立的单元格是无法满足一些复杂的
  • 软件测试基础

    软件测试基础 一 软件测试基础理论 1 软件测试的必要性 所有的产品或者服务上线都需要测试 2 测试的发展过程 3 什么是软件测试 找bug 发现缺陷 4 测试的定义 使用人工或自动的手段来运行或者测试某个系统的过程 目的在于检测它是否满足
  • JSON parse error: Cannot deserialize instance of `java.util.ArrayList

    前言 今天测试接口 JSON里面有个集合 一直报错如下所示 name 到底怎么回事呢 status 0 tenantId 123 createId 123 modifyId 123 labelItemRelations itemId 111
  • 为什么Vue中data一定要是一个函数?

    1 什么是函数 函数是由事件驱动的或者当它被调用时执行的可重复使用的代码块 js函数语法 函数就是包裹在花括号中的代码块 前面使用了关键词 function 当调用该函数时 会执行函数内的代码 可以在某事件发生时直接调用函数 比如当用户点击
  • Android--- Layout

    Android Layout Linear Layout Relative Layout Table Layout Grid Layout Frame Layout Constraint Layout Linear Layout