GithubHelp home page GithubHelp logo

hendyyou / baseproject Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alarmzeng/baseproject

1.0 2.0 0.0 228 KB

一个Android的基础项目,里面会对项目经常用到的如BaseActivity,BaseFragment,网络请求等进行一些基本封装,方便以后使用,项目会逐步更新,欢迎大家持续关注

License: Apache License 2.0

Java 100.00%

baseproject's Introduction

BaseProject

一个Android的基础项目,里面会对项目基本架构模式进行一个示例,并对项目经常用到的如BaseActivityBaseFragment网络请求等进行一些基本封装,方便以后使用,项目会逐步更新

基本架构模式

BaseProject会基于MVP架构作为基本架构模式,将会参考Google官方的MVP示例,采用契约Contract的形式

BaseActivity,BaseFragment等

在BaseActivity,BaseFragment中会在里面书写共有逻辑操作的代码

网络请求框架

网络请求框架将会采用 RxJava + Retrofit + OkHttp的方式,在网络请求中会对三者进行一些简单的配合封装

在网络请求示例中,会用到Gank的API,在此表示感谢!

图片加载框架

图片加载将会使用Glide进行加载,在使用Gide时还会进行二次封装,封装后对应的类文件为ImageLoader,放置在Utils包中

Utils

Utils包中会添加一些常用的工具类,例如:

LogUtils

关于Log日志打印相关的工具类,可以统一设置是否打印日志以及打印的等级等

NetworkUtils

网络连接相关的工具类,判断网络是否连接,当前为哪种网络等

ImageLoader

这是对Glide的二次封装,方便统一使用或更换框架

apkUpdate

这是在Utils包下的子包,里面会用apk版本更新的相关类文件,在这里的apk版本更新中,是使用了DownloadManager进行的版本更新

baseproject's People

Contributors

alarmzeng avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.