mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 00:32:55 +08:00
Merge pull request #263 from infil00p/master
Fix the back button on jsConfirm
This commit is contained in:
commit
1377f60b29
@ -931,7 +931,7 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
AlertDialog.Builder dlg = new AlertDialog.Builder(this.ctx);
|
AlertDialog.Builder dlg = new AlertDialog.Builder(this.ctx);
|
||||||
dlg.setMessage(message);
|
dlg.setMessage(message);
|
||||||
dlg.setTitle("Confirm");
|
dlg.setTitle("Confirm");
|
||||||
dlg.setCancelable(false);
|
dlg.setCancelable(true);
|
||||||
dlg.setPositiveButton(android.R.string.ok,
|
dlg.setPositiveButton(android.R.string.ok,
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
@ -944,6 +944,12 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
result.cancel();
|
result.cancel();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
dlg.setOnCancelListener(
|
||||||
|
new DialogInterface.OnCancelListener() {
|
||||||
|
public void onCancel(DialogInterface dialog) {
|
||||||
|
result.cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
dlg.create();
|
dlg.create();
|
||||||
dlg.show();
|
dlg.show();
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user