All Products
Search
Document Center

Mobile Platform as a Service:Input dialog

Last Updated:Jan 23, 2026

AUInputDialog (formerly APInputDialog) provides a dialog box containing a title, body, Confirm and Cancel buttons, and an input box.

Preview

image

API reference

    /**
     * Constructs an AUInputDialog based on the input parameters.
     *
     * @param context The context object.
     * @param title The title.
     * @param msg The message.
     * @param positiveString The text for the confirm button.
     * @param negativeString The text for the cancel button.
     * @param isAutoCancel Specifies whether to automatically close the dialog box when a user taps the area outside the dialog box.
     */
    public AUInputDialog(Context context, String title, String msg, String positiveString,
            String negativeString, boolean isAutoCancel)

    /**
     * Gets the cancel button.
     */
    public Button getCancelBtn();

    /**
     * Gets the confirm button.
     */
    public Button getEnsureBtn();

    /**
     * Gets the title TextView.
     */
    public TextView getTitle();

    /**
     * Gets the message TextView.
     */
    public TextView getMsg();

    /**
     * Gets the LinearLayout of the bottom buttons.
     */
    public LinearLayout getBottomLayout();

    /**
     * Gets the root RelativeLayout of the dialog box.
     */
    public RelativeLayout getDialogBg();

    /**
     * Sets the listener for the confirm button.
     */
    public void setPositiveListener(OnClickPositiveListener listener);

    /**
     * Sets the listener for the cancel button.
     */
    public void setNegativeListener(OnClickNegativeListener listener);

    /**
     * Gets the input box EditText.
     */
    public AUEditText getInputContent() {
        return inputContent;
    }

    /**
     * Starts and displays the dialog.
     */
    public void show();

Code example

    AUInputDialog dialog = new AUInputDialog(this, "Title text", "Helper text",
                "Confirm", "Cancel", true);
        dialog.show();