天天看點

一套完整的Android通用架構

現在做Android開發,已經是大好時機,網上有很多成熟的架構,我們應充分利用好這些,所謂前人種樹後人好乘涼,很多時候壓根不需要了解太多原理,隻需站在巨人的丁丁上即可,當然您說您能力強,非要重複造輪子,無可厚非。

MVP模式

一套完整的Android通用架構

MVP

簡介

Android MVP Sample,MVP+Retrofit+RxJava實踐小結

github位址

https://github.com/WuXiaolong/AndroidMVPSample

相關部落格

Android MVP+Retrofit+RxJava實踐小結

Android MVP 執行個體

依賴注入

butterknife

Bind Android views and callbacks to fields and methods 将Android視圖和回調方法綁定到字段和方法上

https://github.com/JakeWharton/butterknife

butterknife官網

網絡請求

Retrofit

一套完整的Android通用架構

Type-safe HTTP client for Android and Java by Square 類型安全的Http用戶端

https://github.com/square/retrofit

Android Retrofit 2.0 使用-補充篇

Android Retrofit 2.0使用

Retrofit官網

圖檔加載

glide

一套完整的Android通用架構

An image loading and caching library for Android focused on smooth scrolling  一個圖檔加載和緩存的庫

https://github.com/bumptech/glide

picasso

A powerful image downloading and caching library for Android 一個強大的圖檔下載下傳與緩存的庫

https://github.com/square/picasso

Glide 系列預覽

開始!

加載進階

ListAdapter(ListView, GridView)/)

占位符 和 漸現動畫

圖檔重設大小 和 縮放

顯示 Gif 和 Video

緩存基礎

請求優先級

縮略圖

回調:SimpleTarget 和 ViewTarget 用于自定義視圖類

加載圖檔到通知欄和應用小部件中

異常:調試和錯誤處理

自定義轉換

用 animate() 自定義動畫

內建網絡棧

用 Module 自定義 Glide

Module 執行個體:接受自簽名證書的 HTTPS

Module 執行個體:自定義緩存

Module 執行個體:用自定義尺寸優化加載的圖檔

動态使用 Model Loader

如何旋轉圖像

系列綜述

Picasso

github之Picasso使用

圖檔操作

PhotoView

Implementation of ImageView for Android that supports zooming, by various touch gestures 圖檔縮放

https://github.com/chrisbanes/PhotoView

github之PhotoView使用

uCrop

一套完整的Android通用架構

Image Cropping Library for Android 圖檔裁剪

https://github.com/Yalantis/uCrop

uCrop使用及源碼淺析

CircleImageView

一套完整的Android通用架構

A circular ImageView for Android 圓頭像

https://github.com/hdodenhof/CircleImageView

資料庫

Realm

一套完整的Android通用架構

Realm is a mobile database: a replacement for SQLite & ORMs

https://github.com/realm/realm-java

Realm官網

響應式程式設計

RxJava

一套完整的Android通用架構

RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM

https://github.com/ReactiveX/RxJava

RxJava Essentials CN

ReactiveX文檔中文翻譯

給 Android 開發者的 RxJava 詳解

事件總線

RxBus

基于RxJava寫的事件總線

下拉重新整理

PullLoadMoreRecyclerView

實作RecyclerView下拉重新整理和上拉加載更多以及RecyclerView線性、網格、瀑布流效果示範。适用于隻需要簡單地實作下拉重新整理和上拉加載效果。

https://github.com/WuXiaolong/PullLoadMoreRecyclerView

最後