zoukankan      html  css  js  c++  java
  • app开发(三)

    首先要开始的就是设计页面的编写,确定按钮,完成基本的页面跳转,其次再做功能。

    页面设计的时候,重要的是页面的布局安排,还有内容的设置编写。

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="#fffeee"
        xmlns:tools="http://schemas.android.com/tools"
        tools:context=".MainActivity"
        >
        <TextView
            android:id="@+id/date_text_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="欢迎使用!"
            android:layout_margin="30sp"
            android:layout_gravity="center"
            android:textSize="30sp"
            android:textColor="#000fff"/>
    
        <Button
            android:id="@+id/btn_login"
            android:layout_width="200sp"
            android:layout_height="100dp"
            android:background="#ffe4e6"
            android:layout_gravity="center"
            android:text="体温上报"
            android:layout_margin="20sp"
            android:textColor="#000000"
            android:textSize="25sp" />
    
        <Button
            android:id="@+id/btn_zhu"
            android:layout_width="200dp"
            android:layout_height="100dp"
            android:layout_margin="20sp"
            android:background="#ffe4e6"
            android:layout_gravity="center"
            android:text="登录注册"
            android:textColor="#000000"
            android:textSize="25sp" />
     
    </LinearLayout>
    

     这是这一阶段的界面设置,略显简陋,界面背景还有按钮框的形状等等,都是可以后期再加工处理的。 

     另外再设计一个登录注册的界面:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        xmlns:tools="http://schemas.android.com/tools"
        android:orientation="vertical"
        android:background="#FFFeee"
        android:padding="10dp"
        tools:context=".LoginActivity">
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="添加或注册账号"
            android:textSize="30sp"
            android:layout_gravity="center"
            android:layout_margin="20sp"
            />
        <EditText
            android:id="@+id/name_edit_text1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="姓名"
            android:layout_gravity="left"
            android:layout_margin="10sp"
            />
        <EditText
            android:id="@+id/stuid_1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="学号"
            android:layout_gravity="left"
            android:layout_margin="10sp"
            />
        <EditText
            android:id="@+id/num_1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="手机号(11位)"
            android:layout_gravity="left"
            android:layout_margin="10sp"
            />
        <EditText
            android:id="@+id/stuclass_1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="所在班级"
            android:layout_gravity="left"
            android:layout_margin="10sp"
            />
    
        <Button
            android:id="@+id/btn_zhuce"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="注册"
            android:layout_margin="10sp"
            android:background="#ffe4e6"/>
        <Button
            android:id="@+id/btn_back"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="返回主页面"
            android:layout_margin="10sp"
            android:background="#ffe4e6"/>
    </LinearLayout>
    

      

     最后就是体温上报的界面了:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        xmlns:tools="http://schemas.android.com/tools"
        android:orientation="vertical"
        android:background="#fffeee"
        tools:context=".FunctionActivity">
    
        <TextView
            android:id="@+id/name_text_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="姓名:"
            android:textSize="15sp"
            android:textColor="#000000"
            android:inputType="textPersonName"/>
    
        <EditText
            android:id="@+id/name_edit_text"
            android:layout_width="177dp"
            android:layout_height="wrap_content"
            android:text=""
            android:textColor="#000000"
            android:textSize="15sp" />
    
        <TextView
            android:id="@+id/date_text_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="填报时间:"
            android:textSize="15sp"
            android:textColor="#000000"/>
        <EditText
            android:id="@+id/date_edit_text"
            android:layout_width="177dp"
            android:layout_height="wrap_content"
            android:textColor="#000000"
            android:textSize="15sp" />
    
        <EditText
            android:id="@+id/time_edit_text"
            android:layout_width="177dp"
            android:layout_height="wrap_content"
            android:textColor="#000000"
            android:textSize="15sp" />
    
        <TextView
            android:id="@+id/address_text_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="所在位置:"
            android:layout_margin="5sp"
            android:textColor="#000000"
            android:textSize="15sp" />
    
        <TextView
            android:id="@+id/address_text"
            android:layout_width="380dp"
            android:layout_height="48dp"
            android:text=" "
            android:layout_margin="5sp"
            android:textColor="#000000"
            android:textSize="15sp" />
    
        <Button
            android:id="@+id/button_2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#ffffff"
            android:gravity="center"
            android:text="获取定位"
            android:textColor="#000000"
            android:textSize="15sp" />
    
        <TextView
            android:id="@+id/tiwen_text_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="体温(单位/摄氏度)"
            android:textSize="15sp"
            android:layout_marginTop="5sp"
            android:textColor="#000000"/>
    
        <EditText
            android:id="@+id/tiwen_edit_text"
            android:layout_width="177dp"
            android:layout_height="wrap_content"
            android:text="36.2"
            android:textColor="#000000"
            android:textSize="15sp" />
        <TextView
            android:id="@+id/teshu_text_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="特殊情况(可多选,如有其他需报告的情况请说明)"
            android:layout_margin="10sp"
            android:textColor="#000000"
            android:textSize="15sp" />
        <CheckBox
            android:id="@+id/check_1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="无"
            android:textSize="10sp"
            />
        <CheckBox
            android:id="@+id/check_2"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="2020年12月27日至今去过或现在居住在中高风险地区"
            android:textSize="10sp"/>
        <EditText
            android:id="@+id/teshu_2"
            android:layout_width="200dp"
            android:layout_height="wrap_content"
            android:textColor="#000000"
            android:textSize="10sp"
            android:hint="按照公布的中高风险地区地域名称,对应填写"/>
        <CheckBox
            android:id="@+id/check_3"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textSize="10sp"
            android:text="本人或家人正在集中隔离"/>
        <EditText
            android:id="@+id/teshu_3"
            android:layout_width="200dp"
            android:layout_height="wrap_content"
            android:textColor="#000000"
            android:textSize="10sp"
            android:hint="请填写原因"/>
        <CheckBox
            android:id="@+id/check_4"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textSize="10sp"
            android:text="今日居住地异动"/>
        <EditText
            android:id="@+id/teshu_4"
            android:layout_width="200dp"
            android:layout_height="wrap_content"
            android:textColor="#000000"
            android:textSize="10sp"
            android:hint="请说明情况"/>
        <CheckBox
            android:id="@+id/check_5"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textSize="10sp"
            android:text="其他情况" />
        <Button
            android:id="@+id/button_1"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:background="#ffe4e6"
            android:gravity="center"
            android:text="提交"
            android:layout_margin="5sp"
            android:textColor="#000000"
            android:textSize="15sp" />
    </LinearLayout>
    

     

  • 相关阅读:
    现在的代码,贴一下
    2014年七月写过的代码,现在看来,还有待改进呀
    第一次做技术论坛发博文,不知道说点啥
    04-树6. Huffman Codes--优先队列(堆)在哈夫曼树与哈夫曼编码上的应用
    04-树5. File Transfer--并查集
    04-树4. Root of AVL Tree-平衡查找树AVL树的实现
    03-树3. Tree Traversals Again (25)将先序遍历和中序遍历转为后序遍历
    03-树2. List Leaves (25) 二叉树的层序遍历
    二叉树的遍历:先序中序后序遍历的递归与非递归实现及层序遍历
    最大子序列和问题之算法优化
  • 原文地址:https://www.cnblogs.com/marr/p/14678622.html
Copyright © 2011-2022 走看看