Android 開源項目精選

0x00  leakcanary 【內存泄漏檢測】git

Leakcanary : A memory leak detection library for Android and Java.github

良心企業Square最近剛開源的一個很是有用的工具,強烈推薦緩存

幫助你在開發階段方便的檢測出內存泄露的問題,使用起來更簡單方便網絡

Tips:架構

A very useful tool for corporate conscience Square recently gettin source, it is strongly recommendedapp

Help you in the development stage to facilitate detect memory leak problem, More simple and convenient to use工具

Leakcanary開源項目地址:https://github.com/square/leakcanaryspa

 

0x01 OKHttp 【Android Http請求庫】對象

OKHttp:  An HTTP+HTTP/2 client for Android and Java applications圖片

OkHttp 是一個 Java 和 Android 平臺的 Http 請求庫,很是高效,支持 SPDY、鏈接池、GZIP 和 HTTP 緩存。

默認狀況下,OKHttp 會自動處理常見的網絡問題,像二次鏈接、SSL 的握手問題。

 

Retrofit : Type-safe HTTP client for Android and Java by Square

Retrofit 是一套 RESTful 架構的 Android 和 Java 平臺 Http 請求庫的客戶端實現,基於註解,

提供JSON to POJO(Plain Ordinary Java Object,簡單Java對象),

POJO to JSON,網絡請求(POST,GET,PUT,DELETE等)封裝。

可是若是你的應用程序中集成了 OkHttp,Retrofit 默認會使用 OkHttp 處理其餘網絡層請求。

 

因此一句話若是你想讓你的網絡請求寫的更優雅那推薦使用 Retrofit ,尤爲是跟 RxJava 結合起來更好用,不然直接使用 OkHttp 同樣是能夠的。

 

Okhttp開源項目地址:https://github.com/square/okhttp

Retrofit 開源項目地址:https://github.com/square/retrofit

 

 0x02 picasso【圖片加載】

Picasso: A powerful image downloading and caching library for Android

一個強大的圖片加載和緩存Android庫

調用方式:Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView);

 Picasso開源項目地址:   https://github.com/square/picasso

相關文章
相關標籤/搜索