multiple additions and fixes for the Java APIs

Stuff needed for WhatsApp support
This commit is contained in:
Julian Winkler
2024-06-24 18:44:31 +02:00
committed by Mis012
parent ef77bb287a
commit 3c5a21357d
53 changed files with 357 additions and 43 deletions

View File

@@ -47,9 +47,13 @@ public class AlertDialog extends Dialog implements DialogInterface {
public AlertDialog.Builder setNegativeButton (CharSequence text, DialogInterface.OnClickListener listener) {
System.out.println("AlertDialog.Builder setNegativeButton called with text: '" + text + "'");
dialog.setButton(DialogInterface.BUTTON_NEGATIVE, text, listener);
return this;
}
public AlertDialog.Builder setNegativeButton(int textId, DialogInterface.OnClickListener listener) {
return setNegativeButton(dialog.getContext().getText(textId), listener);
}
public AlertDialog.Builder setCancelable(boolean cancelable) {
return this;
@@ -95,5 +99,10 @@ public class AlertDialog extends Dialog implements DialogInterface {
public AlertDialog create() {
return dialog;
}
public AlertDialog show() {
dialog.show();
return dialog;
}
}
}