Example #1
0
 @Override
 public void onBackPressed() {
   if ((System.currentTimeMillis() - currentTime) > 3000) {
     ToastUtils.show(this, "再按一次退出程序");
     currentTime = System.currentTimeMillis();
   } else {
     this.finish();
     super.onBackPressed();
   }
 }
Example #2
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
 }
Example #3
0
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   mDrawerToggle.onConfigurationChanged(newConfig);
 }
Example #4
0
 @Override
 protected void onPostCreate(Bundle savedInstanceState) {
   super.onPostCreate(savedInstanceState);
   mDrawerToggle.syncState();
 }