@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if(keyCode == KeyEvent.KEYCODE_BACK){
if(System.currentTimeMillis() -lastback >2000){
ToastUtils.showToast("请再按一次退出");
lastback = System.currentTimeMillis();
}else {
finish();
}
return false;
}
return super.onKeyDown(keyCode, event);
}