效果图:

代码:

布局:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<!--设置界面-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dip"
android:gravity="center"
android:orientation="horizontal"
android:background="@color/titleColor">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="20sp"
android:text="设置"/>
</LinearLayout>
<!--温度范围-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dip">
<TextView
android:layout_width="0.0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:gravity="center"
android:text="温度范围"/>
<EditText
android:layout_width="0.0dp"
android:layout_height="wrap_content"
android:layout_weight="6"
android:ems="10" />
<TextView
android:layout_width="0.0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:gravity="center"
android:text="至" />
<EditText
android:layout_width="0.0dp"
android:layout_height="wrap_content"
android:layout_weight="6"
android:layout_marginRight="50dip"
android:ems="10"/>
</LinearLayout>
<!--湿度范围-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp">
<TextView
android:layout_width="0.0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:layout_gravity="center"
android:text="湿度范围"/>
<EditText
android:layout_width="0.0dp"
android:layout_height="wrap_content"
android:layout_weight="6"
android:ems="10"/>
<LinearLayout
android:layout_width="0.0dp"
android:layout_height="wrap_content"
android:layout_weight="10"
android:layout_marginRight="50dip">
</LinearLayout>
</LinearLayout>
<!--光照范围-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp">
<TextView
android:layout_width="0.0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:layout_gravity="center"
android:text="光照范围"/>
<EditText
android:layout_width="0.0dp"
android:layout_height="wrap_content"
android:layout_weight="6"
android:ems="10"/>
<LinearLayout
android:layout_width="0.0dp"
android:layout_height="wrap_content"
android:layout_weight="10"
android:layout_marginRight="50dip">
</LinearLayout>
</LinearLayout>
<!--CO:-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dip">
<TextView
android:layout_width="0.0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:layout_gravity="center"
android:text="CO:"/>
<EditText
android:layout_width="0.0dp"
android:layout_height="wrap_content"
android:layout_weight="6"
android:ems="10"/>
<LinearLayout
android:layout_width="0.0dp"
android:layout_height="wrap_content"
android:layout_weight="10"
android:layout_marginRight="50dip">
</LinearLayout>
</LinearLayout>
<!--按钮-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dip">
<Button
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="保存"/>
<Button
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="重置"/>
<Button
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="取消"/>
</LinearLayout> </LinearLayout>

Android物联网应用程序开发(智慧城市)—— 环境状态值范围设置界面开发的更多相关文章

  1. Android物联网应用程序开发(智慧城市)—— 查询购物信息界面开发

    效果: 布局代码: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xm ...

  2. 【可视化大屏教程】用Python开发智慧城市数据分析大屏!

    目录 一.开发背景 二.讲解代码 2.1 大标题+背景图 2.2 各区县交通事故统计图-系列柱形图 2.3 图书馆建设率-水球图 2.4 当年城市空气质量aqi指数-面积图 2.5 近7年人均生产总值 ...

  3. Android物联网应用程序开发(智慧城市)—— 用户注册界面开发

    效果: 布局代码: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns: ...

  4. Android物联网应用程序开发(智慧城市)—— 摄像头监控界面开发

    效果: 布局代码: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns: ...

  5. Android物联网应用程序开发(智慧城市)—— 火焰监控界面开发

    效果: 布局代码: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns: ...

  6. Android物联网应用程序开发(智慧城市)—— 购物信息的存储界面开发

    效果: 布局代码: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:an ...

  7. Android物联网应用程序开发(智慧园区)—— 图片预览界面

    效果图: 实现步骤: 1.首先在 build.gradle 文件中引入 RecycleView implementation 'com.android.support:recyclerview-v7: ...

  8. Android物联网应用程序开发(智慧园区)—— 设置传感器阈值对话框界面

    效果图: 自定义对话框布局: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xml ...

  9. Android物联网应用程序开发(智慧园区)—— 园区监控系统界面

    效果图: 布局代码: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:a ...

随机推荐

  1. Android Menu的基本用法

    使用xml定义Menu 菜单资源文件必须放在res/menu目录中.菜单资源文件必须使用<menu>标签作为根节点.除了<menu>标签外,还有另外两个标签用于设置菜单项和分组 ...

  2. 通信协议 HTTP TCP UDP

    TCP   HTTP   UDP: 都是通信协议,也就是通信时所遵守的规则,只有双方按照这个规则"说话",对方才能理解或为之服务. TCP   HTTP   UDP三者的关系: T ...

  3. File类及常用操作方法

    import java.io.File; import java.io.IOException; public class file { public static void main(String[ ...

  4. Spring.DM web开发环境搭建

    作为一个初学者来说,搭建好Spring.DM 的web开发环境还是有些麻烦的.我就遇到了N多麻烦,走了很多弯路.本文介绍了2种比较简单的搭建Spring.DM OSGi web开发环境的搭建.   第 ...

  5. mysql死锁com.mysql.cj.jdbc.exception.MYSQLTransactionRollbackException Deadlock found when trying to get lock;try restarting transaction

    1.生产环境出现以下报错 该错误发生在update操作中,该表并未建立索引,也就是只有InnoDB默认的主键索引,发生错误的程序是for循环中update. 什么情况下会出现Deadlock foun ...

  6. Python @函数装饰器及用法(超级详细)

    函数装饰器的工作原理是怎样的呢?假设用 funA() 函数装饰器去装饰 funB() 函数,如下所示: #funA 作为装饰器函数 def funA(fn): #... fn() # 执行传入的fn参 ...

  7. Python模块和函数

    目录 一.基础 二.特殊函数 一.基础 #导入模块 import xxx #调用 xxx.dd() from xxx import xx  as dd #导入某个函数,as给函数加别名,调用xx() ...

  8. Markdown 语法粗学

    Markdown 语法粗学 Typora下载 Typora官网 下拉点击右上角 选择下载即可 里面选择自己想要的系统下载即可 如果下载缓慢,推荐使用各自的下载工具或者使用软件管家等 亲测迅雷速度尚可 ...

  9. [BUUCTF]PWN——ciscn_2019_s_4

    ciscn_2019_s_4 附件 步骤: 例行检查,32位程序,开启了nx保护 本地试运行一下,看看大概的情况,两次输入,让人联想到栈迁移 32位ida载入,找到关键函数,只可以溢出8字节,没法构造 ...

  10. [BUUCTF]PWN——[BJDCTF 2nd]test

    [BJDCTF 2nd]test 步骤 根据题目,ssh连接一下靶机 登录成功后,ls看一下当前目录下的文件,根据提示可知,我们没法直接获取flag字符串,但是我们可以读取test的源码, test. ...