Android 常用开源库
来源:互联网 发布:广告市场有多大 知乎 编辑:程序博客网 时间:2024/05/20 06:56
1.网络
- volley
volley https://github.com/google/volley
缺点:上传文件 、session 处理、大数据量处理不适合使用
- async-http
async-http
https://github.com/loopj/android-async-http
处理cookie
public static void post(String url,RequestParams params,JsonHttpResponseHandler responseHandler){ AsyncHttpClient client = new AsyncHttpClient(); //保存cookie,自动保存到了shareprefercece PersistentCookieStore myCookieStore = new PersistentCookieStore(Application.mInstance); client.setCookieStore(myCookieStore); if(params == null){ params = new RequestParams(); } List<Cookie> cookies = myCookieStore.getCookies(); int size =cookies.size(); if(size>0){ BasicCookieStore bcs = new BasicCookieStore(); bcs.addCookies(cookies.toArray( new Cookie[cookies.size()])); client.setCookieStore(bcs); } try { client.post(url, params, responseHandler); } catch (Exception e) { e.printStackTrace(); responseHandler.onFailure(-1, new Header[]{}, new Throwable(e.getMessage()), new JSONObject()); } }
上传图片:
List<File> images if (images != null) { for (int i = 0; i < images.size(); i++) { File file = images.get(i); try { params.put("img_file[" + i + "]", file, "image/png"); } catch (FileNotFoundException e) { failuredListener.onRespone("file not found", -1); return; } } }
- okhttp
https://github.com/square/okhttp
2.导航指示器
viewpagerindicator
https://github.com/hackware1993/MagicIndicatorViewPagerIndicator
https://github.com/JakeWharton/ViewPagerIndicator
3.跑马灯
俗名:可垂直跑、可水平跑的跑马灯;学名:可垂直翻、可水平翻的翻页公告
https://github.com/sfsheng0322/MarqueeView
4.侧滑菜单
slidingMenu_library
https://github.com/jfeinstein10/SlidingMenu
5.黄油刀
butterknife
https://github.com/JakeWharton/butterknife
6.dialog
- material-dialogs
https://github.com/afollestad/material-dialogs
- sweet-alert-dialog
https://github.com/pedant/sweet-alert-dialog
7.EventBu
EventBu
https://github.com/greenrobot/EventBus
8.图片
- glide
https://github.com/bumptech/glide
- Android-Universal-Image-Loader
https://github.com/nostra13/Android-Universal-Image-Loader
9.扫码
BGAQRCode-Android
https://github.com/bingoogolapple/BGAQRCode-Android
10.轮播图
android-auto-scroll-view-pager
https://github.com/Trinea/android-auto-scroll-view-pager/
11.Json解析
- fastjson
https://github.com/alibaba/fastjson
- gson
https://github.com/google/gson
12.下拉刷新
com.navercorp.pulltorefresh
compile ‘com.navercorp.pulltorefresh:library:3.2.0@aar’
CommonPullToRefresh
https://github.com/Chanven/CommonPullToRefresh
13.数据库
LitePal
https://github.com/LitePalFramework/LitePal
14.logger
logger
https://github.com/orhanobut/logger
15.内存泄漏检测
leakcanary
https://github.com/square/leakcanary
- android常用开源库分享
- android常用开源库分享
- android常用开源库分享
- android常用的开源库
- android常用开源库分享
- Android 常用的开源库
- Android 常用开源库
- Android 常用开源库混淆配置
- Android常用开源库(框架)整合
- Android开发常用的开源库
- 常用Android开源库,加速Android开发
- android常用
- Android 常用
- Android常用
- Android常用
- Android常用
- 一个android项目所常用的开源库
- Android常用开源库之Universal-image-loader
- 网络编程
- 简单扫雷游戏的实现
- centos7忘记root密码解决办法
- phpcms v9 后台增加搜索关键字编辑管理功能
- 如何比较两个时间字符串的大小
- Android 常用开源库
- Stack
- C语言练习题(9)
- 笔记:什么是机器学习?-by周志华
- Linux SElinux以及iptables的关闭
- 2017-11-20 淘宝小测试
- 埃拉托色尼筛选法
- myeclipse安装activiti插件不成功
- final、finalize 和 finally 的不同之处