From f230997d932cec1ff6961bb34af2d132df816b00 Mon Sep 17 00:00:00 2001 From: "kim..ng" Date: Wed, 22 Jun 2011 17:26:27 +0000 Subject: [PATCH] Android: added customizable messages to exit dialog git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7689 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/android/com/jme3/app/AndroidHarness.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/engine/src/android/com/jme3/app/AndroidHarness.java b/engine/src/android/com/jme3/app/AndroidHarness.java index de00a8504..36397338b 100644 --- a/engine/src/android/com/jme3/app/AndroidHarness.java +++ b/engine/src/android/com/jme3/app/AndroidHarness.java @@ -46,7 +46,16 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt * ConfigType.BEST is RGBA8888 or better if supported by the hardware */ protected ConfigType eglConfigType = ConfigType.FASTEST; - + + /** + * Title of the exit dialog, default is "Do you want to exit?" + */ + protected String exitDialogTitle = "Do you want to exit?"; + /** + * Message of the exit dialog, default is "Use your home key to bring this app into the background or exit to terminate it." + */ + protected String exitDialogMessage = "Use your home key to bring this app into the background or exit to terminate it."; + protected OGLESContext ctx; protected GLSurfaceView view; @@ -200,10 +209,10 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt { AlertDialog dialog = new AlertDialog.Builder(AndroidHarness.this) // .setIcon(R.drawable.alert_dialog_icon) - .setTitle("Do you want to exit?") + .setTitle(exitDialogTitle) .setPositiveButton("Yes", AndroidHarness.this) .setNegativeButton("No", AndroidHarness.this) - .setMessage("Use your home key to bring this app into the background or exit to terminate it.") + .setMessage(exitDialogMessage) .create(); dialog.show(); }