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