@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && KJActivityManager.create().getCount() < 2) { ViewInject.create().getExitDialog(this); } return super.onKeyDown(keyCode, event); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); KJActivityManager.create().addActivity(this); setRootView(); // 必须放在annotate之前调用 AnnotateUtil.initBindView(this); // 必须放在initialization之前调用 initialize(); registerBroadcast(); }
@Override protected void onDestroy() { super.onDestroy(); unRegisterBroadcast(); KJActivityManager.create().finishActivity(this); }