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月前
|
物联网
STC51单片机-实验开发装置仿真-物联网应用系统设计
STC51单片机-实验开发装置仿真-物联网应用系统设计
55 0
|
4月前
|
存储 物联网 大数据
助力工业物联网,工业大数据之脚本开发【五】
助力工业物联网,工业大数据之脚本开发【五】
40 0
|
7月前
|
消息中间件 传感器 监控
IoT企业物联网平台,数据服务开发实战
IoT企业物联网平台开发实战
317 0
|
3月前
|
存储 安全 数据管理
构建智慧家庭的未来:物联网平台与智能家居系统的开发
在数字化时代,物联网平台和智能家居系统的开发日益受到关注。本文将探讨物联网平台和智能家居系统的定义、优势以及开发过程中的挑战与解决方案。通过对智能家居系统的构建和物联网平台的应用,我们可以实现更加智能、高效和安全的生活环境。
|
4月前
|
传感器 人工智能 自动驾驶
【Android App】物联网实战项目之自动驾驶的智能小车(附源码和演示 超详细)
【Android App】物联网实战项目之自动驾驶的智能小车(附源码和演示 超详细)
100 0
|
4月前
|
传感器 物联网 Android开发
【Android App】物联网中指南针、计步器、感光器、陀螺仪的讲解及实战演示(附源码 超详细必看)
【Android App】物联网中指南针、计步器、感光器、陀螺仪的讲解及实战演示(附源码 超详细必看)
65 1
|
4月前
|
传感器 物联网 Android开发
【Android App】物联网中查看手机支持的传感器及实现摇一摇功能-加速度传感器(附源码和演示 超详细)
【Android App】物联网中查看手机支持的传感器及实现摇一摇功能-加速度传感器(附源码和演示 超详细)
69 1
|
5月前
|
边缘计算 供应链 安全
|
7月前
|
传感器 安全 物联网
一个非常优秀的跨平台物联网开发常用的网络请求库libcurl
一个非常优秀的跨平台物联网开发常用的网络请求库libcurl
178 1
|
7月前
|
JSON 物联网 API
嵌入式物联网开发之使用Json获取北京时间校准接口API
嵌入式物联网开发之使用Json获取北京时间校准接口API
266 1

相关产品

  • 物联网平台