更新
This commit is contained in:
@@ -13,3 +13,9 @@
|
||||
- Activity 和 Fragment 跳转到项目内的 Activity 时,统一复用各自父类提供的 `goTo(mContext, TargetActivity.class, bundle)`,无参数时传 `null`;不在业务页面直接使用 `startActivity(new Intent(...))`。
|
||||
- 页面参数通过 `Bundle` 传递。Activity 中使用 Activity Result API 的跳转,调用父类 `goTo(mContext, TargetActivity.class, bundle, launcher)` 重载,保留原有返回结果回调。
|
||||
- 系统蓝牙、定位、应用设置等通过 action 启动的系统页面,继续使用对应系统 Intent 和返回回调。
|
||||
|
||||
## 业务 MVP
|
||||
|
||||
- `Presenter` 参考 `LoginPresenter`:字段和构造参数直接使用具体的 `XxxImpl` 类型,不使用 `XxxContract.DataModel` 作为字段或构造参数类型;调用方直接传入 `new XxxImpl()`。
|
||||
- 各 `Presenter` 业务方法内显式书写 `XxxContract.CallBack<T>` 的 `success` 和 `fail`,先检查 View 是否还存在,再回调对应的 View 方法,不用通用回调包装器。
|
||||
- `Impl` 网络请求参考 `LoginImpl.getPhoneCode()`:在各业务方法中显式书写 `try/catch`、RxJava 调度和 `Observer`,按对应接口的响应约定判断结果。
|
||||
|
||||
Reference in New Issue
Block a user