weizhengliang 3be7631394 # 基于分机版本初始化转换盒项目 3 years ago
..
readme.md 3be7631394 # 基于分机版本初始化转换盒项目 3 years ago

readme.md

增加hello模块

清理AndroidManifest.xml

清理res

仅留下layout和values

增加完成layout后,需要Build->编译模块,以自动生成databinding

增加三个包activity,di,launch。如果有fragment应当增加fragment包

launch为模块启动入口

di中注入这个模块的Activity和Fragment

操作middleware模块

api包,增加HelloApi类,用于HTTP通讯

在ApiManager中增加项

model包,如有必要在此包增加对象

logic包

两个大包,contract和presenter,分别建立对应hello模块的hello包

一个是接口,一个是实现 这里主要实现Presenter中的loadData HelloActivityPresenter重要 在此类中使用api,实现Contract 定义observer,其中覆写onNextWithConnection方法,实现json到对象的转换

di包,PresenterComponent类增加注入

列表操作

activity中增加HelloListActivity.kt res.layout中增加hello_list_act_lay.xml和hello_list_item_lay.xml HelloComponent中增加inject 增加adapter包 在AndroidManifest.xml中增加这个Activity middleware.logic.contract.hello增加HelloListActivityContract middleware.logic.presenter.hello增加HelloListActivityPresenter