Skip to content

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 ​

FieldTypeDescription
titleStringTitle
contentStringMessage
showCancelbooleanShow the cancel button
cancelTextStringCancel label, up to 4 characters
cancelColorStringCancel text color as a hexadecimal color string
confirmTextStringConfirm label, up to 4 characters
confirmColorStringConfirm text color as a hexadecimal color string
editablebooleanShow a text input
placeholderTextStringInput 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.