Start Prototyping

Each scene in a webOS application is very similar to a page in website design, or a view controller in a desktop application. In the previous example, you learned how to structure your application and when you should open a new card to display a scene in vs. when you should display scenes in the current card.

Now you're ready to start designing the scenes you will use in your application. Scenes commonly contain things like a Header, a Scroll View, one or more buttons in the Command Menu area, and other commands in the Application Menu. The webOS platform contains the Mojo Framework, which provides you with many UI controls you can use in each of your scenes. Use the ones you need in order to provide your users with tools they will need to succeed while using your application.

Headers and Commands

Scrolling Header

This is the area at the top of the scene containing the title, and may include other controls or information (like at the top of an email message). A scrolling header scrolls out of view when the user scrolls the scene. If a header does not need to remain in place, use a scrolling header. Implemented using the palm-page-header framework class.

image

Fixed Header

This is the area at the top of the scene containing the title. A fixed header never moves. When the user scrolls content in the scene, it scrolls under the Fixed Header. Implemented using the palm-header framework class.

image

View Menu

A View Menu automatically displays a Fixed Header with a pop-up menu. The items in the pop-up menu in the right-side area control the contents in the scroll view below. Implemented using Mojo.Menu.viewMenu.

image

Command Buttons

These buttons appear in the Command menu area at the bottom of a scene. Use command buttons for the most important actions performed in a scene. Buttons can display text labels, icons, or both. Maximum five buttons fit comfortably in the Command menu area. Try to use fewer if you can to keep the UI simple and uncluttered. Implemented using Mojo.Menu.commandMenu.

Tips: To create Command Button icons, make a 32 by 64 px (W x H) PNG file (24 bit/pixel RGB with a 1-bit alpha channel). Draw a 24 by 24 px monochrome image in the top 32 px for the unpressed state, and draw 24 by 24 px for the Pressed state in the lower 32 px.

image

Application Menu Items

You can insert additional commands in the Application menu in each scene. You can also add submenus, if needed. Keep command names short and use title capitalization (like for a book) when naming them. Implemented using Mojo.Menu.appMenu.

By default, the Application menu includes:

  • Edit:

    • The first menu item in all scenes.
    • Contains the Cut, Copy, and Paste submenu commands.
    • Enabled when interacting with a text field.
  • Scene-based commands:

    • An application can insert items into the Application menu. Try to add no more than four commands. If adding more than four, the user has to scroll the menu list.

    • Keep command names short and direct, and use title capitalization for the titles.

  • Preferences and Accounts:
    • Appears in every scene's Application menu when there are preferences and/or account settings used to connect to one or more services.

    • If there are no preferences or account settings, exclude this menu item from the Application menu in all scenes.

    • If your application has either Preferences or Accounts, include the command in all scenes and name it either "Preferences" or "Accounts." If your application has both Preferences and Accounts, display "Preferences" first, followed "Accounts."

  • Help:

    • Opens the Help feature for your application.

image

If a command has choices (e.g., the Edit command), use the Sub-menu feature. To display the sub-menu items, tap the sub-menu name.

image

Text and Buttons

Title

This is static text in a scene that serves as a title. Implemented using palm-body-title style.

Body Text

This is static text that explains something in a scene, such as the text in the bottom half of the example. Implemented using palm-body-text style.

image

Information Text

This is static text that provides further information about a control in a scene, such as the text regarding "New contacts ..." in the example. Implemented using palm-info-text style.

image

Text Field

This is an entry field that a user can enter, select, copy, and paste text. There are three variations. Implemented using the Mojo.Widget.TextField.

Set attributes on a text field to set single line versus multi-line, autoTruncation, autoGrow, and more. When an entry field is active, press the Sym key to display a pop-up that displays special characters. Vertically scroll through the list, and tap one of the characters to insert it. The animation on the right shows a field that autoGrows when entering more content and a single-line text field that autoTruncates after committing to a value.

image

Rich Text Fields

This is an entry field that a user can enter, select, copy, and paste text. In addition, the user can apply bold, italic, underline, and color formatting to the text. Implemented using the Mojo.Widget.RichTextEdit.

image

Password Field

This is an entry field that only displays the character you just typed. It displays all previously-typed characters as dots. The last character automatically turns into a dot after a few seconds. Implemented using the Mojo.Widget.PasswordField.

image

Push Button

Use a push button when the user needs to trigger an action. When pressing a button, it appears "pushed" in and then returns to its unpressed state. Implemented using the Mojo.Widget.Button.

There are various types of standard buttons, such as Primary/Secondary buttons, Affirmative/Negative buttons (for constructive/destructive actions), and so on.

image

Value Selectors

Checkbox

This is a control that turns a value on or off. It appears as a box with two states: unchecked ("off") and checked ("on"). Implemented using the Mojo.Widget.Checkbox.

When labeling a checkbox, use words or phrases that clearly indicate what the on and off state means. For example, "Display alerts" makes sense on a checkbox because the "on" state means "display alerts" and "off" means "do not display alerts." Use checkboxes anywhere in a scene. To display several of them, it helps to display one checkbox per line in a palm-list control for easy tapping of the checkbox target.

image

Segmented Buttons

Use a segmented button to offer users a set of options (buttons) where only one may be chosen at a time. Segmented buttons are displayed in a group. Implemented using the Mojo.Widget.RadioButton.

Examples: In the first segmented button group, the pressed button is Small and it appears pressed in. Pressing another button causes Small to reset to an unpressed state and that next pressed button to appear pressed in. In the second segmented button group, the pressed button is Female.

image

Toggle Button

This is a control that turns something on or off. They look like traditional switches, and have two states: on and off. Implemented using the Mojo.Widget.ToggleButton.

When labeling a toggle button, use words or phrases that clearly indicate each state. For example, the label "Wi-Fi" makes sense on a toggle that looks like a switch (you can turn that service on/off).

image

MultiToggle Button

This is a control that toggles between multiple states. Successive presses cycle through the options. The Music application is a good example. Load some music files, press Shuffle All, and then tap the icon in the lower right-side corner. It toggles between three states: Play all songs once, Repeat all, and Repeat 1 song.

image

Command Button Groups

This is a set of two or more command buttons displayed together, and only one can be pressed at a time. Command button groups set the context of a scene or set the value in a controller. Implemented by adding a Menu Group to the Command Menu area, and then adding menu commands or icons to the group. The example shows how the Calendar application uses this group for switching among the Day, Week, and Month View. Implemented using Mojo.Menu.commandMenu with icons in a Menu Group.

image

Pop-Up Menu

This is a menu that pops up when tapped, and displays a set of available choices where only one can be chosen. Implemented using the Mojo.Widget.ListSelector.

Example: Used in Contacts. Edit a contact and enter a phone number. Tap the inline pop-up menu to declare what kind of phone number this is (e.g., home, work, etc.).

image

Date Picker

This is a set of pop-up menus that appear next to each other displaying the options for month, day, and year. Tap on each menu to choose a value, or type while the focus is on the control and enter a value by using the keyboard. Implemented using the Mojo.Widget.DatePicker.

image

Time Picker

This is a set of pop-up menus that appear next to each other displaying the hours and minutes with an AM/PM picker. Tap on each menu to choose a value, or type while the focus is on the control and enter a value by using the keyboard. Implemented using the Mojo.Widget.TimePicker.

image

Integer Picker

This is a pop-up menu that contains a set of numeric values. You set the minimum and maximum values. Tap the menu to choose a value, or type while the focus is on the control and enter a value by using the keyboard. Implemented using the Mojo.Widget.IntegerPicker.

Slider

This is a horizontal slider with a control knob that you tap and drag to the desired location. Specify the minimum (left side) and maximum (right side) values. Optionally indicate intermediate choices that trigger additional behavior. Implemented using the Mojo.Widget.Slider.

image

Lists

List

This is a list that displays a set of available choices where only one can be tapped. Tap an item to select it (serving as a single-selection list) or trigger an action (acting as a selector). Implemented using the Mojo.Widget.List, with contents in palm-rows, and by using various options including:

  • Add another item to the list
  • Alphabetical dividers
  • Drag to reorder items
  • Static or expandable/collapsible dividers
  • Swipe to delete items

A row can have a single touchable item or multiple elements, each of which processes a tap differently. In a simple list, the entire row is touchable and leads to a scene where details are displayed (like in the first scene in the Tasks app). In more complex designs, each row can contain several different elements. Example: at a movie website, each row might contain a thumbnail of the movie (touchable, to watch the trailer), followed by two lines of information to the right (Movie name on line one, Rating on line two, not touchable so user can easily flick to scroll) and a button to the right, which the user taps to read details about the movie.

image

Multiple Selection List

This is a list that displays a set of available choices where more than one can be chosen. Tap the item to selects it. Implemented using the Mojo.Widget.List using palm-list, with a checkbox in each palm-row.

image

Group Box

This is a list that is enclosed in a border. Most group boxes have titles, but they are optional. Commonly implemented using the Mojo.Widget.List using the palm-group attribute.

image

Filter List

This is a control that includes an entry field and a list. Typing in the entry field filters the list to show only the items that match. Use attributes in the FilterList widget to specify how to display the results. Implemented using the Mojo.Widget.FilterList.

Example: In Contacts, with a full list of contacts displayed, begin typing on the keyboard. The list is filtered based on the typed entry.

image

Filter Field

This is a control that accepts text input and passes it to any specified list. Implemented using the Mojo.Widget.FilterField using the palm-group attribute. Use the Filter Field to process the text the user enters, and display the results however you want.

image

Visual Organizers

Advanced applications may contain lots of different UI controls, which require organization. The webOS SDK provides controls that you can use to organize controls within a scene.

Dividers

A divider is composed of a simple line or a label with a horizontal line to its right. There is a variety of display styles. They are used as a header for a group of information.

Example: An alphabetical list of contacts, where each divider has a letter to organize contacts by their last names.

Implemented using the Mojo.Widget.List using the divider attributes.

image

Collapsible Dividers

A collapsible divider has a label followed by a horizontal line and then a button. Tap the button to open and display items under that divider, and then tap again to close it. Implemented using the Mojo.Widget.List using the divider attributes.

Example: Open the Email application. That app uses collapsible dividers in its first scene to allow a user to hide/show all of the mail folders under each account.

image

Drawers

This is an item that shows and hides the items contained within it. Implemented using the Mojo.Widget.Drawer.

Examples:

  • The Email application allows users to hide and show the folders (displayed in a List) under each Email Account divider.

  • The Application Menu contains an Edit command that displays its submenu items for Cut, Copy, and Paste using a Drawer.

  • The Contacts application allows users to "link" multiple contact profiles together to collect all of the information you have about a person from multiple sources into a single contact record.

image

Connecting to Data and Services

This allows your application to make intelligent use of data and services from other applications on the platform.

People Picker

This allows your application to display a list of records from the Contacts application, allowing the user to add/associate/use their data in your application. It auto-filters a typed list, or you can scroll through the list to select a person. Implemented using the Mojo.Widget.PeoplePicker.

Example: In the Contacts Application, launch Contacts and tap a person for whom you have information coming in from two different accounts (Corporate Server and Facebook®). The example on the right shows a person named Shar Bannett. Tap the picture icon, and then tap "Link more profiles" (the list you see is a People Picker). Type letters using the keyboard to filter down the list to match what you type. Choose another profile to attach to the current contact (Shar Bannett).

image

File Picker

The file picker is a full-screen compound element that allows the user to attach or choose one or more files for use in your application. The Email application uses this to allow users to browse files for attaching to an email message. By default, it shows every file type and provides controls for selecting them (e.g., pictures, movies, songs, and files). You can specify criteria if you want the file picker to only include specific kinds of files for use in your application. Implemented using the Pickers.

image

Media Player

The Media Player is a full-screen widget that allows the user to play media files by using standard controls within the context of another application. For example, opening a music attachment in an email or a music file in the browser. This widget opens a new scene in the current window. Implemented using the Video Playback API.

image

WebView

This is a control that allows you to embed an object that displays Web content in a scene. It can take over the entire scene or be rendered in a frame of a fixed size. It can display content from an external URL or URL-addressible local content. Implemented using the Mojo.Widget.WebView.

ImageView

This is a control that allows you to display one or more images. Provides support for panning, zooming, and navigating from one image to the next. Implemented using the Mojo.Widget.ImageView.

The Application Menu

The Application Menu allows you to create special menus that appear in each scene. This is a very powerful concept. The Application menu is a dynamic menu that contains the following menu items by default:

  • Edit, which is always the first menu command
  • Preferences & Accounts, if applicable for your application
  • Help

Adding Commands

You can insert each scene's special commands between Edit and Preferences & Accounts on a scene-by-scene basis. You can add up to 4 additional commands to the Application menu comfortably. If you add more, the user will have to scroll to find the rest of the commands. We recommend against this. Also be aware that you can add a submenu item in the Application menu. Each sub-menu can contain a set of commands. The webOS platform contains a sub-menu: the Edit menu, which contains the Cut, Copy and Paste commands.

Command names should be written in title case and include an ellipses (...) if the user must take further action after selecting that menu item to complete the named task. For example, a menu item named "Add Bookmark..." which opens a dialog that must be completed before the bookmark is added should have ellipses. A menu item named "Bookmarks" which opens a new scene containing bookmarks should not have ellipses, since once that new scene is opened, the named action is complete.

The menu for a given screen may change depending on the state of the application and view.

  • Items may change their visual state to represent enabled and disabled states.

  • Items may be suppressed entirely when not relevant.

As a general guideline, applications should show a menu action in the disabled state when:

  • That action is commonly available in the circumstances in which it appears currently. For example, most applications can be deleted in the launcher. Applications that cannot be deleted should show the delete menu action in a disabled state, instead of suppressing the action entirely.

  • It's important to communicate the fact that that action would be available, but is not available in the current circumstances.

Applications should suppress a menu action entirely when:

  • Even though that action may be available in other similar circumstances, it's not expected that the action will always be available. For example, a "share" menu action may be commonly available in detail views, but the fact that it appears in the Photos application does not set a precedent for it to appear in the Videos application.

  • Users will not expect the action to be available.

Other reasons why menus for a given screen may change include:

  • Items may be replaced by different items. For example, the speakerphone icon might be replaced by a Bluetooth submenu when the device is connected to a Bluetooth device.

  • Item's internal state may change. For example, I might have an image that changes to reflect the ambient light, or how much the accelerometer is bouncing.

The Edit menu item is always present, to preserve menu layout for faster scanning. However it may be disabled (grayed out) depending on the state of the scene. Submenu commands (Cut, Copy, and Paste) may be enabled, depending on the state of the page and the clipboard. If all submenu commands are disabled, then the Edit menu is disabled (and does not open).

  • Paste is only enabled if the clipboard contains data that the scene's current focus can accept.

    This is currently limited to text (on the clipboard) and focused text edit fields (in the scene).

  • Copy is only enabled if text is selected, or if an app decides to expose it's entire scene as a text equivalent. For example, a contact detail card may push a text version of its content to the clipboard in response to a Copy command.

  • Cut is only enabled if text is selected in an editable field.

Providing Feedback

Dialog Boxes

This displays a message in a dialog panel when your application needs the user to make a decision so it can continue. A Dialog Panel rises from the bottom of the current scene, and is attached to it. It can be displayed when your application is in the foreground, or when minimized to a card.

image

Progress

Display a Progress or an Activity Indicator if a process is going to take two seconds or more to complete.

Progress Indicators

Display a progress indicator when you know the timing length of the task and the amount that has completed. It displays the amount of a task that is currently complete, given the task's entire length. There are several kinds of progress indicators, which are:

  • Progress Pill -- Use this when you need to show download progress, loading from a database or progress during a long operation, and you know approximately how long the task will take. The horizontal bar in the pill updates as the task progresses. Tap the X to cancel the task. Implemented using the Mojo.Widget.ProgressPill.

  • Progress Slider -- Commonly used in audio/video applications where you know how long the content is, want the user to know where they are in the playback process, and allow them to control it. The tracking slider moves as the content plays. Drag it to move the "playback head" or tap anywhere along the slider to reposition it there directly. Implemented using the Mojo.Widget.ProgressSlider.

  • Progress Bar — Display this control when you need to show the progress of a task (e.g., launching, initializing, etc.) and you know approximately how long it will take. The progress bar simply shows progress. It does not allow the user to cancel the task. Implemented using the Mojo.Widget.ProgressBar.

  • Inline Progress Bar — Commonly used in lists that display the names of song files. Allows the user to tap the list item and hear a preview of the item

    image

Activity Indicators

Display an activity indicator when you cannot make a reasonable guess as to how long a task might take. An activity indicator spins indefinitely, letting the user know that the application is making progress, but gives no indication as to how much progress has been made or how much more work remains to be done. They come in large and small sizes, and can be displayed in many situations. They are implemented using the Mojo.Widget.Spinner.

Where When Example
In a menu item When the user presses a command that must be processed, like when turning Wi-Fi on.
In a button When the user presses the button to log in to an email account for the first time.
In the notification bar When the system gathers data from the email account for the first time.
In a list When it may take awhile before the displaying the tapped item. Display a small spinner in the tapped row. If tapping anything else on the screen could cause performance or the response time to worsen, display an intermediate "progress" scene that displays the progress with regard to the tapped item instead. Avoid simply displaying a large spinner over the list.

Errors

Report an error when the problem impacts the user experience and the application cannot resolve the issue quickly on its own. Consider the recommendations in the following table.

Topic Recommendation
Banner notification Use this location when the user only needs to know about the problem, but does not need to take action.
Dialog panel Use this location when the application cannot continue without a decision by the user.

When writing the message and naming the buttons, remember to phrase the message as concisely as possible so the user understands the issue and what actions they can take. Also, avoid the word "please," negative phrases (e.g., "invalid account" or "wrong password"), and technical phrases (e.g., "server error" or "timed out"). A good example is "Try again." Provide buttons that make it simple to take corrective actions. Use verbs or phrases for the button titles that correspond directly to the language used in the message. If any of the actions are destructive, use the "destructive" button style and provide a CANCEL button.
Inline message Use this location to display an error alert icon and a message in the scene, under the tapped item that generated the problem. If multiple items contributed to the problem (e.g., incorrect username and password), display a single message summarizing how the user can correct the problem.

Notifications

The webOS platform allows applications to display messages at any time and, most important, display them in an area that doesn't interrupt or intrude upon the work that they're currently doing. Your app can display banner notifications and dashboard summaries in these kind of situations:

  • When your app is running (but is minimized) or is a "Dashboard App"

    Display Banner Notifications to let users know when your app does something you think they should know about. The notification will appear at the bottom of the screen. It will not overlay the application the user is currently using. It will minimize to a dashboard summary icon a few seconds later.

  • When your app is maximized (running and is frontmost):

    Use Banner Notifications to provide users with status when they use your application to begin a lengthy process that can continue in the background, while the user does other things in your application.

    Example: Imagine you're using the Email app and it's currently set to display email from one of your personal accounts (like AOL, Google, etc). Then you add your work email account, which connects to your company's corporate "Exchange" mail server. It can take awhile to connect to that account for the first time and copy the important information to your phone. Email could display connection and download status as banner notifications to show the user how the app is progressing, and would still allow the user to read email from their personal account.

Banner Notifications appear under the current application and usually consists of a dashboard summary icon followed by a message. The Messaging application does this when running in the background and someone sends you a text message. It displays a dashboard summary icon on the left, followed by the sender's ID and a portion of the text message.

Displaying Banner Notifications is optional. Some applications (like Email) have a preference the user can set to display banner notifications, and it is off by default. Email simply displays the dashboard summary icon on the right immediately instead.

image

Dashboard Summary

If your application displays a Banner Notification, it disappears after a few seconds and slides to the right, representing the notification using a dashboard summary icon. The example shows two dashboard summary icons: one from Messaging and another from Email.

image

Tap a dashboard summary icon and the Dashboard View appears, displaying detailed information about each dashboard item. When displayed, the user can flick each dashboard item to the right to dismiss it or tap any part to open it. Your app is responsible for the icons and text displayed in Dashboard Summary items.

The example on the right shows two Dashboard Summary items: one that represents a single item (incoming text message from Geoff) and another that represents many items (30 emails). If your application processed a single event that should be reported, display it as a single tapable item in the dashboard. If your application has accumulated multiple items while running in the background, display them using two tap targets, similar to the way the Email app displayed its Dashboard Summary Item. Tap the part on the right to open the most current item or tap the part on the left to see the list of emails.

image

Pop-Up Notification

If your application really needs to get the user's attention while it is in the background, use a Pop-up Notification message. It slides up from the bottom of the screen and displays the options available to the user.

Example: Using one application (like Web) and a Calendar Alarm goes off. The Calendar app displays a reminder, which the user must interact with before it is dismissed. The HP webOS platform displays Pop-up Notification, too. You can see one when plugging a USB cable into your phone and computer. The Pop-up Notification asks what you want to do, mount the phone as a USB drive or simply charge the device. You are responsible for designing and implementing the UI that appears in Pop-up Notifications. When you design them, make them as small as possible and never exceed more than half of the screen's height.

image

Dashboard Applications

"Dashboard applications" are apps that provide a service of some kind (e.g., stock ticker, current weather, surf report) and don't need a very elaborate UI in order to do so. Applications like this typically have a single card that users use to configure the service and Dashboard Notifications, Dashboard Summary Icons and Popup Notifications to display information in when its time.

Dashboard apps must have an application icon and some kind of UI manifestation so users can:

  • configure the application, in order to determine what the app should display and when

  • be notified when important information arrives or events occur

    • notifications, dashboard summary icons and dashboard items, in which to display important information

    • popup notifications, in which to display urgent information

  • quit the application

Layout and Customization

The visual elements of the webOS platform were designed to make it very easy to make a great looking application with any extra effort. By default, your application will have a light gray background and will display text and controls that contrast properly against that background. Furthermore, they were created at sizes that ensure their touchability and visibility.

When the webOS controls and fonts were chosen, the designers kept the following things in mind:

  • Control sizes and layouts were optimized for "touchability"

    Ensures that controls are the right size, and that hit targets are set so each item can be tapped successfully

  • Controls and text were designed to ensure an appropriate amount of "whitespace" around each control

    Ensures that controls are spaced properly, for optimal readability.

  • Colors and Font sizes were chosen and are used consistently to communicate specific messages, such as:

    • enabled vs disabled states, which indicate which items can be tapped (enabled) vs. those that cannot (disabled)

    • which buttons are of primary vs. secondary importance, or constructive vs. destructive

      Dark gray buttons to indicate the primary action, and lighter gray buttons are used for other actions.

      Red button are used to indicate actions that are destructive. Green buttons indicate that an action is constructive (or positive).

If your application uses a light-colored background with dark text/controls, the default controls and text colors should work very well for you. If your application uses a dark-colored background with light text/controls, use the palm-dark styled controls and text. Some of the applications Palm ships on the phone use the palm-dark controls (Music, Videos).

image
Default Style

image
Dark Style

If you want to customize the look of your application, here are some things you can do:

  • Change the backdrop

    Sometimes a simple change like this can make a world of difference for your application. Add your new backdrop and use either the default or palm-dark style controls with it. Chances are, the text and button styles in one of those styles will work very well against your backdrop.

  • Fonts

    In order to provide a consistent User Experience and ensure readability, Palm uses certain font sizes for certain kinds of text. It's okay to adjust the font colors to work with your look and feel, but do not change the font sizes. If you customize your font colors:

    • Make sure that colors you choose for contrast properly against your background.

    • Be sure that you the colors you choose properly convey the right information.

      Enabled items use colors that contrast highly against the background (example: white text against a black background).

      Disabled items use colors that have lower contrast against their background (gray text against a black background).

Layout

Because webOS devices report their orientation, your application can take advantage of this information and display the contents of its scenes differently when the user rotates the device from portrait orientation to landscape orientation and back. If you want your application to respond to rotation changes, set the size of the elements in your scenes so they "do the right thing" when the device is rotated.

image
Landscape Orientation

image
Portrait Orientation

The "Style Matters" application responds to rotation, as you can see in the example above. This application did this by setting the size of their scene elements "flexibly" (rather than by using fixed heights or widths). For instance, the width of the header and list is set to occupy 100% of the width of the screen, and the height of the header is not set at all. Setting heights and widths flexibly makes it possible for the scene to display content intelligently, making the most of whatever screen height or width is available at any time.