boolean doubleBackToExitPressedOnce = false;@Overridepublic void onBackPressed() { if (doubleBackToExitPressedOnce) { super.onBackPressed(); return; } this.doubleBackToExitPressedOnce = true; Toast.makeText(this, "Please click BACK again to exit", Toast.LENGTH_SHORT).show(); new Handler().postDelayed(new Runnable() { @Override public void run() { doubleBackToExitPressedOnce=false; } }, 2000);}
Senin, 05 Februari 2018
Doeble Tab to Close Your Apps
you can copy this code to your project
Langganan:
Posting Komentar (Atom)
how to update playonlinux? || bagaimana update playonlinux di linux mint
open terminal wget -q "http://deb.playonlinux.com/public.gpg" -O - | sudo apt-key add - sudo wget http://deb.playonlinux.com/pla...
-
Selamat membaca sahabat semua semoga bermanfaat..!!! oke kali ini saya akan membuat sebuah tutorial Install dan Upload git yang mana kita ...
-
assalamu'alaikum,, today I want to give you a way to make a audioview and videoview on a webview by using html code. and run on an and...
-
Berkata Maimun Bin Mihran Rahimahullah: «الصَّبْرُ صَبْرَانِ، الصَّبْرُ عَلَى الْمُصِيبَةِ حَسَنٌ، وَأَفْضَلُ مِنْ ذَلِكَ الصَّبْرُ عَن...
Tidak ada komentar:
Posting Komentar