mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Android: Fixed an issue where the AlertWindow's callback would never be called if AlertWindows were dismissed by clicking outside the alert's window on Android
This commit is contained in:
parent
665b0a3e3a
commit
d4e0ba0e4d
1 changed files with 27 additions and 6 deletions
|
|
@ -436,11 +436,18 @@ public class JuceAppActivity extends Activity
|
|||
builder.setTitle (title)
|
||||
.setMessage (message)
|
||||
.setCancelable (true)
|
||||
.setOnCancelListener (new DialogInterface.OnCancelListener()
|
||||
{
|
||||
public void onCancel (DialogInterface dialog)
|
||||
{
|
||||
JuceAppActivity.this.alertDismissed (callback, 0);
|
||||
}
|
||||
})
|
||||
.setPositiveButton ("OK", new DialogInterface.OnClickListener()
|
||||
{
|
||||
public void onClick (DialogInterface dialog, int id)
|
||||
{
|
||||
dialog.cancel();
|
||||
dialog.dismiss();
|
||||
JuceAppActivity.this.alertDismissed (callback, 0);
|
||||
}
|
||||
});
|
||||
|
|
@ -455,11 +462,18 @@ public class JuceAppActivity extends Activity
|
|||
builder.setTitle (title)
|
||||
.setMessage (message)
|
||||
.setCancelable (true)
|
||||
.setOnCancelListener (new DialogInterface.OnCancelListener()
|
||||
{
|
||||
public void onCancel (DialogInterface dialog)
|
||||
{
|
||||
JuceAppActivity.this.alertDismissed (callback, 0);
|
||||
}
|
||||
})
|
||||
.setPositiveButton (okButtonText.isEmpty() ? "OK" : okButtonText, new DialogInterface.OnClickListener()
|
||||
{
|
||||
public void onClick (DialogInterface dialog, int id)
|
||||
{
|
||||
dialog.cancel();
|
||||
dialog.dismiss();
|
||||
JuceAppActivity.this.alertDismissed (callback, 1);
|
||||
}
|
||||
})
|
||||
|
|
@ -467,7 +481,7 @@ public class JuceAppActivity extends Activity
|
|||
{
|
||||
public void onClick (DialogInterface dialog, int id)
|
||||
{
|
||||
dialog.cancel();
|
||||
dialog.dismiss();
|
||||
JuceAppActivity.this.alertDismissed (callback, 0);
|
||||
}
|
||||
});
|
||||
|
|
@ -481,11 +495,18 @@ public class JuceAppActivity extends Activity
|
|||
builder.setTitle (title)
|
||||
.setMessage (message)
|
||||
.setCancelable (true)
|
||||
.setOnCancelListener (new DialogInterface.OnCancelListener()
|
||||
{
|
||||
public void onCancel (DialogInterface dialog)
|
||||
{
|
||||
JuceAppActivity.this.alertDismissed (callback, 0);
|
||||
}
|
||||
})
|
||||
.setPositiveButton ("Yes", new DialogInterface.OnClickListener()
|
||||
{
|
||||
public void onClick (DialogInterface dialog, int id)
|
||||
{
|
||||
dialog.cancel();
|
||||
dialog.dismiss();
|
||||
JuceAppActivity.this.alertDismissed (callback, 1);
|
||||
}
|
||||
})
|
||||
|
|
@ -493,7 +514,7 @@ public class JuceAppActivity extends Activity
|
|||
{
|
||||
public void onClick (DialogInterface dialog, int id)
|
||||
{
|
||||
dialog.cancel();
|
||||
dialog.dismiss();
|
||||
JuceAppActivity.this.alertDismissed (callback, 2);
|
||||
}
|
||||
})
|
||||
|
|
@ -501,7 +522,7 @@ public class JuceAppActivity extends Activity
|
|||
{
|
||||
public void onClick (DialogInterface dialog, int id)
|
||||
{
|
||||
dialog.cancel();
|
||||
dialog.dismiss();
|
||||
JuceAppActivity.this.alertDismissed (callback, 0);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue