Anne Han

看见更大的世界,遇见更好的自己。

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_tb
14     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中涉及到的功能进行整理的,如下:

 

参考:

  • 首页的旋转菜单参考该博文:参考

 

版本:

目前的版本为V1.0

APP还有很多功能需要继续完善,希望有兴趣的小伙伴可以一起参与进来,和我一起来开发完善。

 

一点想说的话

不论遇到什么困难,都不应该成为我们放弃的理由

 

posted @ 2018-10-19 11:53  AnneHan  阅读(109722)  评论(20编辑  收藏  举报