Android: added customizable messages to exit dialog
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7689 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
38eb3de309
commit
f230997d93
@ -47,6 +47,15 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
|
|||||||
*/
|
*/
|
||||||
protected ConfigType eglConfigType = ConfigType.FASTEST;
|
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 OGLESContext ctx;
|
||||||
protected GLSurfaceView view;
|
protected GLSurfaceView view;
|
||||||
@ -200,10 +209,10 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
|
|||||||
{
|
{
|
||||||
AlertDialog dialog = new AlertDialog.Builder(AndroidHarness.this)
|
AlertDialog dialog = new AlertDialog.Builder(AndroidHarness.this)
|
||||||
// .setIcon(R.drawable.alert_dialog_icon)
|
// .setIcon(R.drawable.alert_dialog_icon)
|
||||||
.setTitle("Do you want to exit?")
|
.setTitle(exitDialogTitle)
|
||||||
.setPositiveButton("Yes", AndroidHarness.this)
|
.setPositiveButton("Yes", AndroidHarness.this)
|
||||||
.setNegativeButton("No", 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();
|
.create();
|
||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user