"Technical Sangrah" provide 100% real authentic information about technology Like- mobile, computer, laptop, application, camera and more electronic gadgets.
เค เคเคฐ เคเคช เคाเคนเคคे เคนैं เคी User Back เคเคฐे เคคो เคชिเคเคฒे Page เคชเคฐ เคเคฒा เคाเคฏे เคเคฐ เค เคเคฐ Last Page เค เคाเคฏे เคคो User เคธे เคชूเคे "Are you sure. You want to close this app" เคเคฐ Yes or No เคा option เค เคाเคฏे! เคคो เคจिเคे เคเคธเคा Process เคฆिเคฏा เคเคฏा เคนै! 1. เคจिเคे เคฎें เคฆिเค เคเค Code เคो MainActivity.java ( app > java > domain > MainActivity.java ) เคฎें Image เคฎे เคฆिเคाเค เคนुเค เคธ्เคฅाเคจ เคชเคฐ Paste เคीเคिเคฏे! //set back button functionality @Override public void onBackPressed () { //if user presses the back button do this if ( webview .isFocused() && webview .canGoBack()) { //check if in webview and the user can go back webview .goBack() ; //go back in webview } else { //do this if the webview cannot go back any further new AlertDialog.Builder( this ) //alert the person knowing they are about to close .setTitle( "EXIT" ) .setMessage( "Are you sure. You want to close this app?" ) .setPositiveButton( "Yes" , new DialogInterface...
Comments
Post a Comment