Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions packages/core/ui/dialogs/index.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function showDialog(builder: android.app.AlertDialog.Builder) {

if (color) {
const buttons: android.widget.Button[] = [];
for (let i = 0; i < 3; i++) {
for (let i = 0; i < 4; i++) {
const id = dlg
.getContext()
.getResources()
Expand Down Expand Up @@ -82,7 +82,7 @@ function addButtonsToAlertDialog(alert: android.app.AlertDialog.Builder, options
dialog.cancel();
callback(true);
},
})
}),
);
}

Expand All @@ -94,7 +94,7 @@ function addButtonsToAlertDialog(alert: android.app.AlertDialog.Builder, options
dialog.cancel();
callback(false);
},
})
}),
);
}

Expand All @@ -106,15 +106,15 @@ function addButtonsToAlertDialog(alert: android.app.AlertDialog.Builder, options
dialog.cancel();
callback(undefined);
},
})
}),
);
}
alert.setOnDismissListener(
new android.content.DialogInterface.OnDismissListener({
onDismiss: function () {
callback(false);
},
})
}),
);
}

Expand All @@ -132,14 +132,14 @@ export function alert(arg: any): Promise<void> {
dialog.cancel();
resolve();
},
})
}),
);
alert.setOnDismissListener(
new android.content.DialogInterface.OnDismissListener({
onDismiss: function () {
resolve();
},
})
}),
);

showDialog(alert);
Expand All @@ -158,7 +158,7 @@ export function confirm(arg: any): Promise<boolean> {
okButtonText: DialogStrings.OK,
cancelButtonText: DialogStrings.CANCEL,
message: arg + '',
}
}
: arg;
const alert = createAlertDialog(options);

Expand Down Expand Up @@ -345,7 +345,7 @@ export function action(...args): Promise<string> {
onClick: function (dialog: android.content.DialogInterface, which: number) {
resolve(options.actions[which]);
},
})
}),
);
}

Expand All @@ -357,7 +357,7 @@ export function action(...args): Promise<string> {
dialog.cancel();
resolve(options.cancelButtonText);
},
})
}),
);
}

Expand All @@ -370,7 +370,7 @@ export function action(...args): Promise<string> {
resolve('');
}
},
})
}),
);

showDialog(alert);
Expand Down