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