Esempio n. 1
0
 @Override
 public void onBackPressed() {
   long curTime = System.currentTimeMillis();
   if (curTime - lastTime < 1500) {
     super.onBackPressed();
     FileUtil.saveFile(ContextUtil.getContext(), FileUtil.FILE_COMPANY, Company.getInstance());
   } else {
     ContextUtil.toast("再按一次退出!");
     lastTime = curTime;
   }
 }
Esempio n. 2
0
 @Override
 protected void onSaveInstanceState(Bundle outState) {
   super.onSaveInstanceState(outState);
   outState.putSerializable("company", Company.getInstance());
 }