Skip to main content

DevicePopups

Namespace: Wisej.Hybrid

Assembly: Wisej.Hybrid

Provides methods to show popups.

public class DevicePopups

Access this class through the Device singleton.

Constructors

Instance memberDevicePopups()

Initializes a new instance of DevicePopups.

Methods

Instance memberDisplayActionSheet(title, cancel, destruction, direction, buttons)

Displays a native platform action sheet, allowing the application user to choose from several buttons.

ParameterTypeDescription
titleStringTitle of the displayed action sheet. Must not be null.
cancelStringText to be displayed in the 'Cancel' button. Can be null to hide the cancel action.
destructionStringText to be displayed in the 'Destruct' button. Can be null to hide the destructiveoption.
directionFlowDirectionThe flow direction of the items.
buttonsString[]Text labels for additional buttons. Must not be null.

Returns: String. The selected button.

Instance memberDisplayAlert(title, message, cancel)

Presents an alert dialog to the application user with a single cancel button.

ParameterTypeDescription
titleStringThe title of the alert dialog.
messageStringThe body text of the alert dialog.
cancel optionalStringText to be displayed on the 'Cancel' button.

Instance memberDisplayPrompt(title, message, accept, cancel, placeholder, maxLength, keyboard, initialValue)

Shows a modal prompt.

ParameterTypeDescription
titleStringThe title of the prompt
messageStringThe message of the prompt
accept optionalStringThe accept button text
cancel optionalStringThe cancel button text
placeholder optionalStringThe text placeholder
maxLength optionalInt32The maximum length of the text
keyboard optionalKeyboardThe keyboard to use
initialValue optionalStringThe initial text value

Returns: String. The result of the prompt.