Dialog boxes

Use dialog boxes to perform the following actions:

  • Prompt users for information that is required to complete a user-initiated task.
  • Inform users of urgent information or the status of important actions.
  • Warn users of unexpected or potentially destructive conditions or situations.

Dialog boxes are modal; they interrupt the normal operation of the BlackBerry device. A dialog box includes a message, buttons that allow users to perform an action, and an indicator that indicates the type of dialog box. The size of the dialog box depends on the size of the BlackBerry device screen. The theme that users select on their BlackBerry device determines the visual style of the dialog box.

This illustration shows the elements of a dialog box.

Best practice: Implementing dialog boxes

  • Be concise and try to avoid making users scroll in a dialog box. Include scroll arrows if your dialog box message or buttons cannot be displayed fully in the dialog box. If you use standard components, scroll arrows appear automatically if necessary.
  • Always allow users to use the Escape key to close a dialog box.
  • If users press the End/Power key when a dialog box appears on an application screen, display the Home screen or application list. If users return to the application, display the dialog box again.

Guidelines for layout

  • Use standard BlackBerry dialog boxes where possible so that you do not have to adjust the layout of each dialog box for each supported screen size.
  • Create dialog boxes that are up to, but not greater than, 90% of the width and height of the screen. If you use standard BlackBerry dialog boxes, the BlackBerry device automatically calculates the appropriate size for dialog boxes.
  • Center the dialog box on the screen. Make sure that the width of the dialog box is at least half the width of the screen. If you use standard BlackBerry dialog boxes, the BlackBerry device centers the dialog box and adjusts the width of the dialog box automatically.
  • Center the dialog box indicator vertically with the dialog box message.
  • Use a standard indicator that is appropriate for the type of dialog box (for example, use an exclamation point (!) indicator in an alert dialog box). Avoid using multiple indicators in a dialog box.
  • Display messages to the right of the indicator and above any buttons. In right-to-left languages, display messages to the left of the indicator.
  • If you give users the option to not show a dialog box again, include a check box in the dialog box and match the alignment of the check box with the alignment of the dialog box message. Use the label "Don't show again". Place the check box above the buttons. The check box should be checked by default, unless the dialog box displays a message with critical information for users.

Guidelines for messages

  • Be specific. If possible, use one short sentence to clearly state the reason for displaying the dialog box and, if necessary, the actions that can dismiss it.
  • Consider the user's context. You might not need to provide as much detail in your message. For example, if a user cannot save a picture, use "The media card is full." instead of "The file could not be saved because the media card is full."
  • Use vocabulary that users understand. For example, use "The media card is full" instead of "Error writing file to disk."
  • Use positive language where possible and avoid blaming the user. Never write messages that blame users for errors or unexpected conditions. Instead, focus on the actions that users can take to resolve the issue. For example, use " Please close some applications to free up resources, then try again." instead of "Low memory error. Please try again."
  • Use complete sentences for messages where possible.
  • Use the second person (you, your) to refer to users.
  • Use sentence case capitalization.

Guidelines for laying out buttons

  • For the default button, use the button that users are most likely to click. Avoid using a button that is associated with a destructive action as the default button. Exceptions to this rule are those cases where users initiate a minor destructive action (such as deleting a single item) and the most common user action is to continue with the action.
  • Avoid using more than three buttons in a dialog box. If there are more than three, consider using an application screen instead with radio buttons.
  • Use buttons to confirm or cancel actions in dialog boxes. Place buttons for confirmation actions first. For example, place "Save" before "Discard" or "Cancel."
  • In most cases, place buttons vertically in the dialog box. The vertical layout allows buttons to expand to accommodate localized button labels. You can place OK and Cancel buttons horizontally in a dialog box if you need to reduce the amount of vertical space. If you place OK and Cancel buttons horizontally, make sure that OK appears before Cancel, except in right-to-left languages.
  • On BlackBerry devices with a touch screen, add 1.5 mm of space between buttons. Since buttons have padding, the actual space between buttons is approximately 2 mm. If you use standard BlackBerry dialog boxes, the BlackBerry device automatically adds the additional space between buttons.
  • Center-align buttons in dialog boxes. Make the width of each button identical. For BlackBerry devices with a screen width that is greater than the height, at a minimum, make sure that the width of the buttons is 60% of the width of the dialog box. For BlackBerry devices with a screen width that is less than the height, at a minimum, make sure that the width of the buttons is 70% of the width of the dialog box. If you use standard BlackBerry dialog boxes, the BlackBerry device automatically adjusts the width of the buttons.
  • On BlackBerry devices with a physical keyboard, provide shortcut keys for buttons. Typically, the shortcut key is the first letter of the button label.

Guidelines for button labels

  • Use clear, concise labels.
  • Use one-word labels where possible.
  • Avoid using the labels "Yes" and "No." Use verbs that describe the associated action (for example, "Cancel," "Delete," "Discard," or "Save"). This approach helps users quickly and easily understand what happens when they click the button. If necessary, include more descriptive text elsewhere on the screen (for example, in an application message).
  • Use "Cancel" to give users the option not to proceed with the associated action, or to stop an action in progress. Use "Close" if there is no associated action other than to dismiss the dialog box.
  • Avoid using symbols or graphics in labels.
  • Avoid using punctuation in labels.

Was this information helpful? Send us your comments.