CDTU
大一时针对我校开发的校园客户端,方便学生查课表、成绩、一卡通消费记录等等。遵循MD开发原则,数据大多通过抓包获取,现开源(已屏蔽学校相关信息)
Install / Use
/learn @longer96/CDTUREADME
成都工业学院App
<img width="125" height="125" src="https://github.com/longer96/CDTU/blob/master/images/logo.png"/> 大一时针对我校开发的校园客户端,方便学生查课表、成绩、一卡通消费记录、失物招领等等。遵循MD设计原则,数据大多通过抓包获取,现开源(已屏蔽学校相关信息,怕被请回去喝茶) <br>Ps:第一次这么认真写文章,有不合理的地方希望大家提出 --- 谢谢谢谢啦 <br>Introduction
功能的实现主要是通过模拟网页登录,通过抓包和爬虫获取数据,底层都是HttpClient写的(当时大一才接触Android,Httpclient已被官方废弃)。正往Mvp + RXjava 转型,在校期间有空就在更新软件,校内好评度很高,现毕业设计之后开源。 <br>Ps:有公司看得起的望给口饭吃(流泪)
实现功能
- App Splash页秒开(感谢图形图像专业提供的UI设计)
涉及代码:AppSplashActivity.java
- 防止APP启动时白屏/黑屏 参考博客 <br><br> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E7%A7%92%E5%BC%80.gif"/>
<br><br>
- 本校学生通过校园帐号登录
涉及代码:LoginSchool_Activity.java
- 若作为刚接触的同学可以参考后面补充,写的很详细(大佬绕道):更多补充_模拟网页登录 <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E6%A0%A1%E5%9B%AD%E5%8F%B7%E7%99%BB%E5%BD%95.gif"/>
<br><br>
- 其他用户可以通过手机号或QQ一键注册、登录
ps:但是不能进行学生相关的查询。涉及代码:Register_Activity.java , LoginPhone_Activity.java
- 短信验证码使用的是:Bmob短信服务
- 同时推荐使用阿里大于的短信验证API:阿里大于
- 中间还涉及到手机号码的验证,介绍一个好用的工具集合:AndroidUtilCode
- QQ三方登录官方文档 <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E6%B3%A8%E5%86%8C.gif"/> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/QQ%E7%99%BB%E5%BD%95.gif"/>
<br><br>
- 课表功能的实现(很好看,用户体验棒)
涉及代码:CourseActivity.java , Course_addActivity.java , Course_editActivity.java
- 高校大多数都是使用正方系统,课表的数据也是从正方系统爬取解析的,解析的方法大家可以参考utils目录下StreamTools.java getcourse方法。 <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E8%AF%BE%E8%A1%A8.png"/>
- 扁平设计,大大提升内容的占有率
- 个性化设计,可使用系统自带背景图以及自定义背景图
- 用户可编辑课程,查看学期安排以及教学时间表 <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E8%AF%BE%E8%A1%A8%E5%B1%95%E7%A4%BA.gif"/> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E6%8D%A2%E8%83%8C%E6%99%AF.gif"/> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/课表添加课.gif"/>
<br><br>
- 主页轮播图的实现
涉及代码:MainActivity.java
- 预览图使用的是学校的风景图,后台可更换图片url、数量、添加事件。
- 图片是挂在在 花瓣网 上的(自己服务器带宽小,学生党伤不起)
- 轮播图的实现参考 RollViewPager <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E4%B8%BB%E9%A1%B5%E8%BD%AE%E6%92%AD%E5%9B%BE.gif"/>
- 预览图使用的是学校的风景图,后台可更换图片url、数量、添加事件。
<br><br>
- 主页布局实现(主要参考支付宝)
涉及代码:MainActivity.java , Fragment_Menu.java
- 底部导航实现参考 AHBottomNavigation
- 布局严格遵守 Material Design 准则。 Material Design 中文版
- 实现了信息的整合,将有效的信息提取显示,避免效益冗余。
- 更多功能菜单的实现,可下载查看布局文件app_bar_main.xml 参考博客
- 水平RecyclerView的使用,相关博客:RecyclerViewSnap
- 场景过度动画 可百度
Shared Element Transition<br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E4%B8%BB%E9%A1%B5%E5%B1%95%E7%A4%BA.gif"/> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E4%B8%BB%E9%A1%B5%E5%B1%95%E7%A4%BA2.gif"/>
<br><br>
- 表白墙
涉及代码:LoveActivity.java , LoveOne_Activity.java
- 点赞动画的实现 ShineButton
- 文字墙效果的实现 文字飞入、飞出效果 <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E8%A1%A8%E7%99%BD%E5%A2%99.gif"/>
<br><br>
- 图书馆
涉及代码:library 文件下所有
- 抓取我校图书馆相关数据,优雅的显示在手机上
- 学生可以查询所借图书,历史借阅
- 可以查询图书信息,检索图书(有时间可以深入完成高级检索功能)
- 学生可以查询图书馆相关信息 <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E5%9B%BE%E4%B9%A6%E9%A6%86%E4%B8%BB%E9%A1%B5.png"/> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E6%88%91%E7%9A%84%E4%B9%A6%E7%B1%8D.png"/> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E6%88%91%E7%9A%84%E4%B9%A6%E7%B1%8D.png"/>
- 抓取我校图书馆相关数据,优雅的显示在手机上
<br><br>
- 一卡通消费记录
涉及代码:Card_Activity.java
- 下拉刷新,上拉加载 刷新效果参考:WaveSwipeRefreshLayout <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E6%B6%88%E8%B4%B9%E8%AE%B0%E5%BD%95.gif"/>
<br><br>
- 正方系统
涉及代码:zfxt 文件下所有
- 在校成绩(查成绩很方便,期末app经常挤爆)
- 课表查询
- 等级考试、学分统计、考室查询(有时间可以扩展更多功能 如:一键评教、一键选课) <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E5%AD%A6%E5%88%86%E7%BB%9F%E8%AE%A1.png"/> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E8%80%83%E5%AE%A4%E6%9F%A5%E8%AF%A2.png"/> <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E6%88%90%E7%BB%A9%E6%9F%A5%E8%AF%A2.gif"/> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E8%AF%BE%E8%A1%A8%E6%9F%A5%E8%AF%A2.gif"/>
<br><br>
- 学校黄页
涉及代码:Yellow_Activity.java , Sqlite_selectActivity.java
- 数据不是很齐全,没有官方提供数据。也迫于没有经济支持没能做大
- 自己写的标签页,之后才发现网上有更好的
- 显示数据仿魅族通讯录(上个手机是Mx3,魅族通讯录做的真的不错) <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E5%AD%A6%E6%A0%A1%E9%BB%84%E9%A1%B5.gif"/>
<br><br>
- 同学的店(还对应一个商户版,用来管理、添加商品,接单等等,学生可以自己开店)
Ps:最近没时间完善了,涉及代码:Store_Activity.java
- 左边导航栏的实现(仿外卖App以及京东) 开源项目:VerticalTabLayout
- 寝室的选择(友好的交互) 开源项目:Carousel Picker
- 店铺的选择 直接参考Store_Activity.java 中代码
- 底部购物车的实现 参考博客
- 加入购物车动画可参考 开源项目:ShoppingCartAnimation <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E5%90%8C%E5%AD%A6%E7%9A%84%E5%BA%97.gif"/>
<br><br>
- 失物招领(界面实现还行)
涉及代码:MainActivity.java , Fragment_Menu.java , Fragment_Lost.java
- 主界面(都是自己辛辛苦苦写出来的界面)
- 详细界面(消息发布者可以编辑该消息)
- 发布消息(需登录)
- 其中也使用到了过渡动画,参考上面“主页布局实现-场景过度动画”
- EditText的MD实现 可百度:
TextInputLayout - 图片选择框架 开源项目:ImageSelector
- 之后发现几个很好的图片选择框架,比如:GalleryFinal
- 同时附上2个图片压缩框架(该项目未使用,是自己写的)
- CompressHelper
- Tiny <br><br><img width="200px" style="max-width:100%;" src="https://raw.githubusercontent.com/YancyYe/ImageSelector/master/resource/gif_1.gif"/> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E5%A4%B1%E7%89%A9%E6%8B%9B%E9%A2%86_%E6%B7%BB%E5%8A%A0%E5%9B%BE%E7%89%87.gif"/> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E5%A4%B1%E7%89%A9%E6%8B%9B%E9%A2%861.gif"/>
<br><br>
- 跳蚤市场
涉及代码:MainActivity.java , Fragment_Menu.java , Fragment_Goods.java
- 主界面(中规中矩),详细界面和上面的失误招领详细界面差不多就不重复了
- 右下角FAB 的实现 参考博客:MaterialSheetFab,网上还有很多类似的就不详细介绍了
- Material Design <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E8%B7%B3%E8%9A%A4%E5%B8%82%E5%9C%BA.jpg"/> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E8%B7%B3%E8%9A%A4%E5%B8%82%E5%9C%BA_%E5%B1%95%E5%BC%80.jpg"/> <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E8%B7%B3%E8%9A%A4%E5%B8%82%E5%9C%BA_%E5%95%86%E5%93%81%E8%AF%A6%E7%BB%86.jpg"/> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E8%B7%B3%E8%9A%A4%E5%B8%82%E5%9C%BA_%E5%8F%91%E5%B8%83.jpg"/>
<br><br>
- 校园公告
涉及代码:NewsActivity.java , News_bodyActivity.java
- 抓取我校校园公告数据简单的显示 连接:校园公告 <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E6%A0%A1%E5%9B%AD%E5%85%AC%E5%91%8A.gif"/>
<br><br>
- 学生查询、一卡通查询
涉及代码:QueryActivity.java , Query_cardActivity.java
- 主布局(仿QQ个人信息布局)
- 搜索控件是自己写的,网上有更好的实现,如:
- MaterialSearchView
- MaterialSearchBar
- PersistentSearch <br><br><img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E5%AD%A6%E7%94%9F%E6%9F%A5%E8%AF%A2.png"/> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/images/%E5%AD%A6%E7%94%9F%E6%9F%A5%E8%AF%A22.png"/> <img width="200px" style="max-width:100%;" src="https://github.com/longer96/CDTU/blob/master/
