Android MVVM 解讀 1. 大綱

0. Background info

  1. Android MVVM Design Pattern
  2. Guide to app architecture
  3. Better Android Apps Using MVVM with Clean Architecture

1. LifeCycle

1.1. Handling Lifecycles with Lifecycle-Aware Components

MVVM

1.1.1 Activity

SupportActivity
insert ReportFragment

1.1.2 Fragment

support.v4.app.Fragment

1.1.3 Service

  1. LifecycleService
  2. ServiceLifecycleDispatcher

1.2. LifeCycle Relative Class

  1. LifeCycle
  2. LifecycleRegistry

2. Observer

3. LiveData

Data --> LiveData

RelativeClass

  1. LiveData
  2. MediatorLiveData
  3. ComputableLiveData
  4. Transformations

4. ViewModel

5. DataBinding

  1. 通過annotation 生成對應的DataBinderMapperImpl和DataBindingImpl

  2. findViewById,在DataBinding中,已經完成

  3. DataBindingComponent

    DataBindingComponent 問題答疑

5. View

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章