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

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

效果:

78.png

布局代码:


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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="fill_parent"
    tools:context=".UserRegistration">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="30dp"
        android:background="@drawable/bg_environment"
        android:gravity="center_horizontal"
        android:orientation="vertical"
        android:padding="15dp">
        <!--账号-->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="50dp"
            android:layout_marginRight="50dp">
            <TextView
                android:layout_width="0.0dp"
                android:layout_height="wrap_content"
                android:layout_weight="2"
                android:gravity="right"
                android:text="账号:"
                android:textColor="@color/white"/>
            <EditText
                android:layout_width="0.0dp"
                android:layout_height="wrap_content"
                android:layout_weight="8"
                android:ems="10">
                <requestFocus />
            </EditText>
        </LinearLayout>
        <!--密码-->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="50dp"
            android:layout_marginRight="50dp"
            android:layout_marginTop="20dp">
            <TextView
                android:layout_width="0.0dp"
                android:layout_height="wrap_content"
                android:layout_weight="2"
                android:gravity="right"
                android:text="密码:"
                android:textColor="@color/white"/>
            <EditText
                android:layout_width="0.0dp"
                android:layout_height="wrap_content"
                android:layout_weight="5"
                android:ems="10">
            </EditText>
            <CheckBox
                android:layout_width="0.0dp"
                android:layout_height="wrap_content"
                android:layout_weight="3"
                android:text="显示密码"
                android:textColor="@color/white"/>
        </LinearLayout>
        <!--确认密码-->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="50dp"
            android:layout_marginRight="50dp"
            android:layout_marginTop="20dp">
            <TextView
                android:layout_width="0.0dp"
                android:layout_height="wrap_content"
                android:layout_weight="2"
                android:gravity="right"
                android:text="确认密码:"
                android:textColor="@color/white"/>
            <EditText
                android:layout_width="0.0dp"
                android:layout_height="wrap_content"
                android:layout_weight="8"
                android:ems="10">
            </EditText>
        </LinearLayout>
        <!--男女-->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="50dp"
            android:layout_marginRight="50dp"
            android:layout_marginTop="20dp">
            <RadioGroup
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:gravity="right">
                <RadioButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/white"
                    android:text="男"
                    android:layout_marginRight="0dp"/>
                <RadioButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/white"
                    android:text="女"/>
            </RadioGroup>
        </LinearLayout>
        <CheckBox
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="同意 注册协议"
            android:textColor="@color/white"
            android:layout_gravity="right"
            android:gravity="center_vertical"
            android:layout_marginRight="60dp"
            android:layout_marginTop="20dp"/>
        <Button
            android:layout_width="130dp"
            android:layout_height="50dp"
            android:textColor="@color/white"
            android:text="注册"
            android:layout_gravity="right"
            android:layout_marginRight="45dp"
            android:layout_marginTop="10dp"
            android:background="@color/red"/>
    </LinearLayout>
</RelativeLayout>


相关实践学习
阿里云AIoT物联网开发实战
本课程将由物联网专家带你熟悉阿里云AIoT物联网领域全套云产品,7天轻松搭建基于Arduino的端到端物联网场景应用。 开始学习前,请先开通下方两个云产品,让学习更流畅: IoT物联网平台:https://iot.console.aliyun.com/ LinkWAN物联网络管理平台:https://linkwan.console.aliyun.com/service-open
目录
相关文章
|
Android开发 数据安全/隐私保护 开发者
Android自定义view之模仿登录界面文本输入框(华为云APP)
本文介绍了一款自定义输入框的实现,包含静态效果、hint值浮动动画及功能扩展。通过组合多个控件完成界面布局,使用TranslateAnimation与AlphaAnimation实现hint文字上下浮动效果,支持密码加密解密显示、去除键盘回车空格输入、光标定位等功能。代码基于Android平台,提供完整源码与attrs配置,方便复用与定制。希望对开发者有所帮助。
408 0
|
XML Java Android开发
Android自定义view之网易云推荐歌单界面
本文详细介绍了如何通过自定义View实现网易云音乐推荐歌单界面的效果。首先,作者自定义了一个圆角图片控件`MellowImageView`,用于绘制圆角矩形图片。接着,通过将布局放入`HorizontalScrollView`中,实现了左右滑动功能,并使用`ViewFlipper`添加图片切换动画效果。文章提供了完整的代码示例,包括XML布局、动画文件和Java代码,最终展示了实现效果。此教程适合想了解自定义View和动画效果的开发者。
637 65
Android自定义view之网易云推荐歌单界面
|
Android开发 开发者
Android企业级实战-界面篇-3
本文是《Android企业级实战-界面篇》系列的第三篇,主要介绍分割线和条形跳转框的实现方法,二者常用于设置和个人中心界面。文章通过具体代码示例展示了如何实现这两种UI组件,并提供了效果图。实现前需准备`dimens.xml`、`ids.xml`、`colors.xml`等文件,部分资源可参考系列第一、二篇文章。代码中详细说明了布局文件的配置,如分割线的样式定义和条形跳转框的组件组合,帮助开发者快速上手并应用于实际项目中。
226 1
|
XML Android开发 数据格式
Android企业级实战-界面篇-2
本文为《Android企业级实战-界面篇》系列第二篇,主要介绍三个UI模块的实现:用户资料模块、关注与粉丝统计模块以及喜欢和收藏功能模块。通过详细的XML代码展示布局设计,包括dimens、ids、colors配置文件的使用,帮助开发者快速构建美观且功能齐全的界面。文章结合实际效果图,便于理解和应用。建议配合第一篇文章内容学习,以获取完整工具类支持。
263 0
|
算法 Java Android开发
Android企业级实战-界面篇-1
本文详细介绍了Android企业级开发中界面实现的过程,涵盖效果展示、实现前准备及代码实现。作者通过自身经历分享了Android开发经验,并提供了`dimens.xml`、`ids.xml`、`colors.xml`和`strings.xml`等配置文件内容,帮助开发者快速构建规范化的UI布局。文章以一个具体的用户消息界面为例,展示了如何使用线性布局(LinearLayout)和相对布局(RelativeLayout)实现功能模块排列,并附带注意事项及使用方法,适合初学者和进阶开发者参考学习。
385 0
|
传感器 监控 安全
创新无限:物联网技术在智慧城市构建中的前沿探索
【10月更文挑战第29天】在这个信息爆炸的时代,物联网(IoT)技术正重塑我们对城市的认知。智慧城市已从科幻走向现实,物联网通过连接各种设备和传感器,收集、分析数据,提升城市运行效率和居民生活质量。从智慧城管、智能交通、智慧水务到智能电网,物联网的应用正逐步实现城市的智能化、互联化和可持续发展。
603 1
|
XML 数据可视化 Android开发
Android应用界面
Android应用界面中的布局和控件使用,包括相对布局、线性布局、表格布局、帧布局、扁平化布局等,以及AdapterView及其子类如ListView的使用方法和Adapter接口的应用。
564 0
Android应用界面
|
存储 安全 物联网
政府在推动物联网技术标准和规范的统一方面可以发挥哪些作用?
政府在推动物联网技术标准和规范的统一方面可以发挥哪些作用?
696 60
|
传感器 人工智能 物联网
健康监测设备的技术革命:AI+物联网如何让你随时掌握健康数据?
健康监测设备的技术革命:AI+物联网如何让你随时掌握健康数据?
1776 19
|
安全 物联网 物联网安全
制定统一的物联网技术标准和规范的难点有哪些?
制定统一的物联网技术标准和规范的难点有哪些?
872 58

相关产品

  • 物联网平台