> > Probably not the most efficient way to do things... but it works on all >> devices that I have used... Not neat.. but hey, it works. xD > > > boolean quitOnBack = false; public void onBackPressed() { if (quitOnBack) > { finish(); } else { quitOnBack = true; Toast.makeText(this, "Press {Back} > again to quit.", Toast.LENGTH_SHORT).show(); new Thread() { @Override > public void run() { try { Thread.sleep(2500); } catch (Exception e) { } > quitOnBack = false; } }.start(); } } >
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en