public static void ExitApp(Context context) { if ((System.currentTimeMillis() - exitTime) > 2000) { Toast.makeText(context, "再按一次退出程序", Toast.LENGTH_SHORT).show(); exitTime = System.currentTimeMillis(); } else { ActivityMeg.getInstance().exit(); } }
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.main); // System.out.println("==================" // + deleteDatabase("rcpBrithday.db")); // VMRuntime.getRuntime() // .setTargetHeapUtilization(TARGET_HEAP_UTILIZATION); UmengUpdateAgent.setOnDownloadListener(null); UmengUpdateAgent.update(this); // VMRuntime.getRuntime().setMinimumHeapSize(CWJ_HEAP_SIZE); ActivityMeg.getInstance().addActivity(this); tabhostInit(); viewInit(); new Thread(this).start(); }