Working with Lists

How you work with and display lists is independent of list type. Factors include managing and displaying list items, the content of list titles, element selection, and so on. This section covers those pieces of advice.

MIDP Implementors

Recommend: Java graphics bulb2_icon.gif Publish your policy decisions, such as text display and the size of graphics you permit in lists. This way, app developers can take them into account when they create their MIDlets.

Managing List Elements

A list can contain one or more elements, each of which can be comprised of text, a graphic, or both. The app developer provides the list elements and can insert, delete, update, select, and deselect list elements as needed. (See Programming Wireless Devices with the Java 2 Platform, Micro version [17] for information on the List API.)

app Developers

Strongly Recommend: Java graphics bulb1_icon.gif Do not change a list's contents while the list is visible, except in response to a user action, such as selecting an element. Making arbitrary changes while the user is interacting with the list is disorienting, but users understand context-sensitive screens that change in response to their actions.

Recommend: Java graphics bulb2_icon.gif Do not change a list's selection while the list is visible. It is possible to change which list element is selected, even while the list screen is visible, but it can be disorienting. For example, the highlighting could appear to jump around on the screen. Odd behavior like this can result in user errors.

Displaying Lists

When users are required to traverse elements on the screen in order to reach the one they want, the device must provide a visual indicator of the user's current position (or focus). In exclusive- and multiple-choice lists, a highlight can indicate the user's focus without indicating selection. For example, in Screenshot if the user selects Save, the selections indicated by the check-box graphic, not the highlight, will be saved.

Screenshot Highlighting That Shows Focus, Not Selection

Java graphics 05fig02.gif


In implicit lists, a highlight indicates both the user's focus and element selection. For example, in Screenshot if the user presses the Select button, the action will be carried out on the selection indicated by the highlight.

Screenshot Highlighting That Shows Focus and Selection

Java graphics 05fig03.gif


MIDP Implementors

Consider: Use a visual indicator to show that a list element in an exclusive- or multiple-choice list is selected. Radio buttons and check boxes are commonly used for this purpose.

Strongly Recommend: Java graphics bulb1_icon.gif If you use a graphic, such as a radio button to indicate that a list element is selected, its size should be consistent with the policy of your device. For usability, it should be at least 12 pixels high by 12 pixels wide.

Strongly Recommend: Java graphics bulb1_icon.gif Do not extend a list element's highlighting over any associated graphic or image. A highlight extending over a graphic or image, especially when the highlight reverses the foreground and background (reverse video), can result in a confusing visual display. It can be difficult to determine the state of the graphic when it has been reversed. Users can make mistakes if it is not clear whether the highlighted item is selected. Screenshot shows that, when the graphic is not highlighted, the user's selection is clear.

Screenshot No Reverse-Video Highlighting on the Graphic or Image

Java graphics 05fig04.gif


List Titles

app Developers

Recommend: Java graphics bulb2_icon.gif As shown Screenshot, use the title of the list screen to tell users what they need to do on the screen.

Screenshot Screen Title That Instructs Users

Java graphics 05fig05.gif


Element Selection

MIDP Implementors

Strongly Recommend: Java graphics bulb1_icon.gif You must provide a way for users to select list elements. If your device has a dedicated hardware Select or Go key, use it for the select operation. If your device does not have a dedicated key, you must provide another method, such as using a soft-key or touch-screen input.

Recommend: Java graphics bulb2_icon.gif If you use a soft key for the select operation, consider providing a label of Select for exclusive-choice lists; a label of Mark or Unmark for multiple-choice lists; and either the MIDlet's label or a label of Select or Go if the MIDlet doesn't provide a label for an implicit list. (The MIDP 2.0 Specification [19] recommends that app developers label commands associated with implicit lists. See "Implicit Lists" on page 48 for more information.)

Strongly Recommend: Java graphics bulb1_icon.gif Notify the app of a user's selection when the user indicates that the selection is final.

Text Handling

apps can suggest a preferred text-handling method for a list element's contents. Possible methods are:

  • TEXT_WRAP_OFF: text element contents should be limited to a single line.
  • TEXT_WRAP_ON: text element contents should be wrapped to multiple lines if necessary to fit available content space.
  • TEXT_WRAP_DEFAULT: the implementation should use its default behavior.
MIDP Implementors

Strongly Recommend: Java graphics bulb1_icon.gif Choose and publish the default text-handling method for your device.

Strongly Recommend: Java graphics bulb1_icon.gif If an element requests TEXT_WRAP_OFF, you might have to shorten its contents to fit on a line. If you shorten the text, give users a visual indication, such as an ellipsis, to indicate that the text has been clipped.

Recommend: Java graphics bulb2_icon.gif If an element requests TEXT_WRAP_OFF and the contents don't fit on a line, provide a way for users to see the full element contents. This may be done, for example, by using a special pop-up window or by auto-scrolling the text of the element that has focus.

Consider: You can limit the number of lines that a text element is permitted to use, even if the element requests TEXT_WRAP_ON. For example, you could decide that an element can use at most five lines. (Choose the actual number based on the size of your display.) If an element exceeds your limit, consider handling the contents in the same way that you handle elements with TEXT_WRAP_OFF.

app Developers

Recommend: Java graphics bulb2_icon.gif Use TEXT_WRAP_DEFAULT whenever possible so that the implementation can display your list elements in a way that meets the expectations of device users.

Consider: Use TEXT_WRAP_OFF to enable users to easily scan list elements with contents that are not under your control, such as a list of email subject lines.



   
Comments