首页 > 其他分享 >软件工程日报二十二——完善安卓界面

软件工程日报二十二——完善安卓界面

时间:2023-03-22 16:44:44浏览次数:58  
标签:二十二 界面 安卓 查询 软件工程 页面

今天,我和我的搭档开始进行安卓地铁系统的编写,由于之前已经实现了个人作业,所以这次安卓界面的搭建比较容易

初版源码如下:

主页

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainActivity">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="地铁查询系统"
        android:textSize="50dp"
        android:textColor="@color/white"
        android:background="#E91E63"
        android:gravity="center">>

    </TextView>
    </LinearLayout>
    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/add"
        android:text="线路查询"
        android:textColor="@color/white">

    </Button>
    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/clock"
        android:text="站点查询"
        android:textColor="@color/white">

    </Button>
    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/query"
        android:text="换乘查询"
        android:textColor="@color/white">

    </Button>

</LinearLayout>

换乘查询

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ChangeQuery">
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="换乘查询"
        android:id="@+id/title"
        android:textSize="30sp"
        android:textColor="@color/white"
        android:background="#E91E63"
        android:gravity="center">
    </TextView>

    <LinearLayout
        android:layout_below="@+id/title"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        tools:layout_editor_absoluteX="135dp"
        tools:layout_editor_absoluteY="342dp">


        <TextView
            android:layout_width="match_parent"
            android:layout_height="70dp"
            android:id="@+id/a"
            android:text="请输入起点:"
            android:textSize="20dp" />

        <EditText
            android:id="@+id/querydata1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"

            android:inputType="text"
            ></EditText>
        <TextView
            android:layout_width="match_parent"
            android:layout_height="70dp"
            android:id="@+id/b"
            android:text="请输入终点:"
            android:textSize="20dp" />

        <EditText
            android:id="@+id/querydata2"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"

            android:inputType="text"
            ></EditText>

        <Button
            android:id="@+id/submit"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="确定" />
        <Button
            android:id="@+id/back"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:text="返回"
            />
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            >


        </LinearLayout>

    </LinearLayout>

</RelativeLayout>

线路查询

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".queryActivity">
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="线路查询"
        android:id="@+id/title"
        android:textSize="30sp"
        android:textColor="@color/white"
        android:background="#E91E63"
        android:gravity="center">
    </TextView>

    <LinearLayout
        android:layout_below="@+id/title"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        tools:layout_editor_absoluteX="135dp"
        tools:layout_editor_absoluteY="342dp">


        <TextView
            android:layout_width="match_parent"
            android:layout_height="70dp"
            android:id="@+id/a"
            android:text="请输入线路号:"
            android:textSize="20dp" />

        <EditText
            android:id="@+id/querydata"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"

            android:inputType="text"
            ></EditText>

        <Button
            android:id="@+id/submit"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="确定" />
        <Button
            android:id="@+id/back"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:text="返回"
            />
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            >
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:gravity="center"
                android:textSize="18dp"
                android:id="@+id/show1"/>
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:gravity="center"
                android:textSize="18dp"
                android:id="@+id/show2"/>
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:gravity="center"
                android:textSize="18dp"
                android:id="@+id/show3"/>
        </LinearLayout>

    </LinearLayout>

</RelativeLayout>

站点查询

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ChangeQuery">
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="站点查询"
        android:id="@+id/title"
        android:textSize="30sp"
        android:textColor="@color/white"
        android:background="#E91E63"
        android:gravity="center">
    </TextView>

    <LinearLayout
        android:layout_below="@+id/title"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        tools:layout_editor_absoluteX="135dp"
        tools:layout_editor_absoluteY="342dp">


        <TextView
            android:layout_width="match_parent"
            android:layout_height="70dp"
            android:id="@+id/a"
            android:text="请输入站点名:"
            android:textSize="20dp" />

        <EditText
            android:id="@+id/querydata"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"

            android:inputType="text"
            ></EditText>

        <Button
            android:id="@+id/submit"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="确定" />
        <Button
            android:id="@+id/back"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:text="返回"
            />
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            >
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:gravity="center"
                android:textSize="18dp"
                android:id="@+id/show1"/>
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:gravity="center"
                android:textSize="18dp"
                android:id="@+id/show2"/>
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:gravity="center"
                android:textSize="18dp"
                android:id="@+id/show3"/>
        </LinearLayout>

    </LinearLayout>

</RelativeLayout>

页面展示如下:

 

 

实现线路查询

 

 

对于以上安卓端的开发只是一个雏形,页面有些简陋,后期会继续进行开发。

 

标签:二十二,界面,安卓,查询,软件工程,页面
From: https://www.cnblogs.com/jiacheng-712/p/17244612.html

相关文章

  • Android开发-安卓手机真机调试配置教程(以小米/红米手机为例)
    打开手机的设置,点击我的设备。  进入全部参数信息。  下拉找到MIUI版本,多次连续点击,直到进入开发者模式,弹出如图提示。     在设置最上方的搜索......
  • 软件工程3月21日结队日报
    学习时间:五小时代码量:800博客量:1任务:今天对地铁查询系统PC端的前端页面进行了一些css与js的美化,并且完成了安卓端的查询线路、查询站点的功能,对于起点---终点查询也完成......
  • 红米手机如何修改安卓目录下的data目录下的txt文件
    两个应用:wpsoffice安卓清理君先用wps编辑保存一个txt的同名文件,当然wps并不能直接保存到安卓目录下这时候使用安卓清理君,删除+移动,就可以达到修改的目的其实安卓自带......
  • 安卓
    2013年GoogleI/O大会首次发布了AndroidStudioIDE(Android平台集成开发环境)。它基于IntellijIDEA开发环境,旨在取代Eclipse和ADT(Android开发者工具)为开发者提供更好的开发......
  • 2023年3月21日(软件工程日报)
    今天主要内容,完成地铁app主页面及其跳转页面设计,具体情况在第一次结对作业中,之后学习数组适配器适用于纯文本的列表数据,简单适配器适用于带图标的列表数据。然而实际应......
  • 安卓_全屏/取消标题栏
    ......
  • 软件工程日报——SQL语句查询不能应用在jsp文件
    今天上课我们在课堂上讲解了如何搞对象,然后再后两节课我和我的伙伴进行了对地铁系统中初始站台和终点站台查询功能的研究。在这个过程中,我们发现一个问题:能够实现web页面查......
  • 3.20号软件工程课上未展示原因
    1.今日下午软件工程下午上课,程序输出的结果一直乱码,也一直找不到原因,最后只能重新新建项目,一段一段代码的复制,并通过百度搜索,找到了问题的所在,我们团队实现了输入起......
  • 2023.3.18软件工程日报
    时间:6小时代码量:500行今日把地铁系统的基本功能实现了,包括三个功能,前两个功能在上课的时候已经构思并基本实现,但是第三个功能确实费了些时间,但是也基本完成,目前仍需要在......
  • 安卓连接MYSQL---2023年3月18软工日报
    今天上午睡到9点,下午用安卓连接MYSQL,最后连接成功,我来帮你踩了坑,老子帮你弄弄。首先就是你要导入5.1.49jar包驱动,别的不行,别问我,我才过坑,试了试,再有就是改权限,mysql要支......