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

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

效果:

75.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="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".GoodsInfo">
    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_margin="30dp"
        android:background="  #B0C4DE">
        <TextView
            android:id="@+id/text1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentRight="true"
            android:layout_marginLeft="50dp"
            android:layout_marginTop="30dp"
            android:text="订单号:201508260528"
            android:textColor="@android:color/holo_red_light"/>
        <TextView
            android:id="@+id/text2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@id/text1"
            android:layout_below="@id/text1"
            android:layout_marginTop="8dip"
            android:text="收货人:杨明金"
            android:textColor="@android:color/holo_red_light"/>
        <TextView
            android:id="@+id/text3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@id/text1"
            android:layout_below="@id/text2"
            android:layout_marginTop="8dip"
            android:textColor="@android:color/holo_red_light"
            android:text="联系电话:182142XXXX"/>
        <TextView
            android:id="@+id/text4"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@id/text1"
            android:layout_below="@id/text3"
            android:layout_marginTop="8dip"
            android:textColor="@android:color/holo_red_light"
            android:text="收货地址:云南省昆明市五华区128号"/>
        <TextView
            android:id="@+id/text5"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@id/text1"
            android:layout_below="@id/text4"
            android:layout_marginTop="8dip"
            android:textColor="@android:color/holo_red_light"
            android:text="总金额:114"/>
        <TableLayout
            android:id="@+id/tableLayout1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@id/text1"
            android:layout_below="@id/text5"
            android:layout_centerVertical="true"
            android:layout_marginTop="5dp"
            android:layout_marginRight="8dip"
            android:background="#ffcccccc">
            <TableRow
                android:id="@+id/tableRow1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="#ffffcc99"
                android:layout_margin="1dip">
                <TextView
                    android:layout_width="0.0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"
                    android:text="商品名称"
                    android:textColor="@android:color/holo_red_light" />
                <TextView
                    android:layout_width="0.0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"
                    android:text="商品数量"
                    android:textColor="@android:color/holo_red_light" />
                <TextView
                    android:layout_width="0.0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="单价"
                    android:textColor="@android:color/holo_red_light" />
                <TextView
                    android:layout_width="0.0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="5"
                    android:text=""
                    android:textColor="@android:color/holo_red_light" />
            </TableRow>
            <TableRow
                android:id="@+id/tableRow2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">
                <TextView
                    android:layout_width="0.0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"
                    android:text="伊利轻牛奶"
                    android:textColor="@android:color/white"/>
                <TextView
                    android:layout_width="0.0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"
                    android:text="50"
                    android:textColor="@android:color/white"/>
                <TextView
                    android:layout_width="0.0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="2"
                    android:textColor="@android:color/white"/>
                <TextView
                    android:layout_width="0.0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="5"
                    android:text="伊利轻牛奶"
                    android:textColor="@android:color/white"/>
            </TableRow>
        </TableLayout>
    </RelativeLayout>
    <Spinner
        android:id="@+id/spinner"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/tableLayout1"
        android:layout_marginTop="10dp"
        android:layout_alignRight="@id/tableLayout1"/>
    <Button
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:layout_alignRight="@id/tableLayout1"
        android:layout_below="@id/spinner"
        android:layout_marginTop="10dp"/>
</LinearLayout>
相关实践学习
钉钉群中如何接收IoT温控器数据告警通知
本实验主要介绍如何将温控器设备以MQTT协议接入IoT物联网平台,通过云产品流转到函数计算FC,调用钉钉群机器人API,实时推送温湿度消息到钉钉群。
阿里云AIoT物联网开发实战
本课程将由物联网专家带你熟悉阿里云AIoT物联网领域全套云产品,7天轻松搭建基于Arduino的端到端物联网场景应用。 开始学习前,请先开通下方两个云产品,让学习更流畅: IoT物联网平台:https://iot.console.aliyun.com/ LinkWAN物联网络管理平台:https://linkwan.console.aliyun.com/service-open
相关文章
|
4天前
|
存储 Android开发 数据安全/隐私保护
如何在Android设备上撤销Flutter应用程序的所有权限?
如何在Android设备上撤销Flutter应用程序的所有权限?
105 64
|
4天前
|
缓存 Android开发 开发者
Flutter环境配置完成后,如何在Android设备上运行Flutter应用程序?
Flutter环境配置完成后,如何在Android设备上运行Flutter应用程序?
120 62
|
4天前
|
开发工具 Android开发 开发者
在Android设备上运行Flutter应用程序时,如果遇到设备未授权的问题该如何解决?
在Android设备上运行Flutter应用程序时,如果遇到设备未授权的问题该如何解决?
114 61
|
7月前
|
Java API Android开发
安卓应用程序开发的新手指南:从零开始构建你的第一个应用
【10月更文挑战第20天】在这个数字技术不断进步的时代,掌握移动应用开发技能无疑打开了一扇通往创新世界的大门。对于初学者来说,了解并学习如何从无到有构建一个安卓应用是至关重要的第一步。本文将为你提供一份详尽的入门指南,帮助你理解安卓开发的基础知识,并通过实际示例引导你完成第一个简单的应用项目。无论你是编程新手还是希望扩展你的技能集,这份指南都将是你宝贵的资源。
257 5
|
7月前
|
XML 数据可视化 Android开发
Android应用界面
Android应用界面中的布局和控件使用,包括相对布局、线性布局、表格布局、帧布局、扁平化布局等,以及AdapterView及其子类如ListView的使用方法和Adapter接口的应用。
89 0
Android应用界面
|
8月前
|
传感器 物联网 人机交互
物联网:物联网,作为新一代信息技术的重要组成部分,通过智能感知、识别技术与普适计算等通信感知技术,将各种信息传感设备与互联网结合起来而形成的一个巨大网络,实现了物物相连、人物相连,开启了万物互联的新时代。
在21世纪,物联网(IoT)作为新一代信息技术的核心,正以前所未有的速度重塑生活、工作和社会结构。本文首先介绍了物联网的概念及其在各领域的广泛应用,强调其技术融合性、广泛的应用范围以及数据驱动的特点。接着,详细阐述了物联网行业的现状和发展趋势,包括政策支持、关键技术突破和应用场景深化。此外,还探讨了物联网面临的挑战与机遇,并展望了其未来在技术创新和模式创新方面的潜力。物联网行业正以其独特魅力引领科技发展潮流,有望成为推动全球经济发展的新引擎。
|
8月前
|
XML Android开发 UED
💥Android UI设计新风尚!掌握Material Design精髓,让你的界面颜值爆表!🎨
随着移动应用市场的蓬勃发展,用户对界面设计的要求日益提高。为此,掌握由Google推出的Material Design设计语言成为提升应用颜值和用户体验的关键。本文将带你深入了解Material Design的核心原则,如真实感、统一性和创新性,并通过丰富的组件库及示例代码,助你轻松打造美观且一致的应用界面。无论是色彩搭配还是动画效果,Material Design都能为你的Android应用增添无限魅力。
170 1
|
8月前
|
存储 XML API
安卓应用程序开发:从新手到专家的旅程
【8月更文挑战第33天】在这篇文章中,我们将一起踏上一段激动人心的旅程,探索如何从一个对安卓应用程序开发一无所知的新手,成长为一个能够独立开发复杂应用程序的专家。我们将通过实际案例和代码示例,深入理解安卓开发的各个方面,包括用户界面设计、数据存储、网络通信等。无论你是刚刚入门,还是已经有一些基础,这篇文章都将为你提供宝贵的知识和技能,帮助你在安卓开发的道路上更进一步。
|
8月前
|
机器学习/深度学习 人工智能 算法
物联网(IoT)就像是一个大型派对,无数的设备都在欢快地交流着信息
【9月更文挑战第4天】在这个万物互联的时代,物联网(IoT)犹如一场盛大的派对,各类设备欢聚一堂。然而,如何让这些设备互相理解并协同工作呢?这就需要机器学习与人工智能的助力。例如,智能空调通过学习你的使用习惯来调节温度,使你更加舒适;智能安防系统则能识别异常行为并及时报警,保障家庭安全。此外,智能农业、交通等领域也因机器学习和人工智能的应用变得更加高效。下面通过一个简单的温度预测代码示例,展示机器学习在物联网中的实际应用,让我们一起感受其强大潜力。
122 0
|
2月前
|
传感器 人工智能 物联网
健康监测设备的技术革命:AI+物联网如何让你随时掌握健康数据?
健康监测设备的技术革命:AI+物联网如何让你随时掌握健康数据?
264 19

相关产品

  • 物联网平台