summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorsjtufs <[email protected]>2013-08-29 18:19:29 +0800
committersjtufs <[email protected]>2013-08-29 18:19:29 +0800
commitbcebb79d624bcf8d3f93346de6f597e3c9fc88ba (patch)
tree07946763ec3b1e3857883968c01a72b031bd52aa /client
parent4c25c040f5f47b7b5cf055b7bba787da3f50a1d9 (diff)
fix #27
Diffstat (limited to 'client')
-rw-r--r--client/Piztor/src/com/macaroon/piztor/AlertMaker.java23
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Main.java2
2 files changed, 23 insertions, 2 deletions
diff --git a/client/Piztor/src/com/macaroon/piztor/AlertMaker.java b/client/Piztor/src/com/macaroon/piztor/AlertMaker.java
index cc70e62..63382bb 100644
--- a/client/Piztor/src/com/macaroon/piztor/AlertMaker.java
+++ b/client/Piztor/src/com/macaroon/piztor/AlertMaker.java
@@ -96,7 +96,7 @@ public class AlertMaker {
mapMaker.DrawMarker(markerPoint);
else {
Toast toast = Toast.makeText(context,
- "Too early! Give me at least 2 minutes!", Toast.LENGTH_LONG);
+ "Too early!Give me more time!", Toast.LENGTH_LONG);
toast.show();
closeBoard(context);
showMarkerAlert(markerPoint);
@@ -108,4 +108,25 @@ public class AlertMaker {
markerDialog.show();
}
+ public void showQuitAlert() {
+
+ AlertDialog.Builder quitDialog = new AlertDialog.Builder(context);
+ closeBoard(context);
+ quitDialog.setTitle("Quit");
+ quitDialog.setMessage("Do you want to logout and quit?");
+ quitDialog.setPositiveButton("Quit",
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ AppMgr.exit();
+ }
+ });
+ quitDialog.setNegativeButton("Cancel",
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.cancel();
+ }
+ });
+ quitDialog.show();
+ }
+
}
diff --git a/client/Piztor/src/com/macaroon/piztor/Main.java b/client/Piztor/src/com/macaroon/piztor/Main.java
index be01c6a..3e8a939 100644
--- a/client/Piztor/src/com/macaroon/piztor/Main.java
+++ b/client/Piztor/src/com/macaroon/piztor/Main.java
@@ -425,7 +425,7 @@ public class Main extends PiztorAct {
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
- AppMgr.exit();
+ alertMaker.showQuitAlert();
return true;
}
return super.onKeyDown(keyCode, event);