MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / createAlertDialog

Function createAlertDialog

packages/core/ui/dialogs/index.android.ts:15–24  ·  view source on GitHub ↗
(options?: DialogOptions)

Source from the content-addressed store, hash-verified

13}
14
15function createAlertDialog(options?: DialogOptions): android.app.AlertDialog.Builder {
16 const alert = new android.app.AlertDialog.Builder(androidUtils.getCurrentActivity(), options.theme ? options.theme : -1);
17 alert.setTitle(options && isString(options.title) ? options.title : '');
18 alert.setMessage(options && isString(options.message) ? options.message : '');
19 if (options && options.cancelable === false) {
20 alert.setCancelable(false);
21 }
22
23 return alert;
24}
25
26function showDialog(builder: android.app.AlertDialog.Builder) {
27 const dlg = builder.show();

Callers 4

alertFunction · 0.85
confirmFunction · 0.85
promptFunction · 0.85
loginFunction · 0.85

Calls 1

isStringFunction · 0.70

Tested by

no test coverage detected