鍍金池/ 教程/ Android/ 《App研發(fā)錄》一書
Launch mode 和 Intent flags專題
Canvas & Drawables
UTAustinX_UT.9.01x: Effective Thinking Through Mathematics
《JavaScript 語言精粹》
Memory leak專題
React基礎(chǔ)
《Test Driven Development: By Example》一書
Developer tools
安卓開發(fā)技能樹
<a rel="nofollow" href="https://mp.weixin.qq.com/s?__biz=MzA3NDM
Best Practices for Interaction and Engagement
各個安卓版本引入的主要新特性
Building Apps with Connectivity &amp; the Cloud
List.toArray()再強轉(zhuǎn)是一定會失敗的
深入Android frameworks
Google dev 100 days系列視頻
Building Apps with Contacts &amp; Sign-In
關(guān)系型數(shù)據(jù)庫設(shè)計范式
《App研發(fā)錄》一書
REST API設(shè)計
Google IO 2015摘要
自定義View/ViewGroup以及高性能實現(xiàn)自定義UI
安卓系統(tǒng)點擊事件處理
《50 Android Hacks》一書
Building Apps with Content Sharing
Flux基礎(chǔ)
<a rel="nofollow" href="http://developer.android.com/training/in
依賴注入(以Dagger 2為例)
Java同步機制
Java對象內(nèi)存的使用情況
JSR133(Java memory model)
Google官方Material Design手冊(<a rel="nofollow" href="http://develop
Futurice公司安卓團隊的建議
安卓性能優(yōu)化
  • 1.
Best Practices for Performance
<a rel="nofollow" href="http://www.vogella.com/tutorials/Android
<a rel="nofollow" href="http://blog.danlew.net/2014/11/19/styles
Handling Runtime Changes
<a rel="nofollow" href="http://www.vogella.com/tutorials/Android
Building Apps with Graphics &amp; Animation
<a rel="nofollow" href="http://tools.android.com/tech-docs/new-b
Android項目架構(gòu)
MVP(Model-View-Presenter)模式
<a rel="nofollow" href="http://www.infoq.com/cn/es6-in-depth/"">
《Android源碼設(shè)計模式解析與實戰(zhàn)》一書
Rx在Android中的最佳實踐
函數(shù)調(diào)用時,傳遞參數(shù)應(yīng)該是不可變的(Immutable)
ProGuard
面向?qū)ο罅笤瓌t(SOLID+)
深入理解Java虛擬機
深入Java深淺拷貝、immutable、unmodifiable
Best Practices for User Input
UI上的一些高效方式/最佳實踐
<a rel="nofollow" href="https://blog.stylingandroid.com/ripples-
Best Practices for User Interface
安卓測試驅(qū)動開發(fā)/安卓測試驗證
暗時間:學(xué)會正確思考
技術(shù)筆記
Aspect Oriented Programming(AOP)
Best Practices for Background Jobs
安卓系統(tǒng)動效專題
Feed系統(tǒng)的設(shè)計
Data binding(MVVM,Model-View-ViewModel)
Effective Java一書筆記
<a rel="nofollow" href="http://developer.android.com/training/in
Rx (Reactive eXtention)
MultiDex專題
一些很棒的點子
WebRTC

《App研發(fā)錄》一書

第1章:重構(gòu)

  • BaseActivity要有兩個,一個是業(yè)務(wù)無關(guān)的,位于base module中,另一個是業(yè)務(wù)相關(guān)的,位于app module中,后者封裝了業(yè)務(wù)相關(guān)的公用邏輯和代碼;同理,當(dāng)fragment, dialog fragment有業(yè)務(wù)相關(guān)的共性時,也就是時候為app module準(zhǔn)備一個base類了;
  • package by feature,被外部引用的類,就不要作為內(nèi)部類了;未被包外引用的類,就要聲明為package private;
  • (如果)activity只用于管理fragment,fragment inflate view,綁定view的生命周期需要拆分開來,避免onViewCreated過于復(fù)雜;
  • 綁定view和初始化變量、調(diào)用獲取數(shù)據(jù)的方法要拆分開來,單一職責(zé)!
    • 具體而言,應(yīng)該有getLayoutRes, initFields, bindView, startBusiness, unbindView這5個方法
    • getLayoutRes:返回layout的id,用于onCreateView;
    • initFields, bindView, startBusiness:初始化成員變量、綁定view(包括設(shè)置listener)、開始執(zhí)行業(yè)務(wù)邏輯,被onViewCreated依次調(diào)用;
    • unbindView:解綁view(包括重置listener);
  • 為view設(shè)置listener,不要設(shè)置為this,而是創(chuàng)建新的;listener對象的創(chuàng)建開銷并不是瓶頸,而代碼整潔度的提升效果是很明顯的;
  • fragment間數(shù)據(jù)傳遞:FragmentArgs;Effective Java item 74:盡量不要使用serialisable接口;
  • Adapter模板:建議使用AdapterDelegates,F(xiàn)avor composition over inheritance;而對于具體的一個AdapterDelegate,主要規(guī)范點在于onBindViewHolder,子view的listener如何設(shè)置,事件如何傳遞到fragment中?
    • 我的做法是,ViewHolder在構(gòu)造函數(shù)中設(shè)置listener,同時它構(gòu)造時接受一個接口,這個接口從fragment => adapter => ViewHolder => listener,如此達(dá)到事件傳回fragment的目的;
  • 實體化編程/immutable/parcelable,推薦使用Auto-parcel + Gson;