Android Studio 一个完整的APP实例(附源码和数据库)

 

前言:

这是我独立做的第一个APP,是一个记账本APP。

This is the first APP, I've ever done on my own. It's a accountbook APP.

 

源码:

          欢迎satr or fork

 

备注:

APP中所涉及到的图标请勿商用

 

效果图

(备注:在把图片制作成gif时,图片的质量受损,所以最终呈现出来的gif图片,背景变得有些模糊)

 

开发环境

IDE:Android Studio

Database:SQLite

 

功能介绍

该APP共包含6个功能,分别是:

1、登录&注册功能:
进入该界面,默认是让用户进行登录操作;
若用户之前没有注册过,则会提示让用户进行注册;
若用户忘记登录密码,也有重置密码的功能。

2、收入&支出功能:
该功能分为两个页签:明细、类别报表
这两个页签内容,都根据月份来统计呈现(开发中,目前是呈现所有收支明细)
并根据月份,显示当月的收入与支出(开发中,目前是呈现固定值)

 明细页签:
在该页签最下方会显示【记一笔】按钮,点击该按钮,会提示让用户选择记录的类型,是收入 or 支出
然后会进入到记录收支明细的界面
根据用户的选择类型,来呈现不同的内容
当用户录入好收支明细,点击保存,会返回到明细页签,此时会刷新明细页签的内容(刷新功能开发中)

 类别报表页签:
该页签会根据用户的收支明细的类别来进行统计,呈现方式是圆形饼图(具体的统计逻辑开发中)

3、统计功能:
该功能分为两个页签:明细、类别报表(该功能和收入&支出功能类似)
这两个页签内容,都根据月份来统计呈现(开发中,目前是呈现所有收支明细)
并根据月份,显示当月的结余,以及相比上月支出(开发中,目前是呈现固定值)

4、特殊设置功能:该功能正在设计中。

5、心愿墙功能:该功能正在设计中。

6、关于我们功能:该功能主要是对APP进行简要介绍。

 

数据库设计:

目前APP共涉及到三个表,分别是:用户信息表、配置表、收支明细表

复制代码
 1 public void onCreate(SQLiteDatabase db){  2     //user table 3     db.execSQL("create table if not exists user_tb(_id integer primary key autoincrement," + 4             "userID text not null," + 5             "pwd text not null)");  6  7     //Configuration table 8     db.execSQL("create table if not exists refCode_tb(_id integer primary key autoincrement," + 9             "CodeType text not null," +10             "CodeID text not null," +11             "CodeName text null)"); 12 13     //costDetail_tb14     db.execSQL("create table if not exists basicCode_tb(_id integer primary key autoincrement," +15             "userID text not null," +16             "Type integer not null," +17             "incomeWay text not null," +18             "incomeBy text not null," +19             "category text not null," +20             "item text not null," +21             "cost money not null," +22             "note text not null," +23             "makeDate text not null)"); 24 } 
复制代码

 

教程

以下博文是根据APP中涉及到的功能进行整理的,如下:

 

关键字:

50000+
5万行代码练就真实本领
17年
创办于2008年老牌培训机构
1000+
合作企业
98%
就业率

联系我们

电话咨询

0532-85025005

扫码添加微信