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

简介: Android物联网应用程序开发(智慧城市)—— 环境状态值范围设置界面开发

效果图:

74.png


代码:


布局:


<?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>
相关实践学习
阿里云AIoT物联网开发实战
本课程将由物联网专家带你熟悉阿里云AIoT物联网领域全套云产品,7天轻松搭建基于Arduino的端到端物联网场景应用。 开始学习前,请先开通下方两个云产品,让学习更流畅: IoT物联网平台:https://iot.console.aliyun.com/ LinkWAN物联网络管理平台:https://linkwan.console.aliyun.com/service-open
相关文章
|
7月前
|
移动开发 前端开发 Android开发
【02】建立各项目录和页面标准化产品-vue+vite开发实战-做一个非常漂亮的APP下载落地页-支持PC和H5自适应提供安卓苹果鸿蒙下载和网页端访问-优雅草卓伊凡
【02】建立各项目录和页面标准化产品-vue+vite开发实战-做一个非常漂亮的APP下载落地页-支持PC和H5自适应提供安卓苹果鸿蒙下载和网页端访问-优雅草卓伊凡
1374 12
【02】建立各项目录和页面标准化产品-vue+vite开发实战-做一个非常漂亮的APP下载落地页-支持PC和H5自适应提供安卓苹果鸿蒙下载和网页端访问-优雅草卓伊凡
|
7月前
|
移动开发 JavaScript 应用服务中间件
【06】优化完善落地页样式内容-精度优化-vue加vite开发实战-做一个非常漂亮的APP下载落地页-支持PC和H5自适应提供安卓苹果鸿蒙下载和网页端访问-优雅草卓伊凡
【06】优化完善落地页样式内容-精度优化-vue加vite开发实战-做一个非常漂亮的APP下载落地页-支持PC和H5自适应提供安卓苹果鸿蒙下载和网页端访问-优雅草卓伊凡
1002 5
【06】优化完善落地页样式内容-精度优化-vue加vite开发实战-做一个非常漂亮的APP下载落地页-支持PC和H5自适应提供安卓苹果鸿蒙下载和网页端访问-优雅草卓伊凡
|
7月前
|
移动开发 Rust JavaScript
【01】首页建立-vue+vite开发实战-做一个非常漂亮的APP下载落地页-支持PC和H5自适应提供安卓苹果鸿蒙下载和网页端访问-优雅草卓伊凡
【01】首页建立-vue+vite开发实战-做一个非常漂亮的APP下载落地页-支持PC和H5自适应提供安卓苹果鸿蒙下载和网页端访问-优雅草卓伊凡
1097 4
【01】首页建立-vue+vite开发实战-做一个非常漂亮的APP下载落地页-支持PC和H5自适应提供安卓苹果鸿蒙下载和网页端访问-优雅草卓伊凡
|
7月前
|
移动开发 Android开发
【03】建立隐私关于等相关页面和内容-vue+vite开发实战-做一个非常漂亮的APP下载落地页-支持PC和H5自适应提供安卓苹果鸿蒙下载和网页端访问-优雅草卓伊凡
【03】建立隐私关于等相关页面和内容-vue+vite开发实战-做一个非常漂亮的APP下载落地页-支持PC和H5自适应提供安卓苹果鸿蒙下载和网页端访问-优雅草卓伊凡
376 0
|
传感器 人工智能 物联网
健康监测设备的技术革命:AI+物联网如何让你随时掌握健康数据?
健康监测设备的技术革命:AI+物联网如何让你随时掌握健康数据?
1487 19
|
存储 安全 物联网
政府在推动物联网技术标准和规范的统一方面可以发挥哪些作用?
政府在推动物联网技术标准和规范的统一方面可以发挥哪些作用?
538 60
|
安全 物联网 物联网安全
制定统一的物联网技术标准和规范的难点有哪些?
制定统一的物联网技术标准和规范的难点有哪些?
628 58
|
存储 数据采集 物联网
物联网技术在物流领域的应用会遇到哪些挑战?
物联网技术在物流领域的应用会遇到哪些挑战?
897 60
|
供应链 物联网 区块链
探索未来技术潮流:区块链、物联网、虚拟现实的融合与创新
【10月更文挑战第41天】随着科技的不断进步,新技术如区块链、物联网、虚拟现实等正在逐步渗透到我们的日常生活中。本文将深入探讨这些技术的发展趋势和应用场景,以及它们如何相互融合,共同推动社会的进步。我们将通过具体的代码示例,展示这些技术在实际应用中的潜力和价值。无论你是科技爱好者,还是对未来充满好奇的探索者,这篇文章都将为你打开一扇通往未来的窗口。
305 56
|
安全 物联网 物联网安全
揭秘区块链技术在物联网(IoT)安全中的革新应用
揭秘区块链技术在物联网(IoT)安全中的革新应用

相关产品

  • 物联网平台