大家都知道,安卓最大的特点就是开源化,这自然会产生很多十分好用的第三方API,而基本每一个APP都会与网络操作和缓存处理机制打交道,当然,你可以自己通过HttpUrlConnection再通过返回数据进行解析解决,而我们自己学的东西大多数情况下都没有针对网络很糟糕的情况进行优化.下面就给大家带来Square Inc这家有创新精神的公司留下的Retrofit网络加载库的使用! 项目已经同步至github:https://github.com/nanchen2251/retrofitDemo Ret
先看看实现效果图 1.首先自定义一个类继承系统ProgressDialog /** * Created by hanbao0928 on 2018/11/1. */ public class DialogUtils extends ProgressDialog { public DialogUtils(Context context) { super(context); } public DialogUtils(Context context, int theme) { super(contex