haoxiangtt / volley Goto Github PK
View Code? Open in Web Editor NEWvolley精简优化版
volley精简优化版
volley框架改进版 根据公司的需要,主要改进内容: 1、优化二次封装接口; 2、添加wifi下强制数据网络访问开关; 3、修复部分bug; 4、删减部分扩展类和辅助类,精简框架。 引入方式:在build.gradle中加入以下: android { ...... useLibrary 'org.apache.http.legacy' } dependencies { ...... compile 'com.bfy:volley:1.0.4' } 混淆规则: -keep class org.apache.http.** -keep class cn.bfy.volley.Request {*;} -keep class cn.bfy.volley.RequestQueue {*;} -keep class cn.bfy.volley.toolbox.HttpStack {*;} -keep class cn.bfy.volley.toolbox.Volley {*;} -keep class * extends cn.bfy.volley.Request {*;} -keep class cn.bfy.http.** {*;} 简单用法: RequestManager类为主要接口类,里面提供了init()、post()、get()多种重构方法,其中init()为 初始化方法。 RequestManager.getInstance().init(this); String url = "http://pv.sohu.com/cityjson"; RequestManager.getInstance().post(url,null, null, new StringRequestListener() { @Override public void onRequest() { } @Override public void onFinish(String data, Map<String, String> headers, String url, String actionId) { Toast.makeText(MainActivity.this, data, Toast.LENGTH_SHORT).show(); } @Override public void onError(String errorCode, String errorMsg, String url, String actionId) { Toast.makeText(MainActivity.this, errorMsg, Toast.LENGTH_SHORT).show(); } }, UUID.randomUUID().toString());
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.