public abstract class ActivityBase extends Activity {
public static final String TAG = "ActivityBase";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
protected void onDestroy() {
if (_activityControllers != null) {
for (int i = 0; i < _activityControllers.size(); i++) {
ControllerBase child = _activityControllers.get(i);
child.internal_gc();
}
_activityControllers = null;
}
unregisterEventBus();
super.onDestroy();
}
protected void registerEventBus() {
isRegisterEventBus = true;
EventBus.getDefault().register(this);
}
protected void unregisterEventBus() {
if (isRegisterEventBus){
EventBus.getDefault().unregister(this);
isRegis
android 之 activity 和 controller 架构设计
最新推荐文章于 2022-01-12 22:20:20 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)