【Android学习之路】之从零开始做一个小项目(一)

最近在学Android(初学者吖),写下这个【Android学习之路】系列记录一下自己学习的过程,欢迎阅读~


目前进度

① 总体页面框架基本成型,初始界面和登录界面经过一定的美化
② 注册和登录功能已经实现,密码采用MD5算法进行加密存储
③ 能成功连接SQLite数据库并进行数据的CRUD操作
④ 手机验证码登录功能进行至一半(采用的是MobTech平台)

准备阶段

开发工具以及方向构思

我用的开发工具是Android Studio,是谷歌基于IntelliJ IDEA开发的IDE,因为习惯于用IDEA写Java,所以我选择使用用Android Studio来进行安卓开发,而不是Eclipse(而且谷歌已经停止对Eclipse Android开发工具的一切支持)。

附上我用的版本的百度网盘链接:
Android Studio:链接:https://pan.baidu.com/s/1y2uXHEUl0ungSwA2eaAO7A 提取码:twmm
SDK: 链接:https://pan.baidu.com/s/1OdKp84vJnbMcm8ky-L28AQ 提取码:h5zi

模拟器我用的是夜神,使用效果还可以,同样附上链接:

链接:https://pan.baidu.com/s/1JOI0bWH1aOvP1gpc4-79pQ
提取码:odn9

— — — — — — — — — — — — — — — — — —
构思自己要做的项目时,方向是和学校相关的,因为这样也比较贴近我的生活,更加熟悉一些,哈哈。然后本取名鬼才给该项目和APP均取名为:SchoolSystem,哈哈,不过现在我发现这个名字在手机里显示不全,后半截直接省略号了😂
在这里插入图片描述

要实现的功能计划

功能方面我的计划是:
① 分为教师和学生两种登录方式(密码采用MD5加密),登录后所能使用的功能是不同的(拿【学习】页面来说老师能出题和修改学生的分数等,学生只能查看成绩结果和分析以及做题等)
② 老师注册和登录时有一定的限制(我提前准备好可以注册的手机号,老师注册的时候比学生多出手机短信验证这一限制),然后在登录后学生需进行身份认证,认证成功后可享受全部功能,否则只有【计划】这一页面可供使用
③ 【学习】页面有学生的成绩绘制成的图表分析,以及自己的所有成绩查询(和全班的成绩),然后在该页面会实现一个可以做题的功能(教师在该页面可出题,然后学生在该页面做题)
④ 【计划】这一页面可供大家写下自己的计划(可设置为自己可见和全部人可见)
⑤ 如果能力达到的条件下,完善【论坛】页面,连接云数据库,大家可在其中发表一些内容


第一阶段

UI展示

APP启动后会进入初始的选择登录身份的界面,如下图(是我手机上的截屏):
在这里插入图片描述
APP的图标我采用了AS里提供的炒鸡好用的Image Asset功能进行制作,好处是基本能适应各种机型,包括图标是圆形,设计界面如下图:
在这里插入图片描述
选择登录身份的初始界面InitActivity的布局采用了LinearLayout垂直方向线性布局,页面中有ImageView组件显示我设计的欢迎那一张图片和底部的图片,然后是“请选择您的身份”和“Copyright”的TextView组件,下面部分我采用了RelativeLayout相对布局,并在其中嵌套了一个相对布局用于教师选择和学生选择的位置控制,使其具有更好地适应能力,该activity_init.xml文件源代码如下:

<?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"
    android:background="@mipmap/bg1"
    android:padding="3dp"
    tools:context=".InitActivity">
    <ImageView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:src="@mipmap/welcome"
        android:adjustViewBounds="true">
    </ImageView>
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="8dp"
        android:padding="8dp"
        android:background="@drawable/translucent2"
        android:lineSpacingExtra="4sp"
        android:text="请选择您的身份"
        android:textAlignment="center"
        android:textSize="20sp"
        android:textStyle="bold" />
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <RelativeLayout
            android:id="@+id/ChooseTeacher"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/translucent2"
            android:layout_toLeftOf="@+id/canzhao"
            android:layout_marginRight="45dp"
            android:layout_marginTop="50dp">
            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/teacher_ico"
                android:layout_margin="10dp"
                android:src="@mipmap/teacher_ico"/>
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="18sp"
                android:text="我是教师"
                android:layout_centerHorizontal="true"
                android:textColor="#576B95"
                android:layout_marginTop="5dp"
                android:layout_below="@id/teacher_ico"
                android:textStyle="bold"/>
        </RelativeLayout>
        <TextView
            android:id="@+id/canzhao"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true" />
        <RelativeLayout
            android:id="@+id/ChooseStudent"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/translucent2"
            android:layout_toRightOf="@+id/canzhao"
            android:layout_marginLeft="45dp"
            android:layout_marginTop="50dp">
            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/student_ico"
                android:layout_margin="10dp"
                android:src="@mipmap/student_ico"/>
            <TextView
                android:id="@+id/nameLogined"
                android:layout_width="wrap_content"
                
  • 8
    点赞
  • 36
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值