showModal
Show a modal dialog and return the confirmation, cancellation, and input result.
Declaration
java
void showModal(SUDOPCommonStateHandle handle, SUDOPShowModalParams params);This is a host callback on SUDOPWrappedClient. Register the implementation with registerWrappedClient. Perform the operation and report success or failure once through the SDK-supplied handle. Perform view and window operations on the Android main thread.
SUDOPShowModalParams
| Field | Type | Description |
|---|---|---|
title | String | Title |
content | String | Message |
showCancel | boolean | Show the cancel button |
cancelText | String | Cancel label, up to 4 characters |
cancelColor | String | Cancel text color as a hexadecimal color string |
confirmText | String | Confirm label, up to 4 characters |
confirmColor | String | Confirm text color as a hexadecimal color string |
editable | boolean | Show a text input |
placeholderText | String | Input placeholder |
Result
Call handle.success(dataJson) on success or handle.failure(retCode, retMsg) on failure, with a nonzero error code.
json
{"confirm":true,"cancel":false,"content":"text"}confirm and cancel identify the selected button. Selecting Cancel is a normal result, not an operation failure. content contains the input text.
Handle type: global.sud.op.runtime.client.SUDOPCommonStateHandle。
The parameter type is in global.sud.op.runtime.core.model.
