private long firstTime = 0;
public void onBackPressed() {
// super.onBackPressed();
if (System.currentTimeMillis()-firstTime>=2000) {
Toast.makeText(this, "再按一次退出程序", Toast.LENGTH_SHORT).show();
firstTime=System.currentTimeMillis();
}else {
finish();
}
}